mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +01:00
Code cleaning: fix tabs
This commit is contained in:
parent
febb83e39d
commit
40fdc92451
47 changed files with 1814 additions and 1795 deletions
|
@ -116,11 +116,17 @@ LSerror :: defineError('SUPANN_04',
|
||||||
*/
|
*/
|
||||||
function generate_displayName($ldapObject) {
|
function generate_displayName($ldapObject) {
|
||||||
if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_LASTNAME_ATTR'] ]) != 'LSattribute' ) {
|
if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_LASTNAME_ATTR'] ]) != 'LSattribute' ) {
|
||||||
LSerror :: addErrorCode('SUPANN_01',array('dependency' => $GLOBALS['LS_SUPANN_LASTNAME_ATTR'], 'attr' => 'cn'));
|
LSerror :: addErrorCode(
|
||||||
|
'SUPANN_01',
|
||||||
|
array('dependency' => $GLOBALS['LS_SUPANN_LASTNAME_ATTR'], 'attr' => 'cn')
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_FIRSTNAME_ATTR'] ]) != 'LSattribute' ) {
|
if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_FIRSTNAME_ATTR'] ]) != 'LSattribute' ) {
|
||||||
LSerror :: addErrorCode('SUPANN_01',array('dependency' => $GLOBALS['LS_SUPANN_FIRSTNAME_ATTR'], 'attr' => 'cn'));
|
LSerror :: addErrorCode(
|
||||||
|
'SUPANN_01',
|
||||||
|
array('dependency' => $GLOBALS['LS_SUPANN_FIRSTNAME_ATTR'], 'attr' => 'cn')
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,11 +147,17 @@ LSerror :: defineError('SUPANN_04',
|
||||||
*/
|
*/
|
||||||
function generate_cn($ldapObject) {
|
function generate_cn($ldapObject) {
|
||||||
if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_LASTNAME_ATTR'] ]) != 'LSattribute' ) {
|
if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_LASTNAME_ATTR'] ]) != 'LSattribute' ) {
|
||||||
LSerror :: addErrorCode('SUPANN_01',array('dependency' => $GLOBALS['LS_SUPANN_LASTNAME_ATTR'], 'attr' => 'cn'));
|
LSerror :: addErrorCode(
|
||||||
|
'SUPANN_01',
|
||||||
|
array('dependency' => $GLOBALS['LS_SUPANN_LASTNAME_ATTR'], 'attr' => 'cn')
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_FIRSTNAME_ATTR'] ]) != 'LSattribute' ) {
|
if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_FIRSTNAME_ATTR'] ]) != 'LSattribute' ) {
|
||||||
LSerror :: addErrorCode('SUPANN_01',array('dependency' => $GLOBALS['LS_SUPANN_FIRSTNAME_ATTR'], 'attr' => 'cn'));
|
LSerror :: addErrorCode(
|
||||||
|
'SUPANN_01',
|
||||||
|
array('dependency' => $GLOBALS['LS_SUPANN_FIRSTNAME_ATTR'], 'attr' => 'cn')
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +180,10 @@ LSerror :: defineError('SUPANN_04',
|
||||||
*/
|
*/
|
||||||
function generate_eduPersonOrgUnitDN($ldapObject) {
|
function generate_eduPersonOrgUnitDN($ldapObject) {
|
||||||
if ( get_class($ldapObject -> attrs[ 'supannEntiteAffectation' ]) != 'LSattribute' ) {
|
if ( get_class($ldapObject -> attrs[ 'supannEntiteAffectation' ]) != 'LSattribute' ) {
|
||||||
LSerror :: addErrorCode('SUPANN_01',array('dependency' => 'supannEntiteAffectation', 'attr' => 'eduPersonOrgUnitDN'));
|
LSerror :: addErrorCode(
|
||||||
|
'SUPANN_01',
|
||||||
|
array('dependency' => 'supannEntiteAffectation', 'attr' => 'eduPersonOrgUnitDN')
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +308,7 @@ LSerror :: defineError('SUPANN_04',
|
||||||
if (preg_match_all('/\[([^=]*)=([^\]]*)\]/',$val,$matches)) {
|
if (preg_match_all('/\[([^=]*)=([^\]]*)\]/',$val,$matches)) {
|
||||||
$parseValue = array();
|
$parseValue = array();
|
||||||
for($i=0; $i<count($matches[0]); $i++) {
|
for($i=0; $i<count($matches[0]); $i++) {
|
||||||
$parseValue[$matches[1][$i]]=$matches[2][$i];
|
$parseValue[$matches[1][$i]] = array$matches[2][$i];
|
||||||
}
|
}
|
||||||
return $parseValue;
|
return $parseValue;
|
||||||
}
|
}
|
||||||
|
@ -368,7 +383,8 @@ LSerror :: defineError('SUPANN_04',
|
||||||
|
|
||||||
foreach($search -> getSearchEntries() as $e) {
|
foreach($search -> getSearchEntries() as $e) {
|
||||||
$code = $e->get('supannCodeEntite');
|
$code = $e->get('supannCodeEntite');
|
||||||
if (is_array($code)) $code=$code[0];
|
if (is_array($code))
|
||||||
|
$code = $code[0];
|
||||||
$retval[$code] = $e->displayName;
|
$retval[$code] = $e->displayName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,7 +326,7 @@ class LSformElement extends LSlog_staticLoggerClass {
|
||||||
/**
|
/**
|
||||||
* Return a parameter (or default value)
|
* Return a parameter (or default value)
|
||||||
*
|
*
|
||||||
* @param[] $param The parameter
|
* @param[] $param The configuration parameter
|
||||||
* @param[] $default The default value (default : null)
|
* @param[] $default The default value (default : null)
|
||||||
* @param[] $cast Cast resulting value in specific type (default : disabled)
|
* @param[] $cast Cast resulting value in specific type (default : disabled)
|
||||||
*
|
*
|
||||||
|
|
|
@ -160,7 +160,7 @@ class LSioFormatDriver extends LSlog_staticLoggerClass {
|
||||||
/**
|
/**
|
||||||
* Return a option parameter (or default value)
|
* Return a option parameter (or default value)
|
||||||
*
|
*
|
||||||
* @param[] $param The option parameter
|
* @param[] $param The configuration parameter
|
||||||
* @param[] $default The default value (default : null)
|
* @param[] $default The default value (default : null)
|
||||||
* @param[] $cast Cast resulting value in specific type (default : disabled)
|
* @param[] $cast Cast resulting value in specific type (default : disabled)
|
||||||
*
|
*
|
||||||
|
|
|
@ -323,7 +323,9 @@ class LSlog {
|
||||||
* @retval void
|
* @retval void
|
||||||
**/
|
**/
|
||||||
public static function exception($exception, $prefix=null, $fatal=true, $logger=null) {
|
public static function exception($exception, $prefix=null, $fatal=true, $logger=null) {
|
||||||
$message = ($prefix?"$prefix :\n":"An exception occured :\n"). self :: get_debug_backtrace_context(). "\n" .
|
$message =
|
||||||
|
($prefix?"$prefix :\n":"An exception occured :\n").
|
||||||
|
self :: get_debug_backtrace_context(). "\n" .
|
||||||
"## ".$exception->getFile().":".$exception->getLine(). " : ". $exception->getMessage();
|
"## ".$exception->getFile().":".$exception->getLine(). " : ". $exception->getMessage();
|
||||||
if (is_null($logger))
|
if (is_null($logger))
|
||||||
self :: logging(($fatal?'FATAL':'ERROR'), $message);
|
self :: logging(($fatal?'FATAL':'ERROR'), $message);
|
||||||
|
|
|
@ -86,7 +86,8 @@ class LSselect extends LSlog_staticLoggerClass {
|
||||||
* @param[] $id string The LSselect ID
|
* @param[] $id string The LSselect ID
|
||||||
* @param[] $param string The configuration parameter
|
* @param[] $param string The configuration parameter
|
||||||
* @param[] $default mixed The default value (optional, default : null)
|
* @param[] $default mixed The default value (optional, default : null)
|
||||||
* @param[] $cast Cast string|null resulting value in specific type (optional, default : null=disabled)
|
* @param[] $cast Cast string|null resulting value in specific type
|
||||||
|
* (optional, default : null=disabled)
|
||||||
*
|
*
|
||||||
* @retval mixed The configuration parameter value or default value if not set
|
* @retval mixed The configuration parameter value or default value if not set
|
||||||
**/
|
**/
|
||||||
|
|
Loading…
Reference in a new issue