Clean up, update phpdoc.

This commit is contained in:
DariusIII
2014-04-15 23:48:50 +02:00
parent fd08b91807
commit dd7c2ad178
32 changed files with 4337 additions and 3988 deletions
+2 -4
View File
@@ -1,9 +1,7 @@
<?php
require(dirname(__FILE__)."/../bin/config.php");
require_once(WWW_DIR."/lib/framework/db.php");
require(dirname(__FILE__) . "/../bin/config.php");
require_once(WWW_DIR . "/lib/framework/db.php");
$db = new DB;
$rel = $db->query("update releases set passwordstatus = -1 where rarinnerfilecount = 0");
?>
+9 -11
View File
@@ -1,6 +1,6 @@
<?php
require(dirname(__FILE__)."/../bin/config.php");
require_once(WWW_DIR."/lib/framework/db.php");
require(dirname(__FILE__) . "/../bin/config.php");
require_once(WWW_DIR . "/lib/framework/db.php");
$db = new DB;
@@ -10,23 +10,21 @@ printf("Reseting all groups completed.\n");
$arr = array("parts", "partrepair", "binaries");
foreach ($arr as &$value) {
$rel = $db->query("truncate table $value");
printf("Truncating $value completed.\n");
$rel = $db->query("truncate table $value");
printf("Truncating $value completed.\n");
}
unset($value);
//get variables from config.sh and defaults.sh
$path = dirname(__FILE__);
$varnames = shell_exec("cat ".$path."/../config.sh | grep ^export | cut -d \= -f1 | awk '{print $2;}'");
$varnames .= shell_exec("cat ".$path."/../defaults.sh | grep ^export | cut -d \= -f1 | awk '{print $2;}'");
$vardata = shell_exec("cat ".$path."/../config.sh | grep ^export | cut -d \\\" -f2 | awk '{print $1;}'");
$vardata .= shell_exec("cat ".$path."/../defaults.sh | grep ^export | cut -d \\\" -f2 | awk '{print $1;}'");
$varnames = shell_exec("cat " . $path . "/../config.sh | grep ^export | cut -d \= -f1 | awk '{print $2;}'");
$varnames .= shell_exec("cat " . $path . "/../defaults.sh | grep ^export | cut -d \= -f1 | awk '{print $2;}'");
$vardata = shell_exec("cat " . $path . "/../config.sh | grep ^export | cut -d \\\" -f2 | awk '{print $1;}'");
$vardata .= shell_exec("cat " . $path . "/../defaults.sh | grep ^export | cut -d \\\" -f2 | awk '{print $1;}'");
$varnames = explode("\n", $varnames);
$vardata = explode("\n", $vardata);
$array = array_combine($varnames, $vardata);
unset($array['']);
$TESTING="{$array['NEWZPATH']}{$array['TESTING_PATH']}";
$TESTING = "{$array['NEWZPATH']}{$array['TESTING_PATH']}";
passthru("cd $TESTING && php spotnab.php -r");
?>
+2 -5
View File
@@ -1,6 +1,6 @@
<?php
require(dirname(__FILE__)."/../bin/config.php");
require_once(WWW_DIR."/lib/framework/db.php");
require(dirname(__FILE__) . "/../bin/config.php");
require_once(WWW_DIR . "/lib/framework/db.php");
$db = new DB;
@@ -11,6 +11,3 @@ foreach ($arr as &$value) {
printf("Truncating $value completed.\n");
}
unset($value);
?>