diff --git a/html/inc/new-file-bu.php b/html/inc/new-file-bu.php index 8a5d279..12df32a 100644 --- a/html/inc/new-file-bu.php +++ b/html/inc/new-file-bu.php @@ -85,6 +85,8 @@ } $lab1_cont = '
Database name
'; + $test_row_html = ''; + $test_btn_html = ''; }else{ if($db_id>0){ @@ -99,6 +101,8 @@ $lab1_cont = '
Source File/Dir
'; $exfiles_cont = "
Exclude Files
"; + $test_row_html = '
Test output
'; + $test_btn_html = ""; } $content = <<<'EOD' @@ -124,14 +128,12 @@
- + $test_btn_html
- -
Test output
-
- + + $test_row_html $lastRunTime $bu_error_list @@ -140,6 +142,10 @@ EOD; + + + $content = str_replace('$test_btn_html', $test_btn_html, $content); + $content = str_replace('$test_row_html', $test_row_html, $content); $content = str_replace('$bu_error_list', $bu_error_list, $content); $content = str_replace('$lastRunTime', $lastRunTime, $content); $content = str_replace('btn_run_bu\'', "btn_run_bu', $db_id", $content); diff --git a/html/svc/backup.php b/html/svc/backup.php index 4049302..9e07bda 100644 --- a/html/svc/backup.php +++ b/html/svc/backup.php @@ -159,7 +159,10 @@ if($pos===FALSE){ $pos = strpos($str_errs, 'failed' ); } - if($pos===FALSE) return; + if($pos===FALSE){ + unlink("$g_data_dir/$fn_e"); + return; + } //place it in the database rpc( 'f:set_bu_error', $buid, $str_errs ); diff --git a/html/svc/main.php b/html/svc/main.php index d37c443..177ef8b 100644 --- a/html/svc/main.php +++ b/html/svc/main.php @@ -42,10 +42,6 @@ $g_bu_colIdxs = array(); getbu_list_all( $g_bu_table, $g_bu_colIdxs, 'order by BU_DATE desc, BU_TIME desc' ); -//print_r($g_bu_table); -//print_r( $g_bu_table[18][ $g_bu_colIdxs['Dir_Dest'] ]); - - while(true){ $bDidWork = false; @@ -291,7 +287,9 @@ // The idea will be that the indicator before the colon will be handled generically in cases // where it is a simple function call, i.e. 'f:' (provided it is a trusted source and/or has been previously checked) - print_r( $obj ); + if( 'f:getbu_list_state' !== $obj[0] ){ + print_r( $obj ); + } switch( $obj[0] ){ case 'm:fork-complete': diff --git a/notes.txt b/notes.txt index 2ccb8f2..8269837 100644 --- a/notes.txt +++ b/notes.txt @@ -3,57 +3,10 @@ * Run now - failure report etc - - file type (incremental) - - db type (overwrite, and save last copy) + - file type (incremental) * Create new bu - file type - test output * Edit existing bu - - test output - - * Create new bu - DB type - - test output (might not be possible for DB) - - -File hierachy -------------- - - Service Only - (DB access, No rpc) - - ./svc/main.php - ./svc/db-reads.php - ./svc/db-writes.php - - Service Child Process Only - (Both rpc and DB access) - ./svc/backup.php - - Shared - (No rpc, No DB) - ./inc/common.php (some old code needs to be removed) - ./lib/time.php - - Web-server Only - (rcp, No DB) - - ./inc/bu_list_content.php - ./inc/secure.php - ./inc/pagemap.php - ./index.php - ./phpinfo.php - ./post_handler.php - ./inc/new-file-bu.php - ./inc/login.php - ./inc/edit-sh-bu.php - - Libraries - (included as required) - ./lib/sysVcom.php - - - ./inc/paths.php - - - + - test output