more PHP5 fixes

This commit is contained in:
Roland Gruber 2005-07-23 09:34:27 +00:00
parent fb0bf616df
commit fcdae9777e
7 changed files with 19 additions and 0 deletions

View File

@ -23,6 +23,8 @@ $Id$
LDAP Account Manager functions used by account.php
*/
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
// This class keeps all needed values for any account
class account {
@ -2380,6 +2382,7 @@ function creategroup($values, $uselamdaemon=true) {
* 5 == Error while modifying Account
*/
function modifygroup($values,$values_old, $uselamdaemon=true) {
print_r($values);print_r($values_old);
// Add missing objectclasses to group
if (!in_array('posixGroup', $values->general_objectClass)) {
$attr['objectClass'] = $values->general_objectClass;

View File

@ -24,6 +24,9 @@ $Id$
*/
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
include_once("status.inc");
// sets language settings for automatic translation

View File

@ -23,6 +23,9 @@ $Id$
// ldap.inc provides basic functions to connect to the OpenLDAP server.
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
include_once("config.inc");
include_once("blowfish.inc");

View File

@ -23,6 +23,9 @@ $Id$
LDAP Account Manager lamPDF class and some pdf functions
*/
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
define('FPDF_FONTPATH', 'font/');
include_once("fpdf.php");

View File

@ -23,6 +23,9 @@ $Id$
// profiles.inc provides functions to load and save profiles for users/groups/hosts
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
include_once("config.inc");
include_once("account.inc");
include_once("ldap.inc");

View File

@ -23,6 +23,9 @@ $Id$
LDAP Account Manager status messages.
*/
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
function StatusMessage($MessageTyp,$MessageHeadline,$MessageText,$MessageVariables = array()) {
/* Setting CSS-StyleSheet class depending on the $MessageTyp and rewriting $MessageTyp with a readable string. */
if($MessageTyp == "INFO") {

View File

@ -135,6 +135,7 @@ switch ($_POST['select']) {
do { // X-Or, only one if() can be true
if (isset($_POST['users']) && isset($_POST['add'])) { // Add users to list
// Add new user
if (!is_array($account_new->unix_memberUid)) $account_new->unix_memberUid = array();
$account_new->unix_memberUid = array_merge($account_new->unix_memberUid, $_POST['users']);
// remove doubles
$account_new->unix_memberUid = array_flip($account_new->unix_memberUid);