Page 1 of 1

A few fixes

Posted: Fri Aug 27, 2010 1:18 pm
by Normando
Please, do not apply these patches directly, because my code is already modify. So search the string in your code and made the changes manualy.

1 - Remove Makefile.am file of installations:

Code: Select all

--- ./web/skins/classic/views/js/Makefile.am.orig	2009-04-01 10:37:10.000000000 +0200
+++ ./web/skins/classic/views/js/Makefile.am	2010-08-25 00:10:35.000000000 +0200
@@ -24,7 +24,6 @@ dist_web_DATA = \
 	group.js \
 	groups.js \
 	login.js \
-	Makefile.am \
 	monitor.js \
 	monitor.js.php \
 	monitorpreset.js \
--- ./web/skins/classic/views/Makefile.am.orig	2009-03-31 15:00:49.000000000 +0200
+++ ./web/skins/classic/views/Makefile.am	2010-08-25 00:10:57.000000000 +0200
@@ -32,7 +32,6 @@ dist_web_DATA = \
 	groups.php \
 	login.php \
 	logout.php \
-	Makefile.am \
 	monitor.php \
 	monitorpreset.php \
 	monitorprobe.php \
2 - Remove "Force alarm" and Cancel alarm from monitor when the modes are monitor, nodect and record. Also strip redundant code.
Hey! I can't paste here because forum strip the code! How to avoid this?

Code: Select all

--- ./web/skins/classic/views/watch.php.orig	2010-02-28 20:16:40.000000000 +0100
+++ ./web/skins/classic/views/watch.php	2010-08-25 21:46:58.000000000 +0200
@@ -120,15 +120,10 @@ else
       </div>
       <div>
 <php>
         <div><a><SLANG></a><a><SLANG></a></div>
-<php>
         <div><a><SLANG></a><a><SLANG></a></div>
 <?php
 }
3 - Fix language per user

Code: Select all

--- ./web/includes/lang.php.orig	2008-07-25 11:48:16.000000000 +0200
+++ ./web/includes/lang.php	2010-08-25 21:54:58.000000000 +0200
@@ -28,7 +28,7 @@ function loadLanguage( $prefix="" )
     $fallbackLangFile = $prefix.'lang/en_gb.php';
     $systemLangFile = $prefix.'lang/'.ZM_LANG_DEFAULT.'.php';
     if ( isset($user['Language']) )
-        $userLangFile = $prefix.$user['Language'].'.php';
+        $userLangFile = $prefix.'lang/'.$user['Language'].'.php';
 
     if ( isset($userLangFile) && file_exists( $userLangFile ) )
         return( $userLangFile );
4 - Fix php error when you click on "all events" from all monitors and then click on "Show Filter Window" in events list window.

Code: Select all

--- ./web/skins/classic/views/events.php.orig	2010-02-23 10:12:12.000000000 +0100
+++ ./web/skins/classic/views/events.php	2010-08-25 20:48:24.000000000 +0200
@@ -46,6 +46,11 @@ parseSort();
 parseFilter( $_REQUEST['filter'] );
 $filterQuery = $_REQUEST['filter']['query'];
 
+if ( !$filterQuery )
+{
+$filterQuery = '&filter[terms][0][attr]=DateTime&filter[terms][0][op]=%3C&filter[terms][0][val]=now';
+}
+
 if ( $_REQUEST['filter']['sql'] )
 {
     $countSql .= $_REQUEST['filter']['sql'];