Changeset View
Changeset View
Standalone View
Standalone View
orphanize.php
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | |||||
if( ! $wiki_uid ) { | if( ! $wiki_uid ) { | ||||
Log::error( "please choose the wiki! exit" ); | Log::error( "please choose the wiki! exit" ); | ||||
exit( 1 ); | exit( 1 ); | ||||
} | } | ||||
// wiki instance | // wiki instance | ||||
$wiki = Mediawikis::findFromUid( $wiki_uid ); | $wiki = Mediawikis::findFromUid( $wiki_uid ); | ||||
// load the wiki config | // try to load the wiki config | ||||
try { | |||||
wiki_config(); | wiki_config(); | ||||
} catch( \Exception $e ) { | |||||
// I don't have any clue about this but sometime happen | |||||
Log::error( sprintf( | |||||
"failed reading wiki configuration: %s", | |||||
$e->getMessage() | |||||
) ); | |||||
exit( 1 ); | |||||
} | |||||
// parameters available both from cli and on-wiki | // parameters available both from cli and on-wiki | ||||
$SUMMARY = option( 'summary', "Bot: pages orphanization" ); | $SUMMARY = option( 'summary', "Bot: pages orphanization" ); | ||||
$LIST_SUMMARY = option( 'list-summary', "Bot: orphanization list update" ); | $LIST_SUMMARY = option( 'list-summary', "Bot: orphanization list update" ); | ||||
$DONE_TEXT = option( 'done-text', "* [[Special:WhatLinksHere/$1]] - {{done}}" ); | $DONE_TEXT = option( 'done-text', "* [[Special:WhatLinksHere/$1]] - {{done}}" ); | ||||
$NS = option( 'ns' ); | $NS = option( 'ns' ); | ||||
$WARMUP = option( 'warmup', -1 ); | $WARMUP = option( 'warmup', -1 ); | ||||
$COOLDOWN = option( 'cooldown', 1000 ); | $COOLDOWN = option( 'cooldown', 1000 ); | ||||
▲ Show 20 Lines • Show All 395 Lines • Show Last 20 Lines |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register