vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Call to undefined function? (https://vborg.vbsupport.ru/showthread.php?t=36798)

heretic 03-31-2002 03:19 PM

Call to undefined function?
 
After manuallyu upgrading, I get this when editing a post- the edit works, but it won't redirect back to the post...

any idea what's causing this?

Quote:

Fatal error: Call to undefined function: unindexpost() in /home/hosted/warpstorm/public_html/forum/editpost.php on line 263

Admin 03-31-2002 04:12 PM

What version did you upgrade FROM and TO? unindexpost() was changed throughout the 2.2.x line.

(See, this is why you shouldn't upgrade manually unless you know exactly what's going on :))

heretic 03-31-2002 08:01 PM

2.2.1 to 2.2.3, then I went from there to 2.2.4

Admin 04-01-2002 03:45 AM

OK stick this in your functions.php:
Code:

// ###################### Start unindexpost #######################
function unindexpost($postid,$title="",$pagetext="") {
        global $DB_site;

        // get the data
        if ($pagetext=="") {
                $post=$DB_site->query_first("SELECT postid,threadid,title,pagetext FROM post WHERE postid='$postid'");
        } else {
                $post['postid']=$postid;
                $post['title']=$title;
                $post['pagetext']=$pagetext;
        }

        // get word ids from table
        $allwords=$post['title']." ".$post['pagetext'];
        $allwords=preg_replace("/[\n\t\r,]/s"," ",$allwords);
        $allwords=preg_replace("/(\.+)($| |\n|\t)/s", " ", $allwords);
        $allwords=str_replace("[", " [", $allwords);
        $allwords=str_replace("]", "] ", $allwords);
        $allwords=preg_replace("/[\(\)\"':;\[\]?!#{}_\-+\\\\]/s","",$allwords);
        $allwords=strtolower(trim(str_replace("  "," ",$allwords)));
        if ($titlewords)
                $allwords.=" ".$titlewords;
        $wordarray=explode(" ",$allwords);

        $getwordidsql="title IN ('".str_replace(" ","','",$allwords)."')";
        $words=$DB_site->query("SELECT wordid,title FROM word WHERE $getwordidsql");

        $wordids="";
        while ($word=$DB_site->fetch_array($words)) {
                $wordids .= ',' . $word[wordid];
        }

        // delete em!
        $DB_site->query("DELETE FROM searchindex WHERE wordid IN (0$wordids) AND postid=$post[postid]");

}



All times are GMT. The time now is 12:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01112 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete