diff --git a/html/inc/bu_list_content.php b/html/inc/bu_list_content.php index 82002a6..05c12ca 100644 --- a/html/inc/bu_list_content.php +++ b/html/inc/bu_list_content.php @@ -3,7 +3,7 @@ /** * Returns the main backup list page. */ -function getbu_list_content(){ +function getbu_list_content( ){ //this is called destructuring [$table, $colIdxs] = rpc( 'f:getbu_list_all', "order by BUID" ); diff --git a/html/inc/secure.php b/html/inc/secure.php index 651b794..a18ddd5 100644 --- a/html/inc/secure.php +++ b/html/inc/secure.php @@ -8,7 +8,6 @@ if( isset($_GET['action']) && $_GET['action']=='logout' ) { unset( $_SESSION['username'] ); - //include_once "index.php"; header("Location: index.php"); exit; } diff --git a/html/js/main.js b/html/js/main.js index 84eb471..8cbb1c1 100644 --- a/html/js/main.js +++ b/html/js/main.js @@ -270,7 +270,8 @@ if(page_type=='authenticated'){ elem = document.getElementById('anc_login'); - elem.innerHTML="Logout"; + elem.innerHTML="Logout"; + elem.setAttribute("href","post_handler.php?action=logout"); push_page( map_params.get('final-page') ); return; } diff --git a/install/apply-patches.php b/install/apply-patches.php index 86893c2..c2fe5d7 100644 --- a/install/apply-patches.php +++ b/install/apply-patches.php @@ -21,24 +21,27 @@ global $g_database_path; - //clear any previous php errors - $db = new SQLite3( $g_database_path ); - $db->exec("delete from PARAMS where P_Name='db_apply_patch_php'"); - //which patch to start with $curr_version = get_curr_patch_ver( ); $st_patch_val = $curr_version; - + + //clear any previous php errors + $db = new SQLite3( $g_database_path ); + $db->exec("delete from PARAMS where P_Name='db_apply_patch_php'"); + + print( "Current version is $curr_version\n" ); - + $tot_applied=0; do{ $st_patch_val++; + $was_applied = false; //process the SQL patch first $patch_name = get_patch_name( $st_patch_val ); $patch_data = read_patch( $patch_name ); if($patch_data!=null){ apply_patch_sql( $st_patch_val, $patch_name, $patch_data ); + $was_applied = true; } //process the PHP patch @@ -46,13 +49,13 @@ $patch_data = read_patch( $patch_name ); if($patch_data!=null){ apply_patch_php( $st_patch_val, $patch_name, $patch_data ); + $was_applied = true; } - + if($was_applied) $tot_applied++; + }while($patch_data!=null); - $applied = $st_patch_val - $curr_version -1; - print( "Applied $applied patches\n" ); - + print( "Applied $tot_applied patches\n" ); }