mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Clean up, update phpdoc.
This commit is contained in:
@@ -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");
|
||||
|
||||
?>
|
||||
|
||||
@@ -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");
|
||||
|
||||
?>
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user