Added a few modifications in RR system
This commit is contained in:
parent
0321f8a895
commit
d5fd732d8c
|
@ -22,8 +22,7 @@ if (is_ajax ()) {
|
|||
if ($updare_rr) {
|
||||
$number = get_parameter('number');
|
||||
|
||||
$dir = $config["homedir"]."/extras/mr";
|
||||
|
||||
$dir = sys_get_temp_dir() . "/pandora_oum/" . $package . "/extras/mr";
|
||||
$file = "$dir/$number.sql";
|
||||
|
||||
$dangerous_query = false;
|
||||
|
@ -57,7 +56,8 @@ if (is_ajax ()) {
|
|||
if (!file_exists($dir."/updated") || !is_dir($dir."/updated")) {
|
||||
mkdir($dir."/updated");
|
||||
}
|
||||
$file_dest = "$dir/updated/$number.sql";
|
||||
|
||||
$file_dest = $config["homedir"] . "/extras/mr/updated/$number.sql";
|
||||
if (copy($file, $file_dest)) {
|
||||
unlink($file);
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ if (is_ajax ()) {
|
|||
mkdir($dir."/updated");
|
||||
}
|
||||
|
||||
$file_dest = "$dir/updated/$number.sql";
|
||||
$file_dest = $config["homedir"] . "/extras/mr/updated/$number.sql";
|
||||
html_debug("FILE EXISTS: " . (int)file_exists($file_dest), true);
|
||||
if (file_exists($file_dest)) {
|
||||
unlink($file);
|
||||
|
|
|
@ -356,7 +356,8 @@ if ($check_online_free_packages) {
|
|||
}
|
||||
|
||||
if ($search_minor) {
|
||||
$have_minor_releases = db_check_minor_relase_available_to_um();
|
||||
$package = get_parameter('package', '');
|
||||
$have_minor_releases = db_check_minor_relase_available_to_um($package);
|
||||
|
||||
$return['have_minor'] = false;
|
||||
if ($have_minor_releases) {
|
||||
|
|
|
@ -1720,10 +1720,10 @@ function db_check_minor_relase_available () {
|
|||
*
|
||||
* @return bool Return if minor release is available or not
|
||||
*/
|
||||
function db_check_minor_relase_available_to_um () {
|
||||
function db_check_minor_relase_available_to_um ($package) {
|
||||
global $config;
|
||||
|
||||
$dir = $config["homedir"]."/extras/mr";
|
||||
$dir = sys_get_temp_dir() . "/pandora_oum/" . $package . "/extras/mr";
|
||||
|
||||
$have_minor_release = false;
|
||||
|
||||
|
@ -1741,7 +1741,7 @@ function db_check_minor_relase_available_to_um () {
|
|||
|
||||
$exists = false;
|
||||
foreach ($sqlfiles_num as $num) {
|
||||
$file_dest = "$dir/updated/$num.sql";
|
||||
$file_dest = $config["homedir"] . "/extras/mr/updated/$num.sql";
|
||||
|
||||
if (file_exists($file_dest)) {
|
||||
$exists = true;
|
||||
|
|
Loading…
Reference in New Issue