[Customisation Database Commits] r645 - in /trunk/titania/includes: core/modules.php types/_language_pack.php types/_snippet.php
Nathan Guse
exreaction at phpbb.com
Mon Feb 22 04:38:36 GMT 2010
Author: exreaction
Date: Mon Feb 22 04:38:36 2010
New Revision: 645
Log:
Remove some old files
Removed:
trunk/titania/includes/core/modules.php
trunk/titania/includes/types/_language_pack.php
trunk/titania/includes/types/_snippet.php
Removed: trunk/titania/includes/core/modules.php
==============================================================================
*** trunk/titania/includes/core/modules.php (original)
--- trunk/titania/includes/core/modules.php (removed)
***************
*** 1,93 ****
- <?php
- /**
- *
- * @package titania
- * @version $Id$
- * @copyright (c) 2008 phpBB Customisation Database Team
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- *
- */
-
- /**
- * @ignore
- */
- if (!defined('IN_TITANIA'))
- {
- exit;
- }
-
- phpbb::_include('functions_module', false, 'p_master');
-
- /**
- * @package modules
- */
- class titania_modules extends p_master
- {
- /**
- * Constructor to set the custom module include path
- */
- public function __construct()
- {
- $this->set_custom_include_path(titania::$config->modules_path);
- }
-
- /**
- * Check module authorisation
- *
- * Addition of the titania_access_ auth check
- */
- public function module_auth($module_auth, $forum_id = false)
- {
- global $auth, $config;
-
- $module_auth = trim($module_auth);
-
- // Generally allowed to access module if module_auth is empty
- if (!$module_auth)
- {
- return true;
- }
-
- // With the code below we make sure only those elements get eval'd we really want to be checked
- preg_match_all('/(?:
- "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" |
- \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' |
- [(),] |
- [^\s(),]+)/x', $module_auth, $match);
-
- $tokens = $match[0];
- for ($i = 0, $size = sizeof($tokens); $i < $size; $i++)
- {
- $token = &$tokens[$i];
-
- switch ($token)
- {
- case ')':
- case '(':
- case '&&':
- case '||':
- case ',':
- break;
-
- default:
- if (!preg_match('#(?:titania_access_([0-9]+))|(?:acl_([a-z0-9_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z0-9_]+))|(?:cfg_([a-z0-9_]+))|(?:request_([a-zA-Z0-9_]+))#', $token))
- {
- $token = '';
- }
- break;
- }
- }
-
- $module_auth = implode(' ', $tokens);
-
- // Make sure $id seperation is working fine
- $module_auth = str_replace(' , ', ',', $module_auth);
-
- $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id;
-
- $is_auth = false;
- eval('$is_auth = (int) (' . preg_replace(array('#titania_access_([0-9]+)#', '#acl_([a-z0-9_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z0-9_]+)#', '#cfg_([a-z0-9_]+)#', '#request_([a-zA-Z0-9_]+)#'), array('\\1 >= titania::$access_level','(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');');
-
- return $is_auth;
- }
- }
--- 0 ----
Removed: trunk/titania/includes/types/_language_pack.php
==============================================================================
*** trunk/titania/includes/types/_language_pack.php (original)
--- trunk/titania/includes/types/_language_pack.php (removed)
***************
*** 1,62 ****
- <?php
- /**
- *
- * @package Titania
- * @version $Id$
- * @copyright (c) 2008 phpBB Customisation Database Team
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- *
- */
-
- /**
- * @ignore
- */
- if (!defined('IN_TITANIA'))
- {
- exit;
- }
-
- if (!class_exists('titania_type_base'))
- {
- include(TITANIA_ROOT . 'includes/types/base.' . PHP_EXT);
- }
-
-
- class titania_type_language_pack extends titania_type_base
- {
- /**
- * The type id
- *
- * @var int type id (for custom types not specified in titania to start, please start with 10 in case we add any extra later)
- */
- public $id = 4;
-
- /**
- * For the url slug
- *
- * @var string portion to be used in the URL slug
- */
- public $url = 'language_pack';
-
- /**
- * The name of the field used to hold the number of this item in the authors table
- *
- * @var string author count
- */
- public $author_count = 'author_language_packs';
-
- public function __construct()
- {
- $this->lang = phpbb::$user->lang['LANGUAGE_PACK'];
- }
-
- /**
- * Automatically install the type if required
- *
- * For adding type specific permissions, etc. For now ignore
- */
- public function auto_install()
- {
- return;
- }
- }
\ No newline at end of file
--- 0 ----
Removed: trunk/titania/includes/types/_snippet.php
==============================================================================
*** trunk/titania/includes/types/_snippet.php (original)
--- trunk/titania/includes/types/_snippet.php (removed)
***************
*** 1,62 ****
- <?php
- /**
- *
- * @package Titania
- * @version $Id$
- * @copyright (c) 2008 phpBB Customisation Database Team
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- *
- */
-
- /**
- * @ignore
- */
- if (!defined('IN_TITANIA'))
- {
- exit;
- }
-
- if (!class_exists('titania_type_base'))
- {
- include(TITANIA_ROOT . 'includes/types/base.' . PHP_EXT);
- }
-
-
- class titania_type_snippet extends titania_type_base
- {
- /**
- * The type id
- *
- * @var int type id (for custom types not specified in titania to start, please start with 10 in case we add any extra later)
- */
- public $id = 3;
-
- /**
- * For the url slug
- *
- * @var string portion to be used in the URL slug
- */
- public $url = 'snippet';
-
- /**
- * The name of the field used to hold the number of this item in the authors table
- *
- * @var string author count
- */
- public $author_count = 'author_snippets';
-
- public function __construct()
- {
- $this->lang = phpbb::$user->lang['SNIPPET'];
- }
-
- /**
- * Automatically install the type if required
- *
- * For adding type specific permissions, etc. For now ignore
- */
- public function auto_install()
- {
- return;
- }
- }
\ No newline at end of file
--- 0 ----
More information about the customisationdb-commits
mailing list