r106720 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106719‎ | r106720 | r106721 >
Date:23:22, 19 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Pull lockfile into settings

Add a couple of \n
Modified paths:
  • /trunk/tools/rotatebot/rotbot.php (modified) (history)
  • /trunk/tools/rotatebot/settings.php (modified) (history)
  • /trunk/tools/rotatebot/upload.php (modified) (history)

Diff [purge]

Index: trunk/tools/rotatebot/rotbot.php
@@ -16,7 +16,6 @@
1717 */
1818
1919 include("settings.php");
20 -$myLockfile = $homedir."rotatebotlock";
2120
2221 ini_set('memory_limit', '100M'); //Speicher auf 100 MBytes hochsetzen
2322 ini_set('user_agent', $useragent);
@@ -1019,7 +1018,7 @@
10201019 if ($dontDieOnLockProblems) {
10211020 logfile("Could not get lock. Lock file already present. DontDieMode prevents death.");
10221021 } else {
1023 - die("Could not get lock. Lock file already present. Exit.");
 1022+ die("Could not get lock. Lock file already present. Exit.\n");
10241023 }
10251024 }
10261025 }
Index: trunk/tools/rotatebot/settings.php
@@ -17,3 +17,4 @@
1818 $katname = "";
1919 $cookies = array();
2020
 21+$myLockfile = '/tmp/rotatebotlock';
Index: trunk/tools/rotatebot/upload.php
@@ -70,7 +70,7 @@
7171 function wiki_upload_file ($filename_local,$filename_wiki,$license,$desc,$wiki,$cookies)
7272 {
7373 global $homedir;
74 - $file1 = file_get_contents($homedir . "cache/".$filename_local) or die("Fehler - Datei nicht gefunden! ($filename_local)");
 74+ $file1 = file_get_contents($homedir . "cache/".$filename_local) or die("Fehler - Datei nicht gefunden! ($filename_local)\n");
7575
7676 $data_l = array("file.file" => $file1,
7777 "wpDestFile" => $filename_wiki,

Status & tagging log