r45453 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45452‎ | r45453 | r45454 >
Date:19:00, 6 January 2009
Author:harddisk
Status:deferred
Tags:
Comment:
added config.php
Modified paths:
  • /trunk/tools/alertbot/web/addwarn.php (modified) (history)
  • /trunk/tools/alertbot/web/config.php (added) (history)

Diff [purge]

Index: trunk/tools/alertbot/web/addwarn.php
@@ -51,13 +51,15 @@
5252 else
5353 $project=$language.".".$project;
5454
55 - $problem=$problem_correspond[$problem];
5655 if($problem=="other" || $problem=="parts")
57 - $problem.=$problem_other;
 56+ $problem=$problem_correspond[$problem].$problem_other;
 57+ else
 58+ $problem=$problem_correspond[$problem];
 59+
5860 $res=mysqli_query($mysql_link,"INSERT INTO `alertbot`.`alerts` (`id`, `time`, `reporter`, `project`, `affected`, `problem`, `state`) VALUES (NULL, CURRENT_TIMESTAMP, '".$_SERVER['REMOTE_ADDR']."', '$project', '".$level_correspond[$level]."', '".$problem."', '0');");
5961 if(mysqli_affected_rows($mysql_link)!=1)
6062 $msg.="Error occurred: ".mysqli_error($mysql_link)." (".mysqli_errno($mysql_link).")";
61 - $msg.="Thanks for your submission.<br />\r\n"."INSERT INTO `alertbot`.`alerts` (`id`, `time`, `reporter`, `project`, `affected`, `problem`, `state`) VALUES (NULL, CURRENT_TIMESTAMP, '".$_SERVER['REMOTE_ADDR']."', '$project', '".$level_correspond[$level]."', '".$problem."', '0');";
 63+ $msg.="Thanks for your submission.<br />\r\n";
6264 }
6365 $msg.="<a href='warning.php'>Back</a> to main page.";
6466 ?>
Index: trunk/tools/alertbot/web/config.php
@@ -0,0 +1,7 @@
 2+<?PHP
 3+ $mysql_host="localhost";
 4+ $mysql_user="";
 5+ $mysql_password="";
 6+ $mysql_dbname="alertbot";
 7+ $mysql_link=mysqli_connect($mysql_host,$mysql_user,$mysql_password,$mysql_dbname);
 8+?>
\ No newline at end of file
Property changes on: trunk/tools/alertbot/web/config.php
___________________________________________________________________
Added: svn:eol-style
19 + native

Status & tagging log