projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
force client side encodings at POST time.
[platal.git]
/
bin
/
search.rebuild_db.php
diff --git
a/bin/search.rebuild_db.php
b/bin/search.rebuild_db.php
index
86faa7d
..
ed73b28
100755
(executable)
--- a/
bin/search.rebuild_db.php
+++ b/
bin/search.rebuild_db.php
@@
-1,7
+1,7
@@
-#!/usr/bin/php
4
-q
+#!/usr/bin/php
5
-q
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
4
Polytechnique.org *
+ * Copyright (C) 2003-200
6
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-24,15
+24,17
@@
require('./connect.db.inc.php');
require('user.func.inc.php');
ini_set('memory_limit', "16M");
require('user.func.inc.php');
ini_set('memory_limit', "16M");
-
$globals->xdb->
execute('DELETE FROM search_name');
+
XDB::
execute('DELETE FROM search_name');
-$res =
$globals->xdb->
iterRow('SELECT auth_user_md5.user_id, nom, prenom, nom_usage, profile_nick FROM auth_user_md5 LEFT JOIN auth_user_quick USING(user_id)');
+$res =
XDB::
iterRow('SELECT auth_user_md5.user_id, nom, prenom, nom_usage, profile_nick FROM auth_user_md5 LEFT JOIN auth_user_quick USING(user_id)');
$i = 0;
$i = 0;
-$muls = array(1,
1,1,
0.2);
+$muls = array(1,
1, 1,
0.2);
while ($tmp = $res->next()) {
$uid = array_shift($tmp);
_user_reindex($uid, $tmp, $muls);
while ($tmp = $res->next()) {
$uid = array_shift($tmp);
_user_reindex($uid, $tmp, $muls);
- printf
("%02.2f %%\n", ++$i*100/
$res->total());
+ printf
("\r%u / %u", ++$i,
$res->total());
}
}
+print "done\n";
+
?>
?>