Author: benj
Date: Tue May 31 14:10:51 2016
New Revision: 1701

URL: http://svn.gna.org/viewcvs/gdtc?rev=1701&view=rev
Log:
Fix error messages


Modified:
    trunk/gdtc/include/benevalo.php
    trunk/gdtc/include/errors.php
    trunk/gdtc/include/utils.php

Modified: trunk/gdtc/include/benevalo.php
URL: 
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/benevalo.php?rev=1701&r1=1700&r2=1701&view=diff
==============================================================================
--- trunk/gdtc/include/benevalo.php     (original)
+++ trunk/gdtc/include/benevalo.php     Tue May 31 14:10:51 2016
@@ -67,8 +67,7 @@
        ( sprintf ( "   SELECT SUM(benevalo.elapsed_time) as total_time, " .
                    "          SUM(benevalo.costs) as total_cost " .
                    "     FROM benevalo " .
-                   "    WHERE actor_id = '%s' " .
-                   "          $where; ",
+                   "    WHERE actor_id = '%s'; ",
                    my_id ()  ) );
 
     $additional [ 'month_names' ] =
@@ -81,6 +80,7 @@
     $additional [ 'benevalo_total_cost' ] = $total [ 'total_cost' ];
     $additional [ 'benevalo_entries' ] = $entries;
     $additional [ 'months' ] = $real_months;
+    $additional [ 'benevalo_id' ] = 0;
 
     return $additional;
 }

Modified: trunk/gdtc/include/errors.php
URL: 
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/errors.php?rev=1701&r1=1700&r2=1701&view=diff
==============================================================================
--- trunk/gdtc/include/errors.php       (original)
+++ trunk/gdtc/include/errors.php       Tue May 31 14:10:51 2016
@@ -82,9 +82,9 @@
 
   case E_USER_NOTICE:
   case E_NOTICE:
-    if ( array_key_exists ('is_admin', $_SESSION ) && 
-        ! preg_match ( '/adherents/', DTC_MY_BASE_URL ) && 
-        preg_match ( '/-dev/', DTC_BASE_URL ) )
+    if ( array_key_exists ('is_admin', $_SESSION ) 
+        && !preg_match ( '/Undefined index/', $errstr )
+        )
       {
        echo "<p class=\"dev-error\"><b>NOTICE</b> [$errno] $errstr line 
<b>$errline</b> in file <b>$errfile</b></p>\n";
     }
@@ -162,4 +162,4 @@
 set_error_handler("myErrorHandler");
 //register_shutdown_function( "fatal_handler" );
 
-?>
+?>

Modified: trunk/gdtc/include/utils.php
URL: 
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/utils.php?rev=1701&r1=1700&r2=1701&view=diff
==============================================================================
--- trunk/gdtc/include/utils.php        (original)
+++ trunk/gdtc/include/utils.php        Tue May 31 14:10:51 2016
@@ -105,6 +105,7 @@
       }
   $smarty -> assign ( 'app', $app );
   $smarty -> assign ( 'theme', DTC_THEME );
+  $smarty -> assign ( 'template', '' );
   
 
   $smarty -> assign ( 'id', my_id() );


_______________________________________________
Gdtc-commits mailing list
[email protected]
https://mail.gna.org/listinfo/gdtc-commits

Reply via email to