From: Metabox Date: Sun, 29 Sep 2019 23:23:36 +0000 (+1000) Subject: Bug fix , Exclude View, new feature. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=e52e58048b1b1e4aaf5c8c2b2f2ee715896140e8;p=LifeLog.git Bug fix , Exclude View, new feature. --- diff --git a/Current Development Check List.md b/Current Development Check List.md index a37c8fc..81efcdd 100644 --- a/Current Development Check List.md +++ b/Current Development Check List.md @@ -52,7 +52,7 @@ This version is not compatible in data structure to prior versions. Data migrati ## New Features of Minor Relevance -* Provide Exclude an Category View (if posible multiple categories). Should have option to session or not. +* ✔ Provide Exclude an Category View (if posible multiple categories). Should have option to session or not. * ✔ Provide Themes * Enable sticky log entries * Enable file attachment to log entries. @@ -69,7 +69,7 @@ This version is not compatible in data structure to prior versions. Data migrati * ✔ Add category description column and page, view and editing. ## Bugs -* Bug -06, Invalid Time 00. Javascript error thrown, when 00am used. +* ✔ Bug -06, Invalid Time 00. Javascript error thrown, when 00am used. * ✔ Bug - 05, CRLF and apostrophe replacement not working. * ✔ Bug - 04, Local not picked up properly on current date. * ✔ Bug - 03, Keyword search not working on words as they are categorized wrongly by other dropdown in the background. diff --git a/htdocs/cgi-bin/main.cgi b/htdocs/cgi-bin/main.cgi index a9011b8..c7ffe60 100755 --- a/htdocs/cgi-bin/main.cgi +++ b/htdocs/cgi-bin/main.cgi @@ -42,12 +42,12 @@ my $BGCOL = '#c8fff8'; #END OF SETTINGS my $cgi = CGI->new; -my $session = +my $sss = new CGI::Session( "driver:File", $cgi, { Directory => $LOG_PATH } ); -my $sid = $session->id(); -my $dbname = $session->param('database'); -my $userid = $session->param('alias'); -my $password = $session->param('passw'); +my $sid = $sss->id(); +my $dbname = $sss->param('database'); +my $userid = $sss->param('alias'); +my $password = $sss->param('passw'); if ($AUTHORITY) { $userid = $password = $AUTHORITY; @@ -65,7 +65,7 @@ my $db = DBI->connect( $dsn, $userid, $password, { RaiseError => 1 } ) my ( $imgw, $imgh ); -### Authenticate session to alias password +### Authenticate sss to alias password &authenticate; &getConfiguration($db); @@ -75,6 +75,7 @@ my $log_cur_id; my $rs_keys = $cgi->param('keywords'); my $rs_cat_idx = $cgi->param('category'); my $prm_vc = $cgi->param("vc"); +my $prm_xc = $cgi->param("xc"); my $rs_dat_from = $cgi->param('v_from'); my $rs_dat_to = $cgi->param('v_to'); my $rs_prev = $cgi->param('rs_prev'); @@ -102,12 +103,12 @@ if ( $rs_dat_from && $rs_dat_to ) { #Toggle if search deployed. my $toggle = ""; -if ( $rs_keys || $rs_cat_idx || $stmD || $prm_vc > 0 ) { $toggle = 1; } +if ( $rs_keys || $rs_cat_idx || $stmD || $prm_vc > 0 || $prm_xc > 0) { $toggle = 1; } -$session->expire($SESSN_EXPR); -$session->param('theme', $TH_CSS); -$session->param('bgcolor', $BGCOL); -$session->flush(); +$sss->expire($SESSN_EXPR); +$sss->param('theme', $TH_CSS); +$sss->param('bgcolor', $BGCOL); +$sss->flush(); #tag related framed sizing. my @arrwh = split /x/, $IMG_W_H; @@ -180,7 +181,7 @@ $st = $db->prepare($stmtCat); $rv = $st->execute() or die "

Error->" & $DBI::errstri & "

"; my $cats = qq('; $cats_v .= ''; +$cats_x .= ''; for my $key ( keys %hshDesc ) { my $kv = $hshDesc{$key}; if ( $kv ne ".." ) { - $cat_descriptions .= qq(
  • $kv
  • \n); + $cat_desc .= qq(
  • $kv
  • \n); } } my $log_output = @@ -235,11 +245,13 @@ qq(
    0){ + $stmS = $stmS . " ID_CAT!=$prm_xc AND"; + } } if ($stmD) { $stmS = $stmS . $stmD . " AND"; @@ -255,7 +267,7 @@ qq(0){ + $stmt = $stmS . " ID_CAT!=$prm_xc"; + } if ($stmD) { $stmt = $stmS . $stmD . $stmE; } @@ -651,7 +666,7 @@ _TXT @@ -704,7 +719,7 @@ _TXT ); @@ -732,9 +747,18 @@ _TXT ); + + + + + + ); - if ( ( $rs_keys && $rs_keys ne '*' ) || $rs_cat_idx || $stmD ) { + if ( ( $rs_keys && $rs_keys ne '*' ) || $rs_cat_idx || $stmD || $prm_xc ) { $sm_reset_all = 'Reset View
    '; @@ -781,7 +805,7 @@ $sm_reset_all ); print qq(
    * LOG ENTRY FORM * $sp1 - $sp2 + $sp2
    Date:
    Search/View By $sp1 - $sp2 + $sp2
       -
    Exclude Category: + $cats_x    + + +