Поправил типы
This commit is contained in:
parent
5e6d39d638
commit
f3adc4550d
6 changed files with 14 additions and 11 deletions
|
|
@ -50,6 +50,7 @@ class Controller_Component
|
|||
public $templatePath;
|
||||
|
||||
public $component_id;
|
||||
public $component_title;
|
||||
public $COMPONENTS_WEB;
|
||||
|
||||
public /*.Settings.*/$registry;
|
||||
|
|
@ -207,6 +208,8 @@ class Controller_Component
|
|||
|
||||
$path = Path::join (BASE_PATH, 'components', $name, $name . '.php');
|
||||
$className = 'Component_' . $name;
|
||||
|
||||
/*.Controller_Component.*/$component = null;
|
||||
|
||||
if (file_exists($path)) {
|
||||
require_once ($path);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class Database extends PDO
|
|||
/**
|
||||
* Извлекает из базы все элементы по запросу
|
||||
*/
|
||||
public function fetchAllArray($query,$values=null)
|
||||
public function fetchAllArray($query, $values = null)
|
||||
{
|
||||
/*.Database_PDOStatement.*/$sth = $this->prepare($query);
|
||||
$prep = $this->prepareValues($values);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class MailAlt
|
|||
/**
|
||||
* Тема письма
|
||||
*/
|
||||
function subject($subject)
|
||||
function subject(/*.string.*/$subject)
|
||||
{
|
||||
$this->mailer->Subject = $subject;
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ class MailAlt
|
|||
/**
|
||||
* Добавление вложения из файла
|
||||
*/
|
||||
function addAttachment($filename, $name = false)
|
||||
function addAttachment($filename, $name = null)
|
||||
{
|
||||
$this->mailer->addAttachment($filename, $name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ abstract class Validator_Rule_Abstract
|
|||
protected $errorMsg;
|
||||
protected $ctx;
|
||||
|
||||
public function __construct($field, $errorMsg = false)
|
||||
public function __construct($field, $errorMsg = null)
|
||||
{
|
||||
$this->field = $field;
|
||||
$this->errorMsg = $errorMsg;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ class View_Top extends View_Composite {
|
|||
return false;
|
||||
}
|
||||
|
||||
private function groupFiles(array $list, $debug = true)
|
||||
private function groupFiles(array $list, $debugMode = true)
|
||||
{
|
||||
$debug = ($debug) ? 'debug=1' : '';
|
||||
$debug = ($debugMode) ? 'debug=1' : '';
|
||||
$path = parse_url(WWW_PATH, PHP_URL_PATH);
|
||||
|
||||
$groups = array();
|
||||
|
|
@ -77,12 +77,12 @@ class View_Top extends View_Composite {
|
|||
if (is_string($s)) {
|
||||
continue;
|
||||
}
|
||||
$module = explode('_', $s->active_module, 2);
|
||||
if (count($module) < 2) {
|
||||
$moduleName = explode('_', $s->active_module, 2);
|
||||
if (count($moduleName) < 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$module = $module[1];
|
||||
$module = $moduleName[1];
|
||||
|
||||
$name = mb_strtolower($module);
|
||||
$fname = $name . '/' . $name;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ function phptal_component ($expression) {
|
|||
|
||||
if(class_exists("Controller_Site")){ //Если мы в CMS2
|
||||
$component = Controller_Site::loadComponent($expression);
|
||||
}else{
|
||||
} else {
|
||||
global $db, $registry; // Иначе обращаемся к глобальным переменным
|
||||
$component = Controller_Component::loadComponent($expression, $db, $registry);
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ function phptal_component ($expression) {
|
|||
|
||||
$result = $component->execute($req);
|
||||
|
||||
echo "<!-- ", $expression, ", ", round(microtime(true) - $begin, 4), "sec -->";
|
||||
echo "<!-- ", $expression, ", ", round(floatval(microtime(true)) - $begin, 4), "sec -->";
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue