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
// fetch distinguished name and most likely username (try the search field first)
foreach (array($userNameAttribute, "name") as $ldapAttr) {
if (isset($searchResults[$i][$ldapAttr]) && $searchResults[$i][$ldapAttr]['count'] > 0) {
$result[] = array("name" => $searchResults[$i][$ldapAttr][0]
, "fullname" => !empty($searchResults[$i]['name'][0]) ? $searchResults[$i]['name'][0] : ""
, "dn" => $searchResults[$i]['dn']);
$result[] = array(
'name' => $searchResults[$i][$ldapAttr][0],
'fullname' => !empty($searchResults[$i]['name'][0]) ?
$searchResults[$i]['name'][0] : "",
'dn' => $searchResults[$i]['dn']
);
break;
}
}
......
......@@ -163,7 +163,7 @@ class Config extends Singleton
*/
public function toArrayFromFile($filename, $forceList = null)
{
$xml = $this->load_from_file($filename);
$xml = $this->loadFromFile($filename);
return $this->toArray($forceList, $xml);
}
......@@ -309,7 +309,7 @@ class Config extends Singleton
* @return \SimpleXMLElement
* @throws ConfigException
*/
private function load_from_file($filename)
private function loadFromFile($filename)
{
// exception handling
if (!file_exists($filename)) {
......@@ -345,7 +345,7 @@ class Config extends Singleton
{
$this->simplexml = null;
$this->statusIsValid = false;
$this->simplexml = $this->load_from_file($this->config_file);
$this->simplexml = $this->loadFromFile($this->config_file);
$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