X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fsearch.rebuild_db.php;h=5e43d31ad12fceeeadadb295960c696f8d13df6b;hb=fdf0eca063baf13cb3f30b1c276d65f9687d5527;hp=cd7e56c9335dbc9429ab88010c8a13101823080f;hpb=684195f33b11e3067200dd3a9e14304bd7d04463;p=platal.git diff --git a/bin/search.rebuild_db.php b/bin/search.rebuild_db.php index cd7e56c..5e43d31 100755 --- a/bin/search.rebuild_db.php +++ b/bin/search.rebuild_db.php @@ -20,17 +20,17 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -require('./connect.db.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 pid FROM profiles'); $i = 0; $n = $res->total(); -while ($pid = $res->next()->fetchOneCell()) { - Profile::rebuildSearchTokens($pid); +while ($pid = $res->next()) { + Profile::rebuildSearchTokens(intval($pid[0])); printf("\r%u / %u", ++$i, $n); }