Code cleaning

This commit is contained in:
Benjamin Renard 2019-03-11 22:42:20 +01:00
parent 80b747a0c5
commit b9102aeb9e
164 changed files with 122 additions and 105 deletions

View file

@ -47,3 +47,4 @@ else {
// Print template
LSsession :: displayTemplate();

View file

@ -31,4 +31,4 @@ define('LS_ASTERISK_HASH_PWD_FORMAT','%{uid}:sip.lsexample.com:%{clearPassword}'
// Password attribute name to generate MD5 hashed asterisk password
define('LS_ASTERISK_USERPASSWORD_ATTR','userPassword');
?>

View file

@ -34,3 +34,4 @@ define('LS_EXPORTSEARCHRESULTASCSV_ENCLOSURE','"');
// CSV file escape character (available since PHP 5.5.4)
define('LS_EXPORTSEARCHRESULTASCSV_ESCAPE_CHAR','\\');

View file

@ -29,4 +29,3 @@
// Pear :: NET_FTP
define('NET_FTP','/usr/share/php/Net/FTP.php');
?>

View file

@ -81,4 +81,3 @@ $MAIL_HEARDERS = array(
"format" => "flowed"
);
?>

View file

@ -46,3 +46,4 @@ define('LS_MAILDIR_FTP_MAILDIR_PATH_REGEX','/^\/home\/vmail\/([^\/]+)\/$/');
// Serveur FTP - Maildir CHMOD
define('LS_MAILDIR_FTP_MAILDIR_CHMOD','700');

View file

@ -22,3 +22,4 @@
// PhpLdapAdmin View Object URL format
define('LS_PHPLDAPADMIN_VIEW_OBJECT_URL_FORMAT','//'.$_SERVER['SERVER_NAME'].'/phpldapadmin/cmd.php?cmd=template_engine&server_id=0&dn=%{dn}');

View file

@ -62,4 +62,3 @@ define('LS_POSIX_HOMEDIRECTORY_FTP_PATH','%{homeDirectory}');
// Pattern to transform user DN to uid
define('LS_POSIX_DN_TO_UID_PATTERN','/^'.LS_POSIX_UID_ATTR.'=([^,]*),.*$/');
?>

View file

@ -61,4 +61,3 @@ define('LS_SAMBA_HOME_PATH_FORMAT','\\SERVER\%{uid}');
// Format du chemin du profile
define('LS_SAMBA_PROFILE_PATH_FORMAT','\\SERVER\profiles\%{uid}');
?>

View file

@ -2174,3 +2174,4 @@ $GLOBALS['supannNomenclatures'] = array (
),
),
);

View file

@ -61,4 +61,3 @@ define('LSAUTH_CAS_SERVER_NO_SSL_VALIDATION',false);
// error on ticket validation. Possibles values : 2 or 3
//define('LSAUTH_CAS_CURL_SSLVERION',3);
?>

View file

@ -46,3 +46,4 @@
* RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
*/
//define('LSAUTHMETHOD_HTTP_METHOD', 'PHP_PASS');

View file

@ -32,4 +32,3 @@ define('LSAUTHMETHOD_ANONYMOUS_USER','ls');
// Disable logout
define('LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT',False);
?>

View file

@ -103,4 +103,4 @@ $GLOBALS['LSobjects']['LScompany'] = array (
/* ----------- end -----------*/
)
);
?>

View file

@ -181,4 +181,4 @@ $GLOBALS['LSobjects']['LSgroup'] = array (
)
);
?>

View file

@ -713,4 +713,4 @@ $GLOBALS['LSobjects']['LSpeople'] = array (
) // Fin args
);
?>

View file

@ -27,4 +27,3 @@ $GLOBALS['LSaddons']['loads'] = array (
'maildir'
);
?>

View file

@ -205,3 +205,4 @@ $GLOBALS['defaultJSscipts']=array(
// CSS
$GLOBALS['defaultCSSfiles']=array('../light-blue.css');

View file

@ -48,4 +48,3 @@ require_once LS_INCLUDE_DIR.'functions.php';
require_once LS_CLASS_DIR.'class.LSsession.php';
?>

View file

@ -138,3 +138,4 @@ else {
LSsession :: setTemplate('login.tpl');
}
LSsession :: displayTemplate();

View file

@ -111,4 +111,4 @@ else {
// Affichage des retours d'erreurs
LSsession :: displayTemplate();
?>

View file

@ -97,4 +97,4 @@ else {
// Affichage des retours d'erreurs
LSsession :: displayTemplate();
?>

View file

@ -82,3 +82,4 @@ else {
LSsession :: setTemplate('login.tpl');
}
LSsession :: displayTemplate();

View file

@ -111,5 +111,4 @@ LSerror :: defineError('ASTERISK_03',
}
return hashAsteriskPassword($ldapObject,(string)$password);
}

View file

@ -152,3 +152,4 @@ LSerror :: defineError('LS_EXPORTSEARCHRESULTASCSV_03',
}
return (fputcsv($csv, $row, LS_EXPORTSEARCHRESULTASCSV_DELIMITER, LS_EXPORTSEARCHRESULTASCSV_ENCLOSURE, LS_EXPORTSEARCHRESULTASCSV_ESCAPE_CHAR) !== false);
}

View file

@ -221,3 +221,4 @@ LSerror :: defineError('FTP_05',
}
return true;
}

View file

@ -100,4 +100,4 @@ LSerror :: defineError('MAIL_01',
}
return true;
}
?>

View file

@ -178,4 +178,5 @@ $retval=true;
return;
}
return true;
}
}

View file

@ -64,3 +64,4 @@ function redirectToPhpLdapAdmin(&$ldapObject) {
LSsession::redirect($url);
return true;
}

View file

@ -410,4 +410,4 @@ define('LS_SAMBA_INFINITY_TIME',2147483647);
function generate_sambaKickoffTime_from_shadowExpire($ldapObject) {
return generate_timestamp_from_shadowExpire($ldapObject);
}
?>

View file

@ -137,4 +137,3 @@ LSerror :: defineError('LSattr_html_03',
_("LSattr_html_%{type} : Multiple data are not supported for this field type.")
);
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_boolean extends LSattr_html {
}
?>

View file

@ -45,3 +45,4 @@ class LSattr_html_date extends LSattr_html {
}
}

View file

@ -60,4 +60,3 @@ class LSattr_html_image extends LSattr_html {
}
?>

View file

@ -30,3 +30,4 @@ class LSattr_html_jsonCompositeAttribute extends LSattr_html {
var $LSformElement_type = 'jsonCompositeAttribute';
}

View file

@ -30,3 +30,4 @@ class LSattr_html_labeledValue extends LSattr_html {
var $LSformElement_type = 'labeledValue';
}

View file

@ -31,4 +31,3 @@ class LSattr_html_mail extends LSattr_html {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_mailQuota extends LSattr_html {
}
?>

View file

@ -132,4 +132,3 @@ class LSattr_html_maildir extends LSattr_html {
}
?>

View file

@ -60,4 +60,3 @@ class LSattr_html_password extends LSattr_html {
}
?>

View file

@ -33,4 +33,3 @@ class LSattr_html_postaladdress extends LSattr_html_textarea {
}
?>

View file

@ -33,4 +33,3 @@ class LSattr_html_pre extends LSattr_html_textarea {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_quota extends LSattr_html {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_rss extends LSattr_html {
}
?>

View file

@ -36,3 +36,4 @@ class LSattr_html_select_box extends LSattr_html_select_list {
var $LSformElement_type = 'select_box';
}

View file

@ -403,3 +403,4 @@ _("LSattr_html_select_list : Fail to decode the following attribute %{attr} valu
LSerror :: defineError('LSattr_html_select_list_05',
_("LSattr_html_select_list : No component %{component} found in the following attribute %{attr} JSON value : %{value}")
);

View file

@ -243,4 +243,3 @@ LSerror :: defineError('LSattr_html_select_object_03',
_("LSattr_html_select_object : more than one object returned corresponding to value %{val} of attribute %{attr}.")
);
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_ssh_key extends LSattr_html {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_supannActivite extends LSattr_html {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_supannEmpCorps extends LSattr_html {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_supannEtablissement extends LSattr_html {
}
?>

View file

@ -30,3 +30,4 @@ class LSattr_html_supannEtuInscription extends LSattr_html {
var $LSformElement_type = 'supannEtuInscription';
}

View file

@ -31,4 +31,3 @@ class LSattr_html_supannLabeledValue extends LSattr_html {
}
?>

View file

@ -30,3 +30,4 @@ class LSattr_html_supannRoleEntite extends LSattr_html {
var $LSformElement_type = 'supannRoleEntite';
}

View file

@ -31,4 +31,3 @@ class LSattr_html_supannRoleGenerique extends LSattr_html {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_supannTypeEntite extends LSattr_html {
}
?>

View file

@ -30,3 +30,4 @@ class LSattr_html_tel extends LSattr_html {
var $LSformElement_type = 'tel';
}

View file

@ -31,4 +31,3 @@ class LSattr_html_text extends LSattr_html {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_textarea extends LSattr_html {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_url extends LSattr_html {
}
?>

View file

@ -31,4 +31,3 @@ class LSattr_html_valueWithUnit extends LSattr_html {
}
?>

View file

@ -32,3 +32,4 @@ class LSattr_html_wysiwyg extends LSattr_html_textarea {
var $LSformElement_type = 'wysiwyg';
}

View file

@ -31,4 +31,3 @@ class LSattr_html_xmpp extends LSattr_html {
}
?>

View file

@ -29,4 +29,3 @@ class LSattr_ldap_ascii extends LSattr_ldap {
// \\
}
?>

View file

@ -111,4 +111,3 @@ class LSattr_ldap_boolean extends LSattr_ldap {
}
?>

View file

@ -87,4 +87,6 @@ class LSattr_ldap_compositeValueToJSON extends LSattr_ldap {
}
return False;
}
}

View file

@ -81,4 +81,3 @@ class LSattr_ldap_date extends LSattr_ldap {
}
?>

View file

@ -29,4 +29,3 @@ class LSattr_ldap_image extends LSattr_ldap {
// \\
}
?>

View file

@ -29,4 +29,3 @@ class LSattr_ldap_numeric extends LSattr_ldap {
// \\
}
?>

View file

@ -255,6 +255,7 @@ class LSattr_ldap_password extends LSattr_ldap {
function getClearPassword() {
return $this -> clearPassword;
}
}
/**
@ -267,4 +268,3 @@ LSerror :: defineError('LSattr_ldap_password_02',
_("LSattr_ldap_password : Encoding function %{function} is not callable. This password will be stored in clear text.")
);
?>

View file

@ -47,6 +47,6 @@ class LSattr_ldap_postaladdress extends LSattr_ldap {
function getUpdateData($data) {
return str_replace("\n","$",$data);
}
}
?>

View file

@ -57,6 +57,6 @@ class LSattr_ldap_shadowExpire extends LSattr_ldap {
}
return $ret;
}
}
?>

View file

@ -738,4 +738,3 @@ LSerror :: defineError('LSattribute_09',
_("LSattribute : The attr_%{type} of the attribute %{name} is not yet defined.")
);
?>

View file

@ -151,13 +151,12 @@ class LSauth {
* For compatibillity until loginForm is migrated in LSauth
*/
public function disableLoginForm() {
self :: $params['displayLoginForm'] = false;
}
public function displayLoginForm() {
return self :: $params['displayLoginForm'];
}
self :: $params['displayLoginForm'] = false;
}
public function displayLoginForm() {
return self :: $params['displayLoginForm'];
}
}
@ -186,4 +185,3 @@ LSerror :: defineError('LSauth_07',
_("LSauth : Failed to get authentication informations from provider.")
);
?>

View file

@ -112,6 +112,6 @@ class LSauthMethod {
}
return false;
}
}
?>

View file

@ -105,10 +105,11 @@ class LSauthMethod_CAS extends LSauthMethod {
}
}
/*
* Error Codes
*/
LSerror :: defineError('LSauthMethod_CAS_01',
_("LSauthMethod_CAS : Failed to load phpCAS.")
);
?>

View file

@ -110,3 +110,4 @@ class LSauthMethod_HTTP extends LSauthMethod_basic {
LSerror :: defineError('LSauthMethod_HTTP_01',
_("LSauthMethod_HTTP : the %{var} environnement variable is missing.")
);

View file

@ -61,10 +61,11 @@ class LSauthMethod_anonymous extends LSauthMethod {
}
}
/*
* Error Codes
*/
LSerror :: defineError('LSauthMethod_anonymous_01',
_("LSauthMethod_anonymous : You must define the LSAUTHMETHOD_ANONYMOUS_USER contant in the configuration file.")
);
?>

View file

@ -81,4 +81,3 @@ class LSauthMethod_basic extends LSauthMethod {
}
?>

View file

@ -109,6 +109,4 @@ class LSconfig {
}
}
?>

View file

@ -41,4 +41,3 @@ class LSconfirmBox {
}
?>

View file

@ -216,6 +216,7 @@ class LSerror {
return "UNKNOWN_ERROR";
}
}
}
/*
@ -223,3 +224,4 @@ class LSerror {
*/
LSerror :: defineError(-1,_("Unknown error : %{error}"));
LSerror :: defineError(-2,_("PHP error : %{error}"));

View file

@ -752,6 +752,7 @@ class LSform {
}
}
}
}
/**
@ -785,4 +786,4 @@ _("LSform : The data entry form %{name} is not correctly configured.")
LSerror :: defineError('LSform_09',
_("LSform : The element %{name}, listed as displayed in data entry form configuration, doesn't exist.")
);
?>

View file

@ -309,6 +309,6 @@ class LSformElement {
public function getParam($param, $default=null, $cast=null) {
return LSconfig :: get($param, $default, $cast, $this -> params);
}
}
?>

View file

@ -65,3 +65,4 @@ class LSformElement_boolean extends LSformElement {
}
}

View file

@ -210,4 +210,3 @@ class LSformElement_date extends LSformElement {
}
}
?>

View file

@ -115,4 +115,3 @@ class LSformElement_image extends LSformElement {
}
}
?>

View file

@ -299,3 +299,4 @@ class LSformElement_jsonCompositeAttribute extends LSformElement {
}
}

View file

@ -126,3 +126,4 @@ class LSformElement_labeledValue extends LSformElement {
}
}

View file

@ -63,6 +63,6 @@ class LSformElement_mail extends LSformElement_text {
}
return parent :: fetchTemplate($template,$variables);
}
}
?>

View file

@ -160,6 +160,6 @@ class LSformElement_mailQuota extends LSformElement {
return true;
}
}
}
?>

View file

@ -116,4 +116,3 @@ class LSformElement_maildir extends LSformElement_text {
}
?>

View file

@ -373,3 +373,4 @@ _("LSformElement_password : Fail to determine witch e-mail attribute to use to s
LSerror :: defineError('LSformElement_password_05',
_("LSformElement_password : Fail to determine witch e-mail attribute to use to send new password : get_mail_attr_function throwed an exception : %{msg}")
);

View file

@ -78,6 +78,7 @@ class LSformElement_postaladdress extends LSformElement_textarea {
}
return $return;
}
}
function LSformElement_postaladdress__generate_pattern($LSformElement) {
@ -87,3 +88,4 @@ function LSformElement_postaladdress__generate_pattern($LSformElement) {
LSerror :: defineError('LSformElement_postaladdress_01',
_("LSformElement_postaladdress : Map URL pattern generate function is not callabled (%{function}).")
);

View file

@ -47,4 +47,3 @@ class LSformElement_pre extends LSformElement_textarea {
}
?>

View file

@ -151,6 +151,6 @@ class LSformElement_quota extends LSformElement {
private function getFactor() {
return $this -> getParam('html_options.factor', 1);
}
}
?>

View file

@ -55,4 +55,3 @@ class LSformElement_rss extends LSformElement_text {
}
?>

View file

@ -143,3 +143,4 @@ function LSformElement_select_checkIsValidValue($params,$template) {
$template -> assign('LSformElement_select_isValidValue_label',$label);
}
LStemplate :: registerFunction('LSformElement_select_checkIsValidValue','LSformElement_select_checkIsValidValue');

View file

@ -52,3 +52,4 @@ class LSformElement_select_box extends LSformElement_select {
}
}

View file

@ -240,6 +240,6 @@ class LSformElement_select_object extends LSformElement {
}
}
}
}
?>

Some files were not shown because too many files have changed in this diff Show more