gunnar: server/kolab-webadmin/kolab-webadmin/www/admin/user deliver.php.in, 1.7, 1.8 forward.php.in, 1.6, 1.7 vacation.php.in, 1.8, 1.9

cvs at kolab.org cvs at kolab.org
Tue Apr 6 19:56:35 CEST 2010


Author: gunnar

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user
In directory doto:/tmp/cvs-serv8022/kolab-webadmin/www/admin/user

Modified Files:
	deliver.php.in forward.php.in vacation.php.in 
Log Message:
Do not check for PEAR-Net_Sieve in the code. The package dependencies should ensure that it is installed. In addition remove some unused functions.

Index: deliver.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/deliver.php.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- deliver.php.in	6 Apr 2010 17:49:19 -0000	1.7
+++ deliver.php.in	6 Apr 2010 17:56:33 -0000	1.8
@@ -21,6 +21,7 @@
 require_once '@kolab_php_module_prefix at admin/include/mysmarty.php';
 require_once '@kolab_php_module_prefix at admin/include/headers.php';
 require_once '@kolab_php_module_prefix at admin/include/authenticate.php';
+require_once 'Net/Sieve.php';
 require_once 'KolabAdmin/Sieve.php';
 require_once 'KolabAdmin/Sieve/Script.php';
 require_once 'KolabAdmin/Sieve/Segment.php';
@@ -28,21 +29,6 @@
 require_once 'KolabAdmin/Sieve/Segment/Forward.php';
 require_once 'KolabAdmin/Sieve/Segment/Vacation.php';
 
-// Funny multiline string escaping in Sieve
-function dotstuff( $str ) {
-  return str_replace( "\n.", "\n..", $str );
-}
-
-function undotstuff( $str ) {
-  return str_replace( "\n..", "\n.", $str );
-}
-
-$errors = array();
-if( (@include_once 'Net/Sieve.php' ) === false ) {
-  $errors[] = _('Net/Sieve.php is missing. Without that, filter settings are not available');
-  $errors[] = _("Suggest your system administrator to run \"pear install http://pear.php.net/get/Net_Sieve\" on the server");
-}
-
 /**** Authentication etc. ***/
 $sidx = 'user';
 
@@ -54,7 +40,7 @@
 /**** Sieve handling ***/
 // this is the name KDE client stores - so we can also change the setting from KDE client
 $scriptname = "kolab-deliver.siv";
-if( !$errors ) {
+
   $obj = $ldap->read( $auth->dn() );
   $sieve =& new Net_Sieve( $auth->uid(), $auth->password(), $obj['kolabHomeServer'][0] );
   
@@ -82,7 +68,6 @@
 	  $errors[] = '<pre>' . $handler->getScript() . '</pre>';
 	}
   }
-}
 
 /**** Insert into template and output ***/
 $smarty = new MySmarty();

Index: forward.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/forward.php.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- forward.php.in	6 Apr 2010 17:49:19 -0000	1.6
+++ forward.php.in	6 Apr 2010 17:56:33 -0000	1.7
@@ -22,6 +22,7 @@
 require_once '@kolab_php_module_prefix at admin/include/headers.php';
 require_once('@kolab_php_module_prefix at admin/include/locale.php');
 require_once '@kolab_php_module_prefix at admin/include/authenticate.php';
+require_once 'Net/Sieve.php';
 require_once 'KolabAdmin/Sieve.php';
 require_once 'KolabAdmin/Sieve/Script.php';
 require_once 'KolabAdmin/Sieve/Segment.php';
@@ -29,21 +30,6 @@
 require_once 'KolabAdmin/Sieve/Segment/Forward.php';
 require_once 'KolabAdmin/Sieve/Segment/Vacation.php';
 
-// Funny multiline string escaping in Sieve
-function dotstuff( $str ) {
-  return str_replace( "\n.", "\n..", $str );
-}
-
-function undotstuff( $str ) {
-  return str_replace( "\n..", "\n.", $str );
-}
-
-$errors = array();
-if( (@include_once 'Net/Sieve.php' ) === false ) {
-  $errors[] = _('Net/Sieve.php is missing. Without that, vacation settings are not available');
-  $errors[] = _("Suggest your system administrator to run \"pear install http://pear.php.net/get/Net_Sieve\" on the server");
-}
-
 /**** Authentication etc. ***/
 $sidx = 'user';
 
@@ -55,7 +41,7 @@
 /**** Sieve handling ***/
 // this is the name KDE client stores - so we can also change the setting from KDE client
 $scriptname = "kolab-forward.siv";
-if( !$errors ) {
+
   $obj = $ldap->read( $auth->dn() );
   $sieve =& new Net_Sieve( $auth->uid(), $auth->password(), $obj['kolabHomeServer'][0] );
   
@@ -84,7 +70,6 @@
 	  $errors[] = '<pre>' . $handler->getScript() . '</pre>';
 	}
   }
-}
 
 /**** Insert into template and output ***/
 $smarty = new MySmarty();

Index: vacation.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/vacation.php.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- vacation.php.in	6 Apr 2010 17:49:19 -0000	1.8
+++ vacation.php.in	6 Apr 2010 17:56:33 -0000	1.9
@@ -10,6 +10,7 @@
 require_once '@kolab_php_module_prefix at admin/include/headers.php';
 require_once('@kolab_php_module_prefix at admin/include/locale.php');
 require_once '@kolab_php_module_prefix at admin/include/authenticate.php';
+require_once 'Net/Sieve.php';
 require_once 'KolabAdmin/Sieve.php';
 require_once 'KolabAdmin/Sieve/Script.php';
 require_once 'KolabAdmin/Sieve/Segment.php';
@@ -17,12 +18,6 @@
 require_once 'KolabAdmin/Sieve/Segment/Forward.php';
 require_once 'KolabAdmin/Sieve/Segment/Vacation.php';
 
-$errors = array();
-if( (@include_once 'Net/Sieve.php' ) === false ) {
-  $errors[] = _('Net/Sieve.php is missing. Without that, vacation settings are not available');
-  $errors[] = _("Suggest your system administrator to run \"pear install http://pear.php.net/get/Net_Sieve\" on the server");
-}
-
 /**** Authentication etc. ***/
 $sidx = 'user';
 
@@ -33,7 +28,7 @@
 
 /**** Sieve handling ***/
 $scriptname = 'kolab-vacation.siv';
-if( !$errors ) {
+
   $obj = $ldap->read( $auth->dn() );
   $sieve =& new Net_Sieve( $auth->uid(), $auth->password(), $obj['kolabHomeServer'][0] );
   //$sieve->setDebug(true);
@@ -75,7 +70,6 @@
 	  $errors[] = '<pre>' . $handler->getScript() . '</pre>';
 	}
   }
-}
 
 /**** Insert into template and output ***/
 $smarty = new MySmarty();





More information about the commits mailing list