diff --git a/html/class_passwordRecovery.inc b/html/class_passwordRecovery.inc index 243279ab3685bccc3c8968c657c9d300e620afc1..a248d8673d83bc5797fc25d2f5bf998d10a322b4 100644 --- a/html/class_passwordRecovery.inc +++ b/html/class_passwordRecovery.inc @@ -50,7 +50,7 @@ class standAlonePage { /* If SSL is forced, just forward to the SSL enabled site */ if (($config->get_cfg_value("forcessl") == "TRUE") && ($ssl != '')) { - header ("Location: $ssl"); + header("Location: $ssl"); exit; } @@ -173,7 +173,7 @@ class standAlonePage { exit; } elseif ($config->get_cfg_value('warnssl') == 'TRUE') { /* Display SSL mode warning? */ - $smarty->assign ('ssl', sprintf(_('Warning: <a href="%s">Session is not encrypted!</a>'), $ssl)); + $smarty->assign('ssl', sprintf(_('Warning: <a href="%s">Session is not encrypted!</a>'), $ssl)); } } diff --git a/include/accept-to-gettext.inc b/include/accept-to-gettext.inc index 9429195d67b531c089dc1bdcb7163ced4aa4892a..c78c7cdd4f771d07c552e15862429976c5692f9f 100644 --- a/include/accept-to-gettext.inc +++ b/include/accept-to-gettext.inc @@ -155,7 +155,7 @@ function al2gt ($gettextlangs) if (!($infos = parse_gettext_lang($gtlang))) { continue; } - list ($lang, $country, $char) = $infos; + list($lang, $country, $char) = $infos; $lang_score = max_scores($lang_scores, [$lang,$lang.'-'.$country,'*']); $char_score = max_scores($char_scores, [$char,'*']); diff --git a/include/class_IconTheme.inc b/include/class_IconTheme.inc index 38f856e8d5d80bc6c33869889219c6b3a477fd63..5372cda7be749e43468aced24c2475b25851a756 100644 --- a/include/class_IconTheme.inc +++ b/include/class_IconTheme.inc @@ -80,7 +80,7 @@ class IconThemeDir public function SizeDistance ($size) { - switch ($this->Type) { + switch($this->Type) { case 'Fixed': return abs($this->Size - $size); default: diff --git a/include/class_SnapshotDialogs.inc b/include/class_SnapshotDialogs.inc index 0f4bc0d9555c1316b4b599b78777d95b97db11a2..ead678ca1c62419b1afcc5f46e8535a3618609eb 100644 --- a/include/class_SnapshotDialogs.inc +++ b/include/class_SnapshotDialogs.inc @@ -39,15 +39,15 @@ class SnapshotCreateDialog extends simplePlugin 'main' => [ 'name' => _('Creating an object snapshot'), 'attrs' => [ - new DisplayAttribute ( + new DisplayAttribute( _('Object'), _('DN of the object you are creating a snapshot of'), 'object_dn', FALSE ), - new DisplayAttribute ( + new DisplayAttribute( _('Timestamp'), _('Timestamp of this snapshot creation'), 'timestamp', FALSE ), - new TextAreaAttribute ( + new TextAreaAttribute( _('Reason'), _('Reason for creating this snapshot'), 'description', TRUE, '', @@ -257,11 +257,11 @@ class SnapshotRestoreDialog extends simplePlugin 'name' => _('Restoring snapshots'), 'class' => ['fullwidth'], 'attrs' => [ - new DisplayAttribute ( + new DisplayAttribute( _('Object'), _('DN of the object you are creating a snapshot of'), 'object_dn', FALSE ), - new SnapshotsAttribute ( + new SnapshotsAttribute( _('Snapshots'), _('Existing snapshots for this object'), 'snapshots', FALSE, [], diff --git a/include/class_SnapshotHandler.inc b/include/class_SnapshotHandler.inc index 801612d71089ce48171706f08ad3243e25aacd6d..b248486ffff75dab399ce9176c882fa8a0f04325 100644 --- a/include/class_SnapshotHandler.inc +++ b/include/class_SnapshotHandler.inc @@ -313,7 +313,7 @@ class SnapshotHandler $ldap = $config->get_ldap_link(); /* Prepare bases and some other infos */ - $base_of_object = preg_replace ('/^[^,]+,/i', '', $dn); + $base_of_object = preg_replace('/^[^,]+,/i', '', $dn); $new_base = $this->snapshot_dn($base_of_object); $tmp = []; diff --git a/include/class_config.inc b/include/class_config.inc index e6f06de7e60dd3434b31597339a9731eefd5c372..961de1a9214d86a093ff41fcb3e1247de3994765 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -192,7 +192,7 @@ class config } /* Look through attributes */ - switch ($this->tags[$this->level - 1]) { + switch($this->tags[$this->level - 1]) { /* Handle location */ case 'LOCATION': if ($this->tags[$this->level - 2] == 'MAIN') { @@ -317,7 +317,7 @@ class config if ($this->ldap === NULL || !is_resource($this->ldap->cid)) { /* Build new connection */ - $this->ldap = ldap_init ($this->current['SERVER'], $this->current['BASE'], + $this->ldap = ldap_init($this->current['SERVER'], $this->current['BASE'], $this->current['ADMINDN'], $this->get_credentials($this->current['ADMINPASSWORD'])); /* Check for connection */ diff --git a/include/class_filter.inc b/include/class_filter.inc index f8e515a14074cca4a595847de4eebba57c344f8d..b82e4aab9a9b6785dfc5f64c7e152bd9bb44dc66 100644 --- a/include/class_filter.inc +++ b/include/class_filter.inc @@ -398,7 +398,7 @@ class filter // Load template and replace elementsHtml[] foreach ($this->elements as $tag => $element) { $htmlCode = ""; - switch ($element['type']) { + switch($element['type']) { case "textfield": $htmlCode = $this->getTextfield($element); $smarty->assign($tag.'DESC', sprintf(_('Searches in %s'), implode(', ', $element['autocomplete']['attribute']))); diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 460013b8cfd1c338a8a3d73d5b376de48c3a3e7f..7c923956aea652767de8fc84642c53649ca2c528 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -254,7 +254,7 @@ class LDAP $start = microtime(TRUE); $this->clearResult($srp); - switch (strtolower($scope)) { + switch(strtolower($scope)) { case 'base': $this->sr[$srp] = @ldap_read($this->cid, $this->basedn, $filter, $attrs); break; @@ -772,7 +772,7 @@ class LDAP $attrs = [$type => $param]; /* Hardcoded classes */ - switch ($type) { + switch($type) { case 'ou': $attrs['objectClass'] = ['organizationalUnit']; break; @@ -1067,7 +1067,7 @@ class LDAP /* Ignore version number */ } else { /* Line has ended */ - list ($key, $value) = explode(':', $line, 2); + list($key, $value) = explode(':', $line, 2); $value = trim($value); if (preg_match('/^:/', $value)) { $value = base64_decode(trim(substr($value, 1))); @@ -1250,7 +1250,7 @@ class LDAP $objectclasses[$ocname] = []; foreach ($pattern as $chunk) { - switch ($chunk) { + switch($chunk) { case '(': $value = ''; @@ -1331,7 +1331,7 @@ class LDAP if (session::is_set('config')) { $cfg = session::get('config'); if (isset($cfg->current['LDAPSTATS']) && preg_match('/true/i', $cfg->current['LDAPSTATS'])) { - syslog (LOG_INFO, $string); + syslog(LOG_INFO, $string); } } } @@ -1359,15 +1359,15 @@ class LDAP function get_naming_contexts ($server, $admin = '', $password = '') { /* Build LDAP connection */ - $ds = ldap_connect ($server); + $ds = ldap_connect($server); if (!$ds) { - die ('Can\'t bind to LDAP. No check possible!'); + die('Can\'t bind to LDAP. No check possible!'); } ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); - ldap_bind ($ds, $admin, $password); + ldap_bind($ds, $admin, $password); /* Get base to look for naming contexts */ - $sr = @ldap_read ($ds, '', 'objectClass=*', ['namingContexts']); + $sr = @ldap_read($ds, '', 'objectClass=*', ['namingContexts']); $attr = @ldap_get_entries($ds, $sr); return $attr[0]['namingcontexts']; diff --git a/include/class_ldapFilter.inc b/include/class_ldapFilter.inc index 6d93f70c97a14a1a40ae18c255ab20b15c9c597d..cb81838ccdca88145685c2e379c3662480b80ec6 100644 --- a/include/class_ldapFilter.inc +++ b/include/class_ldapFilter.inc @@ -29,7 +29,7 @@ * \brief This class allows to parse and execute on a array an LDAP filter * Example: * $filter = ldapFilter::parse("(&(objectClass=testClass)(testField=value))"); - * $array = array('objectClass' => array('testClass'), 'testField' => array ('value1', 'value')); + * $array = array('objectClass' => array('testClass'), 'testField' => array('value1', 'value')); * if ($filter($array)) { * // do something * } @@ -55,7 +55,7 @@ class ldapFilter function __invoke ($array) { $stopValue = FALSE; - switch ($this->operator) { + switch($this->operator) { case '!': return !$this->subparts[0]($array); case '|': @@ -180,7 +180,7 @@ class ldapFilterLeaf extends ldapFilter function __invoke ($array) { if ($this->dnFilter) { - switch ($this->operator) { + switch($this->operator) { case '~=': trigger_error('Filter apply might not work as expected'); case '=': @@ -195,7 +195,7 @@ class ldapFilterLeaf extends ldapFilter $values = [$values]; } foreach ($values as $value) { - switch ($this->operator) { + switch($this->operator) { case '~=': trigger_error('Filter apply might not work as expected'); case '=': diff --git a/include/class_ldapSizeLimit.inc b/include/class_ldapSizeLimit.inc index 1b89d5efb6d6c80a3a80c998f9a90e00972a6887..1fe0c8da8aae1d0b67662e1218584dbe87b5fdf5 100644 --- a/include/class_ldapSizeLimit.inc +++ b/include/class_ldapSizeLimit.inc @@ -68,7 +68,7 @@ class ldapSizeLimit function update () { if (isset($_POST['set_size_action']) && isset($_POST['action'])) { - switch ($_POST['action']) { + switch($_POST['action']) { case 'newlimit': if (isset($_POST['new_limit']) && tests::is_id($_POST['new_limit'])) { $this->sizeLimit = intval($_POST['new_limit']); diff --git a/include/class_listing.inc b/include/class_listing.inc index 3f5d18384040d457dd9b148f48399b33782f8b33..1aaf7a76eb8cf5d3639439a9b46f4aca9791d6f4 100644 --- a/include/class_listing.inc +++ b/include/class_listing.inc @@ -693,7 +693,7 @@ class listing $classes = ""; $components = explode(';', $cfg); foreach ($components as $part) { - switch ($part) { + switch($part) { case 'r': $res .= 'text-align:right;'; break; @@ -801,10 +801,10 @@ class listing } foreach ($filters as $filterstring => $filter) { - list ($cl, $method, $parts, $offset) = $filter; + list($cl, $method, $parts, $offset) = $filter; $params = []; foreach ($parts as $param) { - switch ($param) { + switch($param) { case 'row': $params[] = $row; break; @@ -1415,7 +1415,7 @@ class listing } // Check for special types - switch ($action['type']) { + switch($action['type']) { case 'copypaste': $cut = !isset($action['cut']) || $action['cut'] != "false"; $copy = !isset($action['copy']) || $action['copy'] != "false"; @@ -1509,7 +1509,7 @@ class listing } foreach ($aclInfos as $aclInfo) { - list ($aclList, $modules) = $aclInfo; + list($aclList, $modules) = $aclInfo; // Walk thru prepared ACL by using $module foreach ($aclList as $sAcl) { $checkAcl = ''; diff --git a/include/class_listingSortIterator.inc b/include/class_listingSortIterator.inc index f011ebaf04f907fb08d828dfd06d1d36bb780ccd..fee52d0be67924a53fd3983041eb1a79beab5aea 100644 --- a/include/class_listingSortIterator.inc +++ b/include/class_listingSortIterator.inc @@ -75,7 +75,7 @@ class listingSortIterator implements Iterator { } // Take a look at the several types - switch ($type) { + switch($type) { // Sort for string by default default: case 'string': diff --git a/include/class_msgPool.inc b/include/class_msgPool.inc index d560ef3ccd65f1dd98d499f52f88f59cd7859c42..1edb06f2c3a3e22b9d8c9d6b4d01226d0dab19db 100644 --- a/include/class_msgPool.inc +++ b/include/class_msgPool.inc @@ -25,12 +25,12 @@ * Source code for class msgPool */ -define ("LDAP_READ", 1); -define ("LDAP_ADD", 2); -define ("LDAP_MOD", 3); -define ("LDAP_DEL", 4); -define ("LDAP_SEARCH", 5); -define ("LDAP_AUTH", 6); +define("LDAP_READ", 1); +define("LDAP_ADD", 2); +define("LDAP_MOD", 3); +define("LDAP_DEL", 4); +define("LDAP_SEARCH", 5); +define("LDAP_AUTH", 6); /*! * \brief This class contains all the messages for the various actions diff --git a/include/class_objects.inc b/include/class_objects.inc index 2c795c0469594c81fa0eaf9684b7f541959f72b5..9c8d7e055a2499d9fcdcab36db18e6feb9f0ac4e 100644 --- a/include/class_objects.inc +++ b/include/class_objects.inc @@ -129,7 +129,7 @@ class objects (strpos($ui->get_permissions($key, $attrsAcls[$attr][0], $attrsAcls[$attr][1]), 'r') === FALSE)) { continue; } - switch ($mode) { + switch($mode) { case '*': unset($fetched_attrs[$attr]['count']); case 'raw': diff --git a/include/class_templateHandling.inc b/include/class_templateHandling.inc index ef058d6740ad1d29338d44e9ee078846170669a0..041a8adca561bdea6987ca4037379a83d1654694 100644 --- a/include/class_templateHandling.inc +++ b/include/class_templateHandling.inc @@ -319,7 +319,7 @@ class templateHandling } $res = ''; for ($i = 0; $i < $length; ++$i) { - switch ($chars) { + switch($chars) { case 'd': /* digits */ $res .= (string)random_int(0, 9); @@ -388,7 +388,7 @@ class templateHandling $str = reset($str); } $result = [$str]; - switch ($m) { + switch($m) { case 'F': // First $result = [reset($str)]; diff --git a/include/functions.inc b/include/functions.inc index d9741c86aa1d963439de2d0317a9e0d446946d0a..f3f4973e3909ebe0d0e7de3dfe7e349889a72280 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -25,12 +25,12 @@ */ /* Define common locations and variables */ -require_once ('variables.inc'); +require_once('variables.inc'); /* Include required files */ -require_once (CACHE_DIR.'/'.CLASS_CACHE); +require_once(CACHE_DIR.'/'.CLASS_CACHE); require_once ('functions_debug.inc'); -require_once ('accept-to-gettext.inc'); +require_once('accept-to-gettext.inc'); /* Define constants for debugging */ define ('DEBUG_TRACE', 1); /*! Debug level for tracing of common actions (save, check, etc.) */ @@ -43,13 +43,13 @@ define ('DEBUG_CONFIG', 64); /*! Debug level for CONFIG information */ define ('DEBUG_ACL', 128); /*! Debug level for ACL infos */ define ('DEBUG_SI', 256); /*! Debug level for communication with Argonaut */ define ('DEBUG_MAIL', 512); /*! Debug level for all about mail (mailAccounts, imap, sieve etc.) */ -define ('DEBUG_FAI', 1024); /* FAI (incomplete) */ +define ('DEBUG_FAI', 1024); /* FAI(incomplete) */ /* Define shadow states */ -define ('POSIX_ACCOUNT_EXPIRED', 1); -define ('POSIX_WARN_ABOUT_EXPIRATION', 2); -define ('POSIX_FORCE_PASSWORD_CHANGE', 4); -define ('POSIX_DISALLOW_PASSWORD_CHANGE', 8); +define('POSIX_ACCOUNT_EXPIRED', 1); +define('POSIX_WARN_ABOUT_EXPIRATION', 2); +define('POSIX_FORCE_PASSWORD_CHANGE', 4); +define('POSIX_DISALLOW_PASSWORD_CHANGE', 8); /* Rewrite german 'umlauts' and spanish 'accents' to get better results */ @@ -402,7 +402,7 @@ function ldap_init ($server, $base, $binddn = '', $pass = '') { global $config; - $ldap = new LDAP ($binddn, $pass, $server, + $ldap = new LDAP($binddn, $pass, $server, isset($config->current['LDAPFOLLOWREFERRALS']) && $config->current['LDAPFOLLOWREFERRALS'] == 'TRUE', isset($config->current['LDAPTLS']) && $config->current['LDAPTLS'] == 'TRUE'); @@ -1472,7 +1472,7 @@ function to_byte ($value) if (!is_numeric(substr($value, -1))) { - switch (substr($value, -1)) { + switch(substr($value, -1)) { case 'g': $mult = 1073741824; break; @@ -1765,7 +1765,7 @@ function compare_revision ($revision_file, $revision) * a certain key, regardless of the case. * * \code - * $items = array ('FOO' => 'blub', 'bar' => 'blub'); + * $items = array('FOO' => 'blub', 'bar' => 'blub'); * array_key_ics('foo', $items); # Returns 'blub' * array_key_ics('BAR', $items); # Returns 'blub' * \endcode @@ -2189,7 +2189,7 @@ function xmlentities ($str) */ function get_random_char () { - $randno = rand (0, 63); + $randno = rand(0, 63); if ($randno < 12) { // Digits, '/' and '.' return chr($randno + 46); diff --git a/include/functions_debug.inc b/include/functions_debug.inc index f96bccd4449377f552f686ba21c6b34e0c9d1dbe..6b834f9454d0005a196011057dc282c6a39353fd 100644 --- a/include/functions_debug.inc +++ b/include/functions_debug.inc @@ -128,7 +128,7 @@ class printAClass { $type = gettype($value); // change the color and format of the value - switch ($type) { + switch($type) { case 'array': break; diff --git a/include/php_setup.inc b/include/php_setup.inc index 19f236880ac3cc8ca3346128ee2d6180adcc1622..7c09ab3d2ba3a83c4f3a81eda2a65445f67bf7ff 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -24,7 +24,7 @@ * \file php_setup.inc * Source code for php_setup */ -require_once ("variables.inc"); +require_once("variables.inc"); /*! * \brief Escape string for HTML output @@ -87,7 +87,7 @@ function html_trace ($errstr = "") $func .= $ct['function']; } if (isset($ct['type'])) { - switch ($ct['type']) { + switch($ct['type']) { case "::": $type = _("static"); break; @@ -337,7 +337,7 @@ date_default_timezone_set("GMT"); /* Get base dir for reference */ $BASE_DIR = dirname(dirname(__FILE__)); $ROOT_DIR = $BASE_DIR."/html"; -error_reporting (E_ALL | E_STRICT); +error_reporting(E_ALL | E_STRICT); /* Register error handler */ $error_collector = ""; diff --git a/include/simpleplugin/attributes/class_DateAttribute.inc b/include/simpleplugin/attributes/class_DateAttribute.inc index 2d2a290c29bb92c05e8cb06b6fae62ec3ed1c7d5..2f7d9bca7e48259a42d24cabe87fecb9d4ca7474 100644 --- a/include/simpleplugin/attributes/class_DateAttribute.inc +++ b/include/simpleplugin/attributes/class_DateAttribute.inc @@ -196,17 +196,17 @@ class TimeHisAttribute extends CompositeAttribute { $this->convert = $convert; $attributes = [ - new IntAttribute ( + new IntAttribute( '', _('Hours'), $ldapName.'_hours', TRUE, 0, 23, 1 ), - new IntAttribute ( + new IntAttribute( ':', _('Minutes'), $ldapName.'_minutes', TRUE, 0, 59, 0 ), - new IntAttribute ( + new IntAttribute( ':', _('Seconds'), $ldapName.'_seconds', TRUE, 0, 59, 0 @@ -270,12 +270,12 @@ class TimeHiAttribute extends TimeHisAttribute { $this->convert = $convert; $attributes = [ - new IntAttribute ( + new IntAttribute( '', _('Hours'), $ldapName.'_hours', TRUE, 0, 23, 1 ), - new IntAttribute ( + new IntAttribute( ':', _('Minutes'), $ldapName.'_minutes', TRUE, 0, 59, 0 diff --git a/include/simpleplugin/attributes/class_PhoneNumberAttribute.inc b/include/simpleplugin/attributes/class_PhoneNumberAttribute.inc index 522176c84c96c30bf46df95a352d0ebe7673af37..4d725ff85e765e48f7fc66955ac40004fd69e39f 100644 --- a/include/simpleplugin/attributes/class_PhoneNumberAttribute.inc +++ b/include/simpleplugin/attributes/class_PhoneNumberAttribute.inc @@ -77,7 +77,7 @@ class phoneSelectDialog extends GenericDialog function __construct ($simplePlugin, $attribute, $type) { $this->attribute = $attribute; - switch ($type) { + switch($type) { case 'phone': $this->dialog = new phoneSelect(); break; diff --git a/include/simpleplugin/class_simplePlugin.inc b/include/simpleplugin/class_simplePlugin.inc index 3ebc773b1b86d3f12e416cb5913b5274e266b745..e7e778a807cd8afe633ff01b1ccdb9d21b1f5afc 100644 --- a/include/simpleplugin/class_simplePlugin.inc +++ b/include/simpleplugin/class_simplePlugin.inc @@ -1008,7 +1008,7 @@ class simplePlugin /* Get current objectClasses in order to add the required ones */ $ldap->cat($this->dn); - $tmp = $ldap->fetch (); + $tmp = $ldap->fetch(); $oc = []; if ($this->is_template) { if (isset($tmp['fdTemplateField'])) { @@ -1369,7 +1369,7 @@ class simplePlugin */ protected function handle_hooks ($when, $mode, array $addAttrs = []) { - switch ($mode) { + switch($mode) { case 'add': return $this->callHook($when.'CREATE', $addAttrs); diff --git a/include/variables.inc b/include/variables.inc index e4fe9c114a2473664d57d52133583d1a2918cb7f..c7ea9b72a19404acd332359bb937fafa422b203a 100644 --- a/include/variables.inc +++ b/include/variables.inc @@ -28,7 +28,7 @@ require_once('variables_common.inc'); if (!defined("CONFIG_DIR")) { - define ("CONFIG_DIR", "/etc/fusiondirectory/"); /* FusionDirectory etc path */ + define("CONFIG_DIR", "/etc/fusiondirectory/"); /* FusionDirectory etc path */ } /*! @@ -36,7 +36,7 @@ if (!defined("CONFIG_DIR")) { * e.g. SetEnv CONFIG_FILE fusiondirectory.conf 1.0 */ if (!defined("CONFIG_FILE")) { - define ("CONFIG_FILE", "fusiondirectory.conf"); /* FusionDirectory filename */ + define("CONFIG_FILE", "fusiondirectory.conf"); /* FusionDirectory filename */ } /*! @@ -47,37 +47,37 @@ define("SMARTY", "/usr/share/php/smarty3/Smarty.class.php"); /*! * \brief Smarty compile dir */ -define ("SPOOL_DIR", "/var/spool/fusiondirectory/"); /* FusionDirectory spool directory */ +define("SPOOL_DIR", "/var/spool/fusiondirectory/"); /* FusionDirectory spool directory */ /*! * \brief Global cache dir */ -define ("CACHE_DIR", "/var/cache/fusiondirectory/"); /* FusionDirectory var directory */ +define("CACHE_DIR", "/var/cache/fusiondirectory/"); /* FusionDirectory var directory */ /*! * \brief Global locale cache dir */ -define ("LOCALE_DIR", "/var/cache/fusiondirectory/locale/"); /* FusionDirectory locale directory */ +define("LOCALE_DIR", "/var/cache/fusiondirectory/locale/"); /* FusionDirectory locale directory */ /*! * \brief Global tmp dir */ -define ("TEMP_DIR", "/var/cache/fusiondirectory/tmp/"); /* FusionDirectory tmp directory */ +define("TEMP_DIR", "/var/cache/fusiondirectory/tmp/"); /* FusionDirectory tmp directory */ /*! * \brief Directory containing the configuration template */ -define ("CONFIG_TEMPLATE_DIR", "/var/cache/fusiondirectory/template/"); /* FusionDirectory template directory */ +define("CONFIG_TEMPLATE_DIR", "/var/cache/fusiondirectory/template/"); /* FusionDirectory template directory */ /*! * \brief Directory containing the fai logs */ -define ("FAI_LOG_DIR", "/var/cache/fusiondirectory/fai/"); /* FusionDirectory fai directory */ +define("FAI_LOG_DIR", "/var/cache/fusiondirectory/fai/"); /* FusionDirectory fai directory */ /*! * \brief Directory containing the vacation files */ -define ("SUPANN_DIR", "/etc/fusiondirectory/supann/"); /* FusionDirectory supann template directory */ +define("SUPANN_DIR", "/etc/fusiondirectory/supann/"); /* FusionDirectory supann template directory */ /*! * \brief name of the class.cache file diff --git a/include/variables_common.inc b/include/variables_common.inc index bc56489e9d40d725261f2374ba9deaf96016605e..ff4c496f6c8439eab6207411df7e765aa51611ce 100644 --- a/include/variables_common.inc +++ b/include/variables_common.inc @@ -29,7 +29,7 @@ * e.g. SetEnv CONFIG_DIR /etc/fusiondirectory */ if (isset($_SERVER['CONFIG_DIR'])) { - define ("CONFIG_DIR", $_SERVER['CONFIG_DIR']); + define("CONFIG_DIR", $_SERVER['CONFIG_DIR']); } /* @@ -37,18 +37,18 @@ if (isset($_SERVER['CONFIG_DIR'])) { * e.g. SetEnv CONFIG_FILE fusiondirectory.conf 1.0 */ if (isset($_SERVER['CONFIG_FILE'])) { - define ("CONFIG_FILE", $_SERVER['CONFIG_FILE']); + define("CONFIG_FILE", $_SERVER['CONFIG_FILE']); } /*! * \brief php library path */ -define ("PHP_DIR", "/usr/share/php"); /*! Define php directory */ +define("PHP_DIR", "/usr/share/php"); /*! Define php directory */ /*! * \brief php pear path */ -define ("PEAR_DIR", "/usr/share/php"); /*! Define PEAR directory */ +define("PEAR_DIR", "/usr/share/php"); /*! Define PEAR directory */ /*! * \brief fpdf library path @@ -63,21 +63,21 @@ define("FPDF_FONTPATH", "/usr/share/php/fpdf/font/"); /*! Define fpdf font path /*! * \brief FusionDirectory Version */ -define ("FD_VERSION", "1.3.1"); /*! Define FusionDirectory version */ +define("FD_VERSION", "1.3.1"); /*! Define FusionDirectory version */ /*! * \brief FusionDirectory config object RDN */ -define ("CONFIGRDN", "cn=config,ou=fusiondirectory,"); /*! Define FusionDirectory config object */ +define("CONFIGRDN", "cn=config,ou=fusiondirectory,"); /*! Define FusionDirectory config object */ /*! * \brief Minimum PHPÂ version */ -define ('PHP_MIN_VERSION', '5.6.0'); +define('PHP_MIN_VERSION', '5.6.0'); /*! * \brief Toggle crashing on PHP error, used for test suites */ -define ('PHP_ERROR_FATAL', 'FALSE'); +define('PHP_ERROR_FATAL', 'FALSE'); ?> diff --git a/plugins/admin/acl/class_aclAssignment.inc b/plugins/admin/acl/class_aclAssignment.inc index b4d1d7cacdde66577f47aa2b3a6dfc48a4dbbb5a..977152361f89861ffa1aa2ddc98f1d03f68e08b0 100644 --- a/plugins/admin/acl/class_aclAssignment.inc +++ b/plugins/admin/acl/class_aclAssignment.inc @@ -315,7 +315,7 @@ class aclAssignment extends simplePlugin function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE) { - parent::__construct ($dn, $object, $parent, FALSE); + parent::__construct($dn, $object, $parent, FALSE); $this->attributesInfo['main']['name'] = sprintf(_('Assignments on object or subtree %s'), $this->dn); } diff --git a/plugins/admin/acl/class_aclManagement.inc b/plugins/admin/acl/class_aclManagement.inc index 3fca279f6d2b593f682a2044541f0c483e962e7c..eb012c93ce3bba86469fa9edff1a3af9cecaa186 100644 --- a/plugins/admin/acl/class_aclManagement.inc +++ b/plugins/admin/acl/class_aclManagement.inc @@ -45,7 +45,7 @@ class aclAssignmentCreationDialog extends simplePlugin 'name' => _('ACL assignment creation'), 'class' => ['fullwidth'], 'attrs' => [ - new StringAttribute ( + new StringAttribute( _('Dn'), _('DN you wish to add assignments for'), 'baseDn', TRUE, $config->current['BASE'], 'aclMode', diff --git a/plugins/admin/departments/class_department.inc b/plugins/admin/departments/class_department.inc index b0c09ff79081f1c991d244af1c6a833c3456a1f7..d587b77ab02830a720b17a700498f54f956b4c0a 100644 --- a/plugins/admin/departments/class_department.inc +++ b/plugins/admin/departments/class_department.inc @@ -102,7 +102,7 @@ class department extends simplePlugin _('Address'), sprintf(_('A postal address for this %s'), $name), 'postalAddress', FALSE ), - new PhoneNumberButtonAttribute ( + new PhoneNumberButtonAttribute( _('Phone'), _('Telephone number'), 'telephoneNumber', FALSE, '', diff --git a/plugins/admin/groups/class_roleGeneric.inc b/plugins/admin/groups/class_roleGeneric.inc index 5a3e090f30e2a728f49c25070403e7cbed110b89..20292d67ea1c1e25927d2ddceeae3f2371472f97 100644 --- a/plugins/admin/groups/class_roleGeneric.inc +++ b/plugins/admin/groups/class_roleGeneric.inc @@ -81,21 +81,21 @@ class roleGeneric extends simplePlugin 'main' => [ 'name' => _('Information'), 'attrs' => [ - new BaseSelectorAttribute (get_ou('roleRDN')), + new BaseSelectorAttribute(get_ou('roleRDN')), new StringAttribute( _('Name'), _('Name of this group'), 'cn', TRUE, '', '', (strict_uid_mode() ? '/^[a-z0-9_-]+$/i' : '/^[a-z0-9_.-]+$/i') ), - new StringAttribute ( + new StringAttribute( _('Description'), _('Description of the role'), 'description' ), - new StringAttribute ( + new StringAttribute( _('Phone number'), _('Phone number'), 'telephoneNumber' ), - new StringAttribute ( + new StringAttribute( _('Fax number'), _('Fax number'), 'facsimileTelephoneNumber' ) @@ -104,7 +104,7 @@ class roleGeneric extends simplePlugin 'members' => [ 'name' => _('Role members'), 'attrs' => [ - new RoleMembersAttribute ( + new RoleMembersAttribute( '', _('Add users for the role'), 'roleOccupant', FALSE ) diff --git a/plugins/config/class_configInLdap.inc b/plugins/config/class_configInLdap.inc index 82235eea9727b7bcbe9952198a5ab826fbefc8e6..a3485ec979a03dde3978cb4f27fdc1022dee1ed2 100644 --- a/plugins/config/class_configInLdap.inc +++ b/plugins/config/class_configInLdap.inc @@ -87,62 +87,62 @@ class configInLdap extends simplePlugin 'look_n_feel' => [ 'name' => _('Look and feel'), 'attrs' => [ - new SelectAttribute ( + new SelectAttribute( _('Language'), _('Language of the application. If \'automatic\' or not available, the one asked by the browser will be used. This setting can be overriden per user.'), 'fdLanguage', FALSE, [''] ), - new SelectAttribute ( + new SelectAttribute( _('Theme'), _('Theme to be used'), 'fdTheme', TRUE, static::get_themes(), 'breezy' ), - new SelectAttribute ( + new SelectAttribute( _('Timezone'), _('Timezone to be used'), 'fdTimezone', TRUE, ['America/New_York'] ), - new HiddenAttribute ('fusionConfigMd5'), + new HiddenAttribute('fusionConfigMd5'), ] ], 'core_settings' => [ 'name' => _('Core settings'), 'attrs' => [ - new IntAttribute ( + new IntAttribute( _('LDAP size limit'), _('Defines the number of entries to get from LDAP by default.'), 'fdLdapSizeLimit', FALSE, 0 /*min*/, FALSE /*no max*/, 200 ), - new SelectAttribute ( + new SelectAttribute( _('Edit locking'), _('Check if a entry currently being edited has been modified outside of FusionDirectory in the meantime.'), 'fdModificationDetectionAttribute', FALSE, ['', 'entryCSN', 'contextCSN'], 'entryCSN' ), - new BooleanAttribute ( + new BooleanAttribute( _('Enable logging'), _('Event logging on FusionDirectory side.'), 'fdLogging', FALSE, TRUE ), - new BooleanAttribute ( + new BooleanAttribute( _('Schema validation'), _('Enables schema checking during login.'), 'fdSchemaCheck', FALSE, TRUE ), - new BooleanAttribute ( + new BooleanAttribute( _('Enable snapshots'), _('This enables you to save certain states of entries and restore them later on.'), 'fdEnableSnapshots', FALSE, TRUE ), - new StringAttribute ( + new StringAttribute( _('Snapshot base'), _('The base where snapshots should be stored inside of the LDAP.'), 'fdSnapshotBase', FALSE, 'ou=snapshots,'.$config->current['BASE'] ), - new BooleanAttribute ( + new BooleanAttribute( _('Wildcard foreign keys'), _('Enables wildcard searches like member=* when moving a whole departement. This will open all existing groups and roles to make sure foreign keys are respected. Slow on big trees.'), 'fdWildcardForeignKeys', FALSE, TRUE @@ -152,35 +152,35 @@ class configInLdap extends simplePlugin 'password' => [ 'name' => _('Password settings'), 'attrs' => [ - new SelectAttribute ( + new SelectAttribute( _('Password default hash'), _('Default hash to be used'), 'fdPasswordDefaultHash', TRUE, ['ssha'] ), - new BooleanAttribute ( + new BooleanAttribute( _('Force default hash'), _('Force the use of the default password hash'), 'fdForcePasswordDefaultHash' ), - new IntAttribute ( + new IntAttribute( _('Password minimum length'), _('Minimum length of user passwords'), 'fdPasswordMinLength', FALSE, 0 /*min*/, FALSE /*no max*/ ), - new IntAttribute ( + new IntAttribute( _('Password minimum differs'), _('Minimum number of different characters from last password'), 'fdPasswordMinDiffer', FALSE, 0 /*min*/, FALSE /*no max*/ ), - new BooleanAttribute ( + new BooleanAttribute( _('Use account expiration'), _('Enables shadow attribute tests during the login to FusionDirectory and forces password renewal or account locking'), 'fdHandleExpiredAccounts' ), - new StringAttribute ( + new StringAttribute( _('SASL Realm'), _('SASL Realm'), 'fdSaslRealm' ), - new StringAttribute ( + new StringAttribute( _('SASL Exop'), _('Attribute to be stored in the userPassword attribute'), 'fdSaslExop' ), @@ -189,40 +189,40 @@ class configInLdap extends simplePlugin 'login' => [ 'name' => _('Login and session'), 'attrs' => [ - new SelectAttribute ( + new SelectAttribute( _('Login attribute'), _('Which LDAP attribute should be used as the login name during login.'), 'fdLoginAttribute', TRUE, ['uid', 'mail', 'uid,mail'], 'uid', ['uid', 'mail', 'both'] ), - new BooleanAttribute ( + new BooleanAttribute( _('Enforce encrypted connections'), _('Enables PHP security checks to force encrypted access (https) to the web interface.'), 'fdForceSSL' ), - new BooleanAttribute ( + new BooleanAttribute( _('Warn if session is not encrypted'), _('will display a warning to the user when http is used instead of https.'), 'fdWarnSSL', FALSE, TRUE ), - new IntAttribute ( + new IntAttribute( _('Session lifetime'), _('Defines when a session will expire in seconds (0 to disable).'), 'fdSessionLifeTime', TRUE, 0 /*min*/, FALSE /*no max*/, 1800 ), - new BooleanAttribute ( + new BooleanAttribute( _('HTTP Basic authentication'), _('Use HTTP Basic authentication protocol instead of the login form.'), 'fdHttpAuthActivated', FALSE, FALSE ), - new BooleanAttribute ( + new BooleanAttribute( _('HTTP Header authentication'), _('Use HTTP Header authentication instead of the login form.'), 'fdHttpHeaderAuthActivated', FALSE, FALSE ), - new StringAttribute ( + new StringAttribute( _('Header name'), _('Name of the header containing user identifier.'), 'fdHttpHeaderAuthHeaderName', FALSE, 'AUTH_USER' @@ -232,17 +232,17 @@ class configInLdap extends simplePlugin 'ssl' => [ 'name' => _('SSL'), 'attrs' => [ - new TrimmedStringAttribute ( + new TrimmedStringAttribute( _('Key path'), _('Path to FusionDirectory private key. Unused for now.'), 'fdSslKeyPath', FALSE, '/etc/ssl/private/fd.key' ), - new TrimmedStringAttribute ( + new TrimmedStringAttribute( _('Certificate path'), _('Path to FusionDirectory certificate. Unused for now.'), 'fdSslCertPath', FALSE, '/etc/ssl/certs/fd.cert' ), - new TrimmedStringAttribute ( + new TrimmedStringAttribute( _('CA certificate path'), _('Path to the CA certificate. Used for validating Argonaut Server host.'), 'fdSslCaCertPath', FALSE, '/etc/ssl/certs/ca.cert' @@ -252,27 +252,27 @@ class configInLdap extends simplePlugin 'cas' => [ 'name' => _('CAS'), 'attrs' => [ - new BooleanAttribute ( + new BooleanAttribute( _('Enable CAS'), _('CAS login will be used instead of LDAP bind'), 'fdCasActivated', FALSE, FALSE ), - new TrimmedStringAttribute ( + new TrimmedStringAttribute( _('CA certificate path'), _('Path to the CA certificate of the CAS server'), 'fdCasServerCaCertPath', FALSE, '/etc/ssl/certs/ca.cert' ), - new StringAttribute ( + new StringAttribute( _('Host'), _('Host of the CAS server'), 'fdCasHost', FALSE, 'localhost' ), - new IntAttribute ( + new IntAttribute( _('Port'), _('Port the CAS server is listening on'), 'fdCasPort', FALSE, 0 /*min*/, FALSE /*no max*/, 443 ), - new StringAttribute ( + new StringAttribute( _('CAS context'), _('CAS context to be used'), 'fdCasContext', FALSE, '/cas' @@ -283,41 +283,41 @@ class configInLdap extends simplePlugin 'name' => _('People and group storage'), 'class' => ['critical'], 'attrs' => [ - new SelectAttribute ( + new SelectAttribute( _('People DN attribute'), _('Attribute to use at the beginning of users dn'), 'fdAccountPrimaryAttribute', TRUE, ['uid', 'cn'] ), - new StringAttribute ( + new StringAttribute( _('CN pattern'), _('The pattern to use to build the common name field'), 'fdCnPattern', TRUE, '%givenName% %sn%' ), - new BooleanAttribute ( + new BooleanAttribute( _('Strict naming policy'), _('Enables strict checking of user and group names'), 'fdStrictNamingRules', FALSE, TRUE ), - new StringAttribute ( + new StringAttribute( _('Users RDN'), _('The branch where users are stored.'), 'fdUserRDN', TRUE, 'ou=people' ), - new StringAttribute ( + new StringAttribute( _('ACL role RDN'), _('The branch where ACL roles are stored.'), 'fdAclRoleRDN', TRUE, 'ou=aclroles' ), - new BooleanAttribute ( + new BooleanAttribute( _('Restrict role members'), _('When enabled only users from the same branch or members of groups from the same branch can be added to a role.'), 'fdRestrictRoleMembers' ), - new BooleanAttribute ( + new BooleanAttribute( _('Separate address fields'), _('Expose street, postOfficeBox and postalCode fields instead of postalAddress.'), 'fdSplitPostalAddress' ), - new PostalAddressAttribute ( + new PostalAddressAttribute( _('Postal address pattern'), _('When using separate address fields, you can use a pattern to fill postalAddress field.'), 'fdPostalAddressPattern' ), @@ -326,23 +326,23 @@ class configInLdap extends simplePlugin 'debug' => [ 'name' => _('Debugging'), 'attrs' => [ - new BooleanAttribute ( + new BooleanAttribute( _('Display errors'), _('Shows PHP errors in the upper part of the screen. This should be disabled in productive deployments, because there might be some passwords in it.'), 'fdDisplayErrors' ), - new IntAttribute ( + new IntAttribute( _('Maximum LDAP query time'), _('Stop LDAP actions if there is no answer within the specified number of seconds.'), 'fdLdapMaxQueryTime', FALSE, 0 /*min*/, FALSE /*no max*/ ), - new BooleanAttribute ( + new BooleanAttribute( _('Log LDAP statistics'), _('Track LDAP timing statistics to the syslog. This may help to find indexing problems or bad search filters.'), 'fdLdapStats' ), - new DebugLevelAttribute ( - new SelectAttribute ( + new DebugLevelAttribute( + new SelectAttribute( _('Debug level'), _('Display certain information on each page load.'), 'fdDebugLevel', FALSE, @@ -358,19 +358,19 @@ class configInLdap extends simplePlugin 'miscellaneous' => [ 'name' => _('Miscellaneous'), 'attrs' => [ - new BooleanAttribute ( + new BooleanAttribute( _('Display summary in listings'), _('Determines whether a status bar will be shown on the bottom of lists, displaying a short summary of type and number of elements in the list.'), 'fdListSummary', FALSE, TRUE ), - new BooleanAttribute ( + new BooleanAttribute( _('Show ACL tab on all objects'), _('For very specific ACL rights setting where you might need to give right on a single object.'), 'fdAclTabOnObjects' ), new SetAttribute( - new StringAttribute ( + new StringAttribute( _('Available department categories'), _('Available categories in the departments dropdown'), 'fdDepartmentCategories', FALSE ), @@ -405,8 +405,8 @@ class configInLdap extends simplePlugin 'name' => _('Hooks'), 'class' => ['fullwidth'], 'attrs' => [ - new OrderedArrayAttribute ( - new CompositeAttribute ( + new OrderedArrayAttribute( + new CompositeAttribute( _('Hooks that are called when specific actions happens'), 'fdTabHook', [ @@ -436,7 +436,7 @@ class configInLdap extends simplePlugin [], TRUE // edition ), - new BooleanAttribute ( + new BooleanAttribute( _('Display hook output'), _('When enabled successful hook execution output is displayed to the user using a dialog.'), 'fdDisplayHookOutput' diff --git a/plugins/config/class_dashBoardConfig.inc b/plugins/config/class_dashBoardConfig.inc index 09993901b1ba651a281fd1f424965041fa05ce10..f2a7d96dfd21033b499f506deff4ab4e6d128556 100644 --- a/plugins/config/class_dashBoardConfig.inc +++ b/plugins/config/class_dashBoardConfig.inc @@ -41,13 +41,13 @@ class dashboardConfig extends simplePlugin 'systems' => [ 'name' => _('Dashboard name schema'), 'attrs' => [ - new IntAttribute ( + new IntAttribute( _('Number of digits'), _('Number of digits to use after prefix'), 'fdDashboardNumberOfDigit', FALSE, 1, 20, 3 ), - new SetAttribute ( - new StringAttribute ( + new SetAttribute( + new StringAttribute( _('Prefixes'), _('Prefixes to be used for computer ids'), 'fdDashboardPrefix', TRUE ), @@ -58,7 +58,7 @@ class dashboardConfig extends simplePlugin 'users' => [ 'name' => _('Dashboard expired users'), 'attrs' => [ - new IntAttribute ( + new IntAttribute( _('Number of days'), _('Number of days before expiration needed for an account to show in the dashboard next expired accounts list'), 'fdDashboardExpiredAccountsDays', FALSE, 1, FALSE, 15 diff --git a/plugins/config/class_mainPluginsConfig.inc b/plugins/config/class_mainPluginsConfig.inc index dec365b7ef064dc50ed0d838d5b9a683fb170a64..e1c1c274963458635bbd538e3f4f60537fa11d48 100644 --- a/plugins/config/class_mainPluginsConfig.inc +++ b/plugins/config/class_mainPluginsConfig.inc @@ -41,7 +41,7 @@ class mainPluginsConfig extends simplePlugin 'ogroups' => [ 'name' => _('Object groups'), 'attrs' => [ - new StringAttribute ( + new StringAttribute( _('Groups RDN'), _('Branch in which object groups will be stored'), 'fdOGroupRDN', TRUE, 'ou=groups' @@ -51,7 +51,7 @@ class mainPluginsConfig extends simplePlugin 'sasl' => [ 'name' => _('SASL'), 'attrs' => [ - new BooleanAttribute ( + new BooleanAttribute( _('Force to ask for password'), _('Useful if you add a hook using password value when SASL user passwords are edited'), 'fdForceSaslPasswordAsk', TRUE, FALSE diff --git a/plugins/config/class_recoveryConfig.inc b/plugins/config/class_recoveryConfig.inc index 799ea261a928db48ce4047bfa914275cf8b45912..3fd56b2ca9b3dc46fafe5843e1aa93335d9f8f68 100644 --- a/plugins/config/class_recoveryConfig.inc +++ b/plugins/config/class_recoveryConfig.inc @@ -41,20 +41,20 @@ class recoveryConfig extends simplePlugin 'class' => ['alone'], 'template' => get_template_path('simpleplugin_section_alone.tpl'), 'attrs' => [ - new BooleanAttribute ( + new BooleanAttribute( _('Activate password recovery'), _('Whether to activate or not password recovery feature'), 'fdPasswordRecoveryActivated', FALSE ), - new MailAttribute ( + new MailAttribute( _('Sender email address'), _('Email address from which mails will be sent'), 'fdPasswordRecoveryEmail', TRUE, 'to.be@chang.ed' ), - new IntAttribute ( + new IntAttribute( _('Link validity (minutes)'), _('Number of minutes before a recovery link expires'), 'fdPasswordRecoveryValidity', @@ -68,13 +68,13 @@ class recoveryConfig extends simplePlugin TRUE, "SomethingSecretAndVeryLong" ), - new BooleanAttribute ( + new BooleanAttribute( _('Allow the use of alternate addresses'), _('Users will also be able to enter one of theirs alternate addresses to recover their password'), 'fdPasswordRecoveryUseAlternate', FALSE ), - new StringAttribute ( + new StringAttribute( _('Login attribute'), _('Usually uid, but you can use something else for instance in case of SSO'), 'fdPasswordRecoveryLoginAttribute', TRUE, 'uid' @@ -84,14 +84,14 @@ class recoveryConfig extends simplePlugin 'first_email' => [ 'name' => _('First email'), 'attrs' => [ - new StringAttribute ( + new StringAttribute( _('Subject'), _('Subject of the first email'), 'fdPasswordRecoveryMailSubject', TRUE, _("[FusionDirectory] Password recovery link") ), - new TextAreaAttribute ( + new TextAreaAttribute( _('Body (first %s is login, second is link)'), _('Body of the first email, sent when the user ask for a new password. Use %s for the login and the recovery link.'), 'fdPasswordRecoveryMailBody', @@ -103,14 +103,14 @@ class recoveryConfig extends simplePlugin 'second_email' => [ 'name' => _('Second email'), 'attrs' => [ - new StringAttribute ( + new StringAttribute( _('Subject'), _('Subject of the second email'), 'fdPasswordRecoveryMail2Subject', TRUE, _("[FusionDirectory] Password recovery successful") ), - new TextAreaAttribute ( + new TextAreaAttribute( _('Body (%s is login)'), _('Body of the second email, sent to confirm the password has been changed. Use %s for the user login.'), 'fdPasswordRecoveryMail2Body', diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index da93d51bd0cee41c9277e597c1333d05927db60b..834c3f7e189f8c0fc8c12836c5ebd4db1532b142 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -39,7 +39,7 @@ class UserPasswordAttribute extends CompositeAttribute } } - parent::__construct ( + parent::__construct( $description, $ldapName, [ new SelectAttribute( @@ -313,21 +313,21 @@ class user extends simplePlugin 'icon' => 'geticon.php?context=types&icon=user&size=16', 'attrs' => [ new HiddenAttribute('cn'), - new StringAttribute ( + new StringAttribute( _('Last name'), _('Last name of this user'), 'sn', TRUE, '', '', '/[^,+"?()=<>;\\\\]/' ), - new StringAttribute ( + new StringAttribute( _('First name'), _('First name of this user'), 'givenName', TRUE, '', '', '/[^,+"?()=<>;\\\\]/' ), - new TextAreaAttribute ( + new TextAreaAttribute( _('Description'), _('Short description of the user'), 'description', FALSE ), - new ImageAttribute ( + new ImageAttribute( _('Picture'), _('The avatar for this user'), 'jpegPhoto', FALSE, 150, 200, 'jpeg' @@ -338,43 +338,43 @@ class user extends simplePlugin 'name' => _('Organizational contact information'), 'icon' => 'geticon.php?context=types&icon=contact&size=16', 'attrs' => [ - new StringAttribute ( + new StringAttribute( _('Location'), _('Location'), 'l', FALSE ), - new StringAttribute ( + new StringAttribute( _('State'), _('State'), 'st', FALSE ), - new PostalAddressAttribute ( + new PostalAddressAttribute( _('Address'), _('Business postal address'), 'postalAddress', FALSE ), - new StringAttribute ( + new StringAttribute( _('Room No.'), _('Room number'), 'roomNumber', FALSE ), - new PhoneNumberButtonAttribute ( + new PhoneNumberButtonAttribute( _('Phone'), _('Business phone number'), 'telephoneNumber', FALSE, '', 'phone' ), - new PhoneNumberButtonAttribute ( + new PhoneNumberButtonAttribute( _('Mobile'), _('Business mobile number'), 'mobile', FALSE, '', 'mobile' ), - new PhoneNumberAttribute ( + new PhoneNumberAttribute( _('Pager'), _('Business pager number'), 'pager', FALSE ), - new PhoneNumberAttribute ( + new PhoneNumberAttribute( _('Fax'), _('Business fax number'), 'facsimileTelephoneNumber', FALSE ), - new URLAttribute ( + new URLAttribute( _('Homepage'), _('Personal homepage'), 'labeledURI', FALSE ), @@ -384,12 +384,12 @@ class user extends simplePlugin 'name' => _('Account information'), 'icon' => 'geticon.php?context=applications&icon=ldap&size=16', 'attrs' => [ - new BaseSelectorAttribute (get_ou("userRDN")), - new UidAttribute ( + new BaseSelectorAttribute(get_ou("userRDN")), + new UidAttribute( _('Login'), _('Login of this user'), 'uid', TRUE ), - new SelectAttribute ( + new SelectAttribute( _('Preferred language'), _('Preferred language'), 'preferredLanguage', FALSE, array_keys($languages), '', array_values($languages) @@ -404,15 +404,15 @@ class user extends simplePlugin 'name' => _('Personal contact information'), 'icon' => 'geticon.php?context=types&icon=contact&size=16', 'attrs' => [ - new StringAttribute ( + new StringAttribute( _('Display name'), _('Name this user should appear as. Used by Exchange.'), 'displayName', FALSE ), - new PostalAddressAttribute ( + new PostalAddressAttribute( _('Home address'), _('Home postal address'), 'homePostalAddress', FALSE ), - new PhoneNumberAttribute ( + new PhoneNumberAttribute( _('Private phone'), _('Home phone number'), 'homePhone', FALSE ), @@ -422,29 +422,29 @@ class user extends simplePlugin 'name' => _('Organizational information'), 'icon' => 'geticon.php?context=places&icon=folder&size=16', 'attrs' => [ - new SetAttribute ( - new StringAttribute ( + new SetAttribute( + new StringAttribute( _('Title'), _('Title of a person in their organizational context. Each title is one value of this multi-valued attribute'), 'title', FALSE ) ), - new StringAttribute ( + new StringAttribute( _('Organization'), _('Organization'), 'o', FALSE ), - new StringAttribute ( + new StringAttribute( _('Unit'), _('Organizational unit this user belongs to'), 'ou', FALSE ), - new StringAttribute ( + new StringAttribute( _('Department No.'), _('Department number'), 'departmentNumber', FALSE ), - new StringAttribute ( + new StringAttribute( _('Employee No.'), _('Employee number'), 'employeeNumber', FALSE ), - new StringAttribute ( + new StringAttribute( _('Employee type'), _('Employee type'), 'employeeType', FALSE ), @@ -458,15 +458,15 @@ class user extends simplePlugin if ($config->get_cfg_value('SplitPostalAddress') == 'TRUE') { $attributesInfo['contact']['attrs'][2]->setVisible(FALSE); array_splice($attributesInfo['contact']['attrs'], 3, 0, [ - new StringAttribute ( + new StringAttribute( _('Street'), _('Street part of the address'), 'street', FALSE ), - new StringAttribute ( + new StringAttribute( _('Post office box'), _('Post office box'), 'postOfficeBox', FALSE ), - new IntAttribute ( + new IntAttribute( _('Postal code'), _('Postal code'), 'postalCode', FALSE, 0, FALSE