Index: trunk/extensions/SemanticMediaWiki/specials/SMWAdmin/SMW_SpecialSMWAdmin.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | public function execute($par = null) { |
37 | | - global $wgOut, $wgRequest; |
| 37 | + global $wgOut, $wgRequest, $smwgAdminRefreshStore; |
38 | 38 | global $wgServer; // "http://www.yourserver.org" |
39 | 39 | // (should be equal to 'http://'.$_SERVER['SERVER_NAME']) |
40 | 40 | global $wgScript; // "/subdirectory/of/wiki/index.php" |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | flush(); |
71 | 71 | return; |
72 | 72 | } |
73 | | - } elseif ($action=='refreshstore') { // not accessible via UI yet, testing |
| 73 | + } elseif ($smwgAdminRefreshStore && ($action=='refreshstore')) { // not accessible via UI yet, testing |
74 | 74 | $dbw =& wfGetDB( DB_MASTER ); |
75 | 75 | // delete existing iteration jobs |
76 | 76 | $dbw->delete( 'job', array( 'job_cmd' => 'SMWRefreshJob' ), __METHOD__ ); |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Settings.php |
— | — | @@ -363,4 +363,22 @@ |
364 | 364 | //$smwgRAPPath = '/another/example/path/rdfapi-php'; |
365 | 365 | ## |
366 | 366 | |
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 | +## |