コード例 #1
0
ファイル: template_tag_defs.php プロジェクト: 0hyeah/yurivn
 private static function get_safe_functions()
 {
     if (!is_array(self::$safe_functions)) {
         $safe_functions = array(0 => 'and', 1 => 'or', 2 => 'xor', 'in_array', 'is_array', 'is_numeric', 'isset', 'empty', 'defined', 'array', 'gmdate', 'mktime', 'gmmktime', 'can_moderate', 'can_moderate_calendar', 'exec_switch_bg', 'is_browser', 'is_member_of', 'is_came_from_search_engine', 'vbdate');
         ($hook = vBulletinHook::fetch_hook('template_safe_functions')) ? eval($hook) : false;
         self::$safe_functions = $safe_functions;
     }
     return self::$safe_functions;
 }
コード例 #2
0
ファイル: template_tag_defs.php プロジェクト: hungnv0789/vhtm
	private static function get_safe_functions()
	{
		if (!is_array(self::$safe_functions))
		{
			$safe_functions = array(
				// logical stuff
				0 => 'and',                   // logical and
				1 => 'or',                    // logical or
				2 => 'xor',                   // logical xor

				// built-in variable checking functions
				'in_array',                   // used for checking
				'is_array',                   // used for checking
				'is_numeric',                 // used for checking
				'isset',                      // used for checking
				'empty',                      // used for checking
				'defined',                    // used for checking
				'array',                      // used for checking
				'gmdate',                     // used by ad manager
				'mktime',                     // used by ad manager
				'gmmktime',                   // used by ad manager

				// vBulletin-defined functions
				'can_moderate',               // obvious one
				'can_moderate_calendar',      // another obvious one
				'exec_switch_bg',             // harmless function that we use sometimes
				'is_browser',                 // function to detect browser and versions
				'is_member_of',               // function to check if $user is member of $usergroupid
				'is_came_from_search_engine', // function to check whether or not user came from search engine for ad manager
				'vbdate',                     // function to check date range for ad manager
			);

			($hook = vBulletinHook::fetch_hook('template_safe_functions')) ? eval($hook) : false;

			self::$safe_functions = $safe_functions;
		}

		return self::$safe_functions;
	}
コード例 #3
0
 private static function get_safe_functions()
 {
     /* 
     	we need to keep this list & the one in core\includes\adminfunctions_template.php
     	process_template_conditionals() in sync. Eventually we'll want to have only 1 list...
     */
     if (!is_array(self::$safe_functions)) {
         $safe_functions = array(0 => 'and', 1 => 'or', 2 => 'xor', 'in_array', 'is_array', 'is_numeric', 'isset', 'empty', 'defined', 'array', 'gmdate', 'mktime', 'gmmktime', 'count', 'size', 'preg_match', 'explode', 'array_shift', 'substr', 'strpos', 'strlen', 'reset', 'ceil', 'array_reverse', 'array_key_exists', 'date', 'range', 'end', 'prev', 'intval', 'can_moderate', 'exec_switch_bg', 'is_browser', 'is_member_of', 'is_came_from_search_engine', 'vbdate');
         self::$safe_functions = $safe_functions;
     }
     return self::$safe_functions;
 }