Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/helpers/modules_helper.php
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
$where_clause[] = 'Name IN ('.implode(',', $modules).')'; | $where_clause[] = 'Name IN ('.implode(',', $modules).')'; | ||||
} | } | ||||
return implode(' AND ', $where_clause); | return implode(' AND ', $where_clause); | ||||
} | } | ||||
function _EnableCookieSID() | function _EnableCookieSID() | ||||
{ | { | ||||
/** @var Session $session */ | |||||
$session = $this->Application->recallObject('Session'); | $session = $this->Application->recallObject('Session'); | ||||
/* @var $session Session */ | |||||
return $session->CookiesEnabled; | return $session->CookiesEnabled; | ||||
} | } | ||||
function _IsSpider($UserAgent) | function _IsSpider($UserAgent) | ||||
{ | { | ||||
global $robots; | global $robots; | ||||
$lines = file(FULL_PATH.'/robots_list.txt'); | $lines = file(FULL_PATH.'/robots_list.txt'); | ||||
▲ Show 20 Lines • Show All 379 Lines • ▼ Show 20 Line(s) | |||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function getModules($module_type = self::ANY) | public function getModules($module_type = self::ANY) | ||||
{ | { | ||||
$modules = Array (); | $modules = Array (); | ||||
try { | try { | ||||
$iterator = new DirectoryIterator(MODULES_PATH); | $iterator = new DirectoryIterator(MODULES_PATH); | ||||
/* @var $file_info DirectoryIterator */ | /** @var DirectoryIterator $file_info */ | ||||
} | } | ||||
catch (UnexpectedValueException $e) { | catch (UnexpectedValueException $e) { | ||||
return $modules; | return $modules; | ||||
} | } | ||||
foreach ($iterator as $file_info) { | foreach ($iterator as $file_info) { | ||||
$file_path = $file_info->getPathname(); | $file_path = $file_info->getPathname(); | ||||
Show All 36 Lines |