Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/application.php
Show First 20 Lines • Show All 443 Lines • ▼ Show 20 Line(s) | |||||
*/ | */ | ||||
public function refreshModuleInfo() | public function refreshModuleInfo() | ||||
{ | { | ||||
if ( defined('IS_INSTALL') && IS_INSTALL && !$this->TableFound('Modules', true) ) { | if ( defined('IS_INSTALL') && IS_INSTALL && !$this->TableFound('Modules', true) ) { | ||||
$this->registerModuleConstants(); | $this->registerModuleConstants(); | ||||
return; | return; | ||||
} | } | ||||
// use makeClass over recallObject, since used before kApplication initialization during installation | // use makeClass over recallObject, since used before kApplication initialization during installation | ||||
Lint: CodingStandard.Commenting.InlineComment.InvalidEndChar: Inline comments must end in full-stops, exclamation marks, or question marks | |||||
Inline comments must start with a capital letter Lint: CodingStandard.Commenting.InlineComment.NotCapital: Inline comments must start with a capital letter | |||||
/** @var kModulesHelper $modules_helper */ | |||||
$modules_helper = $this->makeClass('ModulesHelper'); | $modules_helper = $this->makeClass('ModulesHelper'); | ||||
/* @var $modules_helper kModulesHelper */ | |||||
$this->Conn->nextQueryCachable = true; | $this->Conn->nextQueryCachable = true; | ||||
$sql = 'SELECT * | $sql = 'SELECT * | ||||
FROM ' . TABLE_PREFIX . 'Modules | FROM ' . TABLE_PREFIX . 'Modules | ||||
WHERE ' . $modules_helper->getWhereClause() . ' | WHERE ' . $modules_helper->getWhereClause() . ' | ||||
ORDER BY LoadOrder'; | ORDER BY LoadOrder'; | ||||
$this->ModuleInfo = $this->Conn->Query($sql, 'Name'); | $this->ModuleInfo = $this->Conn->Query($sql, 'Name'); | ||||
▲ Show 20 Lines • Show All 198 Lines • ▼ Show 20 Line(s) | |||||
public function siteDomainField($field, $formatted = false, $format = null) | public function siteDomainField($field, $formatted = false, $format = null) | ||||
{ | { | ||||
if ( $this->isAdmin ) { | if ( $this->isAdmin ) { | ||||
// don't apply any filtering in administrative console | // don't apply any filtering in administrative console | ||||
return false; | return false; | ||||
} | } | ||||
if ( !$this->siteDomain ) { | if ( !$this->siteDomain ) { | ||||
$this->siteDomain = $this->recallObject('site-domain.current', null, Array ('live_table' => true)); | $this->siteDomain = $this->recallObject('site-domain.current', null, Array ('live_table' => true)); | ||||
PHP keywords must be lowercase; expected "array" but found "Array" Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
There must be no space between the Array keyword and the opening parenthesis Lint: CodingStandard.Array.Array.SpaceAfterKeyword: There must be no space between the Array keyword and the opening parenthesis | |||||
/* @var $site_domain kDBItem */ | /** @var kDBItem $site_domain */ | ||||
} | } | ||||
if ( $this->siteDomain->isLoaded() ) { | if ( $this->siteDomain->isLoaded() ) { | ||||
return $formatted ? $this->siteDomain->GetField($field, $format) : $this->siteDomain->GetDBField($field); | return $formatted ? $this->siteDomain->GetField($field, $format) : $this->siteDomain->GetDBField($field); | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 349 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
if ( $this->GetVar('ajax') == 'yes' && !$this->GetVar('debug_ajax') ) { | if ( $this->GetVar('ajax') == 'yes' && !$this->GetVar('debug_ajax') ) { | ||||
// hide debug output from ajax requests automatically | // hide debug output from ajax requests automatically | ||||
kUtil::safeDefine('DBG_SKIP_REPORTING', 1); // safeDefine, because debugger also defines it | kUtil::safeDefine('DBG_SKIP_REPORTING', 1); // safeDefine, because debugger also defines it | ||||
} | } | ||||
} | } | ||||
elseif ( $this->GetVar('admin') ) { | elseif ( $this->GetVar('admin') ) { | ||||
/** @var Session $admin_session */ | |||||
$admin_session = $this->recallObject('Session.admin'); | $admin_session = $this->recallObject('Session.admin'); | ||||
/* @var $admin_session Session */ | |||||
// store Admin Console User's ID to Front-End's session for cross-session permission checks | // store Admin Console User's ID to Front-End's session for cross-session permission checks | ||||
$this->StoreVar('admin_user_id', (int)$admin_session->RecallVar('user_id')); | $this->StoreVar('admin_user_id', (int)$admin_session->RecallVar('user_id')); | ||||
if ( $this->CheckAdminPermission('CATEGORY.MODIFY', 0, $this->getBaseCategory()) ) { | if ( $this->CheckAdminPermission('CATEGORY.MODIFY', 0, $this->getBaseCategory()) ) { | ||||
// user can edit cms blocks (when viewing front-end through admin's frame) | // user can edit cms blocks (when viewing front-end through admin's frame) | ||||
$editing_mode = $this->GetVar('editing_mode'); | $editing_mode = $this->GetVar('editing_mode'); | ||||
define('EDITING_MODE', $editing_mode ? $editing_mode : EDITING_MODE_BROWSE); | define('EDITING_MODE', $editing_mode ? $editing_mode : EDITING_MODE_BROWSE); | ||||
} | } | ||||
} | } | ||||
kUtil::safeDefine('EDITING_MODE', ''); // user can't edit anything | kUtil::safeDefine('EDITING_MODE', ''); // user can't edit anything | ||||
$this->Phrases->setPhraseEditing(); | $this->Phrases->setPhraseEditing(); | ||||
$this->EventManager->ProcessRequest(); | $this->EventManager->ProcessRequest(); | ||||
$this->InitParser(); | $this->InitParser(); | ||||
$t = $this->GetVar('render_template', $this->GetVar('t')); | $t = $this->GetVar('render_template', $this->GetVar('t')); | ||||
if ( !$this->TemplatesCache->TemplateExists($t) && !$this->isAdmin ) { | if ( !$this->TemplatesCache->TemplateExists($t) && !$this->isAdmin ) { | ||||
/** @var CategoriesEventHandler $cms_handler */ | |||||
$cms_handler = $this->recallObject('st_EventHandler'); | $cms_handler = $this->recallObject('st_EventHandler'); | ||||
/* @var $cms_handler CategoriesEventHandler */ | |||||
$t = ltrim($cms_handler->GetDesignTemplate(), '/'); | $t = ltrim($cms_handler->GetDesignTemplate(), '/'); | ||||
if ( defined('DEBUG_MODE') && $this->isDebugMode() ) { | if ( defined('DEBUG_MODE') && $this->isDebugMode() ) { | ||||
$this->Debugger->appendHTML('<strong>Design Template</strong>: ' . $t . '; <strong>CategoryID</strong>: ' . $this->GetVar('m_cat_id')); | $this->Debugger->appendHTML('<strong>Design Template</strong>: ' . $t . '; <strong>CategoryID</strong>: ' . $this->GetVar('m_cat_id')); | ||||
} | } | ||||
} | } | ||||
/*else { | /*else { | ||||
▲ Show 20 Lines • Show All 262 Lines • ▼ Show 20 Line(s) | |||||
/** | /** | ||||
* Returns current session id (SID) | * Returns current session id (SID) | ||||
* | * | ||||
* @return int | * @return int | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function GetSID() | public function GetSID() | ||||
{ | { | ||||
/** @var Session $session */ | |||||
$session = $this->recallObject('Session'); | $session = $this->recallObject('Session'); | ||||
/* @var $session Session */ | |||||
return $session->GetID(); | return $session->GetID(); | ||||
} | } | ||||
/** | /** | ||||
* Destroys current session | * Destroys current session | ||||
* | * | ||||
* @return void | * @return void | ||||
* @access public | * @access public | ||||
* @see UserHelper::logoutUser() | * @see UserHelper::logoutUser() | ||||
*/ | */ | ||||
public function DestroySession() | public function DestroySession() | ||||
{ | { | ||||
/** @var Session $session */ | |||||
$session = $this->recallObject('Session'); | $session = $this->recallObject('Session'); | ||||
/* @var $session Session */ | |||||
$session->Destroy(); | $session->Destroy(); | ||||
} | } | ||||
/** | /** | ||||
* Returns variable passed to the script as GET/POST/COOKIE | * Returns variable passed to the script as GET/POST/COOKIE | ||||
* | * | ||||
* @param string $name Name of variable to retrieve | * @param string $name Name of variable to retrieve | ||||
▲ Show 20 Lines • Show All 153 Lines • ▼ Show 20 Line(s) | |||||
* @param mixed $val Variable value | * @param mixed $val Variable value | ||||
* @param bool $optional | * @param bool $optional | ||||
* @return void | * @return void | ||||
* @access public | * @access public | ||||
* @see kApplication::RecallVar() | * @see kApplication::RecallVar() | ||||
*/ | */ | ||||
public function StoreVar($var, $val, $optional = false) | public function StoreVar($var, $val, $optional = false) | ||||
{ | { | ||||
/** @var Session $session */ | |||||
$session = $this->recallObject('Session'); | $session = $this->recallObject('Session'); | ||||
/* @var $session Session */ | |||||
$this->Session->StoreVar($var, $val, $optional); | $this->Session->StoreVar($var, $val, $optional); | ||||
} | } | ||||
/** | /** | ||||
* Stores variable to persistent session | * Stores variable to persistent session | ||||
* | * | ||||
* @param string $var | * @param string $var | ||||
Show All 15 Lines | |||||
* @param bool $optional | * @param bool $optional | ||||
* @return void | * @return void | ||||
* @access public | * @access public | ||||
* @see Session::RecallVar() | * @see Session::RecallVar() | ||||
* @see Session::StoreVar() | * @see Session::StoreVar() | ||||
*/ | */ | ||||
public function StoreVarDefault($var, $val, $optional = false) | public function StoreVarDefault($var, $val, $optional = false) | ||||
{ | { | ||||
/** @var Session $session */ | |||||
$session = $this->recallObject('Session'); | $session = $this->recallObject('Session'); | ||||
/* @var $session Session */ | |||||
$this->Session->StoreVarDefault($var, $val, $optional); | $this->Session->StoreVarDefault($var, $val, $optional); | ||||
} | } | ||||
/** | /** | ||||
* Links HTTP Query variable with session variable | * Links HTTP Query variable with session variable | ||||
* | * | ||||
* If variable $var is passed in HTTP Query it is stored in session for later use. If it's not passed it's recalled from session. | * If variable $var is passed in HTTP Query it is stored in session for later use. If it's not passed it's recalled from session. | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
* @param string $tag | * @param string $tag | ||||
* @param Array $params | * @param Array $params | ||||
* @return mixed | * @return mixed | ||||
* @access public | * @access public | ||||
* @see kApplication::InitParser() | * @see kApplication::InitParser() | ||||
*/ | */ | ||||
public function ProcessParsedTag($prefix, $tag, $params) | public function ProcessParsedTag($prefix, $tag, $params) | ||||
{ | { | ||||
/** @var kDBTagProcessor $processor */ | |||||
$processor = $this->Parser->GetProcessor($prefix); | $processor = $this->Parser->GetProcessor($prefix); | ||||
/* @var $processor kDBTagProcessor */ | |||||
return $processor->ProcessParsedTag($tag, $params, $prefix); | return $processor->ProcessParsedTag($tag, $params, $prefix); | ||||
} | } | ||||
/** | /** | ||||
* Return object of IDBConnection interface | * Return object of IDBConnection interface | ||||
* | * | ||||
* Return object of IDBConnection interface already connected to the project database, configurable in config.php | * Return object of IDBConnection interface already connected to the project database, configurable in config.php | ||||
▲ Show 20 Lines • Show All 277 Lines • ▼ Show 20 Line(s) | |||||
// header('HTTP/1.1 302 Found'); | // header('HTTP/1.1 302 Found'); | ||||
header('Location: ' . $location, true, $response_code); | header('Location: ' . $location, true, $response_code); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// session expiration is called from session initialization, | // session expiration is called from session initialization, | ||||
// that's why $this->Session may be not defined here | // that's why $this->Session may be not defined here | ||||
Inline comments must end in full-stops, exclamation marks, or question marks Lint: CodingStandard.Commenting.InlineComment.InvalidEndChar: Inline comments must end in full-stops, exclamation marks, or question marks | |||||
/** @var Session $session */ | |||||
$session = $this->recallObject('Session'); | $session = $this->recallObject('Session'); | ||||
/* @var $session Session */ | |||||
if ( $this->InitDone ) { | if ( $this->InitDone ) { | ||||
// if redirect happened in the middle of application initialization don't call event, | // if redirect happened in the middle of application initialization don't call event, | ||||
// that presumes that application was successfully initialized | // that presumes that application was successfully initialized | ||||
$this->HandleEvent(new kEvent('adm:OnBeforeShutdown')); | $this->HandleEvent(new kEvent('adm:OnBeforeShutdown')); | ||||
} | } | ||||
$session->SaveData(); | $session->SaveData(); | ||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | |||||
* later using "u.current" prefix_special. Also you may | * later using "u.current" prefix_special. Also you may | ||||
* get user id by getting "u.current_id" variable. | * get user id by getting "u.current_id" variable. | ||||
* | * | ||||
* @return void | * @return void | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function ValidateLogin() | protected function ValidateLogin() | ||||
{ | { | ||||
/** @var Session $session */ | |||||
$session = $this->recallObject('Session'); | $session = $this->recallObject('Session'); | ||||
/* @var $session Session */ | |||||
$user_id = $session->GetField('PortalUserId'); | $user_id = $session->GetField('PortalUserId'); | ||||
if ( !$user_id && $user_id != USER_ROOT ) { | if ( !$user_id && $user_id != USER_ROOT ) { | ||||
$user_id = USER_GUEST; | $user_id = USER_GUEST; | ||||
} | } | ||||
$this->SetVar('u.current_id', $user_id); | $this->SetVar('u.current_id', $user_id); | ||||
if ( !$this->isAdmin ) { | if ( !$this->isAdmin ) { | ||||
// needed for "profile edit", "registration" forms ON FRONT ONLY | // needed for "profile edit", "registration" forms ON FRONT ONLY | ||||
$this->SetVar('u_id', $user_id); | $this->SetVar('u_id', $user_id); | ||||
} | } | ||||
$this->StoreVar('user_id', $user_id, $user_id == USER_GUEST); // storing Guest user_id (-2) is optional | $this->StoreVar('user_id', $user_id, $user_id == USER_GUEST); // storing Guest user_id (-2) is optional | ||||
$this->isAdminUser = $this->isAdmin && $this->LoggedIn(); | $this->isAdminUser = $this->isAdmin && $this->LoggedIn(); | ||||
if ( $this->GetVar('expired') == 1 ) { | if ( $this->GetVar('expired') == 1 ) { | ||||
// this parameter is set only from admin | // this parameter is set only from admin | ||||
Inline comments must start with a capital letter Lint: CodingStandard.Commenting.InlineComment.NotCapital: Inline comments must start with a capital letter | |||||
Inline comments must end in full-stops, exclamation marks, or question marks Lint: CodingStandard.Commenting.InlineComment.InvalidEndChar: Inline comments must end in full-stops, exclamation marks, or question marks | |||||
/** @var UsersItem $user */ | |||||
$user = $this->recallObject('u.login-admin', null, Array ('form_name' => 'login')); | $user = $this->recallObject('u.login-admin', null, Array ('form_name' => 'login')); | ||||
There must be no space between the Array keyword and the opening parenthesis Lint: CodingStandard.Array.Array.SpaceAfterKeyword: There must be no space between the Array keyword and the opening parenthesis | |||||
PHP keywords must be lowercase; expected "array" but found "Array" Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
/* @var $user UsersItem */ | |||||
$user->SetError('UserLogin', 'session_expired', 'la_text_sess_expired'); | $user->SetError('UserLogin', 'session_expired', 'la_text_sess_expired'); | ||||
} | } | ||||
$this->HandleEvent(new kEvent('adm:OnLogHttpRequest')); | $this->HandleEvent(new kEvent('adm:OnLogHttpRequest')); | ||||
if ( $user_id != USER_GUEST ) { | if ( $user_id != USER_GUEST ) { | ||||
// normal users + root | // normal users + root | ||||
▲ Show 20 Lines • Show All 170 Lines • ▼ Show 20 Line(s) | |||||
* Allows one TagProcessor tag act as other TagProcessor tag | * Allows one TagProcessor tag act as other TagProcessor tag | ||||
* | * | ||||
* @param Array $tag_info | * @param Array $tag_info | ||||
* @return void | * @return void | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function registerAggregateTag($tag_info) | public function registerAggregateTag($tag_info) | ||||
{ | { | ||||
/** @var kArray $aggregator */ | |||||
$aggregator = $this->recallObject('TagsAggregator', 'kArray'); | $aggregator = $this->recallObject('TagsAggregator', 'kArray'); | ||||
/* @var $aggregator kArray */ | |||||
$tag_data = Array ( | $tag_data = Array ( | ||||
$tag_info['LocalPrefix'], | $tag_info['LocalPrefix'], | ||||
$tag_info['LocalTagName'], | $tag_info['LocalTagName'], | ||||
getArrayValue($tag_info, 'LocalSpecial') | getArrayValue($tag_info, 'LocalSpecial') | ||||
); | ); | ||||
$aggregator->SetArrayValue($tag_info['AggregateTo'], $tag_info['AggregatedTagName'], $tag_data); | $aggregator->SetArrayValue($tag_info['AggregateTo'], $tag_info['AggregatedTagName'], $tag_data); | ||||
▲ Show 20 Lines • Show All 307 Lines • ▼ Show 20 Line(s) | |||||
* @param int $to_user_id | * @param int $to_user_id | ||||
* @param array $send_params associative array of direct send params, | * @param array $send_params associative array of direct send params, | ||||
* possible keys: to_email, to_name, from_email, from_name, message, message_text | * possible keys: to_email, to_name, from_email, from_name, message, message_text | ||||
* @return kEvent | * @return kEvent | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function _email($email_template_name, $email_template_type, $to_user_id = null, $send_params = Array ()) | protected function _email($email_template_name, $email_template_type, $to_user_id = null, $send_params = Array ()) | ||||
{ | { | ||||
/** @var kEmail $email */ | |||||
$email = $this->makeClass('kEmail'); | $email = $this->makeClass('kEmail'); | ||||
/* @var $email kEmail */ | |||||
if ( !$email->findTemplate($email_template_name, $email_template_type) ) { | if ( !$email->findTemplate($email_template_name, $email_template_type) ) { | ||||
return false; | return false; | ||||
} | } | ||||
$email->setParams($send_params); | $email->setParams($send_params); | ||||
return $email->send($to_user_id); | return $email->send($to_user_id); | ||||
Show All 17 Lines | |||||
* @param string $name permission name | * @param string $name permission name | ||||
* @param int $cat_id category id, current used if not specified | * @param int $cat_id category id, current used if not specified | ||||
* @param int $type permission type {1 - system, 0 - per category} | * @param int $type permission type {1 - system, 0 - per category} | ||||
* @return int | * @return int | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function CheckPermission($name, $type = 1, $cat_id = null) | public function CheckPermission($name, $type = 1, $cat_id = null) | ||||
{ | { | ||||
/** @var kPermissionsHelper $perm_helper */ | |||||
$perm_helper = $this->recallObject('PermissionsHelper'); | $perm_helper = $this->recallObject('PermissionsHelper'); | ||||
/* @var $perm_helper kPermissionsHelper */ | |||||
return $perm_helper->CheckPermission($name, $type, $cat_id); | return $perm_helper->CheckPermission($name, $type, $cat_id); | ||||
} | } | ||||
/** | /** | ||||
* Check current admin permissions based on it's group permissions in specified category | * Check current admin permissions based on it's group permissions in specified category | ||||
* | * | ||||
* @param string $name permission name | * @param string $name permission name | ||||
* @param int $cat_id category id, current used if not specified | * @param int $cat_id category id, current used if not specified | ||||
* @param int $type permission type {1 - system, 0 - per category} | * @param int $type permission type {1 - system, 0 - per category} | ||||
* @return int | * @return int | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function CheckAdminPermission($name, $type = 1, $cat_id = null) | public function CheckAdminPermission($name, $type = 1, $cat_id = null) | ||||
{ | { | ||||
/** @var kPermissionsHelper $perm_helper */ | |||||
$perm_helper = $this->recallObject('PermissionsHelper'); | $perm_helper = $this->recallObject('PermissionsHelper'); | ||||
/* @var $perm_helper kPermissionsHelper */ | |||||
return $perm_helper->CheckAdminPermission($name, $type, $cat_id); | return $perm_helper->CheckAdminPermission($name, $type, $cat_id); | ||||
} | } | ||||
/** | /** | ||||
* Set's any field of current visit | * Set's any field of current visit | ||||
* | * | ||||
* @param string $field | * @param string $field | ||||
* @param mixed $value | * @param mixed $value | ||||
* @return void | * @return void | ||||
* @access public | * @access public | ||||
* @todo move to separate module | * @todo move to separate module | ||||
*/ | */ | ||||
public function setVisitField($field, $value) | public function setVisitField($field, $value) | ||||
{ | { | ||||
if ( $this->isAdmin || !$this->ConfigValue('UseVisitorTracking') ) { | if ( $this->isAdmin || !$this->ConfigValue('UseVisitorTracking') ) { | ||||
// admin logins are not registered in visits list | // admin logins are not registered in visits list | ||||
return; | return; | ||||
} | } | ||||
/** @var kDBItem $visit */ | |||||
$visit = $this->recallObject('visits', null, Array ('raise_warnings' => 0)); | $visit = $this->recallObject('visits', null, Array ('raise_warnings' => 0)); | ||||
PHP keywords must be lowercase; expected "array" but found "Array" Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
There must be no space between the Array keyword and the opening parenthesis Lint: CodingStandard.Array.Array.SpaceAfterKeyword: There must be no space between the Array keyword and the opening parenthesis | |||||
/* @var $visit kDBItem */ | |||||
if ( $visit->isLoaded() ) { | if ( $visit->isLoaded() ) { | ||||
$visit->SetDBField($field, $value); | $visit->SetDBField($field, $value); | ||||
$visit->Update(); | $visit->Update(); | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 231 Lines • ▼ Show 20 Line(s) | |||||
* @param Array $params counter parameters | * @param Array $params counter parameters | ||||
* @param string $query_name specify query name directly (don't generate from parameters) | * @param string $query_name specify query name directly (don't generate from parameters) | ||||
* @param bool $multiple_results | * @param bool $multiple_results | ||||
* @return mixed | * @return mixed | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function getCounter($name, $params = Array (), $query_name = null, $multiple_results = false) | public function getCounter($name, $params = Array (), $query_name = null, $multiple_results = false) | ||||
{ | { | ||||
/** @var kCountHelper $count_helper */ | |||||
$count_helper = $this->recallObject('CountHelper'); | $count_helper = $this->recallObject('CountHelper'); | ||||
/* @var $count_helper kCountHelper */ | |||||
return $count_helper->getCounter($name, $params, $query_name, $multiple_results); | return $count_helper->getCounter($name, $params, $query_name, $multiple_results); | ||||
} | } | ||||
/** | /** | ||||
* Resets counter, which are affected by one of specified tables | * Resets counter, which are affected by one of specified tables | ||||
* | * | ||||
* @param string $tables comma separated tables list used in counting sqls | * @param string $tables comma separated tables list used in counting sqls | ||||
* @return void | * @return void | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function resetCounters($tables) | public function resetCounters($tables) | ||||
{ | { | ||||
if ( kUtil::constOn('IS_INSTALL') ) { | if ( kUtil::constOn('IS_INSTALL') ) { | ||||
return; | return; | ||||
} | } | ||||
/** @var kCountHelper $count_helper */ | |||||
$count_helper = $this->recallObject('CountHelper'); | $count_helper = $this->recallObject('CountHelper'); | ||||
/* @var $count_helper kCountHelper */ | |||||
$count_helper->resetCounters($tables); | $count_helper->resetCounters($tables); | ||||
} | } | ||||
/** | /** | ||||
* Sends XML header + optionally displays xml heading | * Sends XML header + optionally displays xml heading | ||||
* | * | ||||
* @param string|bool $xml_version | * @param string|bool $xml_version | ||||
▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines |
Inline comments must end in full-stops, exclamation marks, or question marks