[ Index ] |
|
Code source de Phorum 5.1.25 |
1 <?php 2 // rebuild meta-data 3 // this script rebuilds the meta-data for the messages 4 5 // this needs some time, please make sure that its really needed 6 // i.e. in case of errors, required updates etc. 7 8 // it only works with the mysql-layer. 9 10 // YOU NEED TO MOVE THIS SCRIPT TO YOUR PHORUM-DIRECTORY 11 12 define('phorum_page', 'rebuild_meta_data'); 13 14 if(!file_exists('./common.php')) { 15 echo "You didn't move this script to your phorum-directory!\n"; 16 exit(); 17 } 18 19 include './common.php'; 20 include './include/thread_info.php'; 21 22 if (! ini_get('safe_mode')) { 23 set_time_limit(0); 24 ini_set("memory_limit","64M"); 25 } 26 27 echo "Rebuilding meta-data ...\n"; 28 29 $conn = phorum_db_mysql_connect(); 30 31 // this should be enabled if you switched to utf-8 32 /* 33 mysql_query( "SET NAMES 'utf8'", $conn); 34 mysql_query( "SET CHARACTER SET utf8", $conn); 35 */ 36 37 $res = mysql_query("SELECT message_id, forum_id FROM {$PHORUM["message_table"]} WHERE parent_id = 0 and message_id = thread",$conn); 38 39 $rebuild = 0; 40 while($row = mysql_fetch_row($res)) { 41 $PHORUM['forum_id'] = $row[1]; 42 phorum_update_thread_info($row[0]); 43 $rebuild++; 44 } 45 46 flush(); 47 echo "$rebuild messages done.\n"; 48 echo "Rebuilding meta-data finished successfully if no errors were logged above.\n"; 49 50 51 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 12:22:27 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |