Частичная синхронизация с CMS

This commit is contained in:
origami11 2017-02-17 16:22:44 +03:00
parent 312f18a20a
commit b26e521657
62 changed files with 827 additions and 5992 deletions

View file

@ -47,10 +47,14 @@ function phptal_time ($e)
function phptal_component ($expression) {
global $db, $registry; // Нужно как-то передавать параметры
$begin = microtime(true);
$component = Controller_Component::loadComponent($expression, $db, $registry);
$req = new HttpRequest();
return $component->execute($req);
$result = $component->execute($req);
echo "<!-- ", $expression, ", ", round(microtime(true) - $begin, 4), "sec -->";
return $result;
}