Commit be63780c authored by Franco Fichtner's avatar Franco Fichtner

mvc: partially merge style fixes from master

parent ad3ff338
...@@ -281,9 +281,12 @@ class LDAP implements IAuthConnector ...@@ -281,9 +281,12 @@ class LDAP implements IAuthConnector
// fetch distinguished name and most likely username (try the search field first) // fetch distinguished name and most likely username (try the search field first)
foreach (array($userNameAttribute, "name") as $ldapAttr) { foreach (array($userNameAttribute, "name") as $ldapAttr) {
if (isset($searchResults[$i][$ldapAttr]) && $searchResults[$i][$ldapAttr]['count'] > 0) { if (isset($searchResults[$i][$ldapAttr]) && $searchResults[$i][$ldapAttr]['count'] > 0) {
$result[] = array("name" => $searchResults[$i][$ldapAttr][0] $result[] = array(
, "fullname" => !empty($searchResults[$i]['name'][0]) ? $searchResults[$i]['name'][0] : "" 'name' => $searchResults[$i][$ldapAttr][0],
, "dn" => $searchResults[$i]['dn']); 'fullname' => !empty($searchResults[$i]['name'][0]) ?
$searchResults[$i]['name'][0] : "",
'dn' => $searchResults[$i]['dn']
);
break; break;
} }
} }
......
...@@ -163,7 +163,7 @@ class Config extends Singleton ...@@ -163,7 +163,7 @@ class Config extends Singleton
*/ */
public function toArrayFromFile($filename, $forceList = null) public function toArrayFromFile($filename, $forceList = null)
{ {
$xml = $this->load_from_file($filename); $xml = $this->loadFromFile($filename);
return $this->toArray($forceList, $xml); return $this->toArray($forceList, $xml);
} }
...@@ -309,7 +309,7 @@ class Config extends Singleton ...@@ -309,7 +309,7 @@ class Config extends Singleton
* @return \SimpleXMLElement * @return \SimpleXMLElement
* @throws ConfigException * @throws ConfigException
*/ */
private function load_from_file($filename) private function loadFromFile($filename)
{ {
// exception handling // exception handling
if (!file_exists($filename)) { if (!file_exists($filename)) {
...@@ -345,7 +345,7 @@ class Config extends Singleton ...@@ -345,7 +345,7 @@ class Config extends Singleton
{ {
$this->simplexml = null; $this->simplexml = null;
$this->statusIsValid = false; $this->statusIsValid = false;
$this->simplexml = $this->load_from_file($this->config_file); $this->simplexml = $this->loadFromFile($this->config_file);
$this->statusIsValid = true; $this->statusIsValid = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment