本文整理汇总了PHP中categories::optimize方法的典型用法代码示例。如果您正苦于以下问题:PHP categories::optimize方法的具体用法?PHP categories::optimize怎么用?PHP categories::optimize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类categories
的用法示例。
在下文中一共展示了categories::optimize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cleanCategories
function cleanCategories()
{
global $msg, $dbh, $charset, $PMBusername;
if ($deleted == "") {
$deleted = 0;
}
if (SESSrights & ADMINISTRATION_AUTH) {
$result .= "<h3>" . htmlentities($msg["nettoyage_suppr_categories"], ENT_QUOTES, $charset) . "</h3>";
$list_thesaurus = thesaurus::getThesaurusList();
foreach ($list_thesaurus as $id_thesaurus => $libelle_thesaurus) {
$thes = new thesaurus($id_thesaurus);
$noeud_rac = $thes->num_noeud_racine;
$r = noeuds::listChilds($noeud_rac, 0);
while ($row = mysql_fetch_object($r)) {
noeuds::process_categ($row->id_noeud);
}
}
//TODO non repris >> Utilité ???
// $delete = mysql_query("delete from categories where categ_libelle='#deleted#'");
$result .= $deleted . " " . htmlentities($msg["nettoyage_res_suppr_categories"], ENT_QUOTES, $charset);
$optn = noeuds::optimize();
$optc = categories::optimize();
} else {
$result .= sprintf($msg["planificateur_rights_bad_user_rights"], $PMBusername);
}
return $result;
}
示例2: urldecode
// if(!$iuse) {
// $deleted++ ;
// noeuds::delete($id_noeud);
// }
// }
//
//}
$v_state = urldecode($v_state);
if ($deleted == "") {
$deleted = 0;
}
print "<br /><br /><h2 align='center'>" . htmlentities($msg["nettoyage_suppr_categories"], ENT_QUOTES, $charset) . "</h2>";
$list_thesaurus = thesaurus::getThesaurusList();
foreach ($list_thesaurus as $id_thesaurus => $libelle_thesaurus) {
$thes = new thesaurus($id_thesaurus);
$noeud_rac = $thes->num_noeud_racine;
$r = noeuds::listChilds($noeud_rac, 0);
while ($row = mysql_fetch_object($r)) {
noeuds::process_categ($row->id_noeud);
}
}
//Nettoyage des informations d'autorités pour les sous collections
noeuds::delete_autority_sources();
$spec = $spec - CLEAN_CATEGORIES;
//TODO non repris >> Utilité ???
// $delete = mysql_query("delete from categories where categ_libelle='#deleted#'");
$v_state .= "<br /><img src=../../images/d.gif hspace=3>" . htmlentities($msg["nettoyage_suppr_categories"], ENT_QUOTES, $charset) . " : ";
$v_state .= $deleted . " " . htmlentities($msg["nettoyage_res_suppr_categories"], ENT_QUOTES, $charset);
$optn = noeuds::optimize();
$optc = categories::optimize();
print "<form class='form-{$current_module}' name='process_state' action='./clean.php' method='post'>\n\t\t\t\t<input type='hidden' name='v_state' value=\"" . urlencode($v_state) . "\">\n\t\t\t\t<input type='hidden' name='spec' value=\"{$spec}\">\n\t\t\t</form>\n\t\t\t<script type=\"text/javascript\"><!--\n\t\t\t\tdocument.forms['process_state'].submit();\n\t\t\t\t-->\n\t\t\t</script>";