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