Restore code previous to part of previous commit to avoid notice

remotes/angel/1.11.x
Yannick Warnier 9 years ago
parent 454b6f75e3
commit b30ee72ac6
  1. 15
      main/inc/lib/api.lib.php

@ -5247,11 +5247,8 @@ function & api_get_settings($cat = null, $ordering = 'list', $access_url = 1, $u
$sql .= " ORDER BY 1,2 ASC"; $sql .= " ORDER BY 1,2 ASC";
} }
$result = Database::query($sql); $result = Database::query($sql);
if ($result == false) { $result = Database::store_result($result,'ASSOC');
return array(); return $result;
} else {
return Database::store_result($result);
}
} }
/** /**
@ -5268,12 +5265,8 @@ function & api_get_settings_categories($exceptions = array(), $access_url = 1) {
if ($list != "'',''" && $list != "''" && !empty($list)) { if ($list != "'',''" && $list != "''" && !empty($list)) {
$sql .= " AND category NOT IN ($list) "; $sql .= " AND category NOT IN ($list) ";
} }
$result = Database::query($sql); $result = Database::store_result(Database::query($sql));
if ($result == false) { return $result;
return array();
} else {
return Database::store_result($result);
}
} }
/** /**

Loading…
Cancel
Save