diff --git a/html/index.php b/html/index.php index efe328bb390ab4a5a4289c914e98161a81fd88b6..dcbfeb0d5e269ae669f8888475161822e179d07b 100644 --- a/html/index.php +++ b/html/index.php @@ -56,7 +56,7 @@ if (isset($_REQUEST['signout']) && $_REQUEST['signout']) { ); // Set the CA certificate that is the issuer of the cert phpCAS::setCasServerCACert($config->get_cfg_value('casServerCaCertPath')); - phpCas::logout(); + phpCAS::logout(); } $reason = 'Sign out'; if (isset($_REQUEST['message'])) { diff --git a/include/class_divSelectBox.inc b/include/class_divSelectBox.inc index 2392c4c45f28b5e264b732d09075cb3beefac861..fb6290a239c55a9565af68fd2316738a409cc0c0 100644 --- a/include/class_divSelectBox.inc +++ b/include/class_divSelectBox.inc @@ -32,7 +32,7 @@ class divSelectBox { protected $headers = FALSE; protected $a_entries; - protected $summary; + protected $s_summary; protected $cols; protected $id; diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 8019ba51462cc381392f81ff4ba5808d606e1036..c858401bb6a699c8da94c3950de887aac5af5f1c 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -1129,7 +1129,7 @@ class LDAP // Check scope values $scope = trim($scope); if (!empty($scope) && !in_array($scope, ['base', 'one', 'sub', 'children'])) { - throw new LDIFExportException(sprintf('Invalid parameter for scope "%s", please use "base", "one", "sub" or "children".'), $scope); + throw new LDIFExportException(sprintf('Invalid parameter for scope "%s", please use "base", "one", "sub" or "children".', $scope)); } $scope = (empty($scope) ? '' : ' -s '.$scope); @@ -1522,7 +1522,7 @@ class LDAP } } - function get_naming_contexts ($server, $admin = '', $password = '') + public static function get_naming_contexts ($server, $admin = '', $password = '') { /* Build LDAP connection */ $ds = ldap_connect($server); diff --git a/include/class_ldapFilter.inc b/include/class_ldapFilter.inc index 98fdadf5e150d380c5beafc037cd05fb8bc5d192..245195353f68abac2079316639da79d01fe79511 100644 --- a/include/class_ldapFilter.inc +++ b/include/class_ldapFilter.inc @@ -100,7 +100,7 @@ class ldapFilter $filter .= ')'; $offset = 0; $level = 0; - $open; + $open = 0; while (preg_match('/[^\\\\](\\(|\\))/', $filter, $m, PREG_OFFSET_CAPTURE, $offset)) { $offset = $m[0][1] + 1; if ($m[1][0] == '(') { diff --git a/include/class_passwordRecovery.inc b/include/class_passwordRecovery.inc index bc532a2c0b2261aeb2fdaa8eed7dcc8285888889..199aaff55ccd38dfcf991f050659a155a1d936cc 100644 --- a/include/class_passwordRecovery.inc +++ b/include/class_passwordRecovery.inc @@ -31,6 +31,9 @@ class passwordRecovery extends standAlonePage /* Salt needed to mask the uniq id in the ldap */ protected $salt; + /* Uniq ID recovered from email */ + protected $uniq; + /* Delay allowed for the user to change his password (minutes) */ protected $delay_allowed; @@ -132,7 +135,7 @@ class passwordRecovery extends standAlonePage /* Check that password recovery is activated, read config in ldap * Returns a boolean saying if password recovery is activated */ - function readLdapConfig () + protected function readLdapConfig (): bool { global $config; $this->salt = $config->get_cfg_value('passwordRecoverySalt'); diff --git a/include/class_standAlonePage.inc b/include/class_standAlonePage.inc index 0633ae6a574302e12f9a5e4be057e7c0d5bf0157..907832952dc05b87565b78001797da3c9404a9fd 100644 --- a/include/class_standAlonePage.inc +++ b/include/class_standAlonePage.inc @@ -20,7 +20,7 @@ */ /* base class for passwordRecovery and such classes handling requests on their own */ -class standAlonePage +abstract class standAlonePage { protected $directories; protected $directory; @@ -56,6 +56,8 @@ class standAlonePage static::init(); } + abstract protected function readLdapConfig (): bool; + function checkDirectoryChooser () { global $config; diff --git a/include/class_userinfo.inc b/include/class_userinfo.inc index 682c68c6eb2c064fe33023fdf282e9b1b86c5cc5..855931de3600d198814ef96c18991408d409b145 100644 --- a/include/class_userinfo.inc +++ b/include/class_userinfo.inc @@ -214,7 +214,7 @@ class userinfo } break; default: - throw FusionDirectoryException('Unknown ACL member type '.$memberType); + throw new FusionDirectoryException('Unknown ACL member type '.$memberType); } } @@ -1103,7 +1103,7 @@ class userinfo $ui = static::getLdapUser($username); if ($ui === FALSE) { - throw new LoginFailureException(ldap::invalidCredentialsError()); + throw new LoginFailureException(LDAP::invalidCredentialsError()); } elseif (is_string($ui)) { throw new LoginFailureException($ui); } diff --git a/include/login/class_LoginMethod.inc b/include/login/class_LoginMethod.inc index 183f609d619d04870bf6f44c3ab99724a60d6833..06d7c4a1a94158a018e41a615ffecb5dd8354303 100644 --- a/include/login/class_LoginMethod.inc +++ b/include/login/class_LoginMethod.inc @@ -215,6 +215,8 @@ class LoginMethod try { $method::loginProcess(); } catch (Exception $e) { + $lang = session::get('lang'); + $display = '<h1>'.htmlescape(_('An unrecoverable error occurred. Please contact your administator.')).'</h1><p>'; if (ini_get('display_errors') == 1) { $display .= nl2br(htmlescape((string)$e)); diff --git a/include/management/class_management.inc b/include/management/class_management.inc index 10bce9c51532454820598d3d54f02bbfbc1f0b25..4ac1951e7aa08511b7598b685096615a74c14ab4 100644 --- a/include/management/class_management.inc +++ b/include/management/class_management.inc @@ -73,6 +73,8 @@ class management /* Disable and hide configuration system */ protected $skipConfiguration = FALSE; + protected $columnConfiguration; + /* Default columns */ public static $columns = [ ['ObjectTypeColumn', []], diff --git a/include/management/snapshot/class_SnapshotHandler.inc b/include/management/snapshot/class_SnapshotHandler.inc index 2bd2a7dfe0ded09521cb6ac92ad216eb61bca716..34ad2e2fbfba8f8f098d9d0d0ebf71f915e1ec8e 100644 --- a/include/management/snapshot/class_SnapshotHandler.inc +++ b/include/management/snapshot/class_SnapshotHandler.inc @@ -32,6 +32,8 @@ class SnapshotHandler { protected $enabled; + protected $snapshotRDN; + protected $snapshotsCache; static function plInfo () { diff --git a/include/simpleplugin/attributes/class_SelectAttribute.inc b/include/simpleplugin/attributes/class_SelectAttribute.inc index b55e36da2f7ec97f5849b60a463faa6fabb076c1..96c640b971976efe828f3592ed5a5af317f3a33f 100644 --- a/include/simpleplugin/attributes/class_SelectAttribute.inc +++ b/include/simpleplugin/attributes/class_SelectAttribute.inc @@ -129,10 +129,10 @@ class SelectAttribute extends Attribute if ($this->outputs !== NULL) { unset($this->outputs['']); } - } elseif (!$this->isRequired() && !in_array("", $this->choices, TRUE)) { - $this->choices[] = ""; - if (($this->outputs !== NULL) && !isset($this->output[''])) { - $this->output[''] = _('None'); + } elseif (!$this->isRequired() && !in_array('', $this->choices, TRUE)) { + $this->choices[] = ''; + if (($this->outputs !== NULL) && !isset($this->outputs[''])) { + $this->outputs[''] = _('None'); } } } diff --git a/include/simpleplugin/class_multiPlugin.inc b/include/simpleplugin/class_multiPlugin.inc index 85b31d008236092d93c19b5a68e21e696ad9080b..8b011d9b330106166c94e237e9e8575fd66e1108 100644 --- a/include/simpleplugin/class_multiPlugin.inc +++ b/include/simpleplugin/class_multiPlugin.inc @@ -106,7 +106,7 @@ class multiPlugin extends simplePlugin unset($plug); if (!$enabled) { $display = '<img alt="'._('Error').'" src="geticon.php?context=status&icon=dialog-error&size=16" align="middle"/> <b>'. - msgPool::noValidExtension()."</b>"; + msgPool::noValidExtension('').'</b>'; return $display; } } diff --git a/plugins/admin/acl/class_aclManagement.inc b/plugins/admin/acl/class_aclManagement.inc index 1c9a6dfadd0cfabbab7436f856f7c649d01127c4..75f946cbdc82fe06a1ec7a757782cdbd4c5d94e1 100644 --- a/plugins/admin/acl/class_aclManagement.inc +++ b/plugins/admin/acl/class_aclManagement.inc @@ -29,7 +29,7 @@ class aclAssignmentCreationDialog extends simplePlugin { return [ 'plShortName' => _('ACL assignment creation'), - 'plShortName' => _('ACL assignment creation'), + 'plTitle' => _('ACL assignment creation'), 'plDescription' => _('Create an ACL assignment on an arbitrary dn'), 'plCategory' => ['acl'], diff --git a/plugins/admin/groups/class_ogroup.inc b/plugins/admin/groups/class_ogroup.inc index 2b684c92792215b1d1753afb4523c9c1492ea26a..9dc7599765e4ca00f47e58c4b72438698d30e1d6 100644 --- a/plugins/admin/groups/class_ogroup.inc +++ b/plugins/admin/groups/class_ogroup.inc @@ -43,7 +43,6 @@ class ogroup extends simplePlugin return [ 'plShortName' => _('Object group'), 'plDescription' => _('Object group information'), - 'plFilter' => '(objectClass=groupOfNames)', 'plPriority' => 1, 'plObjectClass' => ['groupOfNames', 'gosaGroupOfNames'], 'plFilter' => '(objectClass=groupOfNames)',