X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fsearch.rebuild_db.php;h=5e43d31ad12fceeeadadb295960c696f8d13df6b;hb=85d16d6a72eb7ea25cdaf73a025fbc78c0486767;hp=d506fa4dbc00bd4a97ea64d9793f0aaf9ebae756;hpb=fb813fb52d5ab65ca9a5b92b5cb9089523380d79;p=platal.git diff --git a/bin/search.rebuild_db.php b/bin/search.rebuild_db.php index d506fa4..5e43d31 100755 --- a/bin/search.rebuild_db.php +++ b/bin/search.rebuild_db.php @@ -20,18 +20,17 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -require('./connect.db.inc.php'); -require('user.func.inc.php'); +require './connect.db.inc.php'; -ini_set('memory_limit', "16M"); +ini_set('memory_limit', '16M'); $globals->debug = 0; // Do not store backtraces -$res = XDB::iterRow("SELECT user_id - FROM auth_user_md5"); +$res = XDB::iterRow('SELECT pid + FROM profiles'); $i = 0; $n = $res->total(); -while ($uid = $res->next()->fetchOneCell()) { - user_reindex($uid); +while ($pid = $res->next()) { + Profile::rebuildSearchTokens(intval($pid[0])); printf("\r%u / %u", ++$i, $n); }