diff --git a/lam/templates/3rdParty/pla/htdocs/cmd.php b/lam/templates/3rdParty/pla/htdocs/cmd.php index 34f3848f..76a7015d 100644 --- a/lam/templates/3rdParty/pla/htdocs/cmd.php +++ b/lam/templates/3rdParty/pla/htdocs/cmd.php @@ -48,12 +48,12 @@ $www['page'] = new page($app['server']->getIndex()); if (trim($www['cmd'])) { # If this is a READ-WRITE operation, the LDAP server must not be in READ-ONLY mode. if ($app['server']->isReadOnly() && ! in_array(get_request('cmd','REQUEST'),$app['readwrite_cmds'])) - error(_('You cannot perform updates while server is in read-only mode'),'error','index.php'); + error(('You cannot perform updates while server is in read-only mode'),'error','index.php'); # If this command has been disabled by the config. if (! $_SESSION[APPCONFIG]->isCommandAvailable('script',$www['cmd'])) { - system_message(array('title'=>_('Command disabled by the server configuration'), - _('Error'),'body'=>sprintf('%s: %s.',_('The command could not be run'),htmlspecialchars($www['cmd'])),'type'=>'error'),'index.php'); + system_message(array('title'=>('Command disabled by the server configuration'), + ('Error'),'body'=>sprintf('%s: %s.',('The command could not be run'),htmlspecialchars($www['cmd'])),'type'=>'error'),'index.php'); $app['script_cmd'] = null; } diff --git a/lam/templates/3rdParty/pla/htdocs/copy.php b/lam/templates/3rdParty/pla/htdocs/copy.php index 588a1e0d..d89680a3 100644 --- a/lam/templates/3rdParty/pla/htdocs/copy.php +++ b/lam/templates/3rdParty/pla/htdocs/copy.php @@ -22,10 +22,10 @@ $ldap['DST'] = $_SESSION[APPCONFIG]->getServer(get_request('server_id_dst')); # Error checking if (! trim($request['dnDST'])) - error(_('You left the destination DN blank.'),'error','index.php'); + error(('You left the destination DN blank.'),'error','index.php'); if ($ldap['DST']->isReadOnly()) - error(_('Destination server is currently READ-ONLY.'),'error','index.php'); + error(('Destination server is currently READ-ONLY.'),'error','index.php'); if ($ldap['DST']->dnExists($request['dnDST'])) error(sprintf(_('The destination entry (%s) already exists.'),pretty_print_dn($request['dnDST'])),'error','index.php'); diff --git a/lam/templates/3rdParty/pla/htdocs/copy_form.php b/lam/templates/3rdParty/pla/htdocs/copy_form.php index 99cc69f3..2929aaf5 100644 --- a/lam/templates/3rdParty/pla/htdocs/copy_form.php +++ b/lam/templates/3rdParty/pla/htdocs/copy_form.php @@ -91,11 +91,6 @@ echo "\n"; echo ''; echo ''; -if ($_SESSION[APPCONFIG]->getValue('appearance','show_hints')) - printf('
Light%s
', - IMGDIR,_('Hint: Copying between different servers only works if there are no schema violations')); - - # Draw the javascrpt to enable/disable the filter field if this may be a recursive copy if (count($request['children']) > 0) printf('',JSDIR); diff --git a/lam/templates/3rdParty/pla/htdocs/index.php b/lam/templates/3rdParty/pla/htdocs/index.php index d2113b7c..6e782d27 100644 --- a/lam/templates/3rdParty/pla/htdocs/index.php +++ b/lam/templates/3rdParty/pla/htdocs/index.php @@ -64,21 +64,21 @@ if (! extension_loaded('session')) # Make sure this PHP install has gettext, we use it for language translation if (! extension_loaded('gettext')) system_message(array( - 'title'=>_('Missing required extension'), + 'title'=>('Missing required extension'), 'body'=>'Your install of PHP appears to be missing GETTEXT support.

GETTEXT is used for language translation.

Please install GETTEXT support before using phpLDAPadmin.
(Dont forget to restart your web server afterwards)', 'type'=>'error')); # Make sure this PHP install has all our required extensions if (! extension_loaded('ldap')) system_message(array( - 'title'=>_('Missing required extension'), + 'title'=>('Missing required extension'), 'body'=>'Your install of PHP appears to be missing LDAP support.

Please install LDAP support before using phpLDAPadmin.
(Dont forget to restart your web server afterwards)', 'type'=>'error')); # Make sure that we have php-xml loaded. if (! function_exists('xml_parser_create')) system_message(array( - 'title'=>_('Missing required extension'), + 'title'=>('Missing required extension'), 'body'=>'Your install of PHP appears to be missing XML support.

Please install XML support before using phpLDAPadmin.
(Dont forget to restart your web server afterwards)', 'type'=>'error')); @@ -101,7 +101,7 @@ if (isset($app['function_files']) && is_array($app['function_files'])) # Configuration File check if (! file_exists($app['config_file'])) { - error(sprintf(_('You need to configure %s. Edit the file "%s" to do so. An example config file is provided in "%s.example".'),app_name(),$app['config_file'],$app['config_file']),'error',null,true); + error(sprintf(('You need to configure %s. Edit the file "%s" to do so. An example config file is provided in "%s.example".'),app_name(),$app['config_file'],$app['config_file']),'error',null,true); } elseif (! is_readable($app['config_file'])) { error(sprintf('Fatal error: Cannot read your configuration file "%s", its permissions may be too strict.',$app['config_file']),'error',null,true); @@ -125,7 +125,7 @@ if ($uri = get_request('URI','GET')) if (! preg_match('/^([0-9]+\.?)+/',app_version())) { system_message(array( - 'title'=>_('This is a development version of phpLDAPadmin'), + 'title'=>('This is a development version of phpLDAPadmin'), 'body'=>'This is a development version of phpLDAPadmin! You should NOT use it in a production environment (although we dont think it should do any damage).', 'type'=>'info','special'=>true)); diff --git a/lam/templates/3rdParty/pla/lib/Attribute.php b/lam/templates/3rdParty/pla/lib/Attribute.php index af134dff..e1da5838 100644 --- a/lam/templates/3rdParty/pla/lib/Attribute.php +++ b/lam/templates/3rdParty/pla/lib/Attribute.php @@ -721,8 +721,8 @@ class Attribute { case 'helper': if (! isset($values['post']) && ! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>sprintf('%s [%s]',_('Missing [post] setting in XML file'),$index), - 'body'=>_('[helper] needs an accompanying [post] action.'), + 'title'=>sprintf('%s [%s]',('Missing [post] setting in XML file'),$index), + 'body'=>('[helper] needs an accompanying [post] action.'), 'type'=>'warn')); if (isset($value['value']) && ! is_array($value['value']) && preg_match('/^=php\.(\w+)\((.*)\)$/',$value['value'],$matches)) { @@ -736,8 +736,8 @@ class Attribute { if (! in_array($i,array('default','display','id','value'))) { if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>sprintf('%s [%s]',_('Unknown XML setting'),$i), - 'body'=>sprintf('%s [%s]',_('Unknown XML type setting for helper will be ignored.'),$detail), + 'title'=>sprintf('%s [%s]',('Unknown XML setting'),$i), + 'body'=>sprintf('%s [%s]',('Unknown XML type setting for helper will be ignored.'),$detail), 'type'=>'warn')); unset($value[$i]); @@ -758,8 +758,8 @@ class Attribute { case 'type': if (! in_array($value,array('password','multiselect','select','textarea')) && ! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>sprintf('%s [%s]',_('Unknown XML setting'),$index), - 'body'=>sprintf('%s [%s]',_('Unknown XML type setting will be ignored.'),$value), + 'title'=>sprintf('%s [%s]',('Unknown XML setting'),$index), + 'body'=>sprintf('%s [%s]',('Unknown XML type setting will be ignored.'),$value), 'type'=>'warn')); break; @@ -772,8 +772,8 @@ class Attribute { } else if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>sprintf('%s [%s]',_('Unknown XML setting'),$index), - 'body'=>sprintf('%s [%s]',_('Unknown XML type setting will be ignored.'),$value), + 'title'=>sprintf('%s [%s]',('Unknown XML setting'),$index), + 'body'=>sprintf('%s [%s]',('Unknown XML type setting will be ignored.'),$value), 'type'=>'warn')); case 'value': @@ -781,8 +781,8 @@ class Attribute { foreach ($value as $y) { if (! $this->haveMoreValues()) { system_message(array( - 'title'=>_('Automatically removed attribute values from template'), - 'body'=>sprintf('%s [%s]',_('Template defines more values than can be accepted by attribute.'),$this->getName(true)), + 'title'=>('Automatically removed attribute values from template'), + 'body'=>sprintf('%s [%s]',('Template defines more values than can be accepted by attribute.'),$this->getName(true)), 'type'=>'warn')); $this->clearValue(); @@ -801,7 +801,7 @@ class Attribute { # We'll add a hint too if (! $this->hint) - $this->hint = _('Automatically determined'); + $this->hint = ('Automatically determined'); } else $this->addValue($value); @@ -835,8 +835,8 @@ class Attribute { default: if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>sprintf('%s [%s]',_('Unknown XML setting'),$index), - 'body'=>sprintf('%s [%s]',_('Unknown attribute setting will be ignored.'),serialize($value)), + 'title'=>sprintf('%s [%s]',('Unknown XML setting'),$index), + 'body'=>sprintf('%s [%s]',('Unknown attribute setting will be ignored.'),serialize($value)), 'type'=>'warn')); } diff --git a/lam/templates/3rdParty/pla/lib/AttributeFactory.php b/lam/templates/3rdParty/pla/lib/AttributeFactory.php index 82cf5627..c1211e2d 100644 --- a/lam/templates/3rdParty/pla/lib/AttributeFactory.php +++ b/lam/templates/3rdParty/pla/lib/AttributeFactory.php @@ -27,8 +27,8 @@ class AttributeFactory { default: if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>sprintf('%s [%s]',_('Unknown template [post] function'),$matches[1]), - 'body'=>sprintf('%s [%s]',_('The template function is not known and will be ignored.'),$values['post']), + 'title'=>sprintf('%s [%s]',('Unknown template [post] function'),$matches[1]), + 'body'=>sprintf('%s [%s]',('The template function is not known and will be ignored.'),$values['post']), 'type'=>'warn')); unset($values['post']); @@ -42,8 +42,8 @@ class AttributeFactory { if (! in_array($matches[1],array('GetNextNumber','PasswordEncryptionTypes'))) { if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>sprintf('%s [%s]',_('Unknown template helper function'),$matches[1]), - 'body'=>sprintf('%s [%s]',_('The template helper function is not known and will be ignored.'),$values['helper']['value']), + 'title'=>sprintf('%s [%s]',('Unknown template helper function'),$matches[1]), + 'body'=>sprintf('%s [%s]',('The template helper function is not known and will be ignored.'),$values['helper']['value']), 'type'=>'warn')); unset($values['helper']['value']); @@ -71,8 +71,8 @@ class AttributeFactory { default: if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>sprintf('%s [%s]',_('Unknown template function'),$matches[1]), - 'body'=>sprintf('%s [%s]',_('The template function is not known and will be ignored.'),$values['value']), + 'title'=>sprintf('%s [%s]',('Unknown template function'),$matches[1]), + 'body'=>sprintf('%s [%s]',('The template function is not known and will be ignored.'),$values['value']), 'type'=>'warn')); unset($values['value']); diff --git a/lam/templates/3rdParty/pla/lib/HTMLTree.php b/lam/templates/3rdParty/pla/lib/HTMLTree.php index dc870632..8fc82209 100644 --- a/lam/templates/3rdParty/pla/lib/HTMLTree.php +++ b/lam/templates/3rdParty/pla/lib/HTMLTree.php @@ -67,9 +67,9 @@ class HTMLTree extends Tree { # We didnt get any baseDN entries in our tree? printf('%s
%s
%s
', $this->getDepth()+3-2, - _('Could not determine the root of your LDAP tree.'), - _('It appears that the LDAP server has been configured to not reveal its root.'), - _('Please specify it in config.php')); + ('Could not determine the root of your LDAP tree.'), + ('It appears that the LDAP server has been configured to not reveal its root.'), + ('Please specify it in config.php')); echo ''; @@ -108,10 +108,10 @@ class HTMLTree extends Tree { if (preg_match('/,/',$base->getDN())) printf('%s', - $this->getDepth()+3-3,_('This base cannot be created with PLA.')); + $this->getDepth()+3-3,('This base cannot be created with PLA.')); else printf('%s %s', - $this->getDepth()+3-3,_('This base entry does not exist.'),$server->getIndex(),$javascript_id,_('Create it?')); + $this->getDepth()+3-3,('This base entry does not exist.'),$server->getIndex(),$javascript_id,('Create it?')); } else { $this->draw_item($base->getDN(),-1); @@ -168,7 +168,7 @@ class HTMLTree extends Tree { printf('%s',$server->getName()); if (! is_null($server->inactivityTime())) { - $m = sprintf(_('Inactivity will log you off at %s'), + $m = sprintf(('Inactivity will log you off at %s'), strftime('%H:%M',$server->inactivityTime())); printf(' %s',IMGDIR,$m,'Timeout'); } @@ -217,11 +217,11 @@ class HTMLTree extends Tree { return ''; $menu['cmd'] = 'schema'; - $menu['ajax'] = _('Loading Schema'); + $menu['ajax'] = ('Loading Schema'); $menu['div'] = 'BODY'; - $menu['title'] = _('View schema for'); + $menu['title'] = ('View schema for'); $menu['img'] = 'schema-big.png'; - $menu['name'] = _('schema'); + $menu['name'] = ('schema'); break; @@ -257,11 +257,11 @@ class HTMLTree extends Tree { return ''; $menu['cmd'] = 'server_info'; - $menu['ajax'] = _('Loading Info'); + $menu['ajax'] = ('Loading Info'); $menu['div'] = 'BODY'; - $menu['title'] = _('Info'); + $menu['title'] = ('Info'); $menu['img'] = 'info-big.png'; - $menu['name'] = _('info'); + $menu['name'] = ('info'); break; @@ -274,11 +274,11 @@ class HTMLTree extends Tree { return ''; $menu['cmd'] = 'monitor'; - $menu['ajax'] = _('Loading Monitor Info'); + $menu['ajax'] = ('Loading Monitor Info'); $menu['div'] = 'BODY'; - $menu['title'] = _('Monitor'); + $menu['title'] = ('Monitor'); $menu['img'] = 'monitorserver-big.png'; - $menu['name'] = _('monitor'); + $menu['name'] = ('monitor'); break; @@ -333,7 +333,7 @@ class HTMLTree extends Tree { return ''; else return sprintf('%s
%s
', - htmlspecialchars($href),_('Logout of this server'),IMGDIR,'logout-big.png',_('logout'),_('logout')); + htmlspecialchars($href),('Logout of this server'),IMGDIR,'logout-big.png',('logout'),('logout')); } /** @@ -348,7 +348,7 @@ class HTMLTree extends Tree { $logged_in_dn = $server->getLogin(null); echo ''; echo ''; - printf('%s: ',$this->getDepth()+3-1,_('Logged in as')); + printf('%s: ',$this->getDepth()+3-1,('Logged in as')); if ($server->getContainerTop($logged_in_dn) == $logged_in_dn) { $logged_in_branch = ''; @@ -521,9 +521,9 @@ class HTMLTree extends Tree { if (isAjaxEnabled()) { printf('%s', - $href_parm,$href_parm,_('Loading Login'),_('Login to'),$server->getName(),IMGDIR,'login.png',_('login')); + $href_parm,$href_parm,('Loading Login'),('Login to'),$server->getName(),IMGDIR,'login.png',('login')); printf('%s', - $this->getDepth()+3-2,$href_parm,$href_parm,_('Loading Login'),_('Login to'),$server->getName(),_('login')); + $this->getDepth()+3-2,$href_parm,$href_parm,('Loading Login'),('Login to'),$server->getName(),('login')); } else { printf('%s',$href_parm,IMGDIR,'login.png',_('login')); diff --git a/lam/templates/3rdParty/pla/lib/PageRender.php b/lam/templates/3rdParty/pla/lib/PageRender.php index cad0e49a..78ec006f 100644 --- a/lam/templates/3rdParty/pla/lib/PageRender.php +++ b/lam/templates/3rdParty/pla/lib/PageRender.php @@ -197,8 +197,8 @@ class PageRender extends Visitor { $blank++; system_message(array( - 'title'=>_('Invalid value count for [post] processing'), - 'body'=>sprintf('%s (%s [%s])',_('Function() variable expansion can only handle 1 value'), + 'title'=>('Invalid value count for [post] processing'), + 'body'=>sprintf('%s (%s [%s])',('Function() variable expansion can only handle 1 value'), $attribute->getName(false),count($attribute->getValues())), 'type'=>'warn')); @@ -227,8 +227,8 @@ class PageRender extends Visitor { case 'PasswordEncrypt': if (count($args) != 2) { system_message(array( - 'title'=>_('Invalid argument count for PasswordEncrypt'), - 'body'=>sprintf('%s (%s)',_('PasswordEncrypt() only accepts two arguments'),$autovalue['args']), + 'title'=>('Invalid argument count for PasswordEncrypt'), + 'body'=>sprintf('%s (%s)',('PasswordEncrypt() only accepts two arguments'),$autovalue['args']), 'type'=>'warn')); return; @@ -241,8 +241,8 @@ class PageRender extends Visitor { if (preg_match_all('/%(\w+)(\|.+)?(\/[lU])?%/U',strtolower($args[1]),$matchall)) { if (count($matchall[1]) != 1) system_message(array( - 'title'=>_('Invalid value count for PasswordEncrypt'), - 'body'=>sprintf('%s (%s)',_('Unable to get the attribute value for PasswordEncrypt()'),count($matchall[1])), + 'title'=>('Invalid value count for PasswordEncrypt'), + 'body'=>sprintf('%s (%s)',('Unable to get the attribute value for PasswordEncrypt()'),count($matchall[1])), 'type'=>'warn')); $passwordattr = $matchall[1][0]; @@ -258,8 +258,8 @@ class PageRender extends Visitor { if ($passwordattr && preg_match_all('/%(\w+)(\|.+)?(\/[lU])?%/U',strtolower($args[0]),$matchall)) { if (count($matchall[1]) != 1) system_message(array( - 'title'=>_('Invalid value count for PasswordEncrypt'), - 'body'=>sprintf('%s (%s)',_('Unable to get the attribute value for PasswordEncrypt()'),count($matchall[1])), + 'title'=>('Invalid value count for PasswordEncrypt'), + 'body'=>sprintf('%s (%s)',('Unable to get the attribute value for PasswordEncrypt()'),count($matchall[1])), 'type'=>'warn')); $enc = $_REQUEST[$matchall[1][0]][$passwordattr][$i]; @@ -371,7 +371,7 @@ class PageRender extends Visitor { elseif ($attribute->getLDAPtype()) printf('%s', htmlspecialchars($href), - _('Click to view the schema definition for attribute type'),$attribute->getName(false),_($attribute->getFriendlyName())); + ('Click to view the schema definition for attribute type'),$attribute->getName(false),_($attribute->getFriendlyName())); else printf('%s',_('This attribute is not defined in the LDAP schema'),_($attribute->getFriendlyName())); diff --git a/lam/templates/3rdParty/pla/lib/Query.php b/lam/templates/3rdParty/pla/lib/Query.php index a6941e50..3260de24 100644 --- a/lam/templates/3rdParty/pla/lib/Query.php +++ b/lam/templates/3rdParty/pla/lib/Query.php @@ -68,7 +68,7 @@ class Query extends xmlTemplate { else $this->base = array($xmldata['query'][$xml_key]['base']); else - error(sprintf(_('In the XML file (%s), [%s] contains an unknown key.'), + error(sprintf(('In the XML file (%s), [%s] contains an unknown key.'), $this->filename,$xml_key),'error','index.php'); $this->base = array_unique($this->base); @@ -98,7 +98,7 @@ class Query extends xmlTemplate { # Items that should not be an array if (! in_array($xml_key,$allowed_arrays) && is_array($xml_value)) { debug_dump(array(__METHOD__,'key'=>$xml_key,'value'=>$xml_value)); - error(sprintf(_('In the XML file (%s), [%s] is an array, it must be a string.'), + error(sprintf(('In the XML file (%s), [%s] is an array, it must be a string.'), $this->filename,$xml_key),'error'); } @@ -111,7 +111,7 @@ class Query extends xmlTemplate { if (! isset($this->$key) || (! is_array($this->$key) && ! trim($this->$key))) { - $this->setInvalid(sprintf(_('Missing %s in the XML file.'),$key)); + $this->setInvalid(sprintf(('Missing %s in the XML file.'),$key)); break; } } diff --git a/lam/templates/3rdParty/pla/lib/Template.php b/lam/templates/3rdParty/pla/lib/Template.php index 455baa11..83147210 100644 --- a/lam/templates/3rdParty/pla/lib/Template.php +++ b/lam/templates/3rdParty/pla/lib/Template.php @@ -108,8 +108,8 @@ class Template extends xmlTemplate { elseif (! is_object($soc) && ! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>_('Automatically removed objectClass from template'), - 'body'=>sprintf('%s: %s %s',$this->getTitle(),$details,_('removed from template as it is not defined in the schema')), + 'title'=>('Automatically removed objectClass from template'), + 'body'=>sprintf('%s: %s %s',$this->getTitle(),$details,('removed from template as it is not defined in the schema')), 'type'=>'warn')); } @@ -171,19 +171,19 @@ class Template extends xmlTemplate { # Items that should not be an array if (! in_array($xml_key,$allowed_arrays) && is_array($xml_value)) { debug_dump(array(__METHOD__,'key'=>$xml_key,'value'=>$xml_value)); - error(sprintf(_('In the XML file (%s), [%s] is an array, it must be a string.'), + error(sprintf(('In the XML file (%s), [%s] is an array, it must be a string.'), $this->filename,$xml_key),'error'); } $this->$xml_key = $xml_value; if ($xml_key == 'invalid' && $xml_value) - $this->setInvalid(_('Disabled by XML configuration'),true); + $this->setInvalid(('Disabled by XML configuration'),true); } } if (! count($objectclasses)) { - $this->setInvalid(_('ObjectClasses in XML dont exist in LDAP server.')); + $this->setInvalid(('ObjectClasses in XML dont exist in LDAP server.')); return; } else { @@ -200,7 +200,7 @@ class Template extends xmlTemplate { if (! isset($this->$key) || (! is_array($this->$key) && ! trim($this->$key))) { - $this->setInvalid(sprintf(_('Missing %s in the XML file.'),$key)); + $this->setInvalid(sprintf(('Missing %s in the XML file.'),$key)); break; } } @@ -216,7 +216,7 @@ class Template extends xmlTemplate { if (! is_null($attribute)) $attribute->setRDN($counter++); elseif ($this->isType('creation')) - $this->setInvalid(sprintf(_('Missing RDN attribute %s in the XML file.'),$key)); + $this->setInvalid(sprintf(('Missing RDN attribute %s in the XML file.'),$key)); } } @@ -1379,8 +1379,8 @@ class Template extends xmlTemplate { if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning')) system_message(array( - 'title'=>_('Automatically removed attribute from template'), - 'body'=>sprintf('%s: %s %s',$this->getTitle(),$attribute->getName(false),_('removed from template as it is not defined by an ObjectClass')), + 'title'=>('Automatically removed attribute from template'), + 'body'=>sprintf('%s: %s %s',$this->getTitle(),$attribute->getName(false),('removed from template as it is not defined by an ObjectClass')), 'type'=>'warn')); } } @@ -1463,7 +1463,7 @@ class Template extends xmlTemplate { } if (! $haveStructural) - error(_('An entry should have one structural objectClass.'),'error','index.php'); + error(('An entry should have one structural objectClass.'),'error','index.php'); # Work out the attributes to delete. foreach ($this->getAttribute('objectclass')->getRemovedValues() as $value) { diff --git a/lam/templates/3rdParty/pla/lib/TemplateRender.php b/lam/templates/3rdParty/pla/lib/TemplateRender.php index 06a38657..14bb1e48 100644 --- a/lam/templates/3rdParty/pla/lib/TemplateRender.php +++ b/lam/templates/3rdParty/pla/lib/TemplateRender.php @@ -102,8 +102,8 @@ class TemplateRender extends PageRender { default: system_message(array( - 'title'=>_('Unknown Default Attribute context'), - 'body'=>sprintf('%s (%s)',_('A call was made to getDefaultAttribute() with an unkown context'),$type), + 'title'=>('Unknown Default Attribute context'), + 'body'=>sprintf('%s (%s)',('A call was made to getDefaultAttribute() with an unkown context'),$type), 'type'=>'warn')); return; @@ -132,8 +132,8 @@ class TemplateRender extends PageRender { if (count($args) && count($args) > 1) { system_message(array( - 'title'=>_('Too many arguments'), - 'body'=>sprintf('%s (%s)',_('Function() only takes two arguments and more than two were specified'),count($args)), + 'title'=>('Too many arguments'), + 'body'=>sprintf('%s (%s)',('Function() only takes two arguments and more than two were specified'),count($args)), 'type'=>'warn')); return; @@ -146,8 +146,8 @@ class TemplateRender extends PageRender { else system_message(array( - 'title'=>_('Function doesnt exist'), - 'body'=>sprintf('%s (%s)',_('An attempt was made to call a function that doesnt exist'),$function), + 'title'=>('Function doesnt exist'), + 'body'=>sprintf('%s (%s)',('An attempt was made to call a function that doesnt exist'),$function), 'type'=>'warn')); break; @@ -1035,7 +1035,7 @@ class TemplateRender extends PageRender { if (DEBUGTMP) printf('%s
',__METHOD__); - return sprintf($this->layout['hint'],_('Hint: To view the schema for an attribute, click the attribute name.')); + return sprintf($this->layout['hint'],('Hint: To view the schema for an attribute, click the attribute name.')); } /** PAGE ENTRY MENU ITEMS DETAILS **/ @@ -1063,11 +1063,11 @@ class TemplateRender extends PageRender { $href = sprintf('cmd=template_engine&%s&template=',$this->url_base); if (isAjaxEnabled()) - return sprintf($this->layout['actionajax'],IMGDIR,'switch.png',_('Switch Template'), - htmlspecialchars($href),_('Change to another template'),htmlspecialchars($href),str_replace('\'','\\\'',_('Loading')),_('Switch Template')); + return sprintf($this->layout['actionajax'],IMGDIR,'switch.png',('Switch Template'), + htmlspecialchars($href),('Change to another template'),htmlspecialchars($href),str_replace('\'','\\\'',('Loading')),('Switch Template')); else - return sprintf($this->layout['action'],IMGDIR,'switch.png',_('Switch Template'), - htmlspecialchars($href),_('Change to another template'),_('Switch Template')); + return sprintf($this->layout['action'],IMGDIR,'switch.png',('Switch Template'), + htmlspecialchars($href),('Change to another template'),('Switch Template')); } protected function getMenuItemExportBase() { @@ -2170,8 +2170,8 @@ function fillRec(id,value) { $id = isset($params['id']) ? $params['id'] : ''; if (is_array($id)) { system_message(array( - 'title'=>_('Too many arguments'), - 'body'=>sprintf('%s (%s)',_('Helper attribute has too many ID values, only the first one is used'),count($id)), + 'title'=>('Too many arguments'), + 'body'=>sprintf('%s (%s)',('Helper attribute has too many ID values, only the first one is used'),count($id)), 'type'=>'warn')); $id = $id[0]; @@ -2181,8 +2181,8 @@ function fillRec(id,value) { $display = isset($params['display']) ? $params['display'] : ''; if (is_array($display)) { system_message(array( - 'title'=>_('Too many arguments'), - 'body'=>sprintf('%s (%s)',_('Helper attribute has too many DISPLAY values, only the first one is used'),count($display)), + 'title'=>('Too many arguments'), + 'body'=>sprintf('%s (%s)',('Helper attribute has too many DISPLAY values, only the first one is used'),count($display)), 'type'=>'warn')); $display = $display[0]; @@ -2192,8 +2192,8 @@ function fillRec(id,value) { $default = isset($params['default']) ? $params['default'] : ''; if (is_array($default)) { system_message(array( - 'title'=>_('Too many arguments'), - 'body'=>sprintf('%s (%s)',_('Helper attribute has too many DISPLAY values, only the first one is used'),count($default)), + 'title'=>('Too many arguments'), + 'body'=>sprintf('%s (%s)',('Helper attribute has too many DISPLAY values, only the first one is used'),count($default)), 'type'=>'warn')); $default = $default[0]; diff --git a/lam/templates/3rdParty/pla/lib/ds.php b/lam/templates/3rdParty/pla/lib/ds.php index d5f0e041..9773857b 100644 --- a/lam/templates/3rdParty/pla/lib/ds.php +++ b/lam/templates/3rdParty/pla/lib/ds.php @@ -90,7 +90,7 @@ abstract class DS { public function setValue($key,$setting,$value) { if (isset($this->custom->{$key}[$setting])) system_message(array( - 'title'=>_('Configuration setting already defined.'), + 'title'=>('Configuration setting already defined.'), 'body'=>sprintf('A call has been made to reset a configuration value (%s,%s,%s)', $key,$setting,$value), 'type'=>'info')); diff --git a/lam/templates/3rdParty/pla/lib/ds_ldap_pla.php b/lam/templates/3rdParty/pla/lib/ds_ldap_pla.php index e84f56c8..48d83006 100644 --- a/lam/templates/3rdParty/pla/lib/ds_ldap_pla.php +++ b/lam/templates/3rdParty/pla/lib/ds_ldap_pla.php @@ -453,8 +453,8 @@ class ldap_pla extends myldap { unset($attrs[$attr]); system_message(array( - 'title'=>_('Attribute not added'), - 'body'=>sprintf('%s (%s)',_('Hook pre_attr_add prevented attribute from being added'),$attr), + 'title'=>('Attribute not added'), + 'body'=>sprintf('%s (%s)',('Hook pre_attr_add prevented attribute from being added'),$attr), 'type'=>'warn')); } else @@ -467,8 +467,8 @@ class ldap_pla extends myldap { unset($attrs[$attr]); system_message(array( - 'title'=>_('Attribute not modified'), - 'body'=>sprintf('%s (%s)',_('Hook pre_attr_modify prevented attribute from being modified'),$attr), + 'title'=>('Attribute not modified'), + 'body'=>sprintf('%s (%s)',('Hook pre_attr_modify prevented attribute from being modified'),$attr), 'type'=>'warn')); } else { @@ -483,8 +483,8 @@ class ldap_pla extends myldap { unset($attrs[$attr]); system_message(array( - 'title'=>_('Attribute not deleted'), - 'body'=>sprintf('%s (%s)',_('Hook pre_attr_delete prevented attribute from being deleted'),$attr), + 'title'=>('Attribute not deleted'), + 'body'=>sprintf('%s (%s)',('Hook pre_attr_delete prevented attribute from being deleted'),$attr), 'type'=>'warn')); } else @@ -577,8 +577,8 @@ class ldap_pla extends myldap { # Check see and use our alternate uid_dn and password if we have it. if (! $this->login($this->getValue('unique','dn'),$this->getValue('unique','pass'),'unique')) { system_message(array( - 'title'=>_('UNIQUE invalid login/password'), - 'body'=>sprintf('%s (%s)',_('Unable to connect to LDAP server with the unique login/password, please check your configuration.'), + 'title'=>('UNIQUE invalid login/password'), + 'body'=>sprintf('%s (%s)',('Unable to connect to LDAP server with the unique login/password, please check your configuration.'), $this->getName()), 'type'=>'warn')); @@ -612,9 +612,9 @@ class ldap_pla extends myldap { $href = sprintf('cmd.php?cmd=query_engine&server_id=%s&filter=%s&scope=sub&query=none&format=list&search=true',$this->index,$query['filter']); system_message(array( - 'title'=>_('Attribute value would not be unique'), + 'title'=>('Attribute value would not be unique'), 'body'=>sprintf('%s (%s)', - _('This update has been or will be cancelled, it would result in an attribute value not being unique. You might like to search the LDAP server for the offending entry.'), + ('This update has been or will be cancelled, it would result in an attribute value not being unique. You might like to search the LDAP server for the offending entry.'), htmlspecialchars($href), _('Search')), 'type'=>'warn')); diff --git a/lam/templates/3rdParty/pla/lib/ds_myldap.php b/lam/templates/3rdParty/pla/lib/ds_myldap.php index 48b733a0..17fb4652 100644 --- a/lam/templates/3rdParty/pla/lib/ds_myldap.php +++ b/lam/templates/3rdParty/pla/lib/ds_myldap.php @@ -631,7 +631,7 @@ class myldap extends DS { # Invalid regex? if (is_null($CACHE['authz_id'])) - error(sprintf(_('It seems that sasl_authz_id_regex "%s" contains invalid PCRE regular expression. The error is "%s".'), + error(sprintf(('It seems that sasl_authz_id_regex "%s" contains invalid PCRE regular expression. The error is "%s".'), $this->getValue('sasl','authz_id_regex'),(isset($php_errormsg) ? $php_errormsg : '')), 'error','index.php'); diff --git a/lam/templates/3rdParty/pla/lib/functions.php b/lam/templates/3rdParty/pla/lib/functions.php index c6c7c7e5..e0819043 100644 --- a/lam/templates/3rdParty/pla/lib/functions.php +++ b/lam/templates/3rdParty/pla/lib/functions.php @@ -62,7 +62,7 @@ function __autoload($className) { system_message(array( 'title'=>_('Generic Error'), 'body'=>sprintf('%s: %s [%s]', - __METHOD__,_('Called to load a class that cant be found'),$className), + __METHOD__,('Called to load a class that cant be found'),$className), 'type'=>'error')); } @@ -224,7 +224,7 @@ function check_config($config_file) { # Make sure their PHP version is current enough if (strcmp(phpversion(),REQUIRED_PHP_VERSION) < 0) system_message(array( - 'title'=>_('Incorrect version of PHP'), + 'title'=>('Incorrect version of PHP'), 'body'=>sprintf('phpLDAPadmin requires PHP version %s or greater.
(You are using %s)', REQUIRED_PHP_VERSION,phpversion()), 'type'=>'error')); @@ -322,24 +322,24 @@ function cmd_control_pane($type) { case 'main' : return array( 'home'=>array( - 'title'=>_('Home'), + 'title'=>('Home'), 'enable'=>false, - 'link'=>sprintf('href="index.php" title="%s"',_('Home')), - 'image'=>sprintf('%s',IMGDIR,_('Home'))), + 'link'=>sprintf('href="index.php" title="%s"',('Home')), + 'image'=>sprintf('%s',IMGDIR,('Home'))), 'purge'=>array( - 'title'=>_('Purge caches'), + 'title'=>('Purge caches'), 'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('script','purge_cache') : false, 'link'=>sprintf('href="cmd.php?cmd=purge_cache" onclick="return ajDISPLAY(\'BODY\',\'cmd=purge_cache\',\'%s\');" title="%s"', - _('Clearing cache'),_('Purge caches')), - 'image'=>sprintf('%s',IMGDIR,_('Purge caches'))), + ('Clearing cache'),('Purge caches')), + 'image'=>sprintf('%s',IMGDIR,('Purge caches'))), 'hide_debug_info'=>array( - 'title'=>_('Show Cache'), + 'title'=>('Show Cache'), 'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('script','show_cache') : false, 'link'=>sprintf('href="cmd.php?cmd=show_cache" onclick="return ajDISPLAY(\'BODY\',\'cmd=show_cache\',\'%s\');" title="%s"', - _('Loading'),_('Show Cache'),_('Show Cache')), - 'image'=>sprintf('%s',IMGDIR,_('Show Cache'))), + ('Loading'),('Show Cache'),('Show Cache')), + 'image'=>sprintf('%s',IMGDIR,('Show Cache'))), ); break; @@ -349,32 +349,32 @@ function cmd_control_pane($type) { 'forum'=>array( 'title'=>_('Forum'), 'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true, - 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('forum'),_('Forum')), - 'image'=>sprintf('%s',IMGDIR,_('Forum'))), + 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('forum'),('Forum')), + 'image'=>sprintf('%s',IMGDIR,('Forum'))), 'feature'=>array( 'title'=>_('Request feature'), 'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true, - 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('add_rfe'),_('Request feature')), - 'image'=>sprintf('%s',IMGDIR,_('Request feature'))), + 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('add_rfe'),('Request feature')), + 'image'=>sprintf('%s',IMGDIR,('Request feature'))), 'bug'=>array( 'title'=>_('Report a bug'), 'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true, - 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('add_bug'),_('Report a bug')), - 'image'=>sprintf('%s',IMGDIR,_('Report a bug'))), + 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('add_bug'),('Report a bug')), + 'image'=>sprintf('%s',IMGDIR,('Report a bug'))), 'donation'=>array( 'title'=>_('Donate'), 'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true, - 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('donate'),_('Donate')), - 'image'=>sprintf('%s',IMGDIR,_('Donate'))), + 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('donate'),('Donate')), + 'image'=>sprintf('%s',IMGDIR,('Donate'))), 'help'=>array( 'title'=>_('Help'), 'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true, - 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('documentation'),_('Help')), - 'image'=>sprintf('%s',IMGDIR,_('Help'))) + 'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('documentation'),('Help')), + 'image'=>sprintf('%s',IMGDIR,('Help'))) ); break; @@ -422,7 +422,7 @@ function debug_dump_backtrace($msg='Calling BackTrace',$die=false) { * Send a debug as a sys message */ function debug_sysmsg($msg) { - system_message(array('title'=>_('Debug'),'body'=>$msg,'type'=>'debug')); + system_message(array('title'=>('Debug'),'body'=>$msg,'type'=>'debug')); } /** @@ -1356,8 +1356,8 @@ function get_next_number($base,$attr,$increment=false,$filter=false,$startmin=nu if (! $server->getValue('auto_number','enable')) { system_message(array( - 'title'=>_('AUTO_NUMBER is disabled for this server'), - 'body'=>sprintf('%s (%s)',_('A call was made to get_next_number(), however, it is disabled for this server'),$attr), + 'title'=>('AUTO_NUMBER is disabled for this server'), + 'body'=>sprintf('%s (%s)',('A call was made to get_next_number(), however, it is disabled for this server'),$attr), 'type'=>'warn')); return false; @@ -1366,8 +1366,8 @@ function get_next_number($base,$attr,$increment=false,$filter=false,$startmin=nu # Check see and use our alternate uid_dn and password if we have it. if (! $server->login($server->getValue('auto_number','dn'),$server->getValue('auto_number','pass'),'auto_number')) { system_message(array( - 'title'=>_('AUTO_NUMBER invalid login/password'), - 'body'=>sprintf('%s (%s)',_('Unable to connect to LDAP server with the auto_number login/password, please check your configuration.'), + 'title'=>('AUTO_NUMBER invalid login/password'), + 'body'=>sprintf('%s (%s)',('Unable to connect to LDAP server with the auto_number login/password, please check your configuration.'), $server->getName()), 'type'=>'warn')); @@ -1380,8 +1380,8 @@ function get_next_number($base,$attr,$increment=false,$filter=false,$startmin=nu if (! trim($query['base'])) { system_message(array( - 'title'=>_('No AUTO_NUMBER search_base configured for this server'), - 'body'=>_('A call was made to get_next_number(), however, the base to search is empty.'), + 'title'=>('No AUTO_NUMBER search_base configured for this server'), + 'body'=>('A call was made to get_next_number(), however, the base to search is empty.'), 'type'=>'warn')); return false; @@ -1392,8 +1392,8 @@ function get_next_number($base,$attr,$increment=false,$filter=false,$startmin=nu if (! $server->dnExists($query['base'])) { system_message(array( - 'title'=>_('No AUTO_NUMBER search_base exists for this server'), - 'body'=>sprintf('%s (%s)',_('A call was made to get_next_number(), however, the base to search does not exist for this server.'),$query['base']), + 'title'=>('No AUTO_NUMBER search_base exists for this server'), + 'body'=>sprintf('%s (%s)',('A call was made to get_next_number(), however, the base to search does not exist for this server.'),$query['base']), 'type'=>'warn')); return false; @@ -1401,8 +1401,8 @@ function get_next_number($base,$attr,$increment=false,$filter=false,$startmin=nu if (! is_string($attr) || ! $server->getSchemaAttribute($attr)) { system_message(array( - 'title'=>_('AUTO_NUMBER search attribute invalid'), - 'body'=>sprintf('%s (%s)',_('The search attribute for AUTO_NUMBER is invalid, expecting a single valid attribute.'),$attr), + 'title'=>('AUTO_NUMBER search attribute invalid'), + 'body'=>sprintf('%s (%s)',('The search attribute for AUTO_NUMBER is invalid, expecting a single valid attribute.'),$attr), 'type'=>'warn')); return false; @@ -1478,16 +1478,16 @@ function get_next_number($base,$attr,$increment=false,$filter=false,$startmin=nu case '0': system_message(array( - 'title'=>_('AUTO_NUMBER pool filter didnt return any DNs'), - 'body'=>sprintf('%s (%s)',_('Please change your filter parameter, or check your auto_number,search_base configuration'),$query['filter']), + 'title'=>('AUTO_NUMBER pool filter didnt return any DNs'), + 'body'=>sprintf('%s (%s)',('Please change your filter parameter, or check your auto_number,search_base configuration'),$query['filter']), 'type'=>'warn')); return false; default: system_message(array( - 'title'=>_('AUTO_NUMBER pool filter returned too many DNs'), - 'body'=>sprintf('%s (%s)',_('Please change your filter parameter, or check your auto_number,search_base configuration'),$query['filter']), + 'title'=>('AUTO_NUMBER pool filter returned too many DNs'), + 'body'=>sprintf('%s (%s)',('Please change your filter parameter, or check your auto_number,search_base configuration'),$query['filter']), 'type'=>'warn')); return false; @@ -1511,8 +1511,8 @@ function get_next_number($base,$attr,$increment=false,$filter=false,$startmin=nu # No other cases allowed. The user has an error in the configuration default: system_message(array( - 'title'=>_('Invalid AUTO_NUMBER mechanism'), - 'body'=>sprintf('%s (%s)',_('Your config file specifies an unknown AUTO_NUMBER search mechanism.'),$server->getValue('auto_number','mechanism')), + 'title'=>('Invalid AUTO_NUMBER mechanism'), + 'body'=>sprintf('%s (%s)',('Your config file specifies an unknown AUTO_NUMBER search mechanism.'),$server->getValue('auto_number','mechanism')), 'type'=>'warn')); return false; diff --git a/lam/templates/3rdParty/pla/lib/hooks.php b/lam/templates/3rdParty/pla/lib/hooks.php index 57066ed1..d6ebb38a 100644 --- a/lam/templates/3rdParty/pla/lib/hooks.php +++ b/lam/templates/3rdParty/pla/lib/hooks.php @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * @author Benjamin Drieu and Alc�ve + * @author Benjamin Drieu and Alc�?ve * @package phpLDAPadmin */ @@ -123,7 +123,7 @@ function add_hook($hook_name,$hook_function,$priority=0,$rollback_function=null) # First, see if the hook function exists. if (! function_exists($hook_function)) { system_message(array( - 'title'=>_('Hook function does not exist'), + 'title'=>('Hook function does not exist'), 'body'=>sprintf('Hook name: %s
Hook function: %s',$hook_name,$hook_function), 'type'=>'warn')); diff --git a/lam/templates/3rdParty/pla/lib/xmlTemplates.php b/lam/templates/3rdParty/pla/lib/xmlTemplates.php index 08389de5..2dbe1dcb 100644 --- a/lam/templates/3rdParty/pla/lib/xmlTemplates.php +++ b/lam/templates/3rdParty/pla/lib/xmlTemplates.php @@ -93,8 +93,8 @@ abstract class xmlTemplates { $changed = true; system_message(array( - 'title'=>_('New Template XML found.'), - 'body'=>sprintf('%s %s (%s)',_('A new template XML file has been loaded'),$file,$type), + 'title'=>('New Template XML found.'), + 'body'=>sprintf('%s %s (%s)',('A new template XML file has been loaded'),$file,$type), 'type'=>'info','special'=>true)); } }