Southparkfan has uploaded a new change for review. https://gerrit.wikimedia.org/r/199281
Change subject: Replace absolute paths with relative paths ...................................................................... Replace absolute paths with relative paths Change-Id: Iafad594449a90e7aea99275430a4658581f4453c --- M bots/masters/bot-operator.php M bots/masters/rcreader.php M bots/slaves/bot-wmt-attacks.php M bots/slaves/bot-wmt-blocks.php M bots/slaves/bot-wmt-delete.php M bots/slaves/bot-wmt-es.php M bots/slaves/bot-wmt-fr-copyvio.php M bots/slaves/bot-wmt-fr.php M bots/slaves/bot-wmt-ko.php M bots/slaves/bot-wmt-newpages.php M bots/slaves/bot-wmt-ru.php M bots/slaves/bot-wmt-spambots.php M bots/slaves/irc-wmt-blocks-systemmessages-purge.php M bots/slaves/irc-wmt-delete-systemmessages-purge.php 14 files changed, 35 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/WMT refs/changes/81/199281/1 diff --git a/bots/masters/bot-operator.php b/bots/masters/bot-operator.php index 951b366..37c3514 100644 --- a/bots/masters/bot-operator.php +++ b/bots/masters/bot-operator.php @@ -17,8 +17,8 @@ $prefix = '/data/project/quentinv57-common/data/'; include $prefix . 'class/socket.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; -$bots_file = "/data/project/irc-wmt/bots.json"; // use SQL instead? +include __DIR__ . '/../include/config/irc_conf.php'; +$bots_file = __DIR__ . "/../../bots.json"; // use SQL instead? $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-op"; diff --git a/bots/masters/rcreader.php b/bots/masters/rcreader.php index 021d851..f0b28f0 100644 --- a/bots/masters/rcreader.php +++ b/bots/masters/rcreader.php @@ -7,13 +7,13 @@ $prefix = '/data/project/quentinv57-common/data/'; include $prefix . 'class/socket.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $socket = new Socket_server ( $sock_dir . "server.sock" ); // Getting the list of the wiki channels (wmirc) -$replica_mycnf = parse_ini_file( "/data/project/irc-wmt/replica.my.cnf" ); +$replica_mycnf = parse_ini_file( __DIR__ . "/../../replica.my.cnf" ); $mysql = new MySQLi ( 'ruwiki.labsdb', $replica_mycnf['user'], $replica_mycnf['password'], 'meta_p' ); unset( $replica_mycnf ); @@ -52,7 +52,7 @@ } // Include wikiset configuration -include '/data/project/irc-wmt/bots/include/config/wikisets.php'; +include __DIR__ . '/../include/config/wikisets.php'; $clients = array(); diff --git a/bots/slaves/bot-wmt-attacks.php b/bots/slaves/bot-wmt-attacks.php index 8292ee0..0e9641d 100644 --- a/bots/slaves/bot-wmt-attacks.php +++ b/bots/slaves/bot-wmt-attacks.php @@ -16,7 +16,7 @@ include $prefix . 'class/socket.class.php'; include $prefix . 'class/http.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-attacks"; @@ -59,7 +59,7 @@ #### #### ## Inclusion des fonctions, paramètres, etc. -$pref2 = '/data/project/irc-wmt/bots'; +$pref2 = __DIR__ . '/..'; include $pref2 . '/include/common-functions.php'; function array_all_optout ( $array, $optout ) @@ -103,7 +103,7 @@ // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-attacks.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/bot-wmt-blocks.php b/bots/slaves/bot-wmt-blocks.php index 067f4cc..59b7c09 100644 --- a/bots/slaves/bot-wmt-blocks.php +++ b/bots/slaves/bot-wmt-blocks.php @@ -15,7 +15,7 @@ include $prefix . 'class/socket.class.php'; include $prefix . 'class/http.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-blocks"; @@ -26,7 +26,7 @@ // The global changes are done on meta define( 'GLOBALCHANGES_WIKI', 'meta.wikimedia.org' ); -$pref2 = '/data/project/irc-wmt/bots/include'; +$pref2 = __DIR__ . '/../include'; define( 'SAVEFILE', $pref2 . '/config/irc-cvn-blocks-saved' ); define( 'MESSAGESFILE', $pref2 . '/messages/blocks.txt' ); @@ -94,7 +94,7 @@ $configdata = get_data_from_file( SAVEFILE ); // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-blocks.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/bot-wmt-delete.php b/bots/slaves/bot-wmt-delete.php index 050168c..abdac88 100644 --- a/bots/slaves/bot-wmt-delete.php +++ b/bots/slaves/bot-wmt-delete.php @@ -15,7 +15,7 @@ include $prefix . 'class/socket.class.php'; include $prefix . 'class/http.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-delete"; @@ -24,7 +24,7 @@ $arr_sock = array ( 'wikiset' => 'smallwikis' ); -$pref2 = '/data/project/irc-wmt/bots/include'; +$pref2 = __DIR__ . '/../include'; define( 'SAVEFILE', $pref2 . '/config/irc-cvn-delete-saved' ); define( 'MESSAGESFILE', $pref2 . '/messages/delete.txt' ); @@ -65,7 +65,7 @@ # $configdata = get_data_from_file(SAVEFILE); // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-delete.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/bot-wmt-es.php b/bots/slaves/bot-wmt-es.php index c87439a..8f0b270 100644 --- a/bots/slaves/bot-wmt-es.php +++ b/bots/slaves/bot-wmt-es.php @@ -14,7 +14,7 @@ $prefix = '/data/project/quentinv57-common/data/'; include $prefix . 'class/socket.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-es"; @@ -32,7 +32,7 @@ #### #### // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-es.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/bot-wmt-fr-copyvio.php b/bots/slaves/bot-wmt-fr-copyvio.php index a3596c1..1691084 100644 --- a/bots/slaves/bot-wmt-fr-copyvio.php +++ b/bots/slaves/bot-wmt-fr-copyvio.php @@ -16,7 +16,7 @@ include $prefix . 'class/http.class.php'; include $prefix . 'class/wikiapi.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $http = new Http; $wpapi = new Wikipediaapi ( 'fr.wikipedia.org' ); @@ -158,7 +158,7 @@ #### #### // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-fr-copyvio.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/bot-wmt-fr.php b/bots/slaves/bot-wmt-fr.php index f64c4e8..3696242 100644 --- a/bots/slaves/bot-wmt-fr.php +++ b/bots/slaves/bot-wmt-fr.php @@ -15,7 +15,7 @@ $prefix = '/data/project/quentinv57-common/data/'; include $prefix . 'class/socket.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-fr"; @@ -34,7 +34,7 @@ #### #### // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-fr.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/bot-wmt-ko.php b/bots/slaves/bot-wmt-ko.php index d81228b..bf4f533 100755 --- a/bots/slaves/bot-wmt-ko.php +++ b/bots/slaves/bot-wmt-ko.php @@ -15,7 +15,7 @@ $prefix = '/data/project/quentinv57-common/data/'; include $prefix . 'class/socket.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-ko"; @@ -34,7 +34,7 @@ #### #### // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-ko.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/bot-wmt-newpages.php b/bots/slaves/bot-wmt-newpages.php index 26848b7..272f555 100644 --- a/bots/slaves/bot-wmt-newpages.php +++ b/bots/slaves/bot-wmt-newpages.php @@ -15,7 +15,7 @@ $prefix = '/data/project/quentinv57-common/data/'; include $prefix . 'class/socket.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-newpages"; @@ -34,7 +34,7 @@ #### #### // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-newpages.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/bot-wmt-ru.php b/bots/slaves/bot-wmt-ru.php index de54b73..3537aeb 100644 --- a/bots/slaves/bot-wmt-ru.php +++ b/bots/slaves/bot-wmt-ru.php @@ -15,7 +15,7 @@ $prefix = '/data/project/quentinv57-common/data/'; include $prefix . 'class/socket.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-ru"; @@ -34,7 +34,7 @@ #### #### // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-ru.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/bot-wmt-spambots.php b/bots/slaves/bot-wmt-spambots.php index 3f3b0a4..4f6439a 100644 --- a/bots/slaves/bot-wmt-spambots.php +++ b/bots/slaves/bot-wmt-spambots.php @@ -15,7 +15,7 @@ $prefix = '/data/project/quentinv57-common/data/'; include $prefix . 'class/socket.class.php'; include $prefix . 'class/Irc.class.php'; -include '/data/project/irc-wmt/bots/include/config/irc_conf.php'; +include __DIR__ . '/../include/config/irc_conf.php'; $bot_channel_bots = "#wmt-bots"; $bot_channel = "#wmt-spambots"; @@ -161,7 +161,7 @@ #### #### // Connexion au serveur rcfeed -$sock_dir = "/data/project/irc-wmt/bots/tmp/sockets/"; +$sock_dir = __DIR__ . "/../tmp/sockets/"; $sock = new Socket_client ( $sock_dir . 'wmt-spambots.sock', $sock_dir . 'server.sock', $arr_sock ); diff --git a/bots/slaves/irc-wmt-blocks-systemmessages-purge.php b/bots/slaves/irc-wmt-blocks-systemmessages-purge.php index f578ce2..7bc0c73 100644 --- a/bots/slaves/irc-wmt-blocks-systemmessages-purge.php +++ b/bots/slaves/irc-wmt-blocks-systemmessages-purge.php @@ -23,7 +23,7 @@ ## Corps de programme // Getting the list of the wiki channels (wmirc) -$replica_mycnf = parse_ini_file( "/data/project/irc-wmt/replica.my.cnf" ); +$replica_mycnf = parse_ini_file( __DIR__ . "/../../replica.my.cnf" ); $mysql = new MySQLi ( 'zuwiki.labsdb', $replica_mycnf['user'], $replica_mycnf['password'], 'meta_p' ); unset( $toolserver_mycnf ); @@ -46,7 +46,7 @@ ksort ( $wmchannels, SORT_STRING ); // Ouverture fichier, etc. -$file = fopen( '/data/project/irc-wmt/bots/include/config/irc-cvn-blocks-systemmessages.txt', 'w' ); +$file = fopen( __DIR__ . '/../include/config/irc-cvn-blocks-systemmessages.txt', 'w' ); $http = new xHTTP; @@ -67,4 +67,4 @@ fclose ( $file ); -?> \ No newline at end of file +?> diff --git a/bots/slaves/irc-wmt-delete-systemmessages-purge.php b/bots/slaves/irc-wmt-delete-systemmessages-purge.php index efaccb1..bcc3aa3 100644 --- a/bots/slaves/irc-wmt-delete-systemmessages-purge.php +++ b/bots/slaves/irc-wmt-delete-systemmessages-purge.php @@ -23,7 +23,7 @@ ## Corps de programme // Getting the list of the wiki channels (wmirc) -$replica_mycnf = parse_ini_file( "/data/project/irc-wmt/replica.my.cnf" ); +$replica_mycnf = parse_ini_file( __DIR__ . "/../../replica.my.cnf" ); $mysql = new MySQLi ( 'zuwiki.labsdb', $replica_mycnf['user'], $replica_mycnf['password'], 'meta_p' ); unset( $toolserver_mycnf ); @@ -46,7 +46,7 @@ ksort ( $wmchannels, SORT_STRING ); // Ouverture fichier, etc. -$file = fopen( '/data/project/irc-wmt/bots/include/config/irc-cvn-delete-systemmessages.txt', 'w' ); +$file = fopen( __DIR__ . '/../include/config/irc-cvn-delete-systemmessages.txt', 'w' ); $http = new xHTTP; @@ -67,4 +67,4 @@ fclose ( $file ); -?> \ No newline at end of file +?> -- To view, visit https://gerrit.wikimedia.org/r/199281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iafad594449a90e7aea99275430a4658581f4453c Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/WMT Gerrit-Branch: master Gerrit-Owner: Southparkfan <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
