Мелкие правки
This commit is contained in:
parent
ce7d909ea8
commit
7dad5d30ac
3 changed files with 4 additions and 3 deletions
|
|
@ -62,6 +62,7 @@ class Controller_Action
|
||||||
|
|
||||||
public function loadConfig($name) {
|
public function loadConfig($name) {
|
||||||
$filename = Shortcut::getUrl('config', $name);
|
$filename = Shortcut::getUrl('config', $name);
|
||||||
|
$settings = [];
|
||||||
if (file_exists($filename)) {
|
if (file_exists($filename)) {
|
||||||
include($filename);
|
include($filename);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ class Controller_Component
|
||||||
$view->component_title = $settings['title'];
|
$view->component_title = $settings['title'];
|
||||||
}
|
}
|
||||||
|
|
||||||
static function loadComponent($expression, Database $db, Settings $registry)
|
static function loadComponent($expression, Database $db, /*.Settings.*/ $registry)
|
||||||
{
|
{
|
||||||
|
|
||||||
$expression = htmlspecialchars_decode($expression);
|
$expression = htmlspecialchars_decode($expression);
|
||||||
|
|
|
||||||
|
|
@ -217,9 +217,9 @@ class OptionFactory {
|
||||||
} else if (isset($input['options.db'])) {
|
} else if (isset($input['options.db'])) {
|
||||||
list($table, $keyvalue) = explode(":", $input['options.db']);
|
list($table, $keyvalue) = explode(":", $input['options.db']);
|
||||||
list($key, $value) = explode(",", $keyvalue);
|
list($key, $value) = explode(",", $keyvalue);
|
||||||
try{
|
try {
|
||||||
$query_result = $this->db->executeQuery("SELECT * FROM $table");
|
$query_result = $this->db->executeQuery("SELECT * FROM $table");
|
||||||
}catch(Exception $ex){
|
} catch(Exception $ex) {
|
||||||
$query_result = [];
|
$query_result = [];
|
||||||
}
|
}
|
||||||
$field->options = $this->optionsDB($key, $value, $query_result);
|
$field->options = $this->optionsDB($key, $value, $query_result);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue