17 require_once SQ_SYSTEM_ROOT.
'/core/assets/system/tool/tool.inc';
46 parent::__construct($assetid);
62 $tool_info = $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($type_code);
63 $o->openSection($tool_info[
'name']);
65 $o->openField(
'Root Node');
66 asset_finder($type_code.
'_reindexing_root_assetid',
'');
67 echo
' <b>OR</b>';
70 $o->openField(
'System Wide');
71 check_box($type_code.
'_reindexing_root_folder');
72 echo translate(
'sch_reindex_all_assets');
93 if (isset($_REQUEST[$type_code.
'_reindexing_root_folder'])) {
94 $index_all = $_REQUEST[$type_code.
'_reindexing_root_folder'];
97 if ($index_all == 1) {
99 $vars = Array(
'root_assetid' => $GLOBALS[
'SQ_SYSTEM']->am->getSystemAssetid(
'root_folder'));
101 $root_assetid = $_REQUEST[$type_code.
'_reindexing_root_assetid'][
'assetid'];
102 $vars = Array(
'root_assetid' => $root_assetid);
106 $vars[
'contextid'] = $GLOBALS[
'SQ_SYSTEM']->getContextId();
108 $hh = $GLOBALS[
'SQ_SYSTEM']->getHipoHerder();
109 $hh->queueHipo(
'hipo_job_reindex', $vars,
'', SQ_PACKAGES_PATH.
'/search/hipo_jobs');
110 $url = $hh->runQueuedJobs();
111 if (!empty($url)) $o->setRedirect($url);