r40583 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40582‎ | r40583 | r40584 >
Date:16:37, 7 September 2008
Author:mkroetzsch
Status:old
Tags:
Comment:
setting to enable experimental refresh job, for users without command line access
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Settings.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SMWAdmin/SMW_SpecialSMWAdmin.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/SMWAdmin/SMW_SpecialSMWAdmin.php
@@ -33,7 +33,7 @@
3434 }
3535
3636 public function execute($par = null) {
37 - global $wgOut, $wgRequest;
 37+ global $wgOut, $wgRequest, $smwgAdminRefreshStore;
3838 global $wgServer; // "http://www.yourserver.org"
3939 // (should be equal to 'http://'.$_SERVER['SERVER_NAME'])
4040 global $wgScript; // "/subdirectory/of/wiki/index.php"
@@ -69,7 +69,7 @@
7070 flush();
7171 return;
7272 }
73 - } elseif ($action=='refreshstore') { // not accessible via UI yet, testing
 73+ } elseif ($smwgAdminRefreshStore && ($action=='refreshstore')) { // not accessible via UI yet, testing
7474 $dbw =& wfGetDB( DB_MASTER );
7575 // delete existing iteration jobs
7676 $dbw->delete( 'job', array( 'job_cmd' => 'SMWRefreshJob' ), __METHOD__ );
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Settings.php
@@ -363,4 +363,22 @@
364364 //$smwgRAPPath = '/another/example/path/rdfapi-php';
365365 ##
366366
367 -
 367+###
 368+# If the following is set to true, the wiki can be completely refreshed calling
 369+# calling the URL
 370+#
 371+# http://your.wiki.org/index.php/Special:SMWAdmin?action=refreshstore
 372+#
 373+# This will create a job that will trigger a complete refresh of the whole wiki,
 374+# repairing all data. The refreshing will take some time and new jobs will be
 375+# created again and again over the cause of the action. The only way to stop the
 376+# process currently is to delete all SMW jobs from the database table "job".
 377+# When called twice, the above *resets* the job and starts anew, so it might be
 378+# good to disable this setting again after the job has been created (this will
 379+# not stop the running job).
 380+#
 381+# This is an experimental feature that may not yet work reliably. Use at your
 382+# own risk, and report any problems (see INSTALL on reporting bugs).
 383+##
 384+$smwgAdminRefreshStore = false;
 385+##

Status & tagging log