[phpldapadmin/f13/master] * fix typo in config file (#628067) * avoid php-5.3 deprecation errors (#628061) * fix add par

Dmitry Butskoy buc at fedoraproject.org
Thu Sep 23 14:03:58 UTC 2010


commit da28b3ea3d16ba57a4e05e02cf7db1b348a65bc3
Author: buc <buc at buc.odu.neva.ru>
Date:   Thu Sep 23 18:03:43 2010 +0400

      * fix typo in config file (#628067)
      * avoid php-5.3 deprecation errors (#628061)
      * fix add parent class attributes (#628060)

 phpldapadmin-1.2.0.5-addattr.patch      |   12 +++++
 phpldapadmin-1.2.0.5-closecomment.patch |   24 ++++++++++
 phpldapadmin-1.2.0.5-php53.patch        |   73 +++++++++++++++++++++++++++++++
 phpldapadmin.spec                       |   14 ++++++-
 4 files changed, 122 insertions(+), 1 deletions(-)
---
diff --git a/phpldapadmin-1.2.0.5-addattr.patch b/phpldapadmin-1.2.0.5-addattr.patch
new file mode 100644
index 0000000..f6f1766
--- /dev/null
+++ b/phpldapadmin-1.2.0.5-addattr.patch
@@ -0,0 +1,12 @@
+diff -Naur phpldapadmin-1.2.0.5.orig/lib/Template.php phpldapadmin-1.2.0.5.new/lib/Template.php
+--- phpldapadmin-1.2.0.5.orig/lib/Template.php	2010-01-30 06:21:20.000000000 +0100
++++ phpldapadmin-1.2.0.5.new/lib/Template.php	2010-04-22 14:17:55.000000000 +0200
+@@ -1497,7 +1497,7 @@
+ 
+ 			foreach ($this->getObjectClasses() as $oc) {
+ 				$soc = $server->getSchemaObjectClass($oc);
+-				$attrs = array_merge($attrs,$soc->getMustAttrNames(),$soc->getMayAttrNames());
++				$attrs = array_merge($attrs,$soc->getMustAttrNames(true),$soc->getMayAttrNames(true));
+ 				$attrs = array_unique($attrs);
+ 			}
+ 
diff --git a/phpldapadmin-1.2.0.5-closecomment.patch b/phpldapadmin-1.2.0.5-closecomment.patch
new file mode 100644
index 0000000..d085327
--- /dev/null
+++ b/phpldapadmin-1.2.0.5-closecomment.patch
@@ -0,0 +1,24 @@
+diff -Naur phpldapadmin-1.2.0.5.orig/config/config.php phpldapadmin-1.2.0.5.new/config/config.php
+--- phpldapadmin-1.2.0.5.orig/config/config.php	2010-08-27 17:50:48.000000000 +0200
++++ phpldapadmin-1.2.0.5.new/config/config.php	2010-08-27 17:51:56.000000000 +0200
+@@ -373,7 +373,7 @@
+    and log in as that user.
+    Leave blank or specify 'dn' to use full DN for logging in. Note also that if
+    your LDAP server requires you to login to perform searches, you can enter the
+-   DN to use when searching in 'bind_id' and 'bind_pass' above.
++   DN to use when searching in 'bind_id' and 'bind_pass' above. */
+ // $servers->setValue('login','attr','dn');
+ $servers->setValue('login','attr','uid');
+ 
+diff -Naur phpldapadmin-1.2.0.5.orig/config/config.php.example phpldapadmin-1.2.0.5.new/config/config.php.example
+--- phpldapadmin-1.2.0.5.orig/config/config.php.example	2010-01-30 06:21:20.000000000 +0100
++++ phpldapadmin-1.2.0.5.new/config/config.php.example	2010-08-27 17:55:53.000000000 +0200
+@@ -367,7 +367,7 @@
+    and log in as that user.
+    Leave blank or specify 'dn' to use full DN for logging in. Note also that if
+    your LDAP server requires you to login to perform searches, you can enter the
+-   DN to use when searching in 'bind_id' and 'bind_pass' above.
++   DN to use when searching in 'bind_id' and 'bind_pass' above. */
+ // $servers->setValue('login','attr','dn');
+ 
+ /* Base DNs to used for logins. If this value is not set, then the LDAP server
diff --git a/phpldapadmin-1.2.0.5-php53.patch b/phpldapadmin-1.2.0.5-php53.patch
new file mode 100644
index 0000000..339f0ac
--- /dev/null
+++ b/phpldapadmin-1.2.0.5-php53.patch
@@ -0,0 +1,73 @@
+diff -Naur phpldapadmin-1.2.0.5.orig/lib/common.php phpldapadmin-1.2.0.5.new/lib/common.php
+--- phpldapadmin-1.2.0.5.orig/lib/common.php	2010-01-30 06:21:20.000000000 +0100
++++ phpldapadmin-1.2.0.5.new/lib/common.php	2010-08-27 16:21:51.000000000 +0200
+@@ -193,7 +193,7 @@
+ }
+ 
+ # Check for safe mode.
+-if (ini_get('safe_mode') && ! get_request('cmd','GET'))
++if (@ini_get('safe_mode') && ! get_request('cmd','GET'))
+ 	system_message(array(
+ 	'title'=>_('PHP Safe Mode'),
+ 	'body'=>_('You have PHP Safe Mode enabled. This application may work unexpectedly in Safe Mode.'),
+@@ -215,11 +215,11 @@
+ 		app_version(),$_REQUEST);
+ 
+ # Set our PHP timelimit.
+-if ($_SESSION[APPCONFIG]->getValue('session','timelimit') && ! ini_get('safe_mode'))
++if ($_SESSION[APPCONFIG]->getValue('session','timelimit') && ! @ini_get('safe_mode'))
+ 	set_time_limit($_SESSION[APPCONFIG]->getValue('session','timelimit'));
+ 
+ # If debug mode is set, increase the time_limit, since we probably need it.
+-if (DEBUG_ENABLED && $_SESSION[APPCONFIG]->getValue('session','timelimit') && ! ini_get('safe_mode'))
++if (DEBUG_ENABLED && $_SESSION[APPCONFIG]->getValue('session','timelimit') && ! @ini_get('safe_mode'))
+ 	set_time_limit($_SESSION[APPCONFIG]->getValue('session','timelimit') * 5);
+ 
+ /**
+@@ -227,7 +227,7 @@
+  * Shall we attempt to auto-determine the language?
+  */
+ # If we are in safe mode, and LANG is not in the allowed vars, display an error.
+-if (ini_get('safe_mode') && ! in_array('LANG',explode(',',ini_get('safe_mode_allowed_env_vars'))))
++if (@ini_get('safe_mode') && ! in_array('LANG',explode(',', at ini_get('safe_mode_allowed_env_vars'))))
+ 	error('You are running in SAFE_MODE, but LANG is not in the safe_mode_allowed_env_vars. Please add LANG to safe_mode_allowed_env_vars','error',true,false);
+ 
+ $app['language'] = $_SESSION[APPCONFIG]->getValue('appearance','language');
+@@ -296,7 +296,7 @@
+  * Strip slashes from GET, POST, and COOKIE variables if this
+  * PHP install is configured to automatically addslashes()
+  */
+-if (get_magic_quotes_gpc() && (! isset($slashes_stripped) || ! $slashes_stripped)) {
++if (@get_magic_quotes_gpc() && (! isset($slashes_stripped) || ! $slashes_stripped)) {
+ 	array_stripslashes($_REQUEST);
+ 	array_stripslashes($_GET);
+ 	array_stripslashes($_POST);
+diff -Naur phpldapadmin-1.2.0.5.orig/lib/emuhash_functions.php phpldapadmin-1.2.0.5.new/lib/emuhash_functions.php
+--- phpldapadmin-1.2.0.5.orig/lib/emuhash_functions.php	2010-01-30 06:21:20.000000000 +0100
++++ phpldapadmin-1.2.0.5.new/lib/emuhash_functions.php	2010-08-27 16:14:05.000000000 +0200
+@@ -58,8 +58,12 @@
+ 		function openssl_hash($openssl_hash_id,$password_clear) {
+ 			global $emuhash_emu;
+ 
+-			$current_magic_quotes = get_magic_quotes_runtime();
+-			set_magic_quotes_runtime(0);
++			if (PHP_VERSION < 6) {
++				$current_magic_quotes =
++				    @get_magic_quotes_runtime();
++				@set_magic_quotes_runtime(0);
++				}
++
+ 			$tmpfile = tempnam($emuhash_emu['tmpdir'],'emuhash');
+ 			$pwhandle = fopen($tmpfile,'w');
+ 
+@@ -73,7 +77,9 @@
+ 			$pass = fread($prog,1024);
+ 			pclose($prog);
+ 			unlink($tmpfile);
+-			set_magic_quotes_runtime($current_magic_quotes);
++
++			if (PHP_VERSION < 6)
++				@set_magic_quotes_runtime($current_magic_quotes);
+ 
+ 			return $pass;
+ 		}
diff --git a/phpldapadmin.spec b/phpldapadmin.spec
index 281f8e4..51fd618 100644
--- a/phpldapadmin.spec
+++ b/phpldapadmin.spec
@@ -1,12 +1,15 @@
 Name: phpldapadmin
 Summary: Web-based tool for managing LDAP servers
 Version: 1.2.0.5
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: Applications/Internet
 License: GPLv2+
 URL: http://phpldapadmin.sourceforge.net
 Source: http://dl.sourceforge.net/sourceforge/phpldapadmin/phpldapadmin-%{version}.tgz
 Patch0: phpldapadmin-1.2.0.3-config.patch
+Patch1: phpldapadmin-1.2.0.5-addattr.patch
+Patch2: phpldapadmin-1.2.0.5-closecomment.patch
+Patch3: phpldapadmin-1.2.0.5-php53.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
@@ -37,6 +40,9 @@ access by remote web-clients.
 cp config/config.php.example config/config.php
 
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 
 %build
@@ -116,6 +122,12 @@ fi
 
 
 %changelog
+* Thu Sep 23 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 1.2.0.5-2
+- add patches from Patrick Monnerat <pm at datasphere.ch>:
+  * fix typo (close comment) in config file (#628067)
+  * avoid php-5.3 deprecation errors (#628061)
+  * fix add of parent class attributes (#628060)
+
 * Mon Mar 29 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 1.2.0.5-1
 - update to 1.2.0.5
 


More information about the scm-commits mailing list