From 2357ab721d452785eff1d8253ce3d4995a38a1ff Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sun, 9 Aug 2015 20:20:48 +0200 Subject: [PATCH 001/353] Move auth/headers/DB/config in middleware --- Slim/Extras/Middleware/FeatherBB.php | 430 ++++++++++++++++++++++++++- include/common.php | 191 ------------ index.php | 24 +- 3 files changed, 424 insertions(+), 221 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 2ebb1aaf..a884ae65 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -1,36 +1,116 @@ add(new \Slim\Extras\Middleware\FeatherBB()); + * $app->add(new \Slim\Extras\Middleware\FeatherBB($params)); * */ + namespace Slim\Extras\Middleware; class FeatherBB extends \Slim\Middleware { - protected $settings = array(); + protected $data = array(); - public function __construct() + public function __construct(array $user_forum_settings = array()) { + $this->data['forum_env'] = array( + 'FEATHER' => true, + 'FEATHER_ROOT' => dirname(__FILE__).'/../../../', + 'FORUM_VERSION' => '1.0.0', + 'FORUM_NAME' => 'FeatherBB', + 'FORUM_DB_REVISION' => 21, + 'FORUM_SI_REVISION' => 2, + 'FORUM_PARSER_REVISION' => 2, + 'FORUM_CACHE_DIR' => dirname(__FILE__).'/../../../cache/', // TODO : Move in user settings + 'FEATHER_UNVERIFIED' => 0, + 'FEATHER_ADMIN' => 1, + 'FEATHER_MOD' => 2, + 'FEATHER_GUEST' => 3, + 'FEATHER_MEMBER' => 4, + 'FEATHER_MAX_POSTSIZE' => 32768, + 'FEATHER_SEARCH_MIN_WORD' => 3, + 'FEATHER_SEARCH_MAX_WORD' => 20, + 'FORUM_MAX_COOKIE_SIZE' => 4048 + ); + $this->data['forum_settings'] = array_merge(self::load_default_settings(), $this->load_forum_config(), $user_forum_settings); } - public function call() + public function load_forum_config() { - $feather = $this->app; + global $feather_config; // Legacy - // Block prefetch requests - $this->app->hook('slim.before', function () use ($feather) { - if ((isset($feather->environment['HTTP_X_MOZ'])) && ($feather->environment['HTTP_X_MOZ'] == 'prefetch')) { - $feather->halt(403, 'Prefetch forbidden'); - } - }); + if (file_exists($this->data['forum_env']['FORUM_CACHE_DIR'].'cache_config.php')) { + include $this->data['forum_env']['FORUM_CACHE_DIR'].'cache_config.php'; + } else { + require_once $this->data['forum_env']['FEATHER_ROOT'].'include/cache.php'; + generate_config_cache(); + require $this->data['forum_env']['FEATHER_ROOT'].'cache_config.php'; + } + return $feather_config; + } + + public static function load_default_settings() + { + return array( + // Database + 'db_type' => 'mysqli', + 'db_host' => '', + 'db_name' => '', + 'db_user' => '', + 'db_pass' => '', + 'db_prefix' => '', + // Cookies + 'cookie_name' => 'feather_cookie', + 'cookie_seed' => 'changeme', // MUST BE CHANGED + ); + } + + // Getters / setters for Slim container (avoid magic get error) + + public function set_forum_env($key, $value = null) + { + $tmp = (!is_array($key) && !is_null($value)) ? array($key, $value) : $key; + foreach ($tmp as $key => $value) { + $this->app->container->get('forum_env')[$key] = $value; + } + + } + + public function set_forum_settings($key, $value = null) + { + $tmp = (!is_array($key) && !is_null($value)) ? array($key, $value) : $key; + foreach ($tmp as $key => $value) { + $this->app->container->get('forum_settings')[$key] = $value; + } + + } + + public function hydrate($data) + { + foreach ($data as $key => $value) { + $this->app->container[$key] = $value; + } + } + + // Legacy function, to ensure constants backward compatibility + public function env_to_globals(array $vars) + { + foreach ($vars as $key => $value) { + define($key, $value); + } + } + + // + public function set_headers() + { // No cache headers $this->app->response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate'); $this->app->response->headers->set('Pragma', 'no-cache'); @@ -41,9 +121,327 @@ public function call() // Prevent the site to be embedded in iFrame $this->app->response->headers->set('X-Frame-Options', 'deny'); // Yeah ! - $this->app->response->headers->set('X-Powered-By', 'FeatherBB'); + $this->app->response->headers->set('X-Powered-By', $this->app->forum_env['FORUM_NAME']); + } + + public function init_db() + { + // Include IdiORM + require_once $this->data['forum_env']['FEATHER_ROOT'].'include/idiorm.php'; + + // TODO: handle drivers + \ORM::configure('mysql:host='.$this->data['forum_settings']['db_host'].';dbname='.$this->data['forum_settings']['db_name']); + \ORM::configure('username', $this->app->forum_settings['db_user']); + \ORM::configure('password', $this->app->forum_settings['db_pass']); + \ORM::configure('logging', true); + \ORM::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); + \ORM::configure('id_column_overrides', array( + $this->app->forum_settings['db_prefix'].'groups' => 'g_id', + )); + } + + public function authenticate() + { + $now = time(); + + // Get FeatherBB cookie + $cookie_raw = $this->app->getCookie($this->data['forum_settings']['cookie_name']); + + // Check if cookie exists and is valid (getCookie method returns false if the data has been tampered locally so it can't decrypt the cookie); + if (isset($cookie_raw)) { + $cookie = json_decode($cookie_raw, true); + $checksum = hash_hmac('sha1', $cookie['user_id'].$cookie['expires'], $this->data['forum_settings']['cookie_seed'].'_checksum'); + + // If cookie has a non-guest user, hasn't expired and is legit + if ($cookie['user_id'] > 1 && $cookie['expires'] > $now && $checksum == $cookie['checksum']) { + + // Get user info from db + $select_check_cookie = array('u.*', 'g.*', 'o.logged', 'o.idle'); + $where_check_cookie = array('u.id' => intval($cookie['user_id'])); + + $result = \ORM::for_table($this->data['forum_settings']['db_prefix'].'users') + ->table_alias('u') + ->select_many($select_check_cookie) + ->inner_join($this->data['forum_settings']['db_prefix'].'groups', array('u.group_id', '=', 'g.g_id'), 'g') + ->left_outer_join($this->data['forum_settings']['db_prefix'].'online', array('o.user_id', '=', 'u.id'), 'o') + ->where($where_check_cookie) + ->find_result_set(); + + foreach ($result as $this->app->user); + + // Another security check, to prevent identity fraud by changing the user id in the cookie) (might be useless considering the strength of encryption) + if (isset($this->app->user->id) && hash_hmac('sha1', $this->app->user->password, $this->data['forum_settings']['cookie_seed'].'_password_hash') === $cookie['password_hash']) { + $expires = ($cookie['expires'] > $now + $this->data['forum_settings']['o_timeout_visit']) ? $now + 1209600 : $now + $this->data['forum_settings']['o_timeout_visit']; + $this->app->user->is_guest = false; + $this->app->user->is_admmod = $this->app->user->g_id == FEATHER_ADMIN || $this->app->g_moderator == '1'; + if (!$this->app->user->disp_topics) { + $this->app->user->disp_topics = $this->data['forum_settings']['o_disp_topics_default']; + } + if (!$this->app->user->disp_posts) { + $this->app->user->disp_posts = $this->data['forum_settings']['o_disp_posts_default']; + } + if (!file_exists($this->data['forum_env']['FEATHER_ROOT'].'lang/'.$this->app->user->language)) { + $this->app->user->language = $this->data['forum_settings']['o_default_lang']; + } + if (!file_exists($this->data['forum_env']['FEATHER_ROOT'].'style/'.$this->app->user->style.'.css')) { + $this->app->user->style = $this->data['forum_settings']['o_default_style']; + } + feather_setcookie($this->app->user->id, $this->app->user->password, $expires); + $this->update_online(); + return true; + } + } + } + // If there is no cookie, or cookie is guest or expired, let's reconnect. + $expires = $now + 31536000; // The cookie expires after a year + $remote_addr = get_remote_address(); + + // Fetch guest user + $select_set_default_user = array('u.*', 'g.*', 'o.logged', 'o.last_post', 'o.last_search'); + $where_set_default_user = array('u.id' => '1'); + + $result = \ORM::for_table($this->data['forum_settings']['db_prefix'].'users') + ->table_alias('u') + ->select_many($select_set_default_user) + ->inner_join($this->data['forum_settings']['db_prefix'].'groups', array('u.group_id', '=', 'g.g_id'), 'g') + ->left_outer_join($this->data['forum_settings']['db_prefix'].'online', array('o.ident', '=', $remote_addr), 'o', true) + ->where($where_set_default_user) + ->find_result_set(); + + if (!$result) { + exit('Unable to fetch guest information. Your database must contain both a guest user and a guest user group.'); + } + + foreach ($result as $this->app->user); + + $this->app->user->disp_topics = $this->data['forum_settings']['o_disp_topics_default']; + $this->app->user->disp_posts = $this->data['forum_settings']['o_disp_posts_default']; + $this->app->user->timezone = $this->data['forum_settings']['o_default_timezone']; + $this->app->user->dst = $this->data['forum_settings']['o_default_dst']; + $this->app->user->language = $this->data['forum_settings']['o_default_lang']; + $this->app->user->style = $this->data['forum_settings']['o_default_style']; + $this->app->user->is_guest = true; + $this->app->user->is_admmod = false; + + // Update online list + if (!$this->app->user->logged) { + $this->app->user->logged = time(); + + // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table + switch ($this->data['forum_settings']['db_type']) { + case 'mysql': + case 'mysqli': + case 'mysql_innodb': + case 'mysqli_innodb': + case 'sqlite': + case 'sqlite3': + \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); + break; + + default: + \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); + break; + } + } else { + \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->where('ident', $remote_addr) + ->update_many('logged', time()); + } + + feather_setcookie(1, feather_hash(uniqid(rand(), true)), $expires); + return true; + } + + public function update_online() + { + $now = time(); + + // Define this if you want this visit to affect the online list and the users last visit data + if (!defined('FEATHER_QUIET_VISIT')) { + // Update the online list + if (!$this->app->user->logged) { + $this->app->user->logged = $now; + + // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table + switch ($this->data['forum_settings']['db_type']) { + case 'mysql': + case 'mysqli': + case 'mysql_innodb': + case 'mysqli_innodb': + case 'sqlite': + case 'sqlite3': + \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(:user_id, :ident, :logged)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); + break; + + default: + \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT :user_id, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE user_id=:user_id)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); + break; + } + + // Reset tracked topics + set_tracked_topics(null); + + } else { + // Special case: We've timed out, but no other user has browsed the forums since we timed out + if ($this->app->user->logged < ($now-$this->data['forum_settings']['o_timeout_visit'])) { + \ORM::for_table($this->data['forum_settings']['db_prefix'].'users')->where('id', $this->app->user->id) + ->find_one() + ->set('last_visit', $this->app->user->logged) + ->save(); + $this->app->user->last_visit = $this->app->user->logged; + } + + $idle_sql = ($this->app->user->idle == '1') ? ', idle=0' : ''; + + \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('UPDATE '.$this->data['forum_settings']['db_prefix'].'online SET logged='.$now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $this->app->user->id)); + + // Update tracked topics with the current expire time + $cookie_tracked_topics = $this->app->getCookie($this->data['forum_settings']['cookie_name'].'_track'); + if (isset($cookie_tracked_topics)) { + set_tracked_topics(json_decode($cookie_tracked_topics, true)); + } + } + } else { + if (!$this->app->user->logged) { + $this->app->user->logged = $this->app->user->last_visit; + } + } + } + + // + + public function init_db_legacy() + { + switch ($this->app->forum_settings['db_type']) { + case 'mysql': + require_once FEATHER_ROOT.'include/dblayer/mysql.php'; + break; + + case 'mysql_innodb': + require_once FEATHER_ROOT.'include/dblayer/mysql_innodb.php'; + break; + + case 'mysqli': + require_once FEATHER_ROOT.'include/dblayer/mysqli.php'; + break; + + case 'mysqli_innodb': + require_once FEATHER_ROOT.'include/dblayer/mysqli_innodb.php'; + break; + + case 'pgsql': + require_once FEATHER_ROOT.'include/dblayer/pgsql.php'; + break; + + case 'sqlite': + require_once FEATHER_ROOT.'include/dblayer/sqlite.php'; + break; + + case 'sqlite3': + require_once FEATHER_ROOT.'include/dblayer/sqlite3.php'; + break; + + default: + error('\''.$db_type.'\' is not a valid database type. Please check settings in config.php.', __FILE__, __LINE__); + break; + } + + $this->app->container->singleton('db', function () { + // Create the database adapter object (and open/connect to/select db) + return new \DBLayer($this->app->forum_settings['db_host'], + $this->app->forum_settings['db_user'], + $this->app->forum_settings['db_pass'], + $this->app->forum_settings['db_name'], + $this->app->forum_settings['db_prefix'], + false); + }); + $this->app->db->start_transaction(); + $this->app->prefix = $this->app->forum_settings['db_prefix']; // But, why ? *insert GIF here* + } + + public function call() + { + global $lang_common, $feather_bans, $db_type, $cookie_name, $cookie_seed; + + // Configure Slim + $this->app->config('cookies.encrypt', true); + $this->app->config('debug', true); // As long as we're developing FeatherBB + + // Populate Feather object + $this->hydrate($this->data); + + // Legacy + $this->env_to_globals($this->app->forum_env); + $this->app->config = $this->data['forum_settings']; + extract($this->data['forum_settings']); + + // Block prefetch requests + $this->app->hook('slim.before', function () { + if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { + $this->app->halt(403, 'Prefetch forbidden'); + } + }); + + $this->set_headers(); + $this->init_db(); + $this->init_db_legacy(); + + require_once $this->app->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; + require_once $this->app->forum_env['FEATHER_ROOT'].'include/functions.php'; + + // TODO : check useness + // Strip out "bad" UTF-8 characters + forum_remove_bad_characters(); + // Reverse the effect of register_globals + forum_unregister_globals(); + + // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) + setlocale(LC_CTYPE, 'C'); + + // TODO : magic quotes + // Turn off magic_quotes_runtime + if (get_magic_quotes_runtime()) { + set_magic_quotes_runtime(0); + } + + // Define time formats + $forum_time_formats = array($this->app->config['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); + $forum_date_formats = array($this->app->config['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); + + $this->authenticate(); + + // Attempt to load the common language file + if (file_exists($this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php')) { + include $this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php'; + } else { + die('There is no valid language pack \''.feather_escape($this->app->user->language).'\' installed. Please reinstall a language of that name'); + } + + // Check if we are to display a maintenance message + if ($this->app->config['o_maintenance'] && $this->app->user->g_id > FEATHER_ADMIN && !defined('FEATHER_TURN_OFF_MAINT')) { + maintenance_message(); + } + + // Load cached bans + if (file_exists($this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php')) { + include $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; + } + + if (!defined('FEATHER_BANS_LOADED')) { + if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { + require_once $this->app->forum_env['FEATHER_ROOT'].'include/cache.php'; + } + + generate_bans_cache(); + require_once $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; + } + + // Check if current user is banned + check_bans(); + + // Update online list + update_users_online(); - // Call next middleware. + $this->app->config('templates.path', get_path_view()); $this->next->call(); } diff --git a/include/common.php b/include/common.php index dec6ca65..1da5cfea 100644 --- a/include/common.php +++ b/include/common.php @@ -7,195 +7,4 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -if (!defined('FEATHER_ROOT')) { - exit('The constant FEATHER_ROOT must be defined and point to a valid FeatherBB installation root directory.'); -} -// Define the version and database revision that this code was written for -define('FORUM_VERSION', '1.0.0'); - -define('FORUM_DB_REVISION', 21); -define('FORUM_SI_REVISION', 2); -define('FORUM_PARSER_REVISION', 2); - -// Attempt to load the configuration file config.php -if (file_exists(FEATHER_ROOT.'include/config.php')) { - require FEATHER_ROOT.'include/config.php'; -} - -// Load the functions script -require FEATHER_ROOT.'include/functions.php'; - -// Load UTF-8 functions -require FEATHER_ROOT.'include/utf8/utf8.php'; - -// Strip out "bad" UTF-8 characters -forum_remove_bad_characters(); - -// Reverse the effect of register_globals -forum_unregister_globals(); - -// If FEATHER isn't defined, config.php is missing or corrupt -if (!defined('FEATHER')) { - header('Location: install.php'); - exit; -} - -// Record the start time (will be used to calculate the generation time for the page) -$feather->start = get_microtime(); - -// Make sure PHP reports all errors except E_NOTICE. FluxBB supports E_ALL, but a lot of scripts it may interact with, do not -//error_reporting(E_ALL ^ E_NOTICE); -error_reporting(E_ALL); // Let's report everything for development - -// Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) -setlocale(LC_CTYPE, 'C'); - -// Turn off magic_quotes_runtime -if (get_magic_quotes_runtime()) { - set_magic_quotes_runtime(0); -} - -// If a cookie name is not specified in config.php, we use the default (pun_cookie) -if (empty($cookie_name)) { - $cookie_name = 'feather_cookie'; -} - -// If the cache directory is not specified, we use the default setting -if (!defined('FORUM_CACHE_DIR')) { - define('FORUM_CACHE_DIR', FEATHER_ROOT.'cache/'); -} - -// Define a few commonly used constants -define('FEATHER_UNVERIFIED', 0); -define('FEATHER_ADMIN', 1); -define('FEATHER_MOD', 2); -define('FEATHER_GUEST', 3); -define('FEATHER_MEMBER', 4); - -// Load DB abstraction layer and connect -require FEATHER_ROOT.'include/dblayer/common_db.php'; - - // Inject DB dependency into SlimFramework -$feather->container->singleton('db', function () use ($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) { - // Create the database adapter object (and open/connect to/select db) - return new DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect); -}); - -// Backward compatibility - to be removed soon -$db = $feather->db; - -// Start a transaction -$feather->db->start_transaction(); - -// Include Idiorm -require FEATHER_ROOT.'include/idiorm.php'; - -// TODO: handle drivers -\ORM::configure('mysql:host='.$db_host.';dbname='.$db_name); -\ORM::configure('username', $db_username); -\ORM::configure('password', $db_password); -\ORM::configure('logging', true); -\ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); -\ORM::configure('id_column_overrides', array( - $db_prefix.'groups' => 'g_id', -)); - -// Inject DB prefix to SlimFramework -$feather->prefix = $db_prefix; - -// Load cached config -if (file_exists(FORUM_CACHE_DIR.'cache_config.php')) { - include FORUM_CACHE_DIR.'cache_config.php'; -} - -if (!defined('FEATHER_CONFIG_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_config_cache(); - require FORUM_CACHE_DIR.'cache_config.php'; -} - -// Inject config to SlimFramework -$feather->config = $feather_config; - -// Verify that we are running the proper database schema revision -if (!isset($feather->config['o_database_revision']) || $feather->config['o_database_revision'] < FORUM_DB_REVISION || - !isset($feather->config['o_searchindex_revision']) || $feather->config['o_searchindex_revision'] < FORUM_SI_REVISION || - !isset($feather->config['o_parser_revision']) || $feather->config['o_parser_revision'] < FORUM_PARSER_REVISION || - version_compare($feather->config['o_cur_version'], FORUM_VERSION, '<')) { - header('Location: db_update.php'); - exit; -} - -// Enable output buffering -if (!defined('FEATHER_DISABLE_BUFFERING')) { - // Should we use gzip output compression? - if ($feather->config['o_gzip'] && extension_loaded('zlib')) { - ob_start('ob_gzhandler'); - } else { - ob_start(); - } -} - -// Define standard date/time formats -$forum_time_formats = array($feather->config['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); -$forum_date_formats = array($feather->config['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); - -// Check/update/set cookie and fetch user info -check_cookie(); - -// Attempt to load the common language file -if (file_exists(FEATHER_ROOT.'lang/'.$feather->user->language.'/common.php')) { - include FEATHER_ROOT.'lang/'.$feather->user->language.'/common.php'; -} else { - die('There is no valid language pack \''.feather_escape($feather->user->language).'\' installed. Please reinstall a language of that name'); -} - -// Check if we are to display a maintenance message -if ($feather->config['o_maintenance'] && $feather->user->g_id > FEATHER_ADMIN && !defined('FEATHER_TURN_OFF_MAINT')) { - maintenance_message(); -} - -// Load cached bans -if (file_exists(FORUM_CACHE_DIR.'cache_bans.php')) { - include FORUM_CACHE_DIR.'cache_bans.php'; -} - -if (!defined('FEATHER_BANS_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_bans_cache(); - require FORUM_CACHE_DIR.'cache_bans.php'; -} - -// Check if current user is banned -check_bans(); - -// Update online list -update_users_online(); - -// Check to see if we logged in without a cookie being set -if ($feather->user->is_guest && isset($_GET['login'])) { - message($lang_common['No cookie']); -} - -// 32kb should be more than enough for forum posts -if (!defined('FEATHER_MAX_POSTSIZE')) { - define('FEATHER_MAX_POSTSIZE', 32768); -} - -if (!defined('FEATHER_SEARCH_MIN_WORD')) { - define('FEATHER_SEARCH_MIN_WORD', 3); -} -if (!defined('FEATHER_SEARCH_MAX_WORD')) { - define('FEATHER_SEARCH_MAX_WORD', 20); -} - -if (!defined('FORUM_MAX_COOKIE_SIZE')) { - define('FORUM_MAX_COOKIE_SIZE', 4048); -} diff --git a/index.php b/index.php index bfb68e1f..460159e8 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,7 @@ // Start a session for flash messages session_cache_limiter(false); session_start(); +error_reporting(E_ALL); // Let's report everything for development // Load Slim Framework require 'Slim/Slim.php'; @@ -17,25 +18,20 @@ // Instantiate Slim $feather = new \Slim\Slim(); +$feather_user_settings = array( + 'db_name' => 'featherbb', + 'db_host' => 'localhost', + 'db_user' => 'featherbb', + 'db_pass' => 'featherbb', + 'cookie_name' => 'feather_cookie_45ef0b', + 'cookie_seed' => '0f320ab07f4afbc5'); // Load middlewares $feather->add(new \Slim\Extras\Middleware\CsrfGuard('featherbb_csrf')); // CSRF -$feather->add(new \Slim\Extras\Middleware\FeatherBB()); // FeatherBB - -// Cookie encryption -$feather->config('cookies.encrypt', true); - -// Load FeatherBB common file -define('FEATHER_ROOT', dirname(__FILE__).'/'); -require FEATHER_ROOT.'include/common.php'; +$feather->add(new \Slim\Extras\Middleware\FeatherBB($feather_user_settings)); // FeatherBB // Load the routes -require FEATHER_ROOT.'include/routes.php'; - -// Specify where to load the views -$feather->config('templates.path', get_path_view()); - -$feather->config('debug', true); // As long as we're developing FeatherBB +require 'include/routes.php'; // Run it, baby! $feather->run(); From 95761c2805ae58cf0f0bf9b9ca00e0e87282d90f Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sun, 9 Aug 2015 20:20:59 +0200 Subject: [PATCH 002/353] Remove functions --- include/functions.php | 274 ++++-------------------------------------- 1 file changed, 26 insertions(+), 248 deletions(-) diff --git a/include/functions.php b/include/functions.php index 7c0dcf09..09eb72f3 100644 --- a/include/functions.php +++ b/include/functions.php @@ -7,8 +7,6 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - - // // Return current timestamp (with microseconds) as a float // @@ -18,140 +16,6 @@ function get_microtime() return ((float)$usec + (float)$sec); } -// -// Cookie stuff! -// -function check_cookie() -{ - global $cookie_name, $cookie_seed; - - // Get Slim current session - $feather = \Slim\Slim::getInstance(); - $now = time(); - - // Get FeatherBB cookie - $cookie_raw = $feather->getCookie($cookie_name); - - // Check if cookie exists and is valid (getCookie method returns false if the data has been tampered locally so it can't decrypt the cookie); - if (isset($cookie_raw)) { - $cookie = json_decode($cookie_raw, true); - $checksum = hash_hmac('sha1', $cookie['user_id'].$cookie['expires'], $cookie_seed . '_checksum'); - - // If cookie has a non-guest user, hasn't expired and is legit - if ($cookie['user_id'] > 1 && $cookie['expires'] > $now && $checksum == $cookie['checksum']) { - - // Get user info from db - $select_check_cookie = array('u.*', 'g.*', 'o.logged', 'o.idle'); - $where_check_cookie = array('u.id' => intval($cookie['user_id'])); - - $result = ORM::for_table($feather->prefix.'users') - ->table_alias('u') - ->select_many($select_check_cookie) - ->inner_join($feather->prefix.'groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join($feather->prefix.'online', array('o.user_id', '=', 'u.id'), 'o') - ->where($where_check_cookie) - ->find_result_set(); - - foreach ($result as $feather->user); - - // Another security check, to prevent identity fraud by changing the user id in the cookie) (might be useless considering the strength of encryption) - if (isset($feather->user->id) && hash_hmac('sha1', $feather->user->password, $cookie_seed.'_password_hash') === $cookie['password_hash']) { - $expires = ($cookie['expires'] > $now + $feather->config['o_timeout_visit']) ? $now + 1209600 : $now + $feather->config['o_timeout_visit']; - $feather->user->is_guest = false; - $feather->user->is_admmod = $feather->user->g_id == FEATHER_ADMIN || $feather->user->g_moderator == '1'; - feather_setcookie($feather->user->id, $feather->user->password, $expires); - set_preferences(); - return true; - } - } - } - // If there is no cookie, or cookie is guest or expired, let's reconnect. - $expires = $now + 31536000; // The cookie expires after a year - feather_setcookie(1, feather_hash(uniqid(rand(), true)), $expires); - return set_default_user(); -} - -// -// Set preferences -// -function set_preferences() -{ - global $db_type, $cookie_name; - - // Get Slim current session - $feather = \Slim\Slim::getInstance(); - $now = time(); - - // Set a default language if the user selected language no longer exists - if (!file_exists(FEATHER_ROOT.'lang/'.$feather->user->language)) { - $feather->user->language = $feather->config['o_default_lang']; - } - - // Set a default style if the user selected style no longer exists - if (!file_exists(FEATHER_ROOT.'style/'.$feather->user->style.'.css')) { - $feather->user->style = $feather->config['o_default_style']; - } - - if (!$feather->user->disp_topics) { - $feather->user->disp_topics = $feather->config['o_disp_topics_default']; - } - if (!$feather->user->disp_posts) { - $feather->user->disp_posts = $feather->config['o_disp_posts_default']; - } - - // Define this if you want this visit to affect the online list and the users last visit data - if (!defined('FEATHER_QUIET_VISIT')) { - // Update the online list - if (!$feather->user->logged) { - $feather->user->logged = $now; - - // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table - switch ($db_type) { - case 'mysql': - case 'mysqli': - case 'mysql_innodb': - case 'mysqli_innodb': - case 'sqlite': - case 'sqlite3': - \ORM::for_table($feather->db->prefix.'online')->raw_execute('REPLACE INTO '.$feather->db->prefix.'online (user_id, ident, logged) VALUES(:user_id, :ident, :logged)', array(':user_id' => $feather->user->id, ':ident' => $feather->user->username, ':logged' => $feather->user->logged)); - break; - - default: - \ORM::for_table($feather->db->prefix.'online')->raw_execute('INSERT INTO '.$feather->db->prefix.'online (user_id, ident, logged) SELECT :user_id, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$feather->db->prefix.'online WHERE user_id=:user_id)', array(':user_id' => $feather->user->id, ':ident' => $feather->user->username, ':logged' => $feather->user->logged)); - break; - } - - // Reset tracked topics - set_tracked_topics(null); - - } else { - // Special case: We've timed out, but no other user has browsed the forums since we timed out - if ($feather->user->logged < ($now-$feather->config['o_timeout_visit'])) { - \ORM::for_table($feather->db->prefix.'users')->where('id', $feather->user->id) - ->find_one() - ->set('last_visit', $feather->user->logged) - ->save(); - $feather->user->last_visit = $feather->user->logged; - } - - $idle_sql = ($feather->user->idle == '1') ? ', idle=0' : ''; - - \ORM::for_table($feather->db->prefix.'online')->raw_execute('UPDATE '.$feather->db->prefix.'online SET logged='.$now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $feather->user->id)); - - // Update tracked topics with the current expire time - $cookie_tracked_topics = $feather->getCookie($cookie_name.'_track'); - if (isset($cookie_tracked_topics)) { - set_tracked_topics(json_decode($cookie_tracked_topics, true)); - } - } - } else { - if (!$feather->user->logged) { - $feather->user->logged = $feather->user->last_visit; - } - } -} - - // // Try to determine the current URL // @@ -220,7 +84,6 @@ function get_base_url($support_https = false) return $base_url; } - // // Fetch admin IDs // @@ -243,71 +106,6 @@ function get_admin_ids() } -// -// Fill $feather->user with default values (for guests) -// -function set_default_user() -{ - global $db, $db_type, $feather_config; - - // Get Slim current session - $feather = \Slim\Slim::getInstance(); - - $remote_addr = get_remote_address(); - - // Fetch guest user - $select_set_default_user = array('u.*', 'g.*', 'o.logged', 'o.last_post', 'o.last_search'); - $where_set_default_user = array('u.id' => '1'); - - $result = ORM::for_table($feather->prefix.'users') - ->table_alias('u') - ->select_many($select_set_default_user) - ->inner_join($feather->prefix.'groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join($feather->prefix.'online', array('o.ident', '=', $remote_addr), 'o', true) - ->where($where_set_default_user) - ->find_result_set(); - - if (!$result) { - exit('Unable to fetch guest information. Your database must contain both a guest user and a guest user group.'); - } - - foreach ($result as $feather->user); - - // Update online list - if (!$feather->user->logged) { - $feather->user->logged = time(); - - // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table - switch ($db_type) { - case 'mysql': - case 'mysqli': - case 'mysql_innodb': - case 'mysqli_innodb': - case 'sqlite': - case 'sqlite3': - \ORM::for_table($db->prefix.'online')->raw_execute('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $remote_addr, ':logged' => $feather->user->logged)); - break; - - default: - \ORM::for_table($db->prefix.'online')->raw_execute('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$db->prefix.'online WHERE ident=:ident)', array(':ident' => $remote_addr, ':logged' => $feather->user->logged)); - break; - } - } else { - \ORM::for_table($db->prefix.'online')->where('ident', $remote_addr) - ->update_many('logged', time()); - } - - $feather->user->disp_topics = $feather_config['o_disp_topics_default']; - $feather->user->disp_posts = $feather_config['o_disp_posts_default']; - $feather->user->timezone = $feather_config['o_default_timezone']; - $feather->user->dst = $feather_config['o_default_dst']; - $feather->user->language = $feather_config['o_default_lang']; - $feather->user->style = $feather_config['o_default_style']; - $feather->user->is_guest = true; - $feather->user->is_admmod = false; -} - - // // Wrapper for Slim setCookie method // @@ -324,29 +122,6 @@ function feather_setcookie($user_id, $password, $expires) $feather->setCookie($cookie_name, json_encode($cookie_data), $expires); } - -// -// Set a cookie, FluxBB style! - -function forum_setcookie($name, $value, $expire) -{ - global $cookie_path, $cookie_domain, $cookie_secure, $feather_config; - - if ($expire - time() - $feather_config['o_timeout_visit'] < 1) { - $expire = 0; - } - - // Enable sending of a P3P header - header('P3P: CP="CUR ADM"'); - - if (version_compare(PHP_VERSION, '5.2.0', '>=')) { - setcookie($name, $value, $expire, $cookie_path, $cookie_domain, $cookie_secure, true); - } else { - setcookie($name, $value, $expire, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure); - } -} - - // // Check whether the connecting user is banned (and delete any expired bans while we're at it) // @@ -373,7 +148,7 @@ function check_bans() foreach ($feather_bans as $cur_ban) { // Has this ban expired? if ($cur_ban['expire'] != '' && $cur_ban['expire'] <= time()) { - \ORM::for_table($db->prefix.'bans')->where('id', $cur_ban['id']) + \ORM::for_table($feather->db->prefix.'bans')->where('id', $cur_ban['id']) ->delete_many(); $bans_altered = true; continue; @@ -403,7 +178,7 @@ function check_bans() } if ($is_banned) { - \ORM::for_table($db->prefix.'online')->where('ident', $feather->user->username) + \ORM::for_table($feather->db->prefix.'online')->where('ident', $feather->user->username) ->delete_many(); message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'

'.feather_escape($cur_ban['message']).'

' : '

').$lang_common['Ban message 4'].' '.feather_escape($feather_config['o_admin_email']).'.', true, true, true); } @@ -456,7 +231,7 @@ function check_username($username, $errors, $exclude_id = null) // Check that the username (or a too similar username) is not already registered $query = (!is_null($exclude_id)) ? ' AND id!='.$exclude_id : ''; - $result = \ORM::for_table($db->prefix.'online')->raw_query('SELECT username FROM '.$db->prefix.'users WHERE (UPPER(username)=UPPER(:username1) OR UPPER(username)=UPPER(:username2)) AND id>1'.$query, array(':username1' => $username, ':username2' => ucp_preg_replace('%[^\p{L}\p{N}]%u', '', $username)))->find_one(); + $result = \ORM::for_table($feather->db->prefix.'online')->raw_query('SELECT username FROM '.$feather->db->prefix.'users WHERE (UPPER(username)=UPPER(:username1) OR UPPER(username)=UPPER(:username2)) AND id>1'.$query, array(':username1' => $username, ':username2' => ucp_preg_replace('%[^\p{L}\p{N}]%u', '', $username)))->find_one(); if ($result) { $busy = $db->result($result); @@ -480,33 +255,36 @@ function check_username($username, $errors, $exclude_id = null) // function update_users_online() { - global $db, $feather_config; + global $db; $now = time(); + // Get Slim current session + $feather = \Slim\Slim::getInstance(); + // Fetch all online list entries that are older than "o_timeout_online" $select_update_users_online = array('user_id', 'ident', 'logged', 'idle'); - $result = \ORM::for_table($db->prefix.'online')->select_many($select_update_users_online) - ->where_lt('logged', $now-$feather_config['o_timeout_online']) + $result = \ORM::for_table($feather->db->prefix.'online')->select_many($select_update_users_online) + ->where_lt('logged', $now - $feather->config['o_timeout_online']) ->find_many(); foreach ($result as $cur_user) { // If the entry is a guest, delete it if ($cur_user['user_id'] == '1') { - \ORM::for_table($db->prefix.'online')->where('ident', $cur_user['ident']) + \ORM::for_table($feather->db->prefix.'online')->where('ident', $cur_user['ident']) ->delete_many(); } else { // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list - if ($cur_user['logged'] < ($now-$feather_config['o_timeout_visit'])) { - \ORM::for_table($db->prefix.'users')->where('id', $cur_user['user_id']) + if ($cur_user['logged'] < ($now-$feather->config['o_timeout_visit'])) { + \ORM::for_table($feather->db->prefix.'users')->where('id', $cur_user['user_id']) ->find_one() ->set('last_visit', $cur_user['logged']) ->save(); - \ORM::for_table($db->prefix.'online')->where('user_id', $cur_user['user_id']) + \ORM::for_table($feather->db->prefix.'online')->where('user_id', $cur_user['user_id']) ->delete_many(); } elseif ($cur_user['idle'] == '0') { - \ORM::for_table($db->prefix.'online')->where('user_id', $cur_user['user_id']) + \ORM::for_table($feather->db->prefix.'online')->where('user_id', $cur_user['user_id']) ->update_many('idle', 1); } } @@ -609,7 +387,7 @@ function update_forum($forum_id) { global $db; - $stats_query = \ORM::for_table($db->prefix.'topics') + $stats_query = \ORM::for_table($feather->db->prefix.'topics') ->where('forum_id', $forum_id) ->select_expr('COUNT(id)', 'total_topics') ->select_expr('SUM(num_replies)', 'total_replies') @@ -622,7 +400,7 @@ function update_forum($forum_id) $select_update_forum = array('last_post', 'last_post_id', 'last_poster'); - $result = \ORM::for_table($db->prefix.'topics')->select_many($select_update_forum) + $result = \ORM::for_table($feather->db->prefix.'topics')->select_many($select_update_forum) ->where('forum_id', $forum_id) ->where_null('moved_to') ->order_by_desc('last_post') @@ -647,7 +425,7 @@ function update_forum($forum_id) 'last_poster' => 'NULL', ); } - \ORM::for_table($db->prefix.'forums') + \ORM::for_table($feather->db->prefix.'forums') ->where('id', $forum_id) ->find_one() ->set($insert_update_forum) @@ -686,17 +464,17 @@ function delete_topic($topic_id) array('moved_to' => $topic_id) ); - \ORM::for_table($db->prefix.'topics') + \ORM::for_table($feather->db->prefix.'topics') ->where_any_is($where_delete_topic) ->delete_many(); // Delete posts in topic - \ORM::for_table($db->prefix.'posts') + \ORM::for_table($feather->db->prefix.'posts') ->where('topic_id', $topic_id) ->delete_many(); // Delete any subscriptions for this topic - \ORM::for_table($db->prefix.'topic_subscriptions') + \ORM::for_table($feather->db->prefix.'topic_subscriptions') ->where('topic_id', $topic_id) ->delete_many(); } @@ -709,7 +487,7 @@ function delete_post($post_id, $topic_id) { global $db; - $result = \ORM::for_table($db->prefix.'posts') + $result = \ORM::for_table($feather->db->prefix.'posts') ->select_many('id', 'poster', 'posted') ->where('topic_id', $topic_id) ->order_by_desc('id') @@ -730,7 +508,7 @@ function delete_post($post_id, $topic_id) } // Delete the post - \ORM::for_table($db->prefix.'posts') + \ORM::for_table($feather->db->prefix.'posts') ->where('id', $post_id) ->find_one() ->delete(); @@ -738,7 +516,7 @@ function delete_post($post_id, $topic_id) strip_search_index($post_id); // Count number of replies in the topic - $num_replies = \ORM::for_table($db->prefix.'posts')->where('topic_id', $topic_id)->count() - 1; + $num_replies = \ORM::for_table($feather->db->prefix.'posts')->where('topic_id', $topic_id)->count() - 1; // If the message we deleted is the most recent in the topic (at the end of the topic) if ($last_id == $post_id) { @@ -750,14 +528,14 @@ function delete_post($post_id, $topic_id) 'last_poster' => $second_poster, 'num_replies' => $num_replies, ); - \ORM::for_table($db->prefix.'topics') + \ORM::for_table($feather->db->prefix.'topics') ->where('id', $topic_id) ->find_one() ->set($update_topic) ->save(); } else { // We deleted the only reply, so now last_post/last_post_id/last_poster is posted/id/poster from the topic itself - \ORM::for_table($db->prefix.'topics') + \ORM::for_table($feather->db->prefix.'topics') ->where('id', $topic_id) ->find_one() ->set_expr('last_post', 'posted') @@ -768,7 +546,7 @@ function delete_post($post_id, $topic_id) } } else { // Otherwise we just decrement the reply counter - \ORM::for_table($db->prefix.'topics') + \ORM::for_table($feather->db->prefix.'topics') ->where('id', $topic_id) ->find_one() ->set('num_replies', $num_replies) From ccc25888fc1946f7284f61a7911f5bbfeac24736 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sun, 9 Aug 2015 20:22:13 +0200 Subject: [PATCH 003/353] Generic 404 page --- include/routes.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/routes.php b/include/routes.php index 48acac72..f9419640 100644 --- a/include/routes.php +++ b/include/routes.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Index $feather->get('/', '\controller\index:display'); @@ -92,7 +92,7 @@ // Admin index $feather->get('(/action/:action)(/)', '\controller\admin\index:display'); - + // Admin bans $feather->group('/bans', function() use ($feather) { $feather->get('(/)', '\controller\admin\bans:display'); @@ -156,10 +156,10 @@ $feather->get('/ip-stats/id/:id(/)', '\controller\admin\users:ipstats')->conditions(array('id' => '[0-9]+')); $feather->get('/show-users/ip/:ip(/)', '\controller\admin\users:showusers'); }); - + }); // 404 not found -$feather->notFound(function () use ($lang_common) { - message($lang_common['Bad request'], '404'); +$feather->notFound(function () use ($feather) { + $feather->halt(404, 'Not found'); }); From 663766150b17832efd9772ba541f4fe2decb8c61 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 10 Aug 2015 10:44:14 +0200 Subject: [PATCH 004/353] Remove common file --- include/common.php | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 include/common.php diff --git a/include/common.php b/include/common.php deleted file mode 100644 index 1da5cfea..00000000 --- a/include/common.php +++ /dev/null @@ -1,10 +0,0 @@ - Date: Mon, 10 Aug 2015 11:34:09 +0200 Subject: [PATCH 005/353] Fix block prefetch feature --- Slim/Extras/Middleware/FeatherBB.php | 139 +++++++++++++-------------- 1 file changed, 68 insertions(+), 71 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index a884ae65..27a90c99 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -362,88 +362,85 @@ public function call() { global $lang_common, $feather_bans, $db_type, $cookie_name, $cookie_seed; - // Configure Slim - $this->app->config('cookies.encrypt', true); - $this->app->config('debug', true); // As long as we're developing FeatherBB - - // Populate Feather object - $this->hydrate($this->data); - - // Legacy - $this->env_to_globals($this->app->forum_env); - $this->app->config = $this->data['forum_settings']; - extract($this->data['forum_settings']); - // Block prefetch requests - $this->app->hook('slim.before', function () { - if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { - $this->app->halt(403, 'Prefetch forbidden'); - } - }); - - $this->set_headers(); - $this->init_db(); - $this->init_db_legacy(); - - require_once $this->app->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; - require_once $this->app->forum_env['FEATHER_ROOT'].'include/functions.php'; - - // TODO : check useness - // Strip out "bad" UTF-8 characters - forum_remove_bad_characters(); - // Reverse the effect of register_globals - forum_unregister_globals(); - - // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) - setlocale(LC_CTYPE, 'C'); + if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch') || true) { + $this->set_headers(); + $this->app->response->setStatus(403); + } else { + // Configure Slim + $this->app->config('cookies.encrypt', true); + $this->app->config('debug', true); // As long as we're developing FeatherBB + + // Populate Feather object + $this->hydrate($this->data); + + // Legacy + $this->env_to_globals($this->app->forum_env); + $this->app->config = $this->data['forum_settings']; + extract($this->data['forum_settings']); + + $this->set_headers(); + $this->init_db(); + $this->init_db_legacy(); + + require_once $this->app->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; + require_once $this->app->forum_env['FEATHER_ROOT'].'include/functions.php'; + + // TODO : check useness + // Strip out "bad" UTF-8 characters + forum_remove_bad_characters(); + // Reverse the effect of register_globals + forum_unregister_globals(); + + // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) + setlocale(LC_CTYPE, 'C'); + + // TODO : magic quotes + // Turn off magic_quotes_runtime + if (get_magic_quotes_runtime()) { + set_magic_quotes_runtime(0); + } - // TODO : magic quotes - // Turn off magic_quotes_runtime - if (get_magic_quotes_runtime()) { - set_magic_quotes_runtime(0); - } + // Define time formats + $forum_time_formats = array($this->app->config['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); + $forum_date_formats = array($this->app->config['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); - // Define time formats - $forum_time_formats = array($this->app->config['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); - $forum_date_formats = array($this->app->config['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); + $this->authenticate(); - $this->authenticate(); + // Attempt to load the common language file + if (file_exists($this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php')) { + include $this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php'; + } else { + die('There is no valid language pack \''.feather_escape($this->app->user->language).'\' installed. Please reinstall a language of that name'); + } - // Attempt to load the common language file - if (file_exists($this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php')) { - include $this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php'; - } else { - die('There is no valid language pack \''.feather_escape($this->app->user->language).'\' installed. Please reinstall a language of that name'); - } + // Check if we are to display a maintenance message + if ($this->app->config['o_maintenance'] && $this->app->user->g_id > FEATHER_ADMIN && !defined('FEATHER_TURN_OFF_MAINT')) { + maintenance_message(); + } - // Check if we are to display a maintenance message - if ($this->app->config['o_maintenance'] && $this->app->user->g_id > FEATHER_ADMIN && !defined('FEATHER_TURN_OFF_MAINT')) { - maintenance_message(); - } + // Load cached bans + if (file_exists($this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php')) { + include $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; + } - // Load cached bans - if (file_exists($this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php')) { - include $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; - } + if (!defined('FEATHER_BANS_LOADED')) { + if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { + require_once $this->app->forum_env['FEATHER_ROOT'].'include/cache.php'; + } - if (!defined('FEATHER_BANS_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require_once $this->app->forum_env['FEATHER_ROOT'].'include/cache.php'; + generate_bans_cache(); + require_once $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; } - generate_bans_cache(); - require_once $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; - } - - // Check if current user is banned - check_bans(); + // Check if current user is banned + check_bans(); - // Update online list - update_users_online(); + // Update online list + update_users_online(); - $this->app->config('templates.path', get_path_view()); - $this->next->call(); + $this->app->config('templates.path', get_path_view()); + $this->next->call(); + } } - - } From e37b3cd76909de1a8034f1c7f9828aeed3298042 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 10 Aug 2015 11:43:08 +0200 Subject: [PATCH 006/353] Fix prefetch for production --- Slim/Extras/Middleware/FeatherBB.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 27a90c99..fac15f32 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -363,7 +363,7 @@ public function call() global $lang_common, $feather_bans, $db_type, $cookie_name, $cookie_seed; // Block prefetch requests - if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch') || true) { + if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { $this->set_headers(); $this->app->response->setStatus(403); } else { From 8ae517512184651ea2b706f2aa033f566ab6bdde Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 10 Aug 2015 11:48:11 +0200 Subject: [PATCH 007/353] Tweak get template path function --- Slim/Extras/Middleware/FeatherBB.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index fac15f32..becb5752 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -367,10 +367,6 @@ public function call() $this->set_headers(); $this->app->response->setStatus(403); } else { - // Configure Slim - $this->app->config('cookies.encrypt', true); - $this->app->config('debug', true); // As long as we're developing FeatherBB - // Populate Feather object $this->hydrate($this->data); @@ -439,7 +435,10 @@ public function call() // Update online list update_users_online(); - $this->app->config('templates.path', get_path_view()); + // Configure Slim + $this->app->config('cookies.encrypt', true); + $this->app->config('debug', true); // As long as we're developing FeatherBB + $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); $this->next->call(); } } From 6343d5295dea4b7b4ce4570c3dcf5dfddf1e088c Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 12:42:03 +0200 Subject: [PATCH 008/353] Resolve route conflicts --- include/routes.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/routes.php b/include/routes.php index d0ec30f0..50a4074a 100644 --- a/include/routes.php +++ b/include/routes.php @@ -92,10 +92,7 @@ // Admin index $feather->get('(/action/:action)(/)', '\controller\admin\index:display'); -<<<<<<< HEAD -======= $feather->get('/index(/)', '\controller\admin\index:display'); ->>>>>>> featherbb/master // Admin bans $feather->group('/bans', function() use ($feather) { From 12484630003a417cd8cb09fff282962e33f2c3fa Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 12:45:50 +0200 Subject: [PATCH 009/353] Remove legacy DB layer --- Slim/Extras/Middleware/FeatherBB.php | 81 ++++++---------------------- 1 file changed, 16 insertions(+), 65 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index becb5752..9bc90f93 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -12,6 +12,7 @@ */ namespace Slim\Extras\Middleware; +use DB; class FeatherBB extends \Slim\Middleware { @@ -130,12 +131,12 @@ public function init_db() require_once $this->data['forum_env']['FEATHER_ROOT'].'include/idiorm.php'; // TODO: handle drivers - \ORM::configure('mysql:host='.$this->data['forum_settings']['db_host'].';dbname='.$this->data['forum_settings']['db_name']); - \ORM::configure('username', $this->app->forum_settings['db_user']); - \ORM::configure('password', $this->app->forum_settings['db_pass']); - \ORM::configure('logging', true); - \ORM::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); - \ORM::configure('id_column_overrides', array( + DB::configure('mysql:host='.$this->data['forum_settings']['db_host'].';dbname='.$this->data['forum_settings']['db_name']); + DB::configure('username', $this->app->forum_settings['db_user']); + DB::configure('password', $this->app->forum_settings['db_pass']); + DB::configure('logging', true); + DB::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); + DB::configure('id_column_overrides', array( $this->app->forum_settings['db_prefix'].'groups' => 'g_id', )); } @@ -159,7 +160,7 @@ public function authenticate() $select_check_cookie = array('u.*', 'g.*', 'o.logged', 'o.idle'); $where_check_cookie = array('u.id' => intval($cookie['user_id'])); - $result = \ORM::for_table($this->data['forum_settings']['db_prefix'].'users') + $result = DB::for_table($this->data['forum_settings']['db_prefix'].'users') ->table_alias('u') ->select_many($select_check_cookie) ->inner_join($this->data['forum_settings']['db_prefix'].'groups', array('u.group_id', '=', 'g.g_id'), 'g') @@ -200,7 +201,7 @@ public function authenticate() $select_set_default_user = array('u.*', 'g.*', 'o.logged', 'o.last_post', 'o.last_search'); $where_set_default_user = array('u.id' => '1'); - $result = \ORM::for_table($this->data['forum_settings']['db_prefix'].'users') + $result = DB::for_table($this->data['forum_settings']['db_prefix'].'users') ->table_alias('u') ->select_many($select_set_default_user) ->inner_join($this->data['forum_settings']['db_prefix'].'groups', array('u.group_id', '=', 'g.g_id'), 'g') @@ -235,15 +236,15 @@ public function authenticate() case 'mysqli_innodb': case 'sqlite': case 'sqlite3': - \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); + DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); break; default: - \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); + DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); break; } } else { - \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->where('ident', $remote_addr) + DB::for_table($this->data['forum_settings']['db_prefix'].'online')->where('ident', $remote_addr) ->update_many('logged', time()); } @@ -269,11 +270,11 @@ public function update_online() case 'mysqli_innodb': case 'sqlite': case 'sqlite3': - \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(:user_id, :ident, :logged)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); + DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(:user_id, :ident, :logged)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); break; default: - \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT :user_id, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE user_id=:user_id)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); + DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT :user_id, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE user_id=:user_id)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); break; } @@ -283,7 +284,7 @@ public function update_online() } else { // Special case: We've timed out, but no other user has browsed the forums since we timed out if ($this->app->user->logged < ($now-$this->data['forum_settings']['o_timeout_visit'])) { - \ORM::for_table($this->data['forum_settings']['db_prefix'].'users')->where('id', $this->app->user->id) + DB::for_table($this->data['forum_settings']['db_prefix'].'users')->where('id', $this->app->user->id) ->find_one() ->set('last_visit', $this->app->user->logged) ->save(); @@ -292,7 +293,7 @@ public function update_online() $idle_sql = ($this->app->user->idle == '1') ? ', idle=0' : ''; - \ORM::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('UPDATE '.$this->data['forum_settings']['db_prefix'].'online SET logged='.$now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $this->app->user->id)); + DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('UPDATE '.$this->data['forum_settings']['db_prefix'].'online SET logged='.$now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $this->app->user->id)); // Update tracked topics with the current expire time $cookie_tracked_topics = $this->app->getCookie($this->data['forum_settings']['cookie_name'].'_track'); @@ -309,55 +310,6 @@ public function update_online() // - public function init_db_legacy() - { - switch ($this->app->forum_settings['db_type']) { - case 'mysql': - require_once FEATHER_ROOT.'include/dblayer/mysql.php'; - break; - - case 'mysql_innodb': - require_once FEATHER_ROOT.'include/dblayer/mysql_innodb.php'; - break; - - case 'mysqli': - require_once FEATHER_ROOT.'include/dblayer/mysqli.php'; - break; - - case 'mysqli_innodb': - require_once FEATHER_ROOT.'include/dblayer/mysqli_innodb.php'; - break; - - case 'pgsql': - require_once FEATHER_ROOT.'include/dblayer/pgsql.php'; - break; - - case 'sqlite': - require_once FEATHER_ROOT.'include/dblayer/sqlite.php'; - break; - - case 'sqlite3': - require_once FEATHER_ROOT.'include/dblayer/sqlite3.php'; - break; - - default: - error('\''.$db_type.'\' is not a valid database type. Please check settings in config.php.', __FILE__, __LINE__); - break; - } - - $this->app->container->singleton('db', function () { - // Create the database adapter object (and open/connect to/select db) - return new \DBLayer($this->app->forum_settings['db_host'], - $this->app->forum_settings['db_user'], - $this->app->forum_settings['db_pass'], - $this->app->forum_settings['db_name'], - $this->app->forum_settings['db_prefix'], - false); - }); - $this->app->db->start_transaction(); - $this->app->prefix = $this->app->forum_settings['db_prefix']; // But, why ? *insert GIF here* - } - public function call() { global $lang_common, $feather_bans, $db_type, $cookie_name, $cookie_seed; @@ -377,7 +329,6 @@ public function call() $this->set_headers(); $this->init_db(); - $this->init_db_legacy(); require_once $this->app->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; require_once $this->app->forum_env['FEATHER_ROOT'].'include/functions.php'; From 96adbe4c3ac99625ecd1b8ae23d0b5142502f769 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 12:46:30 +0200 Subject: [PATCH 010/353] Fix functions conflicts --- include/functions.php | 102 ++---------------------------------------- 1 file changed, 4 insertions(+), 98 deletions(-) diff --git a/include/functions.php b/include/functions.php index ff769a27..37daba59 100644 --- a/include/functions.php +++ b/include/functions.php @@ -7,6 +7,8 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ + + // // Return current timestamp (with microseconds) as a float // @@ -17,8 +19,6 @@ function get_microtime() } // -<<<<<<< HEAD -======= // Cookie stuff! // function check_cookie() @@ -27,7 +27,7 @@ function check_cookie() // Get Slim current session $feather = \Slim\Slim::getInstance(); - + $now = time(); // Get FeatherBB cookie @@ -154,7 +154,6 @@ function set_preferences() // ->>>>>>> featherbb/master // Try to determine the current URL // function get_current_url($max_length = 0) @@ -222,6 +221,7 @@ function get_base_url($support_https = false) return $base_url; } + // // Fetch admin IDs // @@ -245,8 +245,6 @@ function get_admin_ids() // -<<<<<<< HEAD -======= // Fill $feather->user with default values (for guests) // function set_default_user() @@ -312,7 +310,6 @@ function set_default_user() // ->>>>>>> featherbb/master // Wrapper for Slim setCookie method // function feather_setcookie($user_id, $password, $expires) @@ -328,10 +325,7 @@ function feather_setcookie($user_id, $password, $expires) $feather->setCookie($cookie_name, json_encode($cookie_data), $expires); } -<<<<<<< HEAD -======= ->>>>>>> featherbb/master // // Check whether the connecting user is banned (and delete any expired bans while we're at it) // @@ -358,11 +352,7 @@ function check_bans() foreach ($feather_bans as $cur_ban) { // Has this ban expired? if ($cur_ban['expire'] != '' && $cur_ban['expire'] <= time()) { -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'bans')->where('id', $cur_ban['id']) -======= \DB::for_table('bans')->where('id', $cur_ban['id']) ->>>>>>> featherbb/master ->delete_many(); $bans_altered = true; continue; @@ -392,11 +382,7 @@ function check_bans() } if ($is_banned) { -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'online')->where('ident', $feather->user->username) -======= \DB::for_table('online')->where('ident', $feather->user->username) ->>>>>>> featherbb/master ->delete_many(); message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'

'.feather_escape($cur_ban['message']).'

' : '

').$lang_common['Ban message 4'].' '.feather_escape($feather_config['o_admin_email']).'.', true, true, true); } @@ -449,11 +435,7 @@ function check_username($username, $errors, $exclude_id = null) // Check that the username (or a too similar username) is not already registered $query = (!is_null($exclude_id)) ? ' AND id!='.$exclude_id : ''; -<<<<<<< HEAD - $result = \ORM::for_table($feather->db->prefix.'online')->raw_query('SELECT username FROM '.$feather->db->prefix.'users WHERE (UPPER(username)=UPPER(:username1) OR UPPER(username)=UPPER(:username2)) AND id>1'.$query, array(':username1' => $username, ':username2' => ucp_preg_replace('%[^\p{L}\p{N}]%u', '', $username)))->find_one(); -======= $result = \DB::for_table('online')->raw_query('SELECT username FROM '.$feather->prefix.'users WHERE (UPPER(username)=UPPER(:username1) OR UPPER(username)=UPPER(:username2)) AND id>1'.$query, array(':username1' => $username, ':username2' => ucp_preg_replace('%[^\p{L}\p{N}]%u', '', $username)))->find_one(); ->>>>>>> featherbb/master if ($result) { $busy = $result['username']; @@ -477,47 +459,20 @@ function check_username($username, $errors, $exclude_id = null) // function update_users_online() { -<<<<<<< HEAD - global $db; -======= global $feather, $feather_config; ->>>>>>> featherbb/master $now = time(); - // Get Slim current session - $feather = \Slim\Slim::getInstance(); - // Fetch all online list entries that are older than "o_timeout_online" $select_update_users_online = array('user_id', 'ident', 'logged', 'idle'); -<<<<<<< HEAD - $result = \ORM::for_table($feather->db->prefix.'online')->select_many($select_update_users_online) - ->where_lt('logged', $now - $feather->config['o_timeout_online']) -======= $result = \DB::for_table('online')->select_many($select_update_users_online) ->where_lt('logged', $now-$feather_config['o_timeout_online']) ->>>>>>> featherbb/master ->find_many(); foreach ($result as $cur_user) { // If the entry is a guest, delete it if ($cur_user['user_id'] == '1') { -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'online')->where('ident', $cur_user['ident']) - ->delete_many(); - } else { - // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list - if ($cur_user['logged'] < ($now-$feather->config['o_timeout_visit'])) { - \ORM::for_table($feather->db->prefix.'users')->where('id', $cur_user['user_id']) - ->find_one() - ->set('last_visit', $cur_user['logged']) - ->save(); - \ORM::for_table($feather->db->prefix.'online')->where('user_id', $cur_user['user_id']) - ->delete_many(); - } elseif ($cur_user['idle'] == '0') { - \ORM::for_table($feather->db->prefix.'online')->where('user_id', $cur_user['user_id']) -======= \DB::for_table('online')->where('ident', $cur_user['ident']) ->delete_many(); } else { @@ -531,7 +486,6 @@ function update_users_online() ->delete_many(); } elseif ($cur_user['idle'] == '0') { \DB::for_table('online')->where('user_id', $cur_user['user_id']) ->>>>>>> featherbb/master ->update_many('idle', 1); } } @@ -635,11 +589,7 @@ function update_forum($forum_id) // Get Slim current session $feather = \Slim\Slim::getInstance(); -<<<<<<< HEAD - $stats_query = \ORM::for_table($feather->db->prefix.'topics') -======= $stats_query = \DB::for_table('topics') ->>>>>>> featherbb/master ->where('forum_id', $forum_id) ->select_expr('COUNT(id)', 'total_topics') ->select_expr('SUM(num_replies)', 'total_replies') @@ -652,11 +602,7 @@ function update_forum($forum_id) $select_update_forum = array('last_post', 'last_post_id', 'last_poster'); -<<<<<<< HEAD - $result = \ORM::for_table($feather->db->prefix.'topics')->select_many($select_update_forum) -======= $result = \DB::for_table('topics')->select_many($select_update_forum) ->>>>>>> featherbb/master ->where('forum_id', $forum_id) ->where_null('moved_to') ->order_by_desc('last_post') @@ -681,11 +627,7 @@ function update_forum($forum_id) 'last_poster' => 'NULL', ); } -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'forums') -======= \DB::for_table('forums') ->>>>>>> featherbb/master ->where('id', $forum_id) ->find_one() ->set($insert_update_forum) @@ -725,29 +667,17 @@ function delete_topic($topic_id) array('moved_to' => $topic_id) ); -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'topics') -======= \DB::for_table('topics') ->>>>>>> featherbb/master ->where_any_is($where_delete_topic) ->delete_many(); // Delete posts in topic -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'posts') -======= \DB::for_table('posts') ->>>>>>> featherbb/master ->where('topic_id', $topic_id) ->delete_many(); // Delete any subscriptions for this topic -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'topic_subscriptions') -======= \DB::for_table('topic_subscriptions') ->>>>>>> featherbb/master ->where('topic_id', $topic_id) ->delete_many(); } @@ -761,11 +691,7 @@ function delete_post($post_id, $topic_id) // Get Slim current session $feather = \Slim\Slim::getInstance(); -<<<<<<< HEAD - $result = \ORM::for_table($feather->db->prefix.'posts') -======= $result = \DB::for_table('posts') ->>>>>>> featherbb/master ->select_many('id', 'poster', 'posted') ->where('topic_id', $topic_id) ->order_by_desc('id') @@ -786,11 +712,7 @@ function delete_post($post_id, $topic_id) } // Delete the post -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'posts') -======= \DB::for_table('posts') ->>>>>>> featherbb/master ->where('id', $post_id) ->find_one() ->delete(); @@ -798,11 +720,7 @@ function delete_post($post_id, $topic_id) strip_search_index($post_id); // Count number of replies in the topic -<<<<<<< HEAD - $num_replies = \ORM::for_table($feather->db->prefix.'posts')->where('topic_id', $topic_id)->count() - 1; -======= $num_replies = \DB::for_table('posts')->where('topic_id', $topic_id)->count() - 1; ->>>>>>> featherbb/master // If the message we deleted is the most recent in the topic (at the end of the topic) if ($last_id == $post_id) { @@ -814,22 +732,14 @@ function delete_post($post_id, $topic_id) 'last_poster' => $second_poster, 'num_replies' => $num_replies, ); -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'topics') -======= \DB::for_table('topics') ->>>>>>> featherbb/master ->where('id', $topic_id) ->find_one() ->set($update_topic) ->save(); } else { // We deleted the only reply, so now last_post/last_post_id/last_poster is posted/id/poster from the topic itself -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'topics') -======= \DB::for_table('topics') ->>>>>>> featherbb/master ->where('id', $topic_id) ->find_one() ->set_expr('last_post', 'posted') @@ -840,11 +750,7 @@ function delete_post($post_id, $topic_id) } } else { // Otherwise we just decrement the reply counter -<<<<<<< HEAD - \ORM::for_table($feather->db->prefix.'topics') -======= \DB::for_table('topics') ->>>>>>> featherbb/master ->where('id', $topic_id) ->find_one() ->set('num_replies', $num_replies) From 6f249c46acbd72b4f266f9af13bf4bcbc3d9e045 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 12:47:24 +0200 Subject: [PATCH 011/353] Remove common file --- include/common.php | 177 --------------------------------------------- 1 file changed, 177 deletions(-) delete mode 100644 include/common.php diff --git a/include/common.php b/include/common.php deleted file mode 100644 index 5839de44..00000000 --- a/include/common.php +++ /dev/null @@ -1,177 +0,0 @@ -request->getPath().'install/index.php'); - exit; -} - -// Record the start time (will be used to calculate the generation time for the page) -$feather->start = get_microtime(); - -// Make sure PHP reports all errors except E_NOTICE. FluxBB supports E_ALL, but a lot of scripts it may interact with, do not -//error_reporting(E_ALL ^ E_NOTICE); -error_reporting(E_ALL); // Let's report everything for development - -// Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) -setlocale(LC_CTYPE, 'C'); - -// Turn off magic_quotes_runtime -if (get_magic_quotes_runtime()) { - set_magic_quotes_runtime(0); -} - -// If a cookie name is not specified in config.php, we use the default (pun_cookie) -if (empty($cookie_name)) { - $cookie_name = 'feather_cookie'; -} - -// If the cache directory is not specified, we use the default setting -if (!defined('FORUM_CACHE_DIR')) { - define('FORUM_CACHE_DIR', FEATHER_ROOT.'cache/'); -} - -// Define a few commonly used constants -define('FEATHER_UNVERIFIED', 0); -define('FEATHER_ADMIN', 1); -define('FEATHER_MOD', 2); -define('FEATHER_GUEST', 3); -define('FEATHER_MEMBER', 4); - -// Inject DB prefix to SlimFramework -$feather->prefix = $db_prefix; - -// Include Idiorm -require FEATHER_ROOT.'include/idiorm.php'; - -// TODO: handle drivers -\DB::configure('mysql:host='.$db_host.';dbname='.$db_name); -\DB::configure('username', $db_username); -\DB::configure('password', $db_password); -\DB::configure('logging', true); -\DB::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); -\DB::configure('id_column_overrides', array( - $db_prefix.'groups' => 'g_id', -)); - -// Load cached config -if (file_exists(FORUM_CACHE_DIR.'cache_config.php')) { - include FORUM_CACHE_DIR.'cache_config.php'; -} - -if (!defined('FEATHER_CONFIG_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_config_cache(); - require FORUM_CACHE_DIR.'cache_config.php'; -} - -// Inject config to SlimFramework -$feather->config = $feather_config; - -// Enable output buffering -if (!defined('FEATHER_DISABLE_BUFFERING')) { - // Should we use gzip output compression? - if ($feather->config['o_gzip'] && extension_loaded('zlib')) { - ob_start('ob_gzhandler'); - } else { - ob_start(); - } -} - -// Define standard date/time formats -$forum_time_formats = array($feather->config['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); -$forum_date_formats = array($feather->config['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); - -// Check/update/set cookie and fetch user info -check_cookie(); - -// Attempt to load the common language file -if (file_exists(FEATHER_ROOT.'lang/'.$feather->user->language.'/common.php')) { - include FEATHER_ROOT.'lang/'.$feather->user->language.'/common.php'; -} else { - die('There is no valid language pack \''.feather_escape($feather->user->language).'\' installed. Please reinstall a language of that name'); -} - -// Check if we are to display a maintenance message -if ($feather->config['o_maintenance'] && $feather->user->g_id > FEATHER_ADMIN && !defined('FEATHER_TURN_OFF_MAINT')) { - maintenance_message(); -} - -// Load cached bans -if (file_exists(FORUM_CACHE_DIR.'cache_bans.php')) { - include FORUM_CACHE_DIR.'cache_bans.php'; -} - -if (!defined('FEATHER_BANS_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_bans_cache(); - require FORUM_CACHE_DIR.'cache_bans.php'; -} - -// Check if current user is banned -check_bans(); - -// Update online list -update_users_online(); - -// Check to see if we logged in without a cookie being set -if ($feather->user->is_guest && isset($_GET['login'])) { - message($lang_common['No cookie']); -} - -// 32kb should be more than enough for forum posts -if (!defined('FEATHER_MAX_POSTSIZE')) { - define('FEATHER_MAX_POSTSIZE', 32768); -} - -if (!defined('FEATHER_SEARCH_MIN_WORD')) { - define('FEATHER_SEARCH_MIN_WORD', 3); -} -if (!defined('FEATHER_SEARCH_MAX_WORD')) { - define('FEATHER_SEARCH_MAX_WORD', 20); -} - -if (!defined('FORUM_MAX_COOKIE_SIZE')) { - define('FORUM_MAX_COOKIE_SIZE', 4048); -} From 2796630b7d55f53d4ab81b6b32082fda8ff6d368 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 12:57:26 +0200 Subject: [PATCH 012/353] Prefer use of forum_settings array --- Slim/Extras/Middleware/FeatherBB.php | 31 ++++++++++++++-------------- include/idiorm.php | 22 ++++++++++---------- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 9bc90f93..0477c4b1 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -37,7 +37,8 @@ public function __construct(array $user_forum_settings = array()) 'FEATHER_MAX_POSTSIZE' => 32768, 'FEATHER_SEARCH_MIN_WORD' => 3, 'FEATHER_SEARCH_MAX_WORD' => 20, - 'FORUM_MAX_COOKIE_SIZE' => 4048 + 'FORUM_MAX_COOKIE_SIZE' => 4048, + 'FEATHER_SHOW_QUERIES' => 1 ); $this->data['forum_settings'] = array_merge(self::load_default_settings(), $this->load_forum_config(), $user_forum_settings); @@ -137,7 +138,7 @@ public function init_db() DB::configure('logging', true); DB::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); DB::configure('id_column_overrides', array( - $this->app->forum_settings['db_prefix'].'groups' => 'g_id', + 'groups' => 'g_id', )); } @@ -160,11 +161,11 @@ public function authenticate() $select_check_cookie = array('u.*', 'g.*', 'o.logged', 'o.idle'); $where_check_cookie = array('u.id' => intval($cookie['user_id'])); - $result = DB::for_table($this->data['forum_settings']['db_prefix'].'users') + $result = DB::for_table('users') ->table_alias('u') ->select_many($select_check_cookie) - ->inner_join($this->data['forum_settings']['db_prefix'].'groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join($this->data['forum_settings']['db_prefix'].'online', array('o.user_id', '=', 'u.id'), 'o') + ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') + ->left_outer_join('online', array('o.user_id', '=', 'u.id'), 'o') ->where($where_check_cookie) ->find_result_set(); @@ -201,11 +202,11 @@ public function authenticate() $select_set_default_user = array('u.*', 'g.*', 'o.logged', 'o.last_post', 'o.last_search'); $where_set_default_user = array('u.id' => '1'); - $result = DB::for_table($this->data['forum_settings']['db_prefix'].'users') + $result = DB::for_table('users') ->table_alias('u') ->select_many($select_set_default_user) - ->inner_join($this->data['forum_settings']['db_prefix'].'groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join($this->data['forum_settings']['db_prefix'].'online', array('o.ident', '=', $remote_addr), 'o', true) + ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') + ->left_outer_join('online', array('o.ident', '=', $remote_addr), 'o', true) ->where($where_set_default_user) ->find_result_set(); @@ -236,15 +237,15 @@ public function authenticate() case 'mysqli_innodb': case 'sqlite': case 'sqlite3': - DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); + DB::for_table('online')->raw_execute('REPLACE INTO online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); break; default: - DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); + DB::for_table('online')->raw_execute('INSERT INTO online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); break; } } else { - DB::for_table($this->data['forum_settings']['db_prefix'].'online')->where('ident', $remote_addr) + DB::for_table('online')->where('ident', $remote_addr) ->update_many('logged', time()); } @@ -270,11 +271,11 @@ public function update_online() case 'mysqli_innodb': case 'sqlite': case 'sqlite3': - DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(:user_id, :ident, :logged)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); + DB::for_table('online')->raw_execute('REPLACE INTO online (user_id, ident, logged) VALUES(:user_id, :ident, :logged)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); break; default: - DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT :user_id, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE user_id=:user_id)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); + DB::for_table('online')->raw_execute('INSERT INTO online (user_id, ident, logged) SELECT :user_id, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE user_id=:user_id)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); break; } @@ -284,7 +285,7 @@ public function update_online() } else { // Special case: We've timed out, but no other user has browsed the forums since we timed out if ($this->app->user->logged < ($now-$this->data['forum_settings']['o_timeout_visit'])) { - DB::for_table($this->data['forum_settings']['db_prefix'].'users')->where('id', $this->app->user->id) + DB::for_table('users')->where('id', $this->app->user->id) ->find_one() ->set('last_visit', $this->app->user->logged) ->save(); @@ -293,7 +294,7 @@ public function update_online() $idle_sql = ($this->app->user->idle == '1') ? ', idle=0' : ''; - DB::for_table($this->data['forum_settings']['db_prefix'].'online')->raw_execute('UPDATE '.$this->data['forum_settings']['db_prefix'].'online SET logged='.$now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $this->app->user->id)); + DB::for_table('online')->raw_execute('UPDATE online SET logged='.$now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $this->app->user->id)); // Update tracked topics with the current expire time $cookie_tracked_topics = $this->app->getCookie($this->data['forum_settings']['cookie_name'].'_track'); diff --git a/include/idiorm.php b/include/idiorm.php index 64768fd3..5e1c7f20 100644 --- a/include/idiorm.php +++ b/include/idiorm.php @@ -225,7 +225,7 @@ public static function reset_config() { self::$_config = array(); } - + /** * Despite its slightly odd name, this is actually the factory * method used to acquire instances of the class. It is named @@ -239,7 +239,7 @@ public static function reset_config() public static function for_table($table_name, $connection_name = self::DEFAULT_CONNECTION) { $feather = \Slim\Slim::getInstance(); - $table_name = $feather->prefix.$table_name; + $table_name = $feather->forum_settings['db_prefix'].$table_name; self::_setup_db($connection_name); return new self($table_name, array(), $connection_name); } @@ -507,12 +507,12 @@ protected static function _log_query($query, $parameters, $connection_name, $que self::$_last_query = $bound_query; self::$_query_log[$connection_name][0][] = $query_time; self::$_query_log[$connection_name][1][] = $bound_query; - + if(is_callable(self::$_config[$connection_name]['logger'])){ $logger = self::$_config[$connection_name]['logger']; $logger($bound_query, $query_time); } - + return true; } @@ -1020,7 +1020,7 @@ public function distinct() * ON `user`.`id` = `profile`.`user_id` * * The fourth argument specifies an alias for the joined table. - * + * * The final argument specifies is the last column should be escaped */ protected function _add_join_source($join_operator, $table, $constraint, $table_alias=null, $no_escape_second_col=false) @@ -1286,7 +1286,7 @@ protected function _create_placeholders($fields) return implode(', ', $db_fields); } } - + /** * Helper method that filters a column/value array returning only those * columns that belong to a compound primary key. @@ -1518,7 +1518,7 @@ public function where_raw($clause, $parameters=array()) { return $this->_add_where($clause, $parameters); } - + /** * Add a LIMIT to the query */ @@ -1570,7 +1570,7 @@ public function order_by($column_name, $dir=null) { return $this->_add_order_by($column_name, $dir); } - + /** * Add columns to the list of columns returned by the ORDER BY * query. This defaults to '*'. Many columns can be supplied @@ -1596,7 +1596,7 @@ public function order_by_many() } return $this; } - + /** * Add an unquoted expression as an ORDER BY clause */ @@ -2653,7 +2653,7 @@ public function as_array() { return $this->get_results(); } - + /** * Get the number of records in the result set * @return int @@ -2692,7 +2692,7 @@ public function offsetGet($offset) { return $this->_results[$offset]; } - + /** * ArrayAccess * @param int|string $offset From d5ec8bb253bcbe313332d11de06d5900486f7c61 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 17:06:00 +0200 Subject: [PATCH 013/353] Fix cookie not decrypted --- Slim/Extras/Middleware/FeatherBB.php | 44 ++++++++++++---------------- index.php | 5 +++- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 0477c4b1..2aed6af0 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -41,7 +41,8 @@ public function __construct(array $user_forum_settings = array()) 'FEATHER_SHOW_QUERIES' => 1 ); - $this->data['forum_settings'] = array_merge(self::load_default_settings(), $this->load_forum_config(), $user_forum_settings); + $this->data['forum_settings'] = array_merge(self::load_default_settings(), $user_forum_settings); + $this->init_db(); } public function load_forum_config() @@ -53,7 +54,7 @@ public function load_forum_config() } else { require_once $this->data['forum_env']['FEATHER_ROOT'].'include/cache.php'; generate_config_cache(); - require $this->data['forum_env']['FEATHER_ROOT'].'cache_config.php'; + require $this->data['forum_env']['FORUM_CACHE_DIR'].'cache_config.php'; } return $feather_config; } @@ -91,7 +92,6 @@ public function set_forum_settings($key, $value = null) foreach ($tmp as $key => $value) { $this->app->container->get('forum_settings')[$key] = $value; } - } public function hydrate($data) @@ -109,8 +109,6 @@ public function env_to_globals(array $vars) } } - // - public function set_headers() { // No cache headers @@ -128,13 +126,13 @@ public function set_headers() public function init_db() { - // Include IdiORM + // Include ORM require_once $this->data['forum_env']['FEATHER_ROOT'].'include/idiorm.php'; // TODO: handle drivers DB::configure('mysql:host='.$this->data['forum_settings']['db_host'].';dbname='.$this->data['forum_settings']['db_name']); - DB::configure('username', $this->app->forum_settings['db_user']); - DB::configure('password', $this->app->forum_settings['db_pass']); + DB::configure('username', $this->data['forum_settings']['db_user']); + DB::configure('password', $this->data['forum_settings']['db_pass']); DB::configure('logging', true); DB::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); DB::configure('id_column_overrides', array( @@ -148,15 +146,13 @@ public function authenticate() // Get FeatherBB cookie $cookie_raw = $this->app->getCookie($this->data['forum_settings']['cookie_name']); - + var_dump($cookie_raw); // Check if cookie exists and is valid (getCookie method returns false if the data has been tampered locally so it can't decrypt the cookie); if (isset($cookie_raw)) { $cookie = json_decode($cookie_raw, true); $checksum = hash_hmac('sha1', $cookie['user_id'].$cookie['expires'], $this->data['forum_settings']['cookie_seed'].'_checksum'); - // If cookie has a non-guest user, hasn't expired and is legit if ($cookie['user_id'] > 1 && $cookie['expires'] > $now && $checksum == $cookie['checksum']) { - // Get user info from db $select_check_cookie = array('u.*', 'g.*', 'o.logged', 'o.idle'); $where_check_cookie = array('u.id' => intval($cookie['user_id'])); @@ -194,6 +190,7 @@ public function authenticate() } } } + // If there is no cookie, or cookie is guest or expired, let's reconnect. $expires = $now + 31536000; // The cookie expires after a year $remote_addr = get_remote_address(); @@ -313,28 +310,27 @@ public function update_online() public function call() { - global $lang_common, $feather_bans, $db_type, $cookie_name, $cookie_seed; + global $lang_common, $feather_bans, $db_type, $cookie_name, $cookie_seed; // Legacy - // Block prefetch requests - if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { + if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { // Block prefetch requests $this->set_headers(); $this->app->response->setStatus(403); } else { + $this->env_to_globals($this->data['forum_env']); // Legacy : define globals from forum_env + + require_once $this->app->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; + require_once $this->app->forum_env['FEATHER_ROOT'].'include/functions.php'; + // Populate Feather object + $this->data['forum_settings'] = array_merge($this->load_forum_config(), $this->data['forum_settings']); $this->hydrate($this->data); - // Legacy - $this->env_to_globals($this->app->forum_env); - $this->app->config = $this->data['forum_settings']; - extract($this->data['forum_settings']); + $this->app->config = $this->data['forum_settings']; // Legacy + extract($this->data['forum_settings']); // Legacy $this->set_headers(); - $this->init_db(); - - require_once $this->app->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; - require_once $this->app->forum_env['FEATHER_ROOT'].'include/functions.php'; - // TODO : check useness + // TODO : check usefulness // Strip out "bad" UTF-8 characters forum_remove_bad_characters(); // Reverse the effect of register_globals @@ -388,8 +384,6 @@ public function call() update_users_online(); // Configure Slim - $this->app->config('cookies.encrypt', true); - $this->app->config('debug', true); // As long as we're developing FeatherBB $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); $this->next->call(); } diff --git a/index.php b/index.php index 460159e8..b53037f2 100644 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Start a session for flash messages session_cache_limiter(false); session_start(); @@ -33,5 +33,8 @@ // Load the routes require 'include/routes.php'; +$feather->config('cookies.encrypt', true); +$feather->config('debug', true); // As long as we're developing FeatherBB + // Run it, baby! $feather->run(); From 46642be49b0df465f206da0df0c117371b43f698 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 17:16:03 +0200 Subject: [PATCH 014/353] Tweaks and fixes --- Slim/Extras/Middleware/FeatherBB.php | 63 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 2aed6af0..a55887fd 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -20,6 +20,7 @@ class FeatherBB extends \Slim\Middleware public function __construct(array $user_forum_settings = array()) { + // Define forum env constants $this->data['forum_env'] = array( 'FEATHER' => true, 'FEATHER_ROOT' => dirname(__FILE__).'/../../../', @@ -41,8 +42,19 @@ public function __construct(array $user_forum_settings = array()) 'FEATHER_SHOW_QUERIES' => 1 ); + // Define forum settings / TODO : handle settings with a class / User input overrides all previous settings $this->data['forum_settings'] = array_merge(self::load_default_settings(), $user_forum_settings); - $this->init_db(); + + // Load DB settings + require_once $this->data['forum_env']['FEATHER_ROOT'].'include/idiorm.php'; + DB::configure('mysql:host='.$this->data['forum_settings']['db_host'].';dbname='.$this->data['forum_settings']['db_name']); + DB::configure('username', $this->data['forum_settings']['db_user']); + DB::configure('password', $this->data['forum_settings']['db_pass']); + DB::configure('logging', true); + DB::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); + DB::configure('id_column_overrides', array( + 'groups' => 'g_id', + )); } public function load_forum_config() @@ -71,7 +83,9 @@ public static function load_default_settings() 'db_prefix' => '', // Cookies 'cookie_name' => 'feather_cookie', - 'cookie_seed' => 'changeme', // MUST BE CHANGED + 'cookie_seed' => 'changeme', // MUST BE CHANGED !!! + // Debug + 'debug' => false, ); } @@ -101,7 +115,7 @@ public function hydrate($data) } } - // Legacy function, to ensure constants backward compatibility + // Legacy function, to ensure backward compatibility with globals public function env_to_globals(array $vars) { foreach ($vars as $key => $value) { @@ -109,6 +123,8 @@ public function env_to_globals(array $vars) } } + // Headers + public function set_headers() { // No cache headers @@ -124,21 +140,7 @@ public function set_headers() $this->app->response->headers->set('X-Powered-By', $this->app->forum_env['FORUM_NAME']); } - public function init_db() - { - // Include ORM - require_once $this->data['forum_env']['FEATHER_ROOT'].'include/idiorm.php'; - - // TODO: handle drivers - DB::configure('mysql:host='.$this->data['forum_settings']['db_host'].';dbname='.$this->data['forum_settings']['db_name']); - DB::configure('username', $this->data['forum_settings']['db_user']); - DB::configure('password', $this->data['forum_settings']['db_pass']); - DB::configure('logging', true); - DB::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); - DB::configure('id_column_overrides', array( - 'groups' => 'g_id', - )); - } + // Auth public function authenticate() { @@ -146,7 +148,6 @@ public function authenticate() // Get FeatherBB cookie $cookie_raw = $this->app->getCookie($this->data['forum_settings']['cookie_name']); - var_dump($cookie_raw); // Check if cookie exists and is valid (getCookie method returns false if the data has been tampered locally so it can't decrypt the cookie); if (isset($cookie_raw)) { $cookie = json_decode($cookie_raw, true); @@ -193,7 +194,6 @@ public function authenticate() // If there is no cookie, or cookie is guest or expired, let's reconnect. $expires = $now + 31536000; // The cookie expires after a year - $remote_addr = get_remote_address(); // Fetch guest user $select_set_default_user = array('u.*', 'g.*', 'o.logged', 'o.last_post', 'o.last_search'); @@ -203,7 +203,7 @@ public function authenticate() ->table_alias('u') ->select_many($select_set_default_user) ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join('online', array('o.ident', '=', $remote_addr), 'o', true) + ->left_outer_join('online', array('o.ident', '=', get_remote_address()), 'o', true) ->where($where_set_default_user) ->find_result_set(); @@ -310,7 +310,7 @@ public function update_online() public function call() { - global $lang_common, $feather_bans, $db_type, $cookie_name, $cookie_seed; // Legacy + global $lang_common, $feather_bans, $db_type, $cookie_name, $cookie_seed, $forum_time_formats, $forum_date_formats; // Legacy if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { // Block prefetch requests $this->set_headers(); @@ -318,11 +318,12 @@ public function call() } else { $this->env_to_globals($this->data['forum_env']); // Legacy : define globals from forum_env - require_once $this->app->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; - require_once $this->app->forum_env['FEATHER_ROOT'].'include/functions.php'; + require_once $this->data['forum_env']['FEATHER_ROOT'].'include/utf8/utf8.php'; + require_once $this->data['forum_env']['FEATHER_ROOT'].'include/functions.php'; - // Populate Feather object + // Get forum config $this->data['forum_settings'] = array_merge($this->load_forum_config(), $this->data['forum_settings']); + // Populate Feather object (Slim instance) $this->hydrate($this->data); $this->app->config = $this->data['forum_settings']; // Legacy @@ -352,8 +353,8 @@ public function call() $this->authenticate(); // Attempt to load the common language file - if (file_exists($this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php')) { - include $this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php'; + if (file_exists($this->data['forum_env']['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php')) { + include $this->data['forum_env']['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.php'; } else { die('There is no valid language pack \''.feather_escape($this->app->user->language).'\' installed. Please reinstall a language of that name'); } @@ -364,17 +365,17 @@ public function call() } // Load cached bans - if (file_exists($this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php')) { - include $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; + if (file_exists($this->data['forum_env']['FORUM_CACHE_DIR'].'cache_bans.php')) { + include $this->data['forum_env']['FORUM_CACHE_DIR'].'cache_bans.php'; } if (!defined('FEATHER_BANS_LOADED')) { if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require_once $this->app->forum_env['FEATHER_ROOT'].'include/cache.php'; + require_once $this->data['forum_env']['FEATHER_ROOT'].'include/cache.php'; } generate_bans_cache(); - require_once $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; + require_once $this->data['forum_env']['FORUM_CACHE_DIR'].'cache_bans.php'; } // Check if current user is banned From 58faf33be95939f1be8b400fc5fc9370b1512df8 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 17:48:33 +0200 Subject: [PATCH 015/353] Drop "remove_bad_characters" and "unregister_globals" functions UTF 8 is handled by Slim register_globals is disabled as of PHP 5.3+ --- Slim/Extras/Middleware/FeatherBB.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index a55887fd..e7c8cc55 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -331,11 +331,11 @@ public function call() $this->set_headers(); - // TODO : check usefulness - // Strip out "bad" UTF-8 characters - forum_remove_bad_characters(); - // Reverse the effect of register_globals - forum_unregister_globals(); + // // TODO : check usefulness + // // Strip out "bad" UTF-8 characters + // forum_remove_bad_characters(); + // // Reverse the effect of register_globals + // forum_unregister_globals(); // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); From 98407d656a0ccabb2f5b224758b4695dd42d1bd8 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 17:58:05 +0200 Subject: [PATCH 016/353] Drop magic quotes runtime check Slim handles magic quotes --- Slim/Extras/Middleware/FeatherBB.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index e7c8cc55..27a81d5d 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -331,21 +331,9 @@ public function call() $this->set_headers(); - // // TODO : check usefulness - // // Strip out "bad" UTF-8 characters - // forum_remove_bad_characters(); - // // Reverse the effect of register_globals - // forum_unregister_globals(); - // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); - // TODO : magic quotes - // Turn off magic_quotes_runtime - if (get_magic_quotes_runtime()) { - set_magic_quotes_runtime(0); - } - // Define time formats $forum_time_formats = array($this->app->config['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); $forum_date_formats = array($this->app->config['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); From 90f0bf0aac57fed4ce4005fe6b4da071dabeb9c3 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 18:00:40 +0200 Subject: [PATCH 017/353] Various typos --- Slim/Extras/Middleware/FeatherBB.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 27a81d5d..17e0b35c 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -172,7 +172,7 @@ public function authenticate() if (isset($this->app->user->id) && hash_hmac('sha1', $this->app->user->password, $this->data['forum_settings']['cookie_seed'].'_password_hash') === $cookie['password_hash']) { $expires = ($cookie['expires'] > $now + $this->data['forum_settings']['o_timeout_visit']) ? $now + 1209600 : $now + $this->data['forum_settings']['o_timeout_visit']; $this->app->user->is_guest = false; - $this->app->user->is_admmod = $this->app->user->g_id == FEATHER_ADMIN || $this->app->g_moderator == '1'; + $this->app->user->is_admmod = $this->app->user->g_id == $this->data['forum_env']['FEATHER_ADMIN'] || $this->app->g_moderator == '1'; if (!$this->app->user->disp_topics) { $this->app->user->disp_topics = $this->data['forum_settings']['o_disp_topics_default']; } @@ -323,6 +323,9 @@ public function call() // Get forum config $this->data['forum_settings'] = array_merge($this->load_forum_config(), $this->data['forum_settings']); + // Define time formats + $forum_time_formats = array($this->data['forum_settings']['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); + $forum_date_formats = array($this->data['forum_settings']['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); // Populate Feather object (Slim instance) $this->hydrate($this->data); @@ -334,10 +337,6 @@ public function call() // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); - // Define time formats - $forum_time_formats = array($this->app->config['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); - $forum_date_formats = array($this->app->config['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); - $this->authenticate(); // Attempt to load the common language file @@ -348,7 +347,7 @@ public function call() } // Check if we are to display a maintenance message - if ($this->app->config['o_maintenance'] && $this->app->user->g_id > FEATHER_ADMIN && !defined('FEATHER_TURN_OFF_MAINT')) { + if ($this->data['forum_settings']['o_maintenance'] && $this->app->user->g_id > $this->data['forum_env']['FEATHER_ADMIN'] && !defined('FEATHER_TURN_OFF_MAINT')) { maintenance_message(); } From 86906209fa766cfb84e05ccd53b568f27e6cd7c9 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 11 Aug 2015 18:06:14 +0200 Subject: [PATCH 018/353] Fix get remote ip feature --- Slim/Extras/Middleware/FeatherBB.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 17e0b35c..8772b38b 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -203,7 +203,7 @@ public function authenticate() ->table_alias('u') ->select_many($select_set_default_user) ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join('online', array('o.ident', '=', get_remote_address()), 'o', true) + ->left_outer_join('online', array('o.ident', '=', $this->app->request->getIp()), 'o', true) ->where($where_set_default_user) ->find_result_set(); @@ -234,15 +234,15 @@ public function authenticate() case 'mysqli_innodb': case 'sqlite': case 'sqlite3': - DB::for_table('online')->raw_execute('REPLACE INTO online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); + DB::for_table('online')->raw_execute('REPLACE INTO online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); break; default: - DB::for_table('online')->raw_execute('INSERT INTO online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $remote_addr, ':logged' => $this->app->user->logged)); + DB::for_table('online')->raw_execute('INSERT INTO online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); break; } } else { - DB::for_table('online')->where('ident', $remote_addr) + DB::for_table('online')->where('ident', $this->app->request->getIp()) ->update_many('logged', time()); } @@ -317,7 +317,7 @@ public function call() $this->app->response->setStatus(403); } else { $this->env_to_globals($this->data['forum_env']); // Legacy : define globals from forum_env - + require_once $this->data['forum_env']['FEATHER_ROOT'].'include/utf8/utf8.php'; require_once $this->data['forum_env']['FEATHER_ROOT'].'include/functions.php'; From 498083b80d84f53683c89394bf0b081de815008d Mon Sep 17 00:00:00 2001 From: adaur Date: Wed, 12 Aug 2015 18:39:40 +0200 Subject: [PATCH 019/353] Remove whitespace --- include/routes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/routes.php b/include/routes.php index 30ba1bb2..98449c5a 100644 --- a/include/routes.php +++ b/include/routes.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Index $feather->get('/', '\controller\index:display'); From 78ec00e37cfa1a45aa778ef66a4f6804d040e514 Mon Sep 17 00:00:00 2001 From: adaur Date: Wed, 12 Aug 2015 23:52:30 +0200 Subject: [PATCH 020/353] Start to switch to gettext --- controller/admin/bans.php | 18 +- controller/admin/categories.php | 20 +- controller/admin/censoring.php | 4 +- controller/admin/forums.php | 16 +- controller/admin/groups.php | 14 +- controller/admin/index.php | 4 +- controller/admin/maintenance.php | 4 +- controller/admin/options.php | 4 +- controller/admin/parser.php | 4 +- controller/admin/permissions.php | 4 +- controller/admin/plugins.php | 8 +- controller/admin/reports.php | 4 +- controller/admin/statistics.php | 8 +- controller/admin/users.php | 24 +- controller/delete.php | 9 +- controller/edit.php | 11 +- controller/footer.php | 3 - controller/header.php | 41 +- controller/help.php | 5 +- controller/index.php | 5 +- controller/login.php | 16 +- controller/misc.php | 39 +- controller/moderate.php | 47 +- controller/post.php | 13 +- controller/profile.php | 94 ++-- controller/register.php | 7 +- controller/search.php | 8 +- controller/userlist.php | 11 +- controller/viewforum.php | 9 +- controller/viewtopic.php | 20 +- extern.php | 24 +- include/cache.php | 6 +- include/common.php | 15 +- include/email.php | 4 +- include/functions.php | 78 ++- include/l10n.php | 75 +++ include/parser.php | 70 +-- include/pomo/.editorconfig | 16 + include/pomo/MO.php | 313 +++++++++++ include/pomo/PO.php | 494 ++++++++++++++++++ include/pomo/Streams/CachedFileReader.php | 25 + include/pomo/Streams/CachedIntFileReader.php | 20 + include/pomo/Streams/FileReader.php | 60 +++ include/pomo/Streams/Reader.php | 120 +++++ include/pomo/Streams/StringReader.php | 61 +++ .../pomo/Translations/EntryTranslations.php | 89 ++++ .../pomo/Translations/GettextTranslations.php | 127 +++++ .../pomo/Translations/NOOPTranslations.php | 104 ++++ include/pomo/Translations/Translations.php | 173 ++++++ .../Translations/TranslationsInterface.php | 94 ++++ include/routes.php | 4 +- install/index.php | 9 +- lang/English/common.mo | Bin 0 -> 9404 bytes lang/English/common.php | 184 ------- lang/English/common.po | 473 +++++++++++++++++ lang/English/convertor.php | 20 + model/admin/bans.php | 8 +- model/admin/groups.php | 10 +- model/admin/options.php | 14 +- model/admin/users.php | 6 +- model/delete.php | 4 +- model/edit.php | 10 +- model/index.php | 20 +- model/login.php | 4 +- model/misc.php | 34 +- model/moderate.php | 68 +-- model/post.php | 22 +- model/profile.php | 72 +-- model/register.php | 6 +- model/search.php | 34 +- model/viewforum.php | 26 +- model/viewtopic.php | 30 +- .../view/admin/groups/add_edit_group.php | 2 +- style/FeatherBB/view/delete.php | 4 +- style/FeatherBB/view/edit.php | 18 +- style/FeatherBB/view/footer.php | 38 +- style/FeatherBB/view/header.php | 10 +- style/FeatherBB/view/help.php | 4 +- style/FeatherBB/view/index.php | 6 +- style/FeatherBB/view/login/form.php | 8 +- .../view/login/password_forgotten.php | 4 +- style/FeatherBB/view/message.php | 4 +- style/FeatherBB/view/misc/email.php | 6 +- style/FeatherBB/view/misc/report.php | 6 +- .../FeatherBB/view/moderate/delete_posts.php | 2 +- .../FeatherBB/view/moderate/delete_topics.php | 2 +- .../FeatherBB/view/moderate/merge_topics.php | 2 +- .../view/moderate/moderator_forum.php | 10 +- style/FeatherBB/view/moderate/move_topics.php | 2 +- style/FeatherBB/view/moderate/posts_view.php | 6 +- style/FeatherBB/view/moderate/split_posts.php | 4 +- style/FeatherBB/view/post.php | 26 +- style/FeatherBB/view/profile/change_mail.php | 6 +- style/FeatherBB/view/profile/change_pass.php | 8 +- style/FeatherBB/view/profile/delete_user.php | 2 +- .../view/profile/section_display.php | 2 +- .../view/profile/section_essentials.php | 2 +- .../view/profile/section_messaging.php | 2 +- .../view/profile/section_personal.php | 2 +- .../view/profile/section_personality.php | 10 +- .../view/profile/section_privacy.php | 2 +- .../FeatherBB/view/profile/upload_avatar.php | 6 +- style/FeatherBB/view/profile/view_profile.php | 2 +- style/FeatherBB/view/register/email.php | 6 +- style/FeatherBB/view/register/form.php | 14 +- style/FeatherBB/view/search/footer.php | 2 +- style/FeatherBB/view/search/form.php | 2 +- style/FeatherBB/view/search/header.php | 10 +- style/FeatherBB/view/search/topics.php | 2 +- style/FeatherBB/view/userlist.php | 18 +- style/FeatherBB/view/viewforum.php | 10 +- style/FeatherBB/view/viewtopic.php | 24 +- view/admin/groups/add_edit_group.php | 2 +- view/delete.php | 4 +- view/edit.php | 18 +- view/footer.php | 38 +- view/header.php | 8 +- view/help.php | 4 +- view/index.php | 6 +- view/login/form.php | 8 +- view/login/password_forgotten.php | 4 +- view/message.php | 4 +- view/misc/email.php | 6 +- view/misc/report.php | 6 +- view/moderate/delete_posts.php | 2 +- view/moderate/delete_topics.php | 2 +- view/moderate/merge_topics.php | 2 +- view/moderate/moderator_forum.php | 10 +- view/moderate/move_topics.php | 2 +- view/moderate/posts_view.php | 6 +- view/moderate/split_posts.php | 4 +- view/post.php | 26 +- view/profile/change_mail.php | 6 +- view/profile/change_pass.php | 8 +- view/profile/delete_user.php | 2 +- view/profile/section_display.php | 2 +- view/profile/section_essentials.php | 2 +- view/profile/section_messaging.php | 2 +- view/profile/section_personal.php | 2 +- view/profile/section_personality.php | 10 +- view/profile/section_privacy.php | 2 +- view/profile/upload_avatar.php | 6 +- view/profile/view_profile.php | 2 +- view/register/email.php | 6 +- view/register/form.php | 14 +- view/search/footer.php | 2 +- view/search/form.php | 2 +- view/search/header.php | 10 +- view/search/topics.php | 2 +- view/userlist.php | 18 +- view/viewforum.php | 10 +- view/viewtopic.php | 24 +- 152 files changed, 3054 insertions(+), 1036 deletions(-) create mode 100644 include/l10n.php create mode 100644 include/pomo/.editorconfig create mode 100644 include/pomo/MO.php create mode 100644 include/pomo/PO.php create mode 100644 include/pomo/Streams/CachedFileReader.php create mode 100644 include/pomo/Streams/CachedIntFileReader.php create mode 100644 include/pomo/Streams/FileReader.php create mode 100644 include/pomo/Streams/Reader.php create mode 100644 include/pomo/Streams/StringReader.php create mode 100644 include/pomo/Translations/EntryTranslations.php create mode 100644 include/pomo/Translations/GettextTranslations.php create mode 100644 include/pomo/Translations/NOOPTranslations.php create mode 100644 include/pomo/Translations/Translations.php create mode 100644 include/pomo/Translations/TranslationsInterface.php create mode 100644 lang/English/common.mo delete mode 100644 lang/English/common.php create mode 100644 lang/English/common.po create mode 100644 lang/English/convertor.php diff --git a/controller/admin/bans.php b/controller/admin/bans.php index 7b2544f0..6e544bc1 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -30,14 +30,14 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_common, $lang_admin_bans; + global $lang_admin_common, $lang_admin_bans; define('FEATHER_ADMIN_CONSOLE', 1); require FEATHER_ROOT . 'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_bans.php language file @@ -54,7 +54,7 @@ public function display() $start_from = 50 * ($p - 1); // Generate paging links - $paging_links = '' . $lang_common['Pages'] . ' ' . paginate_old($num_pages, $p, '?find_ban=&' . implode('&', $ban_info['query_str'])); + $paging_links = '' . __('Pages') . ' ' . paginate_old($num_pages, $p, '?find_ban=&' . implode('&', $ban_info['query_str'])); $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Bans'], $lang_admin_bans['Results head']); define('FEATHER_ACTIVE_PAGE', 'admin'); @@ -93,14 +93,14 @@ public function display() public function add($id = null) { - global $lang_common, $lang_admin_common, $lang_admin_bans; + global $lang_admin_common, $lang_admin_bans; define('FEATHER_ADMIN_CONSOLE', 1); require FEATHER_ROOT . 'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_bans.php language file @@ -131,12 +131,12 @@ public function add($id = null) public function delete($id) { - global $lang_common, $lang_admin_common, $lang_admin_bans; + global $lang_admin_common, $lang_admin_bans; require FEATHER_ROOT . 'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_bans.php language file @@ -148,14 +148,14 @@ public function delete($id) public function edit($id) { - global $lang_common, $lang_admin_common, $lang_admin_bans; + global $lang_admin_common, $lang_admin_bans; define('FEATHER_ADMIN_CONSOLE', 1); require FEATHER_ROOT . 'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_bans.php language file diff --git a/controller/admin/categories.php b/controller/admin/categories.php index 8edac8f6..07ddbe5b 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -30,10 +30,10 @@ public function __autoload($class_name) public function add_category() { - global $lang_common, $lang_admin_common, $lang_admin_categories; + global $lang_admin_common, $lang_admin_categories; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_options.php language file @@ -54,10 +54,10 @@ public function add_category() public function edit_categories() { - global $lang_common, $lang_admin_common, $lang_admin_categories; + global $lang_admin_common, $lang_admin_categories; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_options.php language file @@ -65,7 +65,7 @@ public function edit_categories() require FEATHER_ROOT.'lang/'.$admin_language.'/categories.php'; if (empty($this->request->post('cat'))) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $categories = array(); @@ -90,10 +90,10 @@ public function edit_categories() public function delete_category() { - global $lang_common, $lang_admin_common, $lang_admin_categories; + global $lang_admin_common, $lang_admin_categories; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_options.php language file @@ -103,7 +103,7 @@ public function delete_category() $cat_to_delete = (int) $this->request->post('cat_to_delete'); if ($cat_to_delete < 1) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } if (intval($this->request->post('disclaimer')) != 1) { @@ -119,12 +119,12 @@ public function delete_category() public function display() { - global $lang_common, $lang_admin_common, $lang_admin_categories; + global $lang_admin_common, $lang_admin_categories; require FEATHER_ROOT.'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); diff --git a/controller/admin/censoring.php b/controller/admin/censoring.php index 1c9a2872..469ef9cc 100644 --- a/controller/admin/censoring.php +++ b/controller/admin/censoring.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_common, $lang_admin_censoring; + global $lang_admin_common, $lang_admin_censoring; require FEATHER_ROOT.'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); diff --git a/controller/admin/forums.php b/controller/admin/forums.php index f204e2c7..3d0e3610 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -34,10 +34,10 @@ public function __autoload($class_name) public function add_forum() { - global $lang_common, $lang_admin_common, $lang_admin_forums; + global $lang_admin_common, $lang_admin_forums; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_options.php language file @@ -66,10 +66,10 @@ public function add_forum() public function edit_forum($forum_id) { - global $lang_common, $lang_admin_common, $lang_admin_forums; + global $lang_admin_common, $lang_admin_forums; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_options.php language file @@ -172,10 +172,10 @@ public function edit_forum($forum_id) public function delete_forum($forum_id) { - global $lang_common, $lang_admin_common, $lang_admin_forums; + global $lang_admin_common, $lang_admin_forums; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); @@ -239,12 +239,12 @@ public function edit_positions() public function display() { - global $lang_common, $lang_admin_common, $lang_admin_forums; + global $lang_admin_common, $lang_admin_forums; require FEATHER_ROOT . 'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); diff --git a/controller/admin/groups.php b/controller/admin/groups.php index 2a42b0d9..efae5d16 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_common, $lang_admin_groups; + global $lang_admin_common, $lang_admin_groups; require FEATHER_ROOT.'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); @@ -72,12 +72,12 @@ public function display() public function delete($id) { - global $lang_common, $lang_admin_common, $lang_admin_groups; + global $lang_admin_common, $lang_admin_groups; require FEATHER_ROOT . 'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); @@ -86,7 +86,7 @@ public function delete($id) require FEATHER_ROOT . 'lang/' . $admin_language . '/groups.php'; if ($id < 5) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Make sure we don't remove the default group @@ -145,12 +145,12 @@ public function delete($id) public function addedit($id = '') { - global $lang_common, $lang_admin_common, $lang_admin_groups; + global $lang_admin_common, $lang_admin_groups; require FEATHER_ROOT.'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); diff --git a/controller/admin/index.php b/controller/admin/index.php index 47dc4129..08dedaa1 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -44,12 +44,12 @@ public function remove_install_folder($directory) public function display($action = null) { - global $lang_common, $lang_admin_common, $lang_admin_index; + global $lang_admin_common, $lang_admin_index; require FEATHER_ROOT.'include/common_admin.php'; if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_index.php language file diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index e1527431..a5bfbc11 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_maintenance, $lang_admin_common; + global $lang_admin_maintenance, $lang_admin_common; require FEATHER_ROOT.'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); diff --git a/controller/admin/options.php b/controller/admin/options.php index c20d44d3..07e43253 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_common; + global $lang_admin_common; require FEATHER_ROOT.'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); diff --git a/controller/admin/parser.php b/controller/admin/parser.php index 38b0e084..650869f3 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_parser, $lang_admin_common; + global $lang_admin_parser, $lang_admin_common; require FEATHER_ROOT.'include/common_admin.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index 16adc0f5..f503b775 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_common, $lang_admin_permissions; + global $lang_admin_common, $lang_admin_permissions; require FEATHER_ROOT.'include/common_admin.php'; if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index 9cd51a51..ef747bd9 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_common; + global $lang_admin_common; require FEATHER_ROOT.'include/common_admin.php'; if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); @@ -43,13 +43,13 @@ public function display() // The plugin to load should be supplied via GET $plugin = $this->request->get('plugin') ? $this->request->get('plugin') : ''; if (!preg_match('%^AM?P_(\w*?)\.php$%i', $plugin)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // AP_ == Admins only, AMP_ == admins and moderators $prefix = substr($plugin, 0, strpos($plugin, '_')); if ($this->user->g_moderator == '1' && $prefix == 'AP') { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Make sure the file actually exists diff --git a/controller/admin/reports.php b/controller/admin/reports.php index 070ed31d..681f2838 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_common, $lang_admin_reports; + global $lang_admin_common, $lang_admin_reports; require FEATHER_ROOT.'include/common_admin.php'; if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 8e11a0fe..6b442a66 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_common, $lang_admin_index; + global $lang_admin_common, $lang_admin_index; require FEATHER_ROOT.'include/common_admin.php'; if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } define('FEATHER_ADMIN_CONSOLE', 1); @@ -72,7 +72,7 @@ public function display() public function phpinfo() { - global $lang_common, $lang_admin_common, $lang_admin_index; + global $lang_admin_common, $lang_admin_index; require FEATHER_ROOT.'include/common_admin.php'; @@ -80,7 +80,7 @@ public function phpinfo() require FEATHER_ROOT.'lang/'.$admin_language.'/index.php'; if ($this->user->g_id != FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Show phpinfo() output diff --git a/controller/admin/users.php b/controller/admin/users.php index 17e7b580..e6e9250f 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -30,14 +30,14 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_admin_common, $lang_admin_users; + global $lang_admin_common, $lang_admin_users; define('FEATHER_ADMIN_CONSOLE', 1); require FEATHER_ROOT . 'include/common_admin.php'; if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_bans.php language file @@ -46,7 +46,7 @@ public function display() // Move multiple users to other user groups if ($this->request->post('move_users') || $this->request->post('move_users_comply')) { if ($this->user->g_id > FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $move = $this->model->move_users(); @@ -73,7 +73,7 @@ public function display() // Delete multiple users if ($this->request->post('delete_users') || $this->request->post('delete_users_comply')) { if ($this->user->g_id > FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $user_ids = $this->model->delete_users(); @@ -100,7 +100,7 @@ public function display() // Ban multiple users if ($this->request->post('ban_users') || $this->request->post('ban_users_comply')) { if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $user_ids = $this->model->ban_users(); @@ -140,7 +140,7 @@ public function display() $start_from = 50 * ($p - 1); // Generate paging links - $paging_links = '' . $lang_common['Pages'] . ' ' . paginate_old($num_pages, $p, '?find_user=&'.implode('&', $search['query_str'])); + $paging_links = '' . __('Pages') . ' ' . paginate_old($num_pages, $p, '?find_user=&'.implode('&', $search['query_str'])); // Some helper variables for permissions $can_delete = $can_move = $this->user->g_id == FEATHER_ADMIN; @@ -192,14 +192,14 @@ public function display() // Show IP statistics for a certain user ID public function ipstats($id) { - global $lang_common, $lang_admin_common, $lang_admin_users; + global $lang_admin_common, $lang_admin_users; define('FEATHER_ADMIN_CONSOLE', 1); require FEATHER_ROOT . 'include/common_admin.php'; if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_bans.php language file @@ -215,7 +215,7 @@ public function ipstats($id) $start_from = 50 * ($p - 1); // Generate paging links - $paging_links = ''.$lang_common['Pages'].' '.paginate_old($num_pages, $p, '?ip_stats='.$id); + $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$id); $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Users'], $lang_admin_users['Results head']); @@ -237,14 +237,14 @@ public function ipstats($id) // Show IP statistics for a certain user IP public function showusers($ip) { - global $lang_common, $lang_admin_common, $lang_admin_users; + global $lang_admin_common, $lang_admin_users; define('FEATHER_ADMIN_CONSOLE', 1); require FEATHER_ROOT . 'include/common_admin.php'; if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the admin_bans.php language file @@ -264,7 +264,7 @@ public function showusers($ip) $start_from = 50 * ($p - 1); // Generate paging links - $paging_links = ''.$lang_common['Pages'].' '.paginate_old($num_pages, $p, '?ip_stats='.$ip); + $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$ip); $page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Users'], $lang_admin_users['Results head']); diff --git a/controller/delete.php b/controller/delete.php index b228c4ac..a933ad39 100644 --- a/controller/delete.php +++ b/controller/delete.php @@ -30,10 +30,10 @@ public function __autoload($class_name) public function deletepost($id) { - global $lang_common, $lang_post, $pd; + global $lang_post, $pd; if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } // Fetch some informations about the post, the topic and the forum @@ -55,11 +55,11 @@ public function deletepost($id) $cur_post['poster_id'] != $this->user->id || $cur_post['closed'] == '1') && !$is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } if ($is_admmod && $this->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the delete.php language file @@ -81,7 +81,6 @@ public function deletepost($id) $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); $this->feather->render('delete.php', array( - 'lang_common' => $lang_common, 'lang_delete' => $lang_delete, 'cur_post' => $cur_post, 'id' => $id, diff --git a/controller/edit.php b/controller/edit.php index b2f60660..57c02123 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -30,10 +30,10 @@ public function __autoload($class_name) public function editpost($id) { - global $lang_common, $lang_prof_reg, $lang_post, $lang_register; + global $lang_prof_reg, $lang_post, $lang_register; if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } // Fetch some informations about the post, the topic and the forum @@ -52,11 +52,11 @@ public function editpost($id) // Do we have permission to edit this post? if (($this->user->g_edit_posts == '0' || $cur_post['poster_id'] != $this->user->id || $cur_post['closed'] == '1') && !$is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } if ($is_admmod && $this->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the post.php language file @@ -88,7 +88,7 @@ public function editpost($id) $page_title = array(feather_escape($this->config['o_board_title']), $lang_post['Edit post']); - $required_fields = array('req_subject' => $lang_common['Subject'], 'req_message' => $lang_common['Message']); + $required_fields = array('req_subject' => __('Subject'), 'req_message' => __('Message')); $focus_element = array('edit', 'req_message'); define('FEATHER_ACTIVE_PAGE', 'edit'); @@ -103,7 +103,6 @@ public function editpost($id) } $this->feather->render('edit.php', array( - 'lang_common' => $lang_common, 'cur_post' => $cur_post, 'lang_post' => $lang_post, 'errors' => $errors, diff --git a/controller/footer.php b/controller/footer.php index 40f7964a..b852a21a 100644 --- a/controller/footer.php +++ b/controller/footer.php @@ -27,8 +27,6 @@ public function dontStop() { public function display($footer_style = null, $id = null, $p = null, $pid = null, $forum_id = null, $num_pages = null) { - global $lang_common; - // Render the footer // If no footer style has been specified, we use the default (only copyright/debug info) $footer_style = isset($footer_style) ? $footer_style : null; @@ -42,7 +40,6 @@ public function display($footer_style = null, $id = null, $p = null, $pid = null $num_pages = isset($num_pages) ? $num_pages : null; $this->feather->render('footer.php', array( - 'lang_common' => $lang_common, 'id' => $id, 'p' => $p, 'pid' => $pid, diff --git a/controller/header.php b/controller/header.php index 5ee52832..c49878a1 100644 --- a/controller/header.php +++ b/controller/header.php @@ -77,8 +77,6 @@ public function setPageHead($page_head) public function display() { - global $lang_common; - // START SUBST - TODO /*if (isset($focus_element)) { $tpl_main = str_replace(''.$lang_common['Index'].''; + $links[] = ''; if ($this->user->g_read_board == '1' && $this->user->g_view_users == '1') { - $links[] = ''; + $links[] = ''; } if ($this->config['o_rules'] == '1' && (!$this->user->is_guest || $this->user->g_read_board == '1' || $this->config['o_regs_allow'] == '1')) { - $links[] = ''; + $links[] = ''; } if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $links[] = ''; + $links[] = ''; } if ($this->user->is_guest) { - $links[] = ''; - $links[] = ''; + $links[] = ''; + $links[] = ''; } else { - $links[] = ''; + $links[] = ''; if ($this->user->is_admmod) { - $links[] = ''; + $links[] = ''; } - $links[] = ''; + $links[] = ''; } // Are there any additional navlinks we should insert into the array before imploding it? @@ -136,33 +134,33 @@ public function display() $page_statusinfo = $page_topicsearches = array(); if ($this->user->is_guest) { - $page_statusinfo = '

'.$lang_common['Not logged in'].'

'; + $page_statusinfo = '

'.__('Not logged in').'

'; } else { - $page_statusinfo[] = '
  • '.$lang_common['Logged in as'].' '.feather_escape($this->user->username).'
  • '; - $page_statusinfo[] = '
  • '.sprintf($lang_common['Last visit'], format_time($this->user->last_visit)).'
  • '; + $page_statusinfo[] = '
  • '.__('Logged in as').' '.feather_escape($this->user->username).'
  • '; + $page_statusinfo[] = '
  • '.sprintf(__('Last visit'), format_time($this->user->last_visit)).'
  • '; if ($this->user->is_admmod) { if ($this->config['o_report_method'] == '0' || $this->config['o_report_method'] == '2') { if ($this->model->get_reports()) { - $page_statusinfo[] = ''; + $page_statusinfo[] = ''; } } if ($this->config['o_maintenance'] == '1') { - $page_statusinfo[] = ''; + $page_statusinfo[] = ''; } } if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $page_topicsearches[] = ''.$lang_common['Posted topics'].''; - $page_topicsearches[] = ''.$lang_common['New posts header'].''; + $page_topicsearches[] = ''.__('Posted topics').''; + $page_topicsearches[] = ''.__('New posts header').''; } } // Quick searches if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $page_topicsearches[] = ''.$lang_common['Active topics'].''; - $page_topicsearches[] = ''.$lang_common['Unanswered topics'].''; + $page_topicsearches[] = ''.__('Active topics').''; + $page_topicsearches[] = ''.__('Unanswered topics').''; } @@ -181,7 +179,7 @@ public function display() // Generate quicklinks if (!empty($page_topicsearches)) { $page_info .= "\n\t\t\t".'
      '; - $page_info .= "\n\t\t\t\t".'
    • '.$lang_common['Topic searches'].' '.implode(' | ', $page_topicsearches).'
    • '; + $page_info .= "\n\t\t\t\t".'
    • '.__('Topic searches').' '.implode(' | ', $page_topicsearches).'
    • '; $page_info .= "\n\t\t\t".'
    '; } @@ -207,7 +205,6 @@ public function display() $this->required_fields = isset($this->required_fields) ? $this->required_fields : null; $this->feather->render('header.php', array( - 'lang_common' => $lang_common, 'page_title' => $this->title, 'focus_element' => $this->focus_element, 'p' => $this->page, diff --git a/controller/help.php b/controller/help.php index 7cdff2af..114a545f 100644 --- a/controller/help.php +++ b/controller/help.php @@ -29,10 +29,10 @@ public function __autoload($class_name) public function display() { - global $lang_common; + if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } @@ -48,7 +48,6 @@ public function display() $this->feather->render('help.php', array( 'lang_help' => $lang_help, - 'lang_common' => $lang_common, ) ); diff --git a/controller/index.php b/controller/index.php index 4e4f750c..1d68cbfe 100644 --- a/controller/index.php +++ b/controller/index.php @@ -30,10 +30,8 @@ public function __autoload($class_name) public function display() { - global $lang_common; - if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } // Load the index.php language file @@ -48,7 +46,6 @@ public function display() $this->feather->render('index.php', array( 'index_data' => $this->model->print_categories_forums(), - 'lang_common' => $lang_common, 'lang_index' => $lang_index, 'stats' => $this->model->collect_stats(), 'feather_config' => $this->config, diff --git a/controller/login.php b/controller/login.php index 828a2914..69b43cf9 100644 --- a/controller/login.php +++ b/controller/login.php @@ -30,8 +30,6 @@ public function __autoload($class_name) public function display() { - global $lang_common; - if (!$this->user->is_guest) { header('Location: '.get_base_url()); exit; @@ -43,8 +41,8 @@ public function display() // TODO?: Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login) $redirect_url = $this->model->get_redirect_url($_SERVER); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Login']); - $required_fields = array('req_username' => $lang_common['Username'], 'req_password' => $lang_common['Password']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Login')); + $required_fields = array('req_username' => __('Username'), 'req_password' => __('Password')); $focus_element = array('login', 'req_username'); define('FEATHER_ACTIVE_PAGE', 'login'); @@ -52,7 +50,6 @@ public function display() $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('login/form.php', array( - 'lang_common' => $lang_common, 'lang_login' => $lang_login, 'redirect_url' => $redirect_url, ) @@ -63,7 +60,7 @@ public function display() public function logmein() { - global $lang_common, $lang_login; + global $lang_login; define('FEATHER_QUIET_VISIT', 1); @@ -80,7 +77,7 @@ public function logmein() public function logmeout($id, $token) { - global $lang_common; + define('FEATHER_QUIET_VISIT', 1); @@ -92,7 +89,7 @@ public function logmeout($id, $token) public function forget() { - global $lang_common, $lang_login; + global $lang_login; define('FEATHER_QUIET_VISIT', 1); @@ -107,7 +104,7 @@ public function forget() $errors = $this->model->password_forgotten(); $page_title = array(feather_escape($this->config['o_board_title']), $lang_login['Request pass']); - $required_fields = array('req_email' => $lang_common['Email']); + $required_fields = array('req_email' => __('Email')); $focus_element = array('request_pass', 'req_email'); define('FEATHER_ACTIVE_PAGE', 'login'); @@ -117,7 +114,6 @@ public function forget() $this->feather->render('login/password_forgotten.php', array( 'errors' => $errors, 'lang_login' => $lang_login, - 'lang_common' => $lang_common, ) ); diff --git a/controller/misc.php b/controller/misc.php index 39543856..9ebb3158 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -30,10 +30,10 @@ public function __autoload($class_name) public function rules() { - global $lang_common; + if ($this->config['o_rules'] == '0' || ($this->user->is_guest && $this->user->g_read_board == '0' && $this->config['o_regs_allow'] == '0')) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Load the register.php language file @@ -54,10 +54,10 @@ public function rules() public function markread() { - global $lang_common; + if ($this->user->is_guest) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the misc.php language file @@ -73,10 +73,10 @@ public function markread() public function markforumread($id) { - global $lang_common; + if ($this->user->is_guest) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the misc.php language file @@ -91,10 +91,10 @@ public function markforumread($id) public function subscribeforum($id) { - global $lang_common, $lang_misc; + global $lang_misc; if ($this->user->is_guest) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the misc.php language file @@ -105,10 +105,10 @@ public function subscribeforum($id) public function subscribetopic($id) { - global $lang_common, $lang_misc; + global $lang_misc; if ($this->user->is_guest) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the misc.php language file @@ -119,10 +119,10 @@ public function subscribetopic($id) public function unsubscribeforum($id) { - global $lang_common, $lang_misc; + global $lang_misc; if ($this->user->is_guest) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the misc.php language file @@ -133,10 +133,10 @@ public function unsubscribeforum($id) public function unsubscribetopic($id) { - global $lang_common, $lang_misc; + global $lang_misc; if ($this->user->is_guest) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the misc.php language file @@ -147,14 +147,14 @@ public function unsubscribetopic($id) public function email($id) { - global $lang_common; + if ($this->user->is_guest || $this->user->g_send_email == '0') { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } if ($id < 2) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Load the misc.php language file @@ -191,10 +191,10 @@ public function email($id) public function report($id) { - global $lang_common; + if ($this->user->is_guest) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the misc.php language file @@ -222,7 +222,6 @@ public function report($id) $this->feather->render('misc/report.php', array( 'lang_misc' => $lang_misc, 'id' => $id, - 'lang_common' => $lang_common, 'cur_post' => $cur_post, ) ); diff --git a/controller/moderate.php b/controller/moderate.php index d258d2da..098e50f1 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -30,10 +30,10 @@ public function __autoload($class_name) public function gethostpost($pid) { - global $lang_common; + if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } // Load the viewforum.php language file @@ -45,7 +45,7 @@ public function gethostpost($pid) // This particular function doesn't require forum-based moderator access. It can be used // by all moderators and admins if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $this->model->display_ip_address_post($pid); @@ -53,10 +53,10 @@ public function gethostpost($pid) public function gethostip($ip) { - global $lang_common; + if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } // Load the viewforum.php language file @@ -68,7 +68,7 @@ public function gethostip($ip) // This particular function doesn't require forum-based moderator access. It can be used // by all moderators and admins if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $this->model->display_ip_info($ip); @@ -76,10 +76,10 @@ public function gethostip($ip) public function moderatetopic($id = null, $fid = null, $action = null, $param = null) { - global $lang_common, $lang_topic, $lang_misc; + global $lang_topic, $lang_misc; if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } // Load the viewforum.php language file @@ -92,7 +92,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // by all moderators and admins if ($action == 'get_host') { if (!$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $this->model->display_ip_address(); @@ -103,7 +103,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $mods_array = ($moderators != '') ? unserialize($moderators) : array(); if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator == '0' || !array_key_exists($this->user->username, $mods_array))) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $url_subject = url_friendly($this->model->get_subject_tid($id)); @@ -135,7 +135,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = 'id' => $fid, 'topics' => $topics, 'lang_misc' => $lang_misc, - 'lang_common' => $lang_common, 'list_forums' => $this->model->get_forum_list_move($fid), ) ); @@ -205,7 +204,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = 'id' => $id, 'topics' => $id, 'lang_misc' => $lang_misc, - 'lang_common' => $lang_common, 'list_forums' => $this->model->get_forum_list_move($fid), ) ); @@ -227,7 +225,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->header->setTitle($page_title)->setPage($p)->display(); $this->feather->render('moderate/delete_posts.php', array( - 'lang_common' => $lang_common, 'lang_misc' => $lang_misc, 'id' => $id, 'posts' => $posts, @@ -247,7 +244,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->header->setTitle($page_title)->setPage($p)->setFocusElement($focus_element)->display(); $this->feather->render('moderate/split_posts.php', array( - 'lang_common' => $lang_common, 'lang_misc' => $lang_misc, 'id' => $id, 'posts' => $posts, @@ -271,7 +267,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = }*/ // Generate paging links - $paging_links = ''.$lang_common['Pages'].' '.paginate($num_pages, $p, 'moderate/topic/'.$id.'/forum/'.$fid.'/action/moderate/#'); + $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/topic/'.$id.'/forum/'.$fid.'/action/moderate/#'); if ($this->config['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); @@ -284,7 +280,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->display(); $this->feather->render('moderate/posts_view.php', array( - 'lang_common' => $lang_common, 'lang_topic' => $lang_topic, 'lang_misc' => $lang_misc, 'cur_topic' => $cur_topic, @@ -305,10 +300,10 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = public function display($id, $name = null, $page = null) { - global $lang_common, $lang_forum, $lang_misc; + global $lang_forum, $lang_misc; if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } // Load the viewforum.php language file @@ -322,7 +317,7 @@ public function display($id, $name = null, $page = null) $mods_array = ($moderators != '') ? unserialize($moderators) : array(); if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator == '0' || !array_key_exists($this->user->username, $mods_array))) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Fetch some info about the forum @@ -330,7 +325,7 @@ public function display($id, $name = null, $page = null) // Is this a redirect forum? In that case, abort! if ($cur_forum['redirect_url'] != '') { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $sort_by = $this->model->forum_sort_by($cur_forum['sort_by']); @@ -343,7 +338,7 @@ public function display($id, $name = null, $page = null) $url_forum = url_friendly($cur_forum['forum_name']); // Generate paging links - $paging_links = ''.$lang_common['Pages'].' '.paginate($num_pages, $p, 'moderate/forum/'.$id.'/#'); + $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/forum/'.$id.'/#'); $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])); @@ -352,7 +347,6 @@ public function display($id, $name = null, $page = null) $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->display(); $this->feather->render('moderate/moderator_forum.php', array( - 'lang_common' => $lang_common, 'lang_misc' => $lang_misc, 'id' => $id, 'p' => $p, @@ -371,10 +365,10 @@ public function display($id, $name = null, $page = null) public function dealposts($fid) { - global $lang_common, $lang_forum, $lang_topic, $lang_misc; + global $lang_forum, $lang_topic, $lang_misc; if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } // Load the viewforum.php language file @@ -388,7 +382,7 @@ public function dealposts($fid) $mods_array = ($moderators != '') ? unserialize($moderators) : array(); if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator == '0' || !array_key_exists($this->user->username, $mods_array))) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Move one or more topics @@ -418,7 +412,6 @@ public function dealposts($fid) 'id' => $fid, 'topics' => $topics, 'lang_misc' => $lang_misc, - 'lang_common' => $lang_common, 'list_forums' => $this->model->get_forum_list_move($fid), ) ); @@ -447,7 +440,6 @@ public function dealposts($fid) 'id' => $fid, 'topics' => $topics, 'lang_misc' => $lang_misc, - 'lang_common' => $lang_common, ) ); @@ -475,7 +467,6 @@ public function dealposts($fid) 'id' => $fid, 'topics' => $topics, 'lang_misc' => $lang_misc, - 'lang_common' => $lang_common, ) ); diff --git a/controller/post.php b/controller/post.php index cb64d507..e7bca948 100644 --- a/controller/post.php +++ b/controller/post.php @@ -35,7 +35,7 @@ public function newreply($fid = null, $tid = null, $qid = null) public function newpost($fid = null, $tid = null, $qid = null) { - global $lang_common, $lang_prof_reg, $lang_antispam_questions, $lang_antispam, $lang_post, $lang_register, $lang_bbeditor; + global $lang_prof_reg, $lang_antispam_questions, $lang_antispam, $lang_post, $lang_register, $lang_bbeditor; // Load the register.php/profile.php language file require FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.php'; @@ -55,7 +55,7 @@ public function newpost($fid = null, $tid = null, $qid = null) // If $_POST['username'] is filled, we are facing a bot if ($this->request->post('username')) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Fetch some info about the topic and/or the forum @@ -65,7 +65,7 @@ public function newpost($fid = null, $tid = null, $qid = null) // Is someone trying to post into a redirect forum? if ($cur_posting['redirect_url'] != '') { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Sort out who the moderators are and if we are currently a moderator (or an admin) @@ -77,7 +77,7 @@ public function newpost($fid = null, $tid = null, $qid = null) ($fid && (($cur_posting['post_topics'] == '' && $this->user->g_post_topics == '0') || $cur_posting['post_topics'] == '0')) || (isset($cur_posting['closed']) && $cur_posting['closed'] == '1')) && !$is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the post.php language file @@ -174,7 +174,7 @@ public function newpost($fid = null, $tid = null, $qid = null) $action = $lang_post['Post new topic']; $form = '
    '; } else { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $url_forum = url_friendly($cur_posting['forum_name']); @@ -188,7 +188,7 @@ public function newpost($fid = null, $tid = null, $qid = null) } $page_title = array(feather_escape($this->config['o_board_title']), $action); - $required_fields = array('req_email' => $lang_common['Email'], 'req_subject' => $lang_common['Subject'], 'req_message' => $lang_common['Message']); + $required_fields = array('req_email' => __('Email'), 'req_subject' => __('Subject'), 'req_message' => __('Message')); if ($this->user->is_guest) { $required_fields['captcha'] = $lang_antispam['Robot title']; } @@ -215,7 +215,6 @@ public function newpost($fid = null, $tid = null, $qid = null) 'feather_config' => $this->config, 'feather_user' => $this->user, 'cur_posting' => $cur_posting, - 'lang_common' => $lang_common, 'lang_post' => $lang_post, 'lang_antispam' => $lang_antispam, 'lang_antispam_questions' => $lang_antispam_questions, diff --git a/controller/profile.php b/controller/profile.php index 3abb7e51..02b44ff5 100644 --- a/controller/profile.php +++ b/controller/profile.php @@ -30,7 +30,7 @@ public function __autoload($class_name) public function display($id, $section = null) { - global $lang_common, $lang_prof_reg, $lang_profile, $pd, $forum_time_formats, $forum_date_formats; + global $lang_prof_reg, $lang_profile, $pd, $forum_time_formats, $forum_date_formats; // Include UTF-8 function require FEATHER_ROOT.'include/utf8/substr_replace.php'; @@ -45,38 +45,37 @@ public function display($id, $section = null) if ($this->request->post('update_group_membership')) { if ($this->user->g_id > FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $this->model->update_group_membership($id, $this->feather); } elseif ($this->request->post('update_forums')) { if ($this->user->g_id > FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $this->model->update_mod_forums($id, $this->feather); } elseif ($this->request->post('ban')) { if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $this->model->ban_user($id); } elseif ($this->request->post('delete_user') || $this->request->post('delete_user_comply')) { if ($this->user->g_id > FEATHER_ADMIN) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $this->model->delete_user($id, $this->feather); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Confirm delete user']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Confirm delete user']); define('FEATHER_ACTIVE_PAGE', 'profile'); $this->header->setTitle($page_title)->display(); $this->feather->render('profile/delete_user.php', array( - 'lang_common' => $lang_common, - 'username' => $this->model->get_username($id), + 'username' => $this->model->get_username($id), 'lang_profile' => $lang_profile, 'id' => $id, ) @@ -95,7 +94,7 @@ public function display($id, $section = null) ($this->user->g_mod_edit_users == '0' || // mods aren't allowed to edit users $info['group_id'] == FEATHER_ADMIN || // or the user is an admin $info['is_moderator'])))) { // or the user is another mod - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $this->model->update_profile($id, $info, $section, $this->feather); @@ -128,7 +127,6 @@ public function display($id, $section = null) $this->header->setTitle($page_title)->display(); $this->feather->render('profile/view_profile.php', array( - 'lang_common' => $lang_common, 'lang_profile' => $lang_profile, 'user_info' => $user_info, ) @@ -139,8 +137,8 @@ public function display($id, $section = null) if (!$section || $section == 'essentials') { $user_disp = $this->model->edit_essentials($id, $user); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section essentials']); - $required_fields = array('req_username' => $lang_common['Username'], 'req_email' => $lang_common['Email']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section essentials']); + $required_fields = array('req_username' => __('Username'), 'req_email' => __('Email')); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -149,8 +147,7 @@ public function display($id, $section = null) $this->model->generate_profile_menu('essentials', $id); $this->feather->render('profile/section_essentials.php', array( - 'lang_common' => $lang_common, - 'lang_profile' => $lang_profile, + 'lang_profile' => $lang_profile, 'lang_prof_reg' => $lang_prof_reg, 'feather' => $this->feather, 'id' => $id, @@ -162,10 +159,10 @@ public function display($id, $section = null) ); } elseif ($section == 'personal') { if ($this->user->g_set_title == '1') { - $title_field = ''."\n"; + $title_field = ''."\n"; } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section personal']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section personal']); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -174,15 +171,14 @@ public function display($id, $section = null) $this->model->generate_profile_menu('personal', $id); $this->feather->render('profile/section_personal.php', array( - 'lang_common' => $lang_common, - 'lang_profile' => $lang_profile, + 'lang_profile' => $lang_profile, 'user' => $user, 'feather' => $this->feather, ) ); } elseif ($section == 'messaging') { - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section messaging']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section messaging']); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -191,15 +187,14 @@ public function display($id, $section = null) $this->model->generate_profile_menu('messaging', $id); $this->feather->render('profile/section_messaging.php', array( - 'lang_common' => $lang_common, - 'lang_profile' => $lang_profile, + 'lang_profile' => $lang_profile, 'user' => $user, ) ); } elseif ($section == 'personality') { if ($this->config['o_avatars'] == '0' && $this->config['o_signatures'] == '0') { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $avatar_field = ''.$lang_profile['Change avatar'].''; @@ -217,7 +212,7 @@ public function display($id, $section = null) $signature_preview = '

    '.$lang_profile['No sig'].'

    '."\n"; } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section personality']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section personality']); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -226,8 +221,7 @@ public function display($id, $section = null) $this->model->generate_profile_menu('personality', $id); $this->feather->render('profile/section_personality.php', array( - 'lang_common' => $lang_common, - 'lang_profile' => $lang_profile, + 'lang_profile' => $lang_profile, 'user_avatar' => $user_avatar, 'avatar_field' => $avatar_field, 'signature_preview' => $signature_preview, @@ -237,7 +231,7 @@ public function display($id, $section = null) ); } elseif ($section == 'display') { - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section display']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section display']); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -246,14 +240,13 @@ public function display($id, $section = null) $this->model->generate_profile_menu('display', $id); $this->feather->render('profile/section_display.php', array( - 'lang_common' => $lang_common, - 'lang_profile' => $lang_profile, + 'lang_profile' => $lang_profile, 'user' => $user, ) ); } elseif ($section == 'privacy') { - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section privacy']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section privacy']); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -262,8 +255,7 @@ public function display($id, $section = null) $this->model->generate_profile_menu('privacy', $id); $this->feather->render('profile/section_privacy.php', array( - 'lang_common' => $lang_common, - 'lang_profile' => $lang_profile, + 'lang_profile' => $lang_profile, 'lang_prof_reg' => $lang_prof_reg, 'user' => $user, ) @@ -271,10 +263,10 @@ public function display($id, $section = null) } elseif ($section == 'admin') { if (!$this->user->is_admmod || ($this->user->g_moderator == '1' && $this->user->g_mod_ban_users == '0')) { - message($lang_common['Bad request'], false, '403 Forbidden'); + message(__('Bad request'), false, '403 Forbidden'); } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section admin']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section admin']); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -283,8 +275,7 @@ public function display($id, $section = null) $this->model->generate_profile_menu('admin', $id); $this->feather->render('profile/section_admin.php', array( - 'lang_common' => $lang_common, - 'lang_profile' => $lang_profile, + 'lang_profile' => $lang_profile, 'user' => $user, 'forum_list' => $this->model->get_forum_list($id), 'group_list' => $this->model->get_group_list($user), @@ -293,7 +284,7 @@ public function display($id, $section = null) ); } else { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $this->footer->display(); @@ -302,7 +293,7 @@ public function display($id, $section = null) public function action($id, $action) { - global $lang_common, $lang_prof_reg, $lang_profile; + global $lang_prof_reg, $lang_profile; // Include UTF-8 function require FEATHER_ROOT.'include/utf8/substr_replace.php'; @@ -317,16 +308,16 @@ public function action($id, $action) if ($action != 'change_pass' || !$this->request->get('key')) { if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } elseif ($this->user->g_view_users == '0' && ($this->user->is_guest || $this->user->id != $id)) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } } if ($action == 'change_pass') { $this->model->change_pass($id, $this->feather); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Change pass']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Change pass']); $required_fields = array('req_old_password' => $lang_profile['Old pass'], 'req_new_password1' => $lang_profile['New pass'], 'req_new_password2' => $lang_profile['Confirm new pass']); $focus_element = array('change_pass', ((!$this->user->is_admmod) ? 'req_old_password' : 'req_new_password1')); @@ -335,8 +326,7 @@ public function action($id, $action) $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('profile/change_pass.php', array( - 'lang_common' => $lang_common, - 'feather' => $this->feather, + 'feather' => $this->feather, 'lang_profile' => $lang_profile, 'id' => $id, ) @@ -346,8 +336,8 @@ public function action($id, $action) } elseif ($action == 'change_email') { $this->model->change_email($id, $this->feather); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Change email']); - $required_fields = array('req_new_email' => $lang_profile['New email'], 'req_password' => $lang_common['Password']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Change email']); + $required_fields = array('req_new_email' => $lang_profile['New email'], 'req_password' => __('Password')); $focus_element = array('change_email', 'req_new_email'); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -355,8 +345,7 @@ public function action($id, $action) $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('profile/change_mail.php', array( - 'lang_common' => $lang_common, - 'lang_profile' => $lang_profile, + 'lang_profile' => $lang_profile, 'id' => $id, ) ); @@ -368,14 +357,14 @@ public function action($id, $action) } if ($this->user->id != $id && !$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } if ($this->feather->request()->isPost()) { $this->model->upload_avatar($id, $_FILES); } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Upload avatar']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Upload avatar']); $required_fields = array('req_file' => $lang_profile['File']); $focus_element = array('upload_avatar', 'req_file'); @@ -384,8 +373,7 @@ public function action($id, $action) $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('profile/upload_avatar.php', array( - 'lang_common' => $lang_common, - 'lang_profile' => $lang_profile, + 'lang_profile' => $lang_profile, 'feather_config' => $this->config, 'lang_profile' => $lang_profile, 'id' => $id, @@ -396,7 +384,7 @@ public function action($id, $action) } elseif ($action == 'delete_avatar') { if ($this->user->id != $id && !$this->user->is_admmod) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } @@ -406,12 +394,12 @@ public function action($id, $action) redirect(get_link('user/'.$id.'/section/personality/'), $lang_profile['Avatar deleted redirect']); } elseif ($action == 'promote') { if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_promote_users == '0')) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $this->model->promote_user($id, $this->feather); } else { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } } } diff --git a/controller/register.php b/controller/register.php index 3ab047bc..8683d1c1 100644 --- a/controller/register.php +++ b/controller/register.php @@ -30,7 +30,7 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_antispam_questions, $lang_antispam, $lang_register, $lang_prof_reg; + global $lang_antispam_questions, $lang_antispam, $lang_register, $lang_prof_reg; if (!$this->user->is_guest) { header('Location: '.get_base_url()); @@ -54,7 +54,7 @@ public function display() } $page_title = array(feather_escape($this->config['o_board_title']), $lang_register['Register']); - $required_fields = array('req_user' => $lang_common['Username'], 'req_password1' => $lang_common['Password'], 'req_password2' => $lang_prof_reg['Confirm pass'], 'req_email1' => $lang_common['Email'], 'req_email2' => $lang_common['Email'].' 2', 'captcha' => $lang_antispam['Robot title']); + $required_fields = array('req_user' => __('Username'), 'req_password1' => __('Password'), 'req_password2' => $lang_prof_reg['Confirm pass'], 'req_email1' => __('Email'), 'req_email2' => __('Email').' 2', 'captcha' => $lang_antispam['Robot title']); $focus_element = array('register', 'req_user'); define('FEATHER_ACTIVE_PAGE', 'register'); @@ -79,7 +79,6 @@ public function display() 'errors' => $user['errors'], 'feather_config' => $this->config, 'lang_register' => $lang_register, - 'lang_common' => $lang_common, 'lang_prof_reg' => $lang_prof_reg, 'lang_antispam' => $lang_antispam, 'lang_antispam_questions' => $lang_antispam_questions, @@ -102,7 +101,7 @@ public function cancel() public function rules() { // TODO: fix $_GET w/ URL rewriting - global $lang_common, $lang_login, $lang_register; + global $lang_login, $lang_register; // If we are logged in, we shouldn't be here if (!$this->user->is_guest) { diff --git a/controller/search.php b/controller/search.php index 8cfda6d3..df7712b6 100644 --- a/controller/search.php +++ b/controller/search.php @@ -30,14 +30,14 @@ public function __autoload($class_name) public function display() { - global $lang_common, $lang_search, $lang_forum, $lang_topic, $pd; + global $lang_search, $lang_forum, $lang_topic, $pd; // Load the search.php language file require FEATHER_ROOT.'lang/'.$this->user->language.'/search.php'; require FEATHER_ROOT.'lang/'.$this->user->language.'/forum.php'; if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } elseif ($this->user->g_search == '0') { message($lang_search['No search permission'], false, '403 Forbidden'); } @@ -57,8 +57,7 @@ public function display() $this->header->setTitle($page_title)->display(); $this->feather->render('search/header.php', array( - 'lang_common' => $lang_common, - 'lang_search' => $lang_search, + 'lang_search' => $lang_search, 'search' => $search, ) ); @@ -89,7 +88,6 @@ public function display() $this->header->setTitle($page_title)->setFocusElement($focus_element)->display(); $this->feather->render('search/form.php', array( - 'lang_common' => $lang_common, 'lang_search' => $lang_search, 'feather_config' => $this->config, 'feather' => $this->feather, diff --git a/controller/userlist.php b/controller/userlist.php index 5fda0733..7de8f1c8 100644 --- a/controller/userlist.php +++ b/controller/userlist.php @@ -30,12 +30,12 @@ public function __autoload($class_name) public function display() { - global $lang_common; + if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } elseif ($this->user->g_view_users == '0') { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Load the userlist.php language file @@ -61,13 +61,13 @@ public function display() $p = (!$this->request->get('p') || $page <= 1 || $page > $num_pages) ? 1 : intval($page); $start_from = 50 * ($p - 1); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['User list']); + $page_title = array(feather_escape($this->config['o_board_title']), __('User list')); if ($this->user->g_search_users == '1') { $focus_element = array('userlist', 'username'); } // Generate paging links - $paging_links = ''.$lang_common['Pages'].' '.paginate_old($num_pages, $p, '?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.$sort_dir); + $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.$sort_dir); define('FEATHER_ALLOW_INDEX', 1); @@ -76,7 +76,6 @@ public function display() $this->header->setTitle($page_title)->setPage($p)->setFocusElement($focus_element)->setPagingLinks($paging_links)->display(); $this->feather->render('userlist.php', array( - 'lang_common' => $lang_common, 'lang_search' => $lang_search, 'lang_ul' => $lang_ul, 'feather' => $this->feather, diff --git a/controller/viewforum.php b/controller/viewforum.php index a8802107..c500a8bd 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -30,14 +30,14 @@ public function __autoload($class_name) public function display($id, $name = null, $page = null) { - global $lang_common, $lang_forum; + global $lang_forum; if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } if ($id < 1) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Load the viewforum.php language file @@ -73,7 +73,7 @@ public function display($id, $name = null, $page = null) $url_forum = url_friendly($cur_forum['forum_name']); // Generate paging links - $paging_links = ''.$lang_common['Pages'].' '.paginate($num_pages, $p, 'forum/'.$id.'/'.$url_forum.'/#'); + $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'forum/'.$id.'/'.$url_forum.'/#'); $forum_actions = $this->model->get_forum_actions($id, $this->config['o_forum_subscriptions'], $cur_forum['is_subscribed']); @@ -90,7 +90,6 @@ public function display($id, $name = null, $page = null) $this->feather->render('viewforum.php', array( 'id' => $id, 'forum_data' => $this->model->print_topics($id, $sort_by, $start_from), - 'lang_common' => $lang_common, 'lang_forum' => $lang_forum, 'cur_forum' => $cur_forum, 'paging_links' => $paging_links, diff --git a/controller/viewtopic.php b/controller/viewtopic.php index bbbefaa8..385d6523 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -30,10 +30,10 @@ public function __autoload($class_name) public function display($id = null, $name = null, $page = null, $pid = null) { - global $lang_common, $lang_post, $lang_topic, $lang_bbeditor, $pd; + global $lang_post, $lang_topic, $lang_bbeditor, $pd; if ($this->user->g_read_board == '0') { - message($lang_common['No view'], '403'); + message(__('No view'), '403'); } // Load the viewtopic.php language file @@ -47,12 +47,12 @@ public function display($id = null, $name = null, $page = null, $pid = null) $index_questions = rand(0, count($lang_antispam_questions)-1); // BBcode toolbar feature - require FEATHER_ROOT.'lang/'.$this->user['language'].'/bbeditor.php'; + require FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.php'; // Load the viewtopic.php model file require_once FEATHER_ROOT.'model/viewtopic.php'; - // Fetch some informations about the topic TODO + // Fetch some informations about the topic $cur_topic = $this->model->get_info_topic($id); // Sort out who the moderators are and if we are currently a moderator (or an admin) @@ -82,8 +82,7 @@ public function display($id = null, $name = null, $page = null, $pid = null) $url_forum = url_friendly($cur_topic['forum_name']); // Generate paging links - $paging_links = ''.$lang_common['Pages'].' '.paginate($num_pages, $p, 'topic/'.$id.'/'.$url_topic.'/#'); - + $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'topic/'.$id.'/'.$url_topic.'/#'); if ($this->config['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); @@ -103,15 +102,12 @@ public function display($id = null, $name = null, $page = null, $pid = null) $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); - $forum_id = $cur_topic['forum_id']; - require FEATHER_ROOT.'include/parser.php'; $this->feather->render('viewtopic.php', array( 'id' => $id, 'p' => $p, 'post_data' => $this->model->print_posts($id, $start_from, $cur_topic, $is_admmod), - 'lang_common' => $lang_common, 'lang_topic' => $lang_topic, 'lang_post' => $lang_post, 'lang_bbeditor' => $lang_bbeditor, @@ -141,17 +137,13 @@ public function display($id = null, $name = null, $page = null, $pid = null) public function viewpost($pid) { - global $lang_common; - $post = $this->model->redirect_to_post($pid); - return self::display($post['topic_id'], null, $post['get_p'], $pid); + return $this->display($post['topic_id'], null, $post['get_p'], $pid); } public function action($id, $action) { - global $lang_common; - $this->model->handle_actions($id, $action); } } diff --git a/extern.php b/extern.php index f88c3107..29da2f32 100644 --- a/extern.php +++ b/extern.php @@ -128,7 +128,7 @@ function authenticate_user($user, $password, $password_is_hash = false) if ($feather->user->g_read_board == '0') { http_authenticate_user(); - exit($lang_common['No view']); + exit(__('No view')); } $action = isset($_GET['action']) ? strtolower($_GET['action']) : 'feed'; @@ -167,7 +167,7 @@ function http_authenticate_user() // function output_rss($feed) { - global $lang_common, $feather_config; + global $feather_config; // Send XML/no cache headers header('Content-Type: application/xml; charset=utf-8'); @@ -212,7 +212,7 @@ function output_rss($feed) // function output_atom($feed) { - global $lang_common, $feather_config; + global $feather_config; // Send XML/no cache headers header('Content-Type: application/atom+xml; charset=utf-8'); @@ -270,7 +270,7 @@ function output_atom($feed) // function output_xml($feed) { - global $lang_common, $feather_config; + global $feather_config; // Send XML/no cache headers header('Content-Type: application/xml; charset=utf-8'); @@ -370,7 +370,7 @@ function output_html($feed) if (!$cur_topic) { http_authenticate_user(); - exit($lang_common['Bad request']); + exit(__('Bad request')); } if ($feather_config['o_censoring'] == '1') { @@ -379,9 +379,9 @@ function output_html($feed) // Setup the feed $feed = array( - 'title' => $feather_config['o_board_title'].$lang_common['Title separator'].$cur_topic['subject'], + 'title' => $feather_config['o_board_title'].__('Title separator').$cur_topic['subject'], 'link' => get_link('topic/'.$tid.'/'.url_friendly($cur_topic['subject']).'/'), - 'description' => sprintf($lang_common['RSS description topic'], $cur_topic['subject']), + 'description' => sprintf(__('RSS description topic'), $cur_topic['subject']), 'items' => array(), 'type' => 'posts' ); @@ -403,7 +403,7 @@ function output_html($feed) $item = array( 'id' => $cur_post['id'], - 'title' => $cur_topic['first_post_id'] == $cur_post['id'] ? $cur_topic['subject'] : $lang_common['RSS reply'].$cur_topic['subject'], + 'title' => $cur_topic['first_post_id'] == $cur_post['id'] ? $cur_topic['subject'] : __('RSS reply').$cur_topic['subject'], 'link' => get_link('post/'.$cur_post['id'].'/#p'.$cur_post['id']), 'description' => $cur_post['message'], 'author' => array( @@ -458,7 +458,7 @@ function output_html($feed) ->find_one_col('f.forum_name'); if ($cur_topic) { - $forum_name = $lang_common['Title separator'].$cur_topic; + $forum_name = __('Title separator').$cur_topic; } } } @@ -475,7 +475,7 @@ function output_html($feed) // Only attempt to cache if caching is enabled and we have all or a single forum if ($feather_config['o_feed_ttl'] > 0 && ($forum_sql == '' || ($forum_name != '' && !isset($_GET['nfid'])))) { - $cache_id = 'feed'.sha1($feather->user->g_id.'|'.$lang_common['lang_identifier'].'|'.($order_posted ? '1' : '0').($forum_name == '' ? '' : '|'.$fids[0])); + $cache_id = 'feed'.sha1($feather->user->g_id.'|'.__('lang_identifier').'|'.($order_posted ? '1' : '0').($forum_name == '' ? '' : '|'.$fids[0])); } // Load cached feed @@ -489,7 +489,7 @@ function output_html($feed) $feed = array( 'title' => $feather_config['o_board_title'].$forum_name, 'link' => '/index.php', - 'description' => sprintf($lang_common['RSS description'], $feather_config['o_board_title']), + 'description' => sprintf(__('RSS description'), $feather_config['o_board_title']), 'items' => array(), 'type' => 'topics' ); @@ -663,4 +663,4 @@ function output_html($feed) exit; } // If we end up here, the script was called with some wacky parameters -exit($lang_common['Bad request']); +exit(__('Bad request')); diff --git a/include/cache.php b/include/cache.php index dba2e878..b275e400 100644 --- a/include/cache.php +++ b/include/cache.php @@ -56,7 +56,7 @@ function generate_bans_cache() // function generate_quickjump_cache($group_id = false) { - global $lang_common; + $groups = array(); @@ -103,7 +103,7 @@ function generate_quickjump_cache($group_id = false) ->find_many(); if ($result) { - $output .= "\t\t\t\t".''."\n\t\t\t\t\t".'
    '."\n\t\t\t\t\t".''."\n\t\t\t\t\t".'
    '."\n\t\t\t\t".'
    '."\n"; + $output .= "\t\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t".''."\n"; } } diff --git a/include/common.php b/include/common.php index ad95a092..d617810b 100644 --- a/include/common.php +++ b/include/common.php @@ -145,10 +145,15 @@ // Check/update/set cookie and fetch user info check_cookie(); -// Attempt to load the common language file -if (file_exists(FEATHER_ROOT.'lang/'.$feather->user->language.'/common.php')) { - include FEATHER_ROOT.'lang/'.$feather->user->language.'/common.php'; -} else { +// Load l10n +require_once FEATHER_ROOT.'include/pomo/MO.php'; +require_once FEATHER_ROOT.'include/l10n.php'; + +// Attempt to load the language file +if (file_exists(FEATHER_ROOT.'lang/'.$feather->user->language.'/common.mo')) { + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/common.mo'); +} +else { die('There is no valid language pack \''.feather_escape($feather->user->language).'\' installed. Please reinstall a language of that name'); } @@ -179,7 +184,7 @@ // Check to see if we logged in without a cookie being set if ($feather->user->is_guest && isset($_GET['login'])) { - message($lang_common['No cookie']); + message(__('No cookie')); } // 32kb should be more than enough for forum posts diff --git a/include/email.php b/include/email.php index 4300cf85..619d9736 100644 --- a/include/email.php +++ b/include/email.php @@ -261,14 +261,14 @@ function bbcode2email($text, $wrap_length = 72) // function pun_mail($to, $subject, $message, $reply_to_email = '', $reply_to_name = '') { - global $feather_config, $lang_common; + global $feather_config; // Use \r\n for SMTP servers, the system's line ending for local mailers $smtp = $feather_config['o_smtp_host'] != ''; $EOL = $smtp ? "\r\n" : FORUM_EOL; // Default sender/return address - $from_name = sprintf($lang_common['Mailer'], $feather_config['o_board_title']); + $from_name = sprintf(__('Mailer'), $feather_config['o_board_title']); $from_email = $feather_config['o_webmaster_email']; // Do a little spring cleaning diff --git a/include/functions.php b/include/functions.php index 49937c1d..ab906f78 100644 --- a/include/functions.php +++ b/include/functions.php @@ -331,7 +331,7 @@ function feather_setcookie($user_id, $password, $expires) // function check_bans() { - global $feather_config, $lang_common, $feather_bans; + global $feather_config, $feather_bans; // Get Slim current session $feather = \Slim\Slim::getInstance(); @@ -384,7 +384,7 @@ function check_bans() if ($is_banned) { \DB::for_table('online')->where('ident', $feather->user->username) ->delete_many(); - message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'

    '.feather_escape($cur_ban['message']).'

    ' : '

    ').$lang_common['Ban message 4'].' '.feather_escape($feather_config['o_admin_email']).'.', true, true, true); + message(__('Ban message').' '.(($cur_ban['expire'] != '') ? __('Ban message 2').' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? __('Ban message 3').'

    '.feather_escape($cur_ban['message']).'

    ' : '

    ').__('Ban message 4').' '.feather_escape($feather_config['o_admin_email']).'.', true, true, true); } } @@ -404,7 +404,7 @@ function check_bans() // function check_username($username, $errors, $exclude_id = null) { - global $feather, $feather_config, $errors, $lang_prof_reg, $lang_register, $lang_common, $feather_bans; + global $feather, $feather_config, $errors, $lang_prof_reg, $lang_register, $feather_bans; // Include UTF-8 function require_once FEATHER_ROOT.'include/utf8/strcasecmp.php'; @@ -417,7 +417,7 @@ function check_username($username, $errors, $exclude_id = null) $errors[] = $lang_prof_reg['Username too short']; } elseif (feather_strlen($username) > 25) { // This usually doesn't happen since the form element only accepts 25 characters $errors[] = $lang_prof_reg['Username too long']; - } elseif (!strcasecmp($username, 'Guest') || !utf8_strcasecmp($username, $lang_common['Guest'])) { + } elseif (!strcasecmp($username, 'Guest') || !utf8_strcasecmp($username, __('Guest'))) { $errors[] = $lang_prof_reg['Username guest']; } elseif (preg_match('%[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}%', $username) || preg_match('%((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))%', $username)) { $errors[] = $lang_prof_reg['Username IP']; @@ -521,7 +521,7 @@ function generate_avatar_markup($user_id) // function generate_page_title($page_title, $p = null) { - global $lang_common; + if (!is_array($page_title)) { $page_title = array($page_title); @@ -530,10 +530,10 @@ function generate_page_title($page_title, $p = null) $page_title = array_reverse($page_title); if ($p > 1) { - $page_title[0] .= ' ('.sprintf($lang_common['Page'], forum_number_format($p)).')'; + $page_title[0] .= ' ('.sprintf(__('Page'), forum_number_format($p)).')'; } - $crumbs = implode($lang_common['Title separator'], $page_title); + $crumbs = implode(__('Title separator'), $page_title); return $crumbs; } @@ -796,7 +796,7 @@ function censor_words($text) // function get_title($user) { - global $feather_bans, $lang_common; + global $feather_bans; static $ban_list; // If not already built in a previous call, build an array of lowercase banned usernames @@ -814,7 +814,7 @@ function get_title($user) } // If the user is banned elseif (in_array(utf8_strtolower($user['username']), $ban_list)) { - $user_title = $lang_common['Banned']; + $user_title = __('Banned'); } // If the user group has a default user title elseif ($user['g_user_title'] != '') { @@ -822,11 +822,11 @@ function get_title($user) } // If the user is a guest elseif ($user['g_id'] == FEATHER_GUEST) { - $user_title = $lang_common['Guest']; + $user_title = __('Guest'); } // If nothing else helps, we assign the default else { - $user_title = $lang_common['Member']; + $user_title = __('Member'); } return $user_title; @@ -838,7 +838,7 @@ function get_title($user) // function paginate($num_pages, $cur_page, $link, $args = null) { - global $lang_common; + $pages = array(); $link_to_all = false; @@ -854,14 +854,14 @@ function paginate($num_pages, $cur_page, $link, $args = null) } else { // Add a previous page link if ($num_pages > 1 && $cur_page > 1) { - $pages[] = ''; + $pages[] = ''; } if ($cur_page > 3) { $pages[] = '1'; if ($cur_page > 5) { - $pages[] = ''.$lang_common['Spacer'].''; + $pages[] = ''.__('Spacer').''; } } @@ -878,7 +878,7 @@ function paginate($num_pages, $cur_page, $link, $args = null) if ($cur_page <= ($num_pages-3)) { if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4)) { - $pages[] = ''.$lang_common['Spacer'].''; + $pages[] = ''.__('Spacer').''; } $pages[] = ''.forum_number_format($num_pages).''; @@ -886,7 +886,7 @@ function paginate($num_pages, $cur_page, $link, $args = null) // Add a next page link if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages) { - $pages[] = ''; + $pages[] = ''; } } @@ -899,7 +899,7 @@ function paginate($num_pages, $cur_page, $link, $args = null) // function paginate_old($num_pages, $cur_page, $link) { - global $lang_common; + $pages = array(); $link_to_all = false; @@ -915,14 +915,14 @@ function paginate_old($num_pages, $cur_page, $link) } else { // Add a previous page link if ($num_pages > 1 && $cur_page > 1) { - $pages[] = ''; + $pages[] = ''; } if ($cur_page > 3) { $pages[] = '1'; if ($cur_page > 5) { - $pages[] = ''.$lang_common['Spacer'].''; + $pages[] = ''.__('Spacer').''; } } @@ -939,7 +939,7 @@ function paginate_old($num_pages, $cur_page, $link) if ($cur_page <= ($num_pages-3)) { if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4)) { - $pages[] = ''.$lang_common['Spacer'].''; + $pages[] = ''.__('Spacer').''; } $pages[] = ''.forum_number_format($num_pages).''; @@ -947,7 +947,7 @@ function paginate_old($num_pages, $cur_page, $link) // Add a next page link if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages) { - $pages[] = ''; + $pages[] = ''; } } @@ -961,7 +961,7 @@ function paginate_old($num_pages, $cur_page, $link) function message($msg, $http_status = null, $no_back_link = false, $dontStop = false) { - global $lang_common; + // Did we receive a custom header? if (!is_null($http_status)) { @@ -980,7 +980,7 @@ function message($msg, $http_status = null, $no_back_link = false, $dontStop = f $feather->response->setBody(''); if (!defined('FEATHER_HEADER')) { - $page_title = array(feather_escape($feather->config['o_board_title']), $lang_common['Info']); + $page_title = array(feather_escape($feather->config['o_board_title']), __('Info')); if (!defined('FEATHER_ACTIVE_PAGE')) { define('FEATHER_ACTIVE_PAGE', 'index'); @@ -996,7 +996,6 @@ function message($msg, $http_status = null, $no_back_link = false, $dontStop = f } $feather->render('message.php', array( - 'lang_common' => $lang_common, 'message' => $msg, 'no_back_link' => $no_back_link, )); @@ -1018,10 +1017,10 @@ function message($msg, $http_status = null, $no_back_link = false, $dontStop = f // function format_time($timestamp, $date_only = false, $date_format = null, $time_format = null, $time_only = false, $no_text = false) { - global $lang_common, $forum_date_formats, $forum_time_formats; + global $forum_date_formats, $forum_time_formats; if ($timestamp == '') { - return $lang_common['Never']; + return __('Never'); } // Get Slim current session @@ -1045,9 +1044,9 @@ function format_time($timestamp, $date_only = false, $date_format = null, $time_ if (!$no_text) { if ($date == $today) { - $date = $lang_common['Today']; + $date = __('Today'); } elseif ($date == $yesterday) { - $date = $lang_common['Yesterday']; + $date = __('Yesterday'); } } @@ -1066,9 +1065,9 @@ function format_time($timestamp, $date_only = false, $date_format = null, $time_ // function forum_number_format($number, $decimals = 0) { - global $lang_common; - return is_numeric($number) ? number_format($number, $decimals, $lang_common['lang_decimal_point'], $lang_common['lang_thousands_sep']) : $number; + + return is_numeric($number) ? number_format($number, $decimals, __('lang_decimal_point'), __('lang_thousands_sep')) : $number; } @@ -1243,7 +1242,7 @@ function is_all_uppercase($string) // function maintenance_message() { - global $lang_common, $feather_config, $tpl_main; + global $feather_config, $tpl_main; // Deal with newlines, tabs and multiple spaces $pattern = array("\t", ' ', ' '); @@ -1253,7 +1252,7 @@ function maintenance_message() // Get Slim current session $feather = \Slim\Slim::getInstance(); - $page_title = array(feather_escape($feather_config['o_board_title']), $lang_common['Maintenance']); + $page_title = array(feather_escape($feather_config['o_board_title']), __('Maintenance')); if (!defined('FEATHER_ACTIVE_PAGE')) { define('FEATHER_ACTIVE_PAGE', 'index'); @@ -1269,7 +1268,6 @@ function maintenance_message() $header->setTitle($page_title)->display(); $feather->render('message.php', array( - 'lang_common' => $lang_common, 'message' => $message, 'no_back_link' => '', ) @@ -1411,15 +1409,13 @@ function remove_bad_characters($array) // function file_size($size) { - global $lang_common; - $units = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'); for ($i = 0; $size > 1024; $i++) { $size /= 1024; } - return sprintf($lang_common['Size unit '.$units[$i]], round($size, 2)); + return sprintf(__('Size unit '.$units[$i]), round($size, 2)); } @@ -1707,19 +1703,19 @@ function forum_is_writable($path) // function display_saved_queries() { - global $lang_common; + ?>
    -

    +

    - - + + @@ -1738,7 +1734,7 @@ function display_saved_queries() } ?> - +
    diff --git a/include/l10n.php b/include/l10n.php new file mode 100644 index 00000000..ce27af92 --- /dev/null +++ b/include/l10n.php @@ -0,0 +1,75 @@ + + */ +function load_textdomain($domain, $mofile) { + + global $l10n; + + if (!is_readable($mofile)) { + return false; + } + + $mo = new MO(); + if (!$mo->import_from_file($mofile)) { + return false; + } + + if (isset($l10n[$domain])) { + $mo->merge_with($l10n[$domain]); + } + + $l10n[$domain] = &$mo; + + return true; +} + +function __($text, $domain = 'featherbb') { + + return luna_translate($text, $domain); +} + +function _e($text, $domain = 'featherbb') { + + echo luna_translate($text, $domain); +} + +function _n($single, $plural, $number, $domain = 'featherbb') { + + $translations = load_translations($domain); + $translation = $translations->translate_plural($single, $plural, $number); + + return $translation; +} + +function luna_translate($text, $domain = 'featherbb') { + + $translations = load_translations($domain); + $translations = $translations->translate($text); + + return $translations; +} + +function load_translations($domain) { + + global $l10n; + + if (!isset($l10n[$domain])) { + $l10n[$domain] = new NOOPTranslations; + } + + return $l10n[$domain]; +} \ No newline at end of file diff --git a/include/parser.php b/include/parser.php index 69e287dc..69ee422d 100644 --- a/include/parser.php +++ b/include/parser.php @@ -118,7 +118,7 @@ function matches one BBCode open/close pair. The BBCode tag components are *********************************************************** */ function _preparse_bbcode_callback($matches) { - global $lang_common, $errors, $pd; + global $errors, $pd; // Get Slim current session $feather = \Slim\Slim::getInstance(); @@ -143,7 +143,7 @@ function _preparse_bbcode_callback($matches) if ($contents === null) { // On error, preg_replace_callback returns NULL. // Error #1: '(%s) Message is too long or too complex. Please shorten.' - $new_errors[] = sprintf($lang_common['BBerr pcre'], preg_error()); + $new_errors[] = sprintf(__('BBerr pcre'), preg_error()); $contents = ''; // Zero out the contents. } } @@ -179,22 +179,22 @@ function _preparse_bbcode_callback($matches) // which is either unexpected or unrecognized. // Error #2: 'Unexpected attribute: "%1$s". (No attribute allowed for [%2$s].'. $handler =& $pd['bbcd']['_ROOT_']['handlers']['NO_ATTRIB']; - $new_errors[] = sprintf($lang_common['BBerr unexpected attribute'], $attribute, $tagname); + $new_errors[] = sprintf(__('BBerr unexpected attribute'), $attribute, $tagname); } else { // Error #3: 'Unrecognized attribute: "%1$s", is not valid for [%2$s].' $handler =& $pd['bbcd']['_ROOT_']['handlers']['NO_ATTRIB']; - $new_errors[] = sprintf($lang_common['BBerr unrecognized attribute'], $attribute, $tagname); + $new_errors[] = sprintf(__('BBerr unrecognized attribute'), $attribute, $tagname); } // Make sure attribute does nor contain a valid BBcode tag. if (preg_match($pd['re_bbtag'], $attribute)) { // Error #4: 'Attribute may NOT contain open or close bbcode tags' $handler =& $pd['bbcd']['_ROOT_']['handlers']['NO_ATTRIB']; - $new_errors[] = $lang_common['BBerr bbcode attribute']; + $new_errors[] = __('BBerr bbcode attribute'); } // Validate and filter tag's attribute value if and according to custom attribute regex. if (isset($handler['a_regex'])) { // Check if this tag has an attribute regex? (very rare) if (preg_match($handler['a_regex'], $attribute, $m)) { // Yes. Check if regex matches attribute? $attribute = $m[1]; } else { // Error #4b: 'Invalid attribute, [%s] requires specific attribute.' - $new_errors[] = sprintf($lang_common['BBerr invalid attrib'], $tagname); + $new_errors[] = sprintf(__('BBerr invalid attrib'), $tagname); } } } else { // Attribute not specified. Use the NO_ATTRIB handler if it exixts else error. @@ -204,7 +204,7 @@ function _preparse_bbcode_callback($matches) $handler =& $tag['handlers']['NO_ATTRIB']; // no-attribute handler. Otherwise... } else { // Error #5: '[%1$s] is missing a required attribute.'. $handler =& $pd['bbcd']['_ROOT_']['handlers']['NO_ATTRIB']; - $new_errors[] = sprintf($lang_common['BBerr missing attribute'], $tagname); + $new_errors[] = sprintf(__('BBerr missing attribute'), $tagname); } } // ------------------------------------------------------- @@ -220,7 +220,7 @@ function _preparse_bbcode_callback($matches) $fmt_open = $fmt_close = ''; break; case 'err': // Error #6: '[%1$s] tag nesting depth: %2$d exceeds allowable limit: %3$d.'. - $new_errors[] = sprintf($lang_common['BBerr nesting overflow'], + $new_errors[] = sprintf(__('BBerr nesting overflow'), $tagname, $tag['depth'], $tag['depth_max']); break; default: @@ -231,14 +231,14 @@ function _preparse_bbcode_callback($matches) // Are we illegitimate? // Yes. Pick between error #6 and #7. if ($parent === $tagname) { // Error #7: '[%s] was opened within itself, this is not allowed.' - $new_errors[] = sprintf($lang_common['BBerr self-nesting'], $tagname); + $new_errors[] = sprintf(__('BBerr self-nesting'), $tagname); } else { // Error #8: '[%1$s] was opened within [%2$s], this is not allowed.' - $new_errors[] = sprintf($lang_common['BBerr invalid nesting'], $tagname, $parent); + $new_errors[] = sprintf(__('BBerr invalid nesting'), $tagname, $parent); } } // Verfify our parent tag is in our 'parents' allowable array if it exists. if (isset($tag['parents']) && !isset($tag['parents'][$parent])) { // Error #9: '[%1$s] cannot be within: [%2$s]. Allowable parent tags: %3$s.'. - $new_errors[] = sprintf($lang_common['BBerr invalid parent'], + $new_errors[] = sprintf(__('BBerr invalid parent'), $tagname, $parent, '('. implode('), (', array_keys($tag['parents'])) .')'); } // ----------------------------------------- @@ -266,18 +266,18 @@ function _preparse_bbcode_callback($matches) $contents = preg_replace(array('/^\s+/', '/\s+$/S'), '', $contents); // Handle special case link to a if ($feather->user->g_post_links != '1') { - $new_errors[] = $lang_common['BBerr cannot post URLs']; + $new_errors[] = __('BBerr cannot post URLs'); } else if (($m = url_valid($contents))) { $contents = $m['url']; // Fetch possibly more complete url address. } else { // Error #10a: 'Invalid URL name: %s'. - $new_errors[] = sprintf($lang_common['BBerr Invalid URL name'], $contents); + $new_errors[] = sprintf(__('BBerr Invalid URL name'), $contents); } break; case 'email': if (filter_var($contents, FILTER_VALIDATE_EMAIL)) { // Error #10c: 'Invalid email address: %s'. - $new_errors[] = sprintf($lang_common['BBerr Invalid email address'], $contents); + $new_errors[] = sprintf(__('BBerr Invalid email address'), $contents); } break; @@ -308,20 +308,20 @@ function _preparse_bbcode_callback($matches) if (($m = url_valid($attribute))) { $attribute = $m['url']; // Fetch possibly more complete url address. } else { // Error #10b: 'Invalid URL name: %s'. - $new_errors[] = sprintf($lang_common['BBerr Invalid URL name'], $attribute); + $new_errors[] = sprintf(__('BBerr Invalid URL name'), $attribute); } break; case 'color': if (!preg_match($pd['re_color'], $attribute)) { // Error #11: 'Invalid color attribute: %s'. - $new_errors[] = sprintf($lang_common['BBerr Invalid color'], $attribute); + $new_errors[] = sprintf(__('BBerr Invalid color'), $attribute); } break; case 'email': // TODO: improve this quick-n-dirty email check. if (!preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i', $attribute)) { // Error #10c: 'Invalid email address: %s'. - $new_errors[] = sprintf($lang_common['BBerr Invalid email address'], $attribute); + $new_errors[] = sprintf(__('BBerr Invalid email address'), $attribute); } break; @@ -376,13 +376,13 @@ function _preparse_bbcode_callback($matches) } // Else remote image fits. Do nothing special with width and height. } } else { // Error #13: 'Unable to retrieve image data from remote url: %s'. - $new_errors[] = sprintf($lang_common['BBerr bad meta data'], $contents); + $new_errors[] = sprintf(__('BBerr bad meta data'), $contents); } // NOTE: cannot generate this error. } else { // Filesize of remote image is too big. Silently convert to link if possible. if (isset($pd['bbcd']['url']) && $pd['bbcd']['url']['depth'] === 0) { $fmt_open = '{[url='. $contents .']'; $fmt_close = '[/url]}'; - $contents = $lang_common['BBmsg big image']; + $contents = __('BBmsg big image'); } else { // Image within a url cannot be linkified. Just display url name. $contents = '{'. $contents .'}'; $fmt_open = ''; @@ -392,16 +392,16 @@ function _preparse_bbcode_callback($matches) } else { // $size not set. // Error #14: 'Unable to determine remote file size.'. - $new_errors[] = $lang_common['BBerr no file size']; + $new_errors[] = __('BBerr no file size'); } // NOTE: cannot generate this error. } else { // Error #15: 'Remote url does not have Content-Type: "image".' - $new_errors[] = $lang_common['BBerr non image']; + $new_errors[] = __('BBerr non image'); } } else { // Error #16: 'Bad HTTP response header: "%s"'. - $new_errors[] = sprintf($lang_common['BBerr bad http response'], $http[0]); + $new_errors[] = sprintf(__('BBerr bad http response'), $http[0]); } } else { // Error #17: 'Unable to read remote image http headers.'. - $new_errors[] = $lang_common['BBerr bad headers']; + $new_errors[] = __('BBerr bad headers'); } } // Image validation turned off. Do nothing. } else { // Non-Error: IMG tag self nesting. Handle by silently stripping tags with no error. @@ -507,7 +507,7 @@ function _preparse_bbcode_callback($matches) if (preg_match($handler['c_regex'], $contents, $m)) { $contents = $m[1]; } else { // Error #12: 'Invalid content, [%s] requires specific content.' - $new_errors[] = sprintf($lang_common['BBerr invalid content'], $tagname); + $new_errors[] = sprintf(__('BBerr invalid content'), $tagname); } } // Silently strip empty or all-white tags: @@ -572,7 +572,7 @@ function _preparse_bbcode_callback($matches) */ function preparse_bbcode($text, &$errors, $is_signature = false) { - global $lang_common, $feather_config, $pd; + global $feather_config, $pd; $pd['new_errors'] = array(); // Reset the parser error message stack. $pd['in_signature'] = ($is_signature) ? true : false; @@ -581,7 +581,7 @@ function preparse_bbcode($text, &$errors, $is_signature = false) if ($newtext === null) { // On error, preg_replace_callback returns NULL. // Error #1: '(%s) Message is too long or too complex. Please shorten.' - $errors[] = sprintf($lang_common['BBerr pcre'], preg_error()); + $errors[] = sprintf(__('BBerr pcre'), preg_error()); return $text; } $newtext = str_replace("\3", '[', $newtext); // Fixup CODE sections. @@ -628,11 +628,11 @@ function preparse_bbcode($text, &$errors, $is_signature = false) // function _orphan_callback($matches) { - global $pd, $lang_common; + global $pd; if ($matches[0][1] === '/') { // Error #18: 'Orphan close tag: [/%s] is missing its open tag.' - $errmsg = sprintf($lang_common['BBerr orphan close'], $matches[1]); + $errmsg = sprintf(__('BBerr orphan close'), $matches[1]); } else { // Error #19: 'Orphan open tag: [%s] is missing its close tag.' - $errmsg = sprintf($lang_common['BBerr orphan open'], $matches[1]); + $errmsg = sprintf(__('BBerr orphan open'), $matches[1]); } $pd['new_errors'][] = $errmsg; // Append to array of errors so far. return '[err='. $errmsg .']'. $matches[0] .'[/err]'; @@ -731,7 +731,7 @@ function preg_error() *********************************************************** */ function _parse_bbcode_callback($matches) { - global $pd, $lang_common; + global $pd; $tagname =& $matches[1]; // TAGNAME we are currently servicing. $contents =& $matches[6]; // Shortcut to contents. $tag =& $pd['bbcd'][$tagname]; // Shortcut to bbcd array entry. @@ -852,10 +852,10 @@ function _parse_bbcode_callback($matches) $format = "{%c_str%}"; } else { if ($attribute) { - $format = '{'. $lang_common['Image link'] .'}'; + $format = '{'. __('Image link') .'}'; } else { - $format = '{'. - $lang_common['Image link'] .'}'; + $format = '{'. + __('Image link') .'}'; } $enabled = true; // Re-enable to override defauslt disabled handling (i.e. dont delete.) } @@ -879,12 +879,12 @@ function _parse_bbcode_callback($matches) // Check for optional embedded post id. // Attribute has optional '#1234' quoted post ID number. Convert to link back to quoted post. $attribute = preg_replace('/\s*#\d++$/S', '', $attribute); // Strip post id from attribute. - $attribute .= ' '. $lang_common['wrote']; // Append language-specific "wrote:". + $attribute .= ' '. __('wrote'); // Append language-specific "wrote:". if ($pd['config']['quote_links']) { $attribute = ' '. $attribute .''; } } else { - $attribute .= ' '. $lang_common['wrote']; + $attribute .= ' '. __('wrote'); } // If no post id, just add "wrote:". } break; diff --git a/include/pomo/.editorconfig b/include/pomo/.editorconfig new file mode 100644 index 00000000..a6c9cc43 --- /dev/null +++ b/include/pomo/.editorconfig @@ -0,0 +1,16 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[*.php] +indent_size = 4 diff --git a/include/pomo/MO.php b/include/pomo/MO.php new file mode 100644 index 00000000..d3a25de3 --- /dev/null +++ b/include/pomo/MO.php @@ -0,0 +1,313 @@ +is_resource()) { + return false; + } + + return $this->import_from_reader($reader); + } + + public function export_to_file($filename) + { + $fh = fopen($filename, 'wb'); + if (!$fh) { + return false; + } + $res = $this->export_to_file_handle($fh); + fclose($fh); + + return $res; + } + + public function export() + { + $tmp_fh = fopen("php://temp", 'r+'); + if (!$tmp_fh) { + return false; + } + $this->export_to_file_handle($tmp_fh); + rewind($tmp_fh); + + return stream_get_contents($tmp_fh); + } + + public function is_entry_good_for_export($entry) + { + if (empty($entry->translations)) { + return false; + } + + if (!array_filter($entry->translations)) { + return false; + } + + return true; + } + + public function export_to_file_handle($fh) + { + $entries = array_filter( + $this->entries, + array($this, 'is_entry_good_for_export') + ); + ksort($entries); + $magic = 0x950412de; + $revision = 0; + $total = count($entries) + 1; // all the headers are one entry + $originals_lenghts_addr = 28; + $translations_lenghts_addr = $originals_lenghts_addr + 8 * $total; + $size_of_hash = 0; + $hash_addr = $translations_lenghts_addr + 8 * $total; + $current_addr = $hash_addr; + fwrite($fh, pack( + 'V*', + $magic, + $revision, + $total, + $originals_lenghts_addr, + $translations_lenghts_addr, + $size_of_hash, + $hash_addr + )); + fseek($fh, $originals_lenghts_addr); + + // headers' msgid is an empty string + fwrite($fh, pack('VV', 0, $current_addr)); + $current_addr++; + $originals_table = chr(0); + + $reader = new Reader(); + + foreach ($entries as $entry) { + $originals_table .= $this->export_original($entry) . chr(0); + $length = $reader->strlen($this->export_original($entry)); + fwrite($fh, pack('VV', $length, $current_addr)); + $current_addr += $length + 1; // account for the NULL byte after + } + + $exported_headers = $this->export_headers(); + fwrite($fh, pack( + 'VV', + $reader->strlen($exported_headers), + $current_addr) + ); + $current_addr += strlen($exported_headers) + 1; + $translations_table = $exported_headers . chr(0); + + foreach ($entries as $entry) { + $translations_table .= $this->export_translations($entry).chr(0); + $length = $reader->strlen($this->export_translations($entry)); + fwrite($fh, pack('VV', $length, $current_addr)); + $current_addr += $length + 1; + } + + fwrite($fh, $originals_table); + fwrite($fh, $translations_table); + + return true; + } + + public function export_original($entry) + { + //TODO: warnings for control characters + $exported = $entry->singular; + if ($entry->is_plural) { + $exported .= chr(0).$entry->plural; + } + if (!is_null($entry->context)) { + $exported = $entry->context.chr(4).$exported; + } + + return $exported; + } + + public function export_translations($entry) + { + //TODO: warnings for control characters + return implode(chr(0), $entry->translations); + } + + public function export_headers() + { + $exported = ''; + foreach ($this->headers as $header => $value) { + $exported .= "$header: $value\n"; + } + + return $exported; + } + + public function get_byteorder($magic) + { + // The magic is 0x950412de + $magic_little = (int) - 1794895138; + $magic_little_64 = (int) 2500072158; + // 0xde120495 + $magic_big = ((int) - 569244523) & 0xFFFFFFFF; + if ($magic_little == $magic || $magic_little_64 == $magic) { + return 'little'; + } elseif ($magic_big == $magic) { + return 'big'; + } else { + return false; + } + } + + public function import_from_reader($reader) + { + $endian_string = $this->get_byteorder($reader->readint32()); + if (false === $endian_string) { + return false; + } + $reader->setEndian($endian_string); + + $endian = ('big' == $endian_string) ? 'N' : 'V'; + + $header = $reader->read(24); + if ($reader->strlen($header) != 24) { + return false; + } + + // parse header + $header = unpack("{$endian}revision/{$endian}total/{$endian}originals_lenghts_addr/{$endian}translations_lenghts_addr/{$endian}hash_length/{$endian}hash_addr", $header); + if (!is_array($header)) { + return false; + } + + // support revision 0 of MO format specs, only + if ($header['revision'] != 0) { + return false; + } + + // seek to data blocks + $reader->seekto($header['originals_lenghts_addr']); + + // read originals' indices + $originals_lengths_length = $header['translations_lenghts_addr'] - $header['originals_lenghts_addr']; + if ($originals_lengths_length != $header['total'] * 8) { + return false; + } + + $originals = $reader->read($originals_lengths_length); + if ($reader->strlen($originals) != $originals_lengths_length) { + return false; + } + + // read translations' indices + $translations_lenghts_length = $header['hash_addr'] - $header['translations_lenghts_addr']; + if ($translations_lenghts_length != $header['total'] * 8) { + return false; + } + + $translations = $reader->read($translations_lenghts_length); + if ($reader->strlen($translations) != $translations_lenghts_length) { + return false; + } + + // transform raw data into set of indices + $originals = $reader->str_split($originals, 8); + $translations = $reader->str_split($translations, 8); + + // skip hash table + $strings_addr = $header['hash_addr'] + $header['hash_length'] * 4; + + $reader->seekto($strings_addr); + + $strings = $reader->read_all(); + $reader->close(); + + for ($i = 0; $i < $header['total']; $i++) { + $o = unpack("{$endian}length/{$endian}pos", $originals[$i]); + $t = unpack("{$endian}length/{$endian}pos", $translations[$i]); + if (!$o || !$t) { + return false; + } + + // adjust offset due to reading strings to separate space before + $o['pos'] -= $strings_addr; + $t['pos'] -= $strings_addr; + + $original = $reader->substr($strings, $o['pos'], $o['length']); + $translation = $reader->substr($strings, $t['pos'], $t['length']); + + if ('' === $original) { + $this->set_headers($this->make_headers($translation)); + } else { + $entry = &$this->make_entry($original, $translation); + $this->entries[$entry->key()] = &$entry; + } + } + + return true; + } + + /** + * Build a EntryTranslations from original string and translation strings, + * found in a MO file + * + * @param string $original original string to translate from MO file. + * Might contain 0x04 as context separator or + * 0x00 as singular/plural separator + * @param string $translation translation string from MO file.Might contain + * 0x00 as a plural translations separator + * @retrun EntryTranslations New entry + */ + public static function &make_entry($original, $translation) { + $entry = new EntryTranslations(); + // look for context + $parts = explode(chr(4), $original); + if (isset($parts[1])) { + $original = $parts[1]; + $entry->context = $parts[0]; + } + // look for plural original + $parts = explode(chr(0), $original); + $entry->singular = $parts[0]; + if (isset($parts[1])) { + $entry->is_plural = true; + $entry->plural = $parts[1]; + } + // plural translations are also separated by \0 + $entry->translations = explode(chr(0), $translation); + + return $entry; + } + + public function select_plural_form($count) + { + return $this->gettext_select_plural_form($count); + } + + public function get_plural_forms_count() + { + return $this->_nplurals; + } +} diff --git a/include/pomo/PO.php b/include/pomo/PO.php new file mode 100644 index 00000000..6a057631 --- /dev/null +++ b/include/pomo/PO.php @@ -0,0 +1,494 @@ +headers as $header => $value) { + $header_string.= "$header: $value\n"; + } + $poified = PO::poify($header_string); + if ($this->comments_before_headers) { + $before_headers = PO::prepend_each_line(rtrim( + $this->comments_before_headers)."\n", '# ' + ); + } else { + $before_headers = ''; + } + + return rtrim("{$before_headers}msgid \"\"\nmsgstr $poified"); + } + + /** + * Exports all entries to PO format + * + * @return string sequence of mgsgid/msgstr PO strings, doesn't containt + * newline at the end + */ + public function export_entries() + { + //TODO: sorting + return implode("\n\n", array_map( + array(__CLASS__, 'export_entry'), + $this->entries) + ); + } + + /** + * Exports the whole PO file as a string + * + * @param bool $include_headers whether to include the headers in the + * export + * @return string ready for inclusion in PO file string for headers and all + * the enrtries + */ + public function export($include_headers = true) + { + $res = ''; + if ($include_headers) { + $res .= $this->export_headers(); + $res .= "\n\n"; + } + $res .= $this->export_entries(); + + return $res; + } + + /** + * Same as {@link export}, but writes the result to a file + * + * @param string $filename where to write the PO string + * @param bool $include_headers whether to include tje headers in the + * export + * @return bool true on success, false on error + */ + public function export_to_file($filename, $include_headers = true) + { + $fh = fopen($filename, 'w'); + if (false === $fh) { + return false; + } + $export = $this->export($include_headers); + $res = fwrite($fh, $export); + if (false === $res) { + return false; + } + + return fclose($fh); + } + + /** + * Text to include as a comment before the start of the PO contents + * + * Doesn't need to include # in the beginning of lines, these are added + * automatically + * + * @param string $text Comment text + */ + public function set_comment_before_headers($text) + { + $this->comments_before_headers = $text; + } + + /** + * Formats a string in PO-style + * + * @param string $string the string to format + * @return string the poified string + */ + public static function poify($string) + { + $quote = '"'; + $slash = '\\'; + $newline = "\n"; + + $replaces = array( + "$slash" => "$slash$slash", + "$quote" => "$slash$quote", + "\t" => '\t', + ); + + $string = str_replace( + array_keys($replaces), + array_values($replaces), + $string + ); + + $po = $quote.implode( + "${slash}n$quote$newline$quote", + explode($newline, $string) + ).$quote; + // add empty string on first line for readbility + if (false !== strpos($string, $newline) && + (substr_count($string, $newline) > 1 || + !($newline === substr($string, -strlen($newline))))) { + $po = "$quote$quote$newline$po"; + } + // remove empty strings + $po = str_replace("$newline$quote$quote", '', $po); + + return $po; + } + + /** + * Gives back the original string from a PO-formatted string + * + * @param string $string PO-formatted string + * @return string enascaped string + */ + public static function unpoify($string) + { + $escapes = array('t' => "\t", 'n' => "\n", '\\' => '\\'); + $lines = array_map('trim', explode("\n", $string)); + $lines = array_map(array(__CLASS__, 'trim_quotes'), $lines); + $unpoified = ''; + $previous_is_backslash = false; + foreach ($lines as $line) { + preg_match_all('/./u', $line, $chars); + $chars = $chars[0]; + foreach ($chars as $char) { + if (!$previous_is_backslash) { + if ('\\' == $char) { + $previous_is_backslash = true; + } else { + $unpoified .= $char; + } + } else { + $previous_is_backslash = false; + $unpoified .= isset($escapes[$char]) ? + $escapes[$char] : + $char; + } + } + } + + return $unpoified; + } + + /** + * Inserts $with in the beginning of every new line of $string and + * returns the modified string + * + * @param string $string prepend lines in this string + * @param string $with prepend lines with this string + * @return string The modified string + */ + public static function prepend_each_line($string, $with) + { + $php_with = var_export($with, true); + $lines = explode("\n", $string); + // do not prepend the string on the last empty line, artefact by explode + if ("\n" == substr($string, -1)) { + unset($lines[count($lines) - 1]); + } + $res = implode("\n", array_map( + create_function('$x', "return $php_with.\$x;"), + $lines + )); + // give back the empty line, we ignored above + if ("\n" == substr($string, -1)) { + $res .= "\n"; + } + + return $res; + } + + /** + * Prepare a text as a comment -- wraps the lines and prepends # + * and a special character to each line + * + * @param string $text the comment text + * @param string $char character to denote a special PO comment, + * like :, default is a space + * @return string The modified string + */ + private static function comment_block($text, $char=' ') + { + $text = wordwrap($text, self::MAX_LINE_LEN - 3); + + return self::prepend_each_line($text, "#$char "); + } + + /** + * Builds a string from the entry for inclusion in PO file + * + * @param object &$entry the entry to convert to po string + * @return string|bool PO-style formatted string for the entry or + * false if the entry is empty + */ + public static function export_entry(&$entry) + { + if (is_null($entry->singular)) { + return false; + } + $po = array(); + if (!empty($entry->translator_comments)) { + $po[] = self::comment_block($entry->translator_comments); + } + if (!empty($entry->extracted_comments)) { + $po[] = self::comment_block($entry->extracted_comments, '.'); + } + if (!empty($entry->references)) { + $po[] = self::comment_block(implode(' ', $entry->references), ':'); + } + if (!empty($entry->flags)) { + $po[] = self::comment_block(implode(", ", $entry->flags), ','); + } + if (!is_null($entry->context)) { + $po[] = 'msgctxt '.self::poify($entry->context); + } + $po[] = 'msgid '.self::poify($entry->singular); + if (!$entry->is_plural) { + $translation = empty($entry->translations) ? + '' : + $entry->translations[0]; + $po[] = 'msgstr '.self::poify($translation); + } else { + $po[] = 'msgid_plural '.self::poify($entry->plural); + $translations = empty($entry->translations) ? + array('', '') : + $entry->translations; + foreach ($translations as $i => $translation) { + $po[] = "msgstr[$i] ".self::poify($translation); + } + } + + return implode("\n", $po); + } + + public function import_from_file($filename) + { + $f = fopen($filename, 'r'); + if (!$f) { + return false; + } + $lineno = 0; + while (true) { + $res = $this->read_entry($f, $lineno); + if (!$res) { + break; + } + if ($res['entry']->singular == '') { + $this->set_headers( + $this->make_headers($res['entry']->translations[0]) + ); + } else { + $this->add_entry($res['entry']); + } + } + PO::read_line($f, 'clear'); + if (false === $res) { + return false; + } + if (! $this->headers && ! $this->entries) { + return false; + } + + return true; + } + + public function read_entry($f, $lineno = 0) + { + $entry = new EntryTranslations(); + // where were we in the last step + // can be: comment, msgctxt, msgid, msgid_plural, msgstr, msgstr_plural + $context = ''; + $msgstr_index = 0; + $is_final = create_function('$context', 'return $context == "msgstr" || $context == "msgstr_plural";'); + while (true) { + $lineno++; + $line = PO::read_line($f); + if (!$line) { + if (feof($f)) { + if ($is_final($context)) { + break; + } elseif (!$context) {// we haven't read a line and eof came + + return null; + } else { + return false; + } + } else { + return false; + } + } + if ($line == "\n") { + continue; + } + + $line = trim($line); + if (preg_match('/^#/', $line, $m)) { + // the comment is the start of a new entry + if ($is_final($context)) { + PO::read_line($f, 'put-back'); + $lineno--; + break; + } + // comments have to be at the beginning + if ($context && $context != 'comment') { + return false; + } + // add comment + $this->add_comment_to_entry($entry, $line); + } elseif (preg_match('/^msgctxt\s+(".*")/', $line, $m)) { + if ($is_final($context)) { + PO::read_line($f, 'put-back'); + $lineno--; + break; + } + if ($context && $context != 'comment') { + return false; + } + $context = 'msgctxt'; + $entry->context .= PO::unpoify($m[1]); + } elseif (preg_match('/^msgid\s+(".*")/', $line, $m)) { + if ($is_final($context)) { + PO::read_line($f, 'put-back'); + $lineno--; + break; + } + if ($context && + $context != 'msgctxt' && + $context != 'comment') { + return false; + } + $context = 'msgid'; + $entry->singular .= PO::unpoify($m[1]); + } elseif (preg_match('/^msgid_plural\s+(".*")/', $line, $m)) { + if ($context != 'msgid') { + return false; + } + $context = 'msgid_plural'; + $entry->is_plural = true; + $entry->plural .= PO::unpoify($m[1]); + } elseif (preg_match('/^msgstr\s+(".*")/', $line, $m)) { + if ($context != 'msgid') { + return false; + } + $context = 'msgstr'; + $entry->translations = array(PO::unpoify($m[1])); + } elseif (preg_match('/^msgstr\[(\d+)\]\s+(".*")/', $line, $m)) { + if ($context != 'msgid_plural' && $context != 'msgstr_plural') { + return false; + } + $context = 'msgstr_plural'; + $msgstr_index = $m[1]; + $entry->translations[$m[1]] = PO::unpoify($m[2]); + } elseif (preg_match('/^".*"$/', $line)) { + $unpoified = PO::unpoify($line); + switch ($context) { + case 'msgid': + $entry->singular .= $unpoified; + break; + case 'msgctxt': + $entry->context .= $unpoified; + break; + case 'msgid_plural': + $entry->plural .= $unpoified; + break; + case 'msgstr': + $entry->translations[0] .= $unpoified; + break; + case 'msgstr_plural': + $entry->translations[$msgstr_index] .= $unpoified; + break; + default: + return false; + } + } else { + return false; + } + } + if (array() == array_filter( + $entry->translations, + create_function('$t', 'return $t || "0" === $t;')) + ) { + $entry->translations = array(); + } + + return array('entry' => $entry, 'lineno' => $lineno); + } + + public static function read_line($f, $action = 'read') + { + static $last_line = ''; + static $use_last_line = false; + if ('clear' == $action) { + $last_line = ''; + + return true; + } + if ('put-back' == $action) { + $use_last_line = true; + + return true; + } + $line = $use_last_line ? $last_line : fgets($f); + $line = ( "\r\n" == substr( $line, -2 ) ) ? + rtrim( $line, "\r\n" ) . "\n" : + $line; + $last_line = $line; + $use_last_line = false; + + return $line; + } + + public function add_comment_to_entry(&$entry, $po_comment_line) + { + $first_two = substr($po_comment_line, 0, 2); + $comment = trim(substr($po_comment_line, 2)); + if ('#:' == $first_two) { + $entry->references = array_merge( + $entry->references, + preg_split('/\s+/', $comment) + ); + } elseif ('#.' == $first_two) { + $entry->extracted_comments = trim( + $entry->extracted_comments . "\n" . $comment + ); + } elseif ('#,' == $first_two) { + $entry->flags = array_merge( + $entry->flags, + preg_split('/,\s*/', $comment) + ); + } else { + $entry->translator_comments = trim( + $entry->translator_comments . "\n" . $comment + ); + } + } + + public static function trim_quotes($s) + { + if ( substr($s, 0, 1) == '"') { + $s = substr($s, 1); + } + if ( substr($s, -1, 1) == '"') { + $s = substr($s, 0, -1); + } + + return $s; + } +} diff --git a/include/pomo/Streams/CachedFileReader.php b/include/pomo/Streams/CachedFileReader.php new file mode 100644 index 00000000..5d93121e --- /dev/null +++ b/include/pomo/Streams/CachedFileReader.php @@ -0,0 +1,25 @@ + + */ +class CachedFileReader extends StringReader +{ + public function __construct($filename) + { + parent::__construct(); + $this->_str = file_get_contents($filename); + if (false === $this->_str) { + return false; + } + $this->_pos = 0; + } +} diff --git a/include/pomo/Streams/CachedIntFileReader.php b/include/pomo/Streams/CachedIntFileReader.php new file mode 100644 index 00000000..17a8e50e --- /dev/null +++ b/include/pomo/Streams/CachedIntFileReader.php @@ -0,0 +1,20 @@ + + */ +class CachedIntFileReader extends CachedFileReader +{ + public function __construct($filename) + { + parent::__construct($filename); + } +} diff --git a/include/pomo/Streams/FileReader.php b/include/pomo/Streams/FileReader.php new file mode 100644 index 00000000..983df271 --- /dev/null +++ b/include/pomo/Streams/FileReader.php @@ -0,0 +1,60 @@ + + */ +class FileReader extends Reader +{ + public function __construct($filename) + { + parent::__construct(); + $this->_f = fopen($filename, 'rb'); + } + + public function read($bytes) + { + return fread($this->_f, $bytes); + } + + public function seekto($pos) + { + if (-1 == fseek($this->_f, $pos, SEEK_SET)) { + return false; + } + $this->_pos = $pos; + + return true; + } + + public function is_resource() + { + return is_resource($this->_f); + } + + public function feof() + { + return feof($this->_f); + } + + public function close() + { + return fclose($this->_f); + } + + public function read_all() + { + $all = ''; + while (!$this->feof()) + $all .= $this->read(4096); + + return $all; + } +} diff --git a/include/pomo/Streams/Reader.php b/include/pomo/Streams/Reader.php new file mode 100644 index 00000000..ced42eb6 --- /dev/null +++ b/include/pomo/Streams/Reader.php @@ -0,0 +1,120 @@ + + */ +class Reader +{ + public $endian = 'little'; + public $_post = ''; + + public function __construct() + { + $this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && + function_exists('mb_substr'); + $this->_pos = 0; + } + + /** + * Sets the endianness of the file. + * + * @param $endian string 'big' or 'little' + */ + public function setEndian($endian) + { + $this->endian = $endian; + } + + /** + * Reads a 32bit Integer from the Stream + * + * @return mixed The integer, corresponding to the next 32 bits from the + * stream of false if there are not enough bytes or on error + */ + public function readint32() + { + $bytes = $this->read(4); + if (4 != $this->strlen($bytes)) { + return false; + } + $endian_letter = ('big' == $this->endian) ? 'N' : 'V'; + $int = unpack($endian_letter, $bytes); + + return array_shift($int); + } + + /** + * Reads an array of 32-bit Integers from the Stream + * + * @param integer count How many elements should be read + * @return mixed Array of integers or false if there isn't + * enough data or on error + */ + public function readint32array($count) + { + $bytes = $this->read(4 * $count); + if (4*$count != $this->strlen($bytes)) { + return false; + } + $endian_letter = ('big' == $this->endian) ? 'N' : 'V'; + + return unpack($endian_letter.$count, $bytes); + } + + + public function substr($string, $start, $length) + { + if ($this->is_overloaded) { + return mb_substr($string, $start, $length, 'ascii'); + } else { + return substr($string, $start, $length); + } + } + + public function strlen($string) + { + if ($this->is_overloaded) { + return mb_strlen($string, 'ascii'); + } else { + return strlen($string); + } + } + + public function str_split($string, $chunk_size) + { + if (!function_exists('str_split')) { + $length = $this->strlen($string); + $out = array(); + for ($i = 0; $i < $length; $i += $chunk_size) { + $out[] = $this->substr($string, $i, $chunk_size); + } + + return $out; + } else { + return str_split($string, $chunk_size); + } + } + + public function pos() + { + return $this->_pos; + } + + public function is_resource() + { + return true; + } + + public function close() + { + return true; + } +} diff --git a/include/pomo/Streams/StringReader.php b/include/pomo/Streams/StringReader.php new file mode 100644 index 00000000..c0d1c3bb --- /dev/null +++ b/include/pomo/Streams/StringReader.php @@ -0,0 +1,61 @@ + + */ +class StringReader extends Reader +{ + public $_str = ''; + + public function __construct($str = '') + { + parent::__construct(); + $this->_str = $str; + $this->_pos = 0; + } + + public function read($bytes) + { + $data = $this->substr($this->_str, $this->_pos, $bytes); + $this->_pos += $bytes; + if ($this->strlen($this->_str) < $this->_pos) { + $this->_pos = $this->strlen($this->_str); + } + + return $data; + } + + public function seekto($pos) + { + $this->_pos = $pos; + if ($this->strlen($this->_str) < $this->_pos) { + $this->_pos = $this->strlen($this->_str); + } + + return $this->_pos; + } + + public function length() + { + return $this->strlen($this->_str); + } + + public function read_all() + { + return $this->substr( + $this->_str, + $this->_pos, + $this->strlen($this->_str) + ); + } + +} diff --git a/include/pomo/Translations/EntryTranslations.php b/include/pomo/Translations/EntryTranslations.php new file mode 100644 index 00000000..892a2718 --- /dev/null +++ b/include/pomo/Translations/EntryTranslations.php @@ -0,0 +1,89 @@ + $value) { + $this->$varname = $value; + } + if (isset($args['plural'])) { + $this->is_plural = true; + } + if (!is_array($this->translations)) { + $this->translations = array(); + } + if (!is_array($this->references)) { + $this->references = array(); + } + if (!is_array($this->flags)) { + $this->flags = array(); + } + } + + /** + * Generates a unique key for this entry + * + * @return string|bool the key or false if the entry is empty + */ + public function key() + { + if (is_null($this->singular)) { + return false; + } + // prepend context and EOT, like in MO files + return is_null($this->context) ? $this->singular : $this->context.chr(4).$this->singular; + } + + public function merge_with(&$other) + { + $this->flags = array_unique(array_merge($this->flags, $other->flags)); + $this->references = array_unique(array_merge($this->references, $other->references)); + if ($this->extracted_comments != $other->extracted_comments) { + $this->extracted_comments .= $other->extracted_comments; + } + + } +} diff --git a/include/pomo/Translations/GettextTranslations.php b/include/pomo/Translations/GettextTranslations.php new file mode 100644 index 00000000..857e05f7 --- /dev/null +++ b/include/pomo/Translations/GettextTranslations.php @@ -0,0 +1,127 @@ +_gettext_select_plural_form) + || is_null($this->_gettext_select_plural_form)) { + list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms')); + $this->_nplurals = $nplurals; + $this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression); + } + + return call_user_func($this->_gettext_select_plural_form, $count); + } + + public function nplurals_and_expression_from_header($header) + { + if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) { + $nplurals = (int) $matches[1]; + $expression = trim($this->parenthesize_plural_exression($matches[2])); + + return array($nplurals, $expression); + } else { + return array(2, 'n != 1'); + } + } + + /** + * Makes a function, which will return the right translation index, + * according to the plural forms header + * + * @param integer $nplurals + * @param string $expression + * @return integer The right translation index + */ + public function make_plural_form_function($nplurals, $expression) + { + $expression = str_replace('n', '$n', $expression); + $func_body = " + \$index = (int) ($expression); + + return (\$index < $nplurals) ? \$index : $nplurals - 1;"; + return create_function('$n', $func_body); + } + + /** + * Adds parantheses to the inner parts of ternary operators in + * plural expressions, because PHP evaluates ternary oerators + * from left to right + * + * @param string $expression the expression without parentheses + * @return string the expression with parentheses added + */ + public function parenthesize_plural_exression($expression) + { + $expression .= ';'; + $res = ''; + $depth = 0; + for ($i = 0; $i < strlen($expression); ++$i) { + $char = $expression[$i]; + switch ($char) { + case '?': + $res .= ' ? ('; + $depth++; + break; + case ':': + $res .= ') : ('; + break; + case ';': + $res .= str_repeat(')', $depth) . ';'; + $depth= 0; + break; + default: + $res .= $char; + } + } + + return rtrim($res, ';'); + } + + public function make_headers($translation) + { + $headers = array(); + // sometimes \ns are used instead of real new lines + $translation = str_replace('\n', "\n", $translation); + $lines = explode("\n", $translation); + foreach ($lines as $line) { + $parts = explode(':', $line, 2); + if (!isset($parts[1])) { + continue; + } + $headers[trim($parts[0])] = trim($parts[1]); + } + + return $headers; + } + + public function set_header($header, $value) + { + parent::set_header($header, $value); + if ('Plural-Forms' == $header) { + list($nplurals, $expression) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms')); + $this->_nplurals = $nplurals; + $this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression); + } + } +} diff --git a/include/pomo/Translations/NOOPTranslations.php b/include/pomo/Translations/NOOPTranslations.php new file mode 100644 index 00000000..f656f860 --- /dev/null +++ b/include/pomo/Translations/NOOPTranslations.php @@ -0,0 +1,104 @@ +key(); + if (false === $key) { + return false; + } + $this->entries[$key] = &$entry; + + return true; + } + + public function add_entry_or_merge($entry) + { + if (is_array($entry)) { + $entry = new EntryTranslations($entry); + } + $key = $entry->key(); + if (false === $key) { + return false; + } + if (isset($this->entries[$key])) { + $this->entries[$key]->merge_with($entry); + } else { + $this->entries[$key] = &$entry; + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function set_header($header, $value) + { + $this->headers[$header] = $value; + } + + /** + * {@inheritdoc} + */ + public function set_headers($headers) + { + foreach ($headers as $header => $value) { + $this->set_header($header, $value); + } + } + + /** + * {@inheritdoc} + */ + public function get_header($header) + { + return isset($this->headers[$header]) ? $this->headers[$header] : false; + } + + /** + * {@inheritdoc} + */ + public function translate_entry(&$entry) + { + $key = $entry->key(); + + return isset($this->entries[$key]) ? $this->entries[$key] : false; + } + + /** + * {@inheritdoc} + */ + public function translate($singular, $context = null) + { + $entry = new EntryTranslations(array( + 'singular' => $singular, + 'context' => $context + )); + $translated = $this->translate_entry($entry); + + return ($translated && !empty($translated->translations)) ? + $translated->translations[0] : + $singular; + } + + /** + * {@inheritdoc} + */ + public function select_plural_form($count) + { + return 1 == $count ? 0 : 1; + } + + /** + * {@inheritdoc} + */ + public function get_plural_forms_count() + { + return 2; + } + + /** + * {@inheritdoc} + */ + public function translate_plural( + $singular, + $plural, + $count, + $context = null + ) { + $entry = new EntryTranslations(array( + 'singular' => $singular, + 'plural' => $plural, + 'context' => $context + )); + $translated = $this->translate_entry($entry); + $index = $this->select_plural_form($count); + $total_plural_forms = $this->get_plural_forms_count(); + if ($translated && 0 <= $index && $index < $total_plural_forms && + is_array($translated->translations) && + isset($translated->translations[$index])) { + return $translated->translations[$index]; + } else { + return 1 == $count ? $singular : $plural; + } + } + + /** + * {@inheritdoc} + */ + public function merge_with(&$other) + { + foreach ($other->entries as $entry) { + $this->entries[$entry->key()] = $entry; + } + } + + public function merge_originals_with(&$other) + { + foreach ($other->entries as $entry) { + if ( !isset( $this->entries[$entry->key()] )) { + $this->entries[$entry->key()] = $entry; + } else { + $this->entries[$entry->key()]->merge_with($entry); + } + } + } +} diff --git a/include/pomo/Translations/TranslationsInterface.php b/include/pomo/Translations/TranslationsInterface.php new file mode 100644 index 00000000..401194d9 --- /dev/null +++ b/include/pomo/Translations/TranslationsInterface.php @@ -0,0 +1,94 @@ + + */ +interface TranslationsInterface +{ + /** + * Add entry to the PO structure + * + * @param object &$entry + * @return bool true on success, false if the entry doesn't have a key + */ + public function add_entry($entry); + + /** + * Sets $header PO header to $value + * + * If the header already exists, it will be overwritten + * + * @todo This should be out of this class, it is gettext specific + * @param string $header header name, without trailing : + * @param string $value header value, without trailing \n + */ + public function set_header($header, $value); + + public function set_headers($headers); + + public function get_header($header); + + public function translate_entry(&$entry); + + /** + * Translate an entry in the singular way + * + * @param string $singular Singular form of the entry + * @param mixed $context + * @return string The translation + */ + public function translate($singular, $context = null); + + /** + * Given the number of items, returns the 0-based index of the plural form + * to use + * + * Here, in the base Translations class, the common logic for English is + * implemented: + * 0 if there is one element, 1 otherwise + * + * This function should be overrided by the sub-classes. For example MO/PO + * can derive the logic from their headers. + * + * @param integer $count number of items + */ + public function select_plural_form($count); + + public function get_plural_forms_count(); + + /** + * Plural sensitive tranlation of an entry + * + * Same behavior as {@link translate()} but with plural analyser, provide by + * {@link select_plural_form()} parser. + * + * @param string $singular Singular form of the entry + * @param string $plural Plural form of the entry + * @param integer $count Number of items for the plural context + * @param mixed $context + * @return string The correct translation + */ + public function translate_plural( + $singular, + $plural, + $count, + $context = null + ); + + /** + * Merge $other in the current object. + * + * @param Object &$other Another Translation object, whose translations + * will be merged in this one + * @return void + **/ + public function merge_with(&$other); +} diff --git a/include/routes.php b/include/routes.php index 98449c5a..85afa86f 100644 --- a/include/routes.php +++ b/include/routes.php @@ -161,6 +161,6 @@ }); // 404 not found -$feather->notFound(function () use ($lang_common) { - message($lang_common['Bad request'], '404'); +$feather->notFound(function () { + message(__('Bad request'), '404'); }); diff --git a/install/index.php b/install/index.php index 873973c2..898a86a7 100644 --- a/install/index.php +++ b/install/index.php @@ -115,7 +115,7 @@ function stripslashes_array($array) // function error($message, $file = null, $line = null, $db_error = false) { - global $feather_config, $lang_common; + global $feather_config; // Set some default settings if the script failed before $feather_config could be populated if (empty($feather_config)) { $feather_config = array( @@ -123,13 +123,6 @@ function error($message, $file = null, $line = null, $db_error = false) 'o_gzip' => '0' ); } - // Set some default translations if the script failed before $lang_common could be populated - if (empty($lang_common)) { - $lang_common = array( - 'Title separator' => ' / ', - 'Page' => 'Page %s' - ); - } // Empty all output buffers and stop buffering while (@ob_end_clean()); // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent) diff --git a/lang/English/common.mo b/lang/English/common.mo new file mode 100644 index 0000000000000000000000000000000000000000..fc08237e6da5b22b1f2d17b687732e820380b425 GIT binary patch literal 9404 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 literal 0 HcmV?d00001 diff --git a/lang/English/common.php b/lang/English/common.php deleted file mode 100644 index 59632561..00000000 --- a/lang/English/common.php +++ /dev/null @@ -1,184 +0,0 @@ - 'ltr', // ltr (Left-To-Right) or rtl (Right-To-Left) -'lang_identifier' => 'en', - -// Number formatting -'lang_decimal_point' => '.', -'lang_thousands_sep' => ',', - -// Notices -'Bad request' => 'Bad request. The link you followed is incorrect or outdated.', -'No view' => 'You do not have permission to view these forums.', -'No permission' => 'You do not have permission to access this page.', -'Bad referrer' => 'Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that \'Base URL\' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the FluxBB documentation.', -'No cookie' => 'You appear to have logged in successfully, however a cookie has not been set. Please check your settings and if applicable, enable cookies for this website.', -'Pun include extension' => 'Unable to process user include %s from template %s. "%s" files are not allowed', -'Pun include directory' => 'Unable to process user include %s from template %s. Directory traversal is not allowed', -'Pun include error' => 'Unable to process user include %s from template %s. There is no such file in neither the template directory nor in the user include directory', - -// Miscellaneous -'Announcement' => 'Announcement', -'Options' => 'Options', -'Submit' => 'Submit', // "Name" of submit buttons -'Ban message' => 'You are banned from this forum.', -'Ban message 2' => 'The ban expires at the end of', -'Ban message 3' => 'The administrator or moderator that banned you left the following message:', -'Ban message 4' => 'Please direct any inquiries to the forum administrator at', -'Never' => 'Never', -'Today' => 'Today', -'Yesterday' => 'Yesterday', -'Info' => 'Info', // A common table header -'Go back' => 'Go back', -'Maintenance' => 'Maintenance', -'Redirecting' => 'Redirecting', -'Click redirect' => 'Click here if you do not want to wait any longer (or if your browser does not automatically forward you)', -'on' => 'on', // As in "BBCode is on" -'off' => 'off', -'Invalid email' => 'The email address you entered is invalid.', -'Required' => '(Required)', -'required field' => 'is a required field in this form.', // For javascript form validation -'Last post' => 'Last post', -'by' => 'by', // As in last post by some user -'New posts' => 'New posts', // The link that leads to the first new post -'New posts info' => 'Go to the first new post in this topic.', // The popup text for new posts links -'Username' => 'Username', -'Password' => 'Password', -'Email' => 'Email', -'Send email' => 'Send email', -'Moderated by' => 'Moderated by', -'Registered' => 'Registered', -'Subject' => 'Subject', -'Message' => 'Message', -'Topic' => 'Topic', -'Forum' => 'Forum', -'Posts' => 'Posts', -'Replies' => 'Replies', -'Pages' => 'Pages:', -'Page' => 'Page %s', -'BBCode' => 'BBCode:', // You probably shouldn't change this -'url tag' => '[url] tag:', -'img tag' => '[img] tag:', -'Smilies' => 'Smilies:', -'and' => 'and', -'Image link' => 'image', // This is displayed (i.e. ) instead of images when "Show images" is disabled in the profile -'wrote' => 'wrote:', // For [quote]'s -'Mailer' => '%s Mailer', // As in "MyForums Mailer" in the signature of outgoing emails -'Important information' => 'Important information', -'Write message legend' => 'Write your message and submit', -'Previous' => 'Previous', -'Next' => 'Next', -'Spacer' => '…', // Ellipsis for paginate - -// Title -'Title' => 'Title', -'Member' => 'Member', // Default title -'Moderator' => 'Moderator', -'Administrator' => 'Administrator', -'Banned' => 'Banned', -'Guest' => 'Guest', - -// Stuff for include/parser.php -'BBerr pcre' => '(%s) Message is too long or too complex. Please shorten.', // Error 1 -'BBerr unexpected attribute' => 'Unexpected attribute: "%1$s". (No attribute allowed for (%2$s).', // Error 2 -'BBerr unrecognized attribute' => 'Unrecognized attribute: "%1$s", is not valid for (%2$s).', // Error 3 -'BBerr bbcode attribute' => 'Attribute may NOT contain open or close bbcode tags', // Error 4 -'BBerr missing attribute' => '(%1$s) is missing a required attribute.', // Error 5 -'BBerr nesting overflow' => '(%1$s) tag nesting depth: %2$d exceeds allowable limit: %3$d.', // Error 6 -'BBerr self-nesting' => '(%s) was opened within itself, this is not allowed.', // Error 7 -'BBerr invalid nesting' => '(%1$s) was opened within (%2$s), this is not allowed.', // Error 8 -'BBerr invalid parent' => '(%1$s) cannot be within: (%2$s). Allowable parent tags: %3$s.', // Error 9 -'BBerr Invalid URL name' => 'Invalid URL name: %s', // Error 10 -'BBerr cannot post URLs' => 'You are not allowed to post links', // Error 10 -'BBerr Invalid email address' => 'Invalid email address: %s', // Error 10c -'BBerr Invalid color' => 'Invalid color attribute: %s', // Error 11 -'BBerr invalid content' => 'Invalid content, (%s) requires specific content.', // Error 12 -'BBerr bad meta data' => 'Unable to retrieve image data from remote url: %s', // Error 13 -'BBerr no file size' => 'Unable to determine remote file size.', // Error 14 -'BBerr non image' => 'Remote url does not have Content-Type: "image".', // Error 15 -'BBerr bad http response' => 'Bad HTTP response header: "%s"', // Error 16 -'BBerr bad headers' => 'Unable to read remote image http headers.', // Error 17 -'BBerr orphan close' => 'Orphan close tag: (/%s) is missing its open tag.', // Error 18 -'BBerr orphan open' => 'Orphan open tag: (%s) is missing its close tag.', // Error 19 - -'BBmsg big image' => 'Big image', // Msg 1 -'BBmsg images disabled' => 'Image display not currently enabled in this context', // Msg 2 - -// Stuff for the navigator (top of every page) -'Index' => 'Index', -'User list' => 'User list', -'Rules' => 'Rules', -'Search' => 'Search', -'Register' => 'Register', -'Login' => 'Login', -'Not logged in' => 'You are not logged in.', -'Profile' => 'Profile', -'Logout' => 'Logout', -'Logged in as' => 'Logged in as', -'Admin' => 'Administration', -'Last visit' => 'Last visit: %s', -'Topic searches' => 'Topics:', -'New posts header' => 'New', -'Active topics' => 'Active', -'Unanswered topics' => 'Unanswered', -'Posted topics' => 'Posted', -'Show new posts' => 'Find topics with new posts since your last visit.', -'Show active topics' => 'Find topics with recent posts.', -'Show unanswered topics' => 'Find topics with no replies.', -'Show posted topics' => 'Find topics you have posted to.', -'Mark all as read' => 'Mark all topics as read', -'Mark forum read' => 'Mark this forum as read', -'Title separator' => ' / ', - -// Stuff for the page footer -'Board footer' => 'Board footer', -'Jump to' => 'Jump to', -'Go' => ' Go ', // Submit button in forum jump -'Moderate topic' => 'Moderate topic', -'All' => 'All', -'Move topic' => 'Move topic', -'Open topic' => 'Open topic', -'Close topic' => 'Close topic', -'Unstick topic' => 'Unstick topic', -'Stick topic' => 'Stick topic', -'Moderate forum' => 'Moderate forum', -'Powered by' => 'Powered by %s', - -// Debug information -'Debug table' => 'Debug information', -'Querytime' => 'Generated in %1$s seconds, %2$s queries executed', -'Memory usage' => 'Memory usage: %1$s', -'Peak usage' => '(Peak: %1$s)', -'Query times' => 'Time (s)', -'Query' => 'Query', -'Total query time' => 'Total query time: %s', - -// For extern.php RSS feed -'RSS description' => 'The most recent topics at %s.', -'RSS description topic' => 'The most recent posts in %s.', -'RSS reply' => 'Re: ', // The topic subject will be appended to this string (to signify a reply) -'RSS active topics feed' => 'RSS active topics feed', -'Atom active topics feed' => 'Atom active topics feed', -'RSS forum feed' => 'RSS forum feed', -'Atom forum feed' => 'Atom forum feed', -'RSS topic feed' => 'RSS topic feed', -'Atom topic feed' => 'Atom topic feed', - -// Admin related stuff in the header -'New reports' => 'There are new reports', -'Maintenance mode enabled' => 'Maintenance mode is enabled!', - -// Units for file sizes -'Size unit B' => '%s B', -'Size unit KiB' => '%s KiB', -'Size unit MiB' => '%s MiB', -'Size unit GiB' => '%s GiB', -'Size unit TiB' => '%s TiB', -'Size unit PiB' => '%s PiB', -'Size unit EiB' => '%s EiB', - -); diff --git a/lang/English/common.po b/lang/English/common.po new file mode 100644 index 00000000..8d5a40cd --- /dev/null +++ b/lang/English/common.po @@ -0,0 +1,473 @@ +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "lang_direction" +msgstr "ltr" + +msgid "lang_identifier" +msgstr "en" + +msgid "lang_decimal_point" +msgstr "." + +msgid "lang_thousands_sep" +msgstr "," + +msgid "Bad request" +msgstr "Bad request. The link you followed is incorrect or outdated." + +msgid "No view" +msgstr "You do not have permission to view these forums." + +msgid "No permission" +msgstr "You do not have permission to access this page." + +msgid "Bad referrer" +msgstr "Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that 'Base URL' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the FluxBB documentation." + +msgid "No cookie" +msgstr "You appear to have logged in successfully, however a cookie has not been set. Please check your settings and if applicable, enable cookies for this website." + +msgid "Pun include extension" +msgstr "Unable to process user include %s from template %s. \"%s\" files are not allowed" + +msgid "Pun include directory" +msgstr "Unable to process user include %s from template %s. Directory traversal is not allowed" + +msgid "Pun include error" +msgstr "Unable to process user include %s from template %s. There is no such file in neither the template directory nor in the user include directory" + +msgid "Announcement" +msgstr "Announcement" + +msgid "Options" +msgstr "Options" + +msgid "Submit" +msgstr "Submit" + +msgid "Ban message" +msgstr "You are banned from this forum." + +msgid "Ban message 2" +msgstr "The ban expires at the end of" + +msgid "Ban message 3" +msgstr "The administrator or moderator that banned you left the following message:" + +msgid "Ban message 4" +msgstr "Please direct any inquiries to the forum administrator at" + +msgid "Never" +msgstr "Never" + +msgid "Today" +msgstr "Today" + +msgid "Yesterday" +msgstr "Yesterday" + +msgid "Info" +msgstr "Info" + +msgid "Go back" +msgstr "Go back" + +msgid "Maintenance" +msgstr "Maintenance" + +msgid "Redirecting" +msgstr "Redirecting" + +msgid "Click redirect" +msgstr "Click here if you do not want to wait any longer (or if your browser does not automatically forward you)" + +msgid "on" +msgstr "on" + +msgid "off" +msgstr "off" + +msgid "Invalid email" +msgstr "The email address you entered is invalid." + +msgid "Required" +msgstr "(Required)" + +msgid "required field" +msgstr "is a required field in this form." + +msgid "Last post" +msgstr "Last post" + +msgid "by" +msgstr "by" + +msgid "New posts" +msgstr "New posts" + +msgid "New posts info" +msgstr "Go to the first new post in this topic." + +msgid "Username" +msgstr "Username" + +msgid "Password" +msgstr "Password" + +msgid "Email" +msgstr "Email" + +msgid "Send email" +msgstr "Send email" + +msgid "Moderated by" +msgstr "Moderated by" + +msgid "Registered" +msgstr "Registered" + +msgid "Subject" +msgstr "Subject" + +msgid "Message" +msgstr "Message" + +msgid "Topic" +msgstr "Topic" + +msgid "Forum" +msgstr "Forum" + +msgid "Posts" +msgstr "Posts" + +msgid "Replies" +msgstr "Replies" + +msgid "Pages" +msgstr "Pages:" + +msgid "Page" +msgstr "Page %s" + +msgid "BBCode" +msgstr "BBCode:" + +msgid "url tag" +msgstr "[url] tag:" + +msgid "img tag" +msgstr "[img] tag:" + +msgid "Smilies" +msgstr "Smilies:" + +msgid "and" +msgstr "and" + +msgid "Image link" +msgstr "image" + +msgid "wrote" +msgstr "wrote:" + +msgid "Mailer" +msgstr "%s Mailer" + +msgid "Important information" +msgstr "Important information" + +msgid "Write message legend" +msgstr "Write your message and submit" + +msgid "Previous" +msgstr "Previous" + +msgid "Next" +msgstr "Next" + +msgid "Spacer" +msgstr "…" + +msgid "Title" +msgstr "Title" + +msgid "Member" +msgstr "Member" + +msgid "Moderator" +msgstr "Moderator" + +msgid "Administrator" +msgstr "Administrator" + +msgid "Banned" +msgstr "Banned" + +msgid "Guest" +msgstr "Guest" + +msgid "BBerr pcre" +msgstr "(%s) Message is too long or too complex. Please shorten." + +msgid "BBerr unexpected attribute" +msgstr "Unexpected attribute: \"%1$s\". (No attribute allowed for (%2$s)." + +msgid "BBerr unrecognized attribute" +msgstr "Unrecognized attribute: \"%1$s\", is not valid for (%2$s)." + +msgid "BBerr bbcode attribute" +msgstr "Attribute may NOT contain open or close bbcode tags" + +msgid "BBerr missing attribute" +msgstr "(%1$s) is missing a required attribute." + +msgid "BBerr nesting overflow" +msgstr "(%1$s) tag nesting depth: %2$d exceeds allowable limit: %3$d." + +msgid "BBerr self-nesting" +msgstr "(%s) was opened within itself, this is not allowed." + +msgid "BBerr invalid nesting" +msgstr "(%1$s) was opened within (%2$s), this is not allowed." + +msgid "BBerr invalid parent" +msgstr "(%1$s) cannot be within: (%2$s). Allowable parent tags: %3$s." + +msgid "BBerr Invalid URL name" +msgstr "Invalid URL name: %s" + +msgid "BBerr cannot post URLs" +msgstr "You are not allowed to post links" + +msgid "BBerr Invalid email address" +msgstr "Invalid email address: %s" + +msgid "BBerr Invalid color" +msgstr "Invalid color attribute: %s" + +msgid "BBerr invalid content" +msgstr "Invalid content, (%s) requires specific content." + +msgid "BBerr bad meta data" +msgstr "Unable to retrieve image data from remote url: %s" + +msgid "BBerr no file size" +msgstr "Unable to determine remote file size." + +msgid "BBerr non image" +msgstr "Remote url does not have Content-Type: \"image\"." + +msgid "BBerr bad http response" +msgstr "Bad HTTP response header: \"%s\"" + +msgid "BBerr bad headers" +msgstr "Unable to read remote image http headers." + +msgid "BBerr orphan close" +msgstr "Orphan close tag: (/%s) is missing its open tag." + +msgid "BBerr orphan open" +msgstr "Orphan open tag: (%s) is missing its close tag." + +msgid "BBmsg big image" +msgstr "Big image" + +msgid "BBmsg images disabled" +msgstr "Image display not currently enabled in this context" + +msgid "Index" +msgstr "Index" + +msgid "User list" +msgstr "User list" + +msgid "Rules" +msgstr "Rules" + +msgid "Search" +msgstr "Search" + +msgid "Register" +msgstr "Register" + +msgid "Login" +msgstr "Login" + +msgid "Not logged in" +msgstr "You are not logged in." + +msgid "Profile" +msgstr "Profile" + +msgid "Logout" +msgstr "Logout" + +msgid "Logged in as" +msgstr "Logged in as" + +msgid "Admin" +msgstr "Administration" + +msgid "Last visit" +msgstr "Last visit: %s" + +msgid "Topic searches" +msgstr "Topics:" + +msgid "New posts header" +msgstr "New" + +msgid "Active topics" +msgstr "Active" + +msgid "Unanswered topics" +msgstr "Unanswered" + +msgid "Posted topics" +msgstr "Posted" + +msgid "Show new posts" +msgstr "Find topics with new posts since your last visit." + +msgid "Show active topics" +msgstr "Find topics with recent posts." + +msgid "Show unanswered topics" +msgstr "Find topics with no replies." + +msgid "Show posted topics" +msgstr "Find topics you have posted to." + +msgid "Mark all as read" +msgstr "Mark all topics as read" + +msgid "Mark forum read" +msgstr "Mark this forum as read" + +msgid "Title separator" +msgstr " / " + +msgid "Board footer" +msgstr "Board footer" + +msgid "Jump to" +msgstr "Jump to" + +msgid "Go" +msgstr " Go " + +msgid "Moderate topic" +msgstr "Moderate topic" + +msgid "All" +msgstr "All" + +msgid "Move topic" +msgstr "Move topic" + +msgid "Open topic" +msgstr "Open topic" + +msgid "Close topic" +msgstr "Close topic" + +msgid "Unstick topic" +msgstr "Unstick topic" + +msgid "Stick topic" +msgstr "Stick topic" + +msgid "Moderate forum" +msgstr "Moderate forum" + +msgid "Powered by" +msgstr "Powered by %s" + +msgid "Debug table" +msgstr "Debug information" + +msgid "Querytime" +msgstr "Generated in %1$s seconds, %2$s queries executed" + +msgid "Memory usage" +msgstr "Memory usage: %1$s" + +msgid "Peak usage" +msgstr "(Peak: %1$s)" + +msgid "Query times" +msgstr "Time (s)" + +msgid "Query" +msgstr "Query" + +msgid "Total query time" +msgstr "Total query time: %s" + +msgid "RSS description" +msgstr "The most recent topics at %s." + +msgid "RSS description topic" +msgstr "The most recent posts in %s." + +msgid "RSS reply" +msgstr "Re: " + +msgid "RSS active topics feed" +msgstr "RSS active topics feed" + +msgid "Atom active topics feed" +msgstr "Atom active topics feed" + +msgid "RSS forum feed" +msgstr "RSS forum feed" + +msgid "Atom forum feed" +msgstr "Atom forum feed" + +msgid "RSS topic feed" +msgstr "RSS topic feed" + +msgid "Atom topic feed" +msgstr "Atom topic feed" + +msgid "New reports" +msgstr "There are new reports" + +msgid "Maintenance mode enabled" +msgstr "Maintenance mode is enabled!" + +msgid "Size unit B" +msgstr "%s B" + +msgid "Size unit KiB" +msgstr "%s KiB" + +msgid "Size unit MiB" +msgstr "%s MiB" + +msgid "Size unit GiB" +msgstr "%s GiB" + +msgid "Size unit TiB" +msgstr "%s TiB" + +msgid "Size unit PiB" +msgstr "%s PiB" + +msgid "Size unit EiB" +msgstr "%s EiB" diff --git a/lang/English/convertor.php b/lang/English/convertor.php new file mode 100644 index 00000000..f2c0326a --- /dev/null +++ b/lang/English/convertor.php @@ -0,0 +1,20 @@ + $value) { + $key = addslashes($key); + $value = addslashes($value); + fwrite($fh, "\n"); + fwrite($fh, "msgid \"$key\"\n"); + fwrite($fh, "msgstr \"$value\"\n"); +} +fclose($fh); \ No newline at end of file diff --git a/model/admin/bans.php b/model/admin/bans.php index db3a1b0e..52ba33a9 100644 --- a/model/admin/bans.php +++ b/model/admin/bans.php @@ -24,7 +24,7 @@ public function __construct() public function add_ban_info($id = null) { - global $lang_common, $lang_admin_bans; + global $lang_admin_bans; $ban = array(); @@ -32,7 +32,7 @@ public function add_ban_info($id = null) if (is_numeric($id)) { $ban['user_id'] = $id; if ($ban['user_id'] < 2) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $select_add_ban_info = array('group_id', 'username', 'email'); @@ -102,7 +102,7 @@ public function add_ban_info($id = null) public function edit_ban_info($id) { - global $lang_common; + $ban = array(); @@ -120,7 +120,7 @@ public function edit_ban_info($id) $ban['message'] = $result['message']; $ban['expire'] = $result['expire']; } else { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $diff = ($this->user->timezone + $this->user->dst) * 3600; diff --git a/model/admin/groups.php b/model/admin/groups.php index 6769a13c..6ce1b905 100644 --- a/model/admin/groups.php +++ b/model/admin/groups.php @@ -35,7 +35,7 @@ public function fetch_groups() public function info_add_group($groups, $id) { - global $lang_common; + $group = array(); @@ -47,7 +47,7 @@ public function info_add_group($groups, $id) } else { // We are editing a group if (!isset($groups[$id])) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $group['info'] = $groups[$id]; @@ -246,18 +246,18 @@ public function add_edit_group($groups) public function set_default_group($groups) { - global $lang_admin_groups, $lang_common; + global $lang_admin_groups; $group_id = intval($this->request->post('default_group')); // Make sure it's not the admin or guest groups if ($group_id == FEATHER_ADMIN || $group_id == FEATHER_GUEST) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Make sure it's not a moderator group if ($groups[$group_id]['g_moderator'] != 0) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } DB::for_table('config')->where('conf_name', 'o_default_user_group') diff --git a/model/admin/options.php b/model/admin/options.php index d9f29c05..c0cdc83e 100644 --- a/model/admin/options.php +++ b/model/admin/options.php @@ -24,7 +24,7 @@ public function __construct() public function update_options() { - global $lang_admin_options, $lang_common; + global $lang_admin_options; @@ -110,12 +110,12 @@ public function update_options() $languages = forum_list_langs(); if (!in_array($form['default_lang'], $languages)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $styles = forum_list_styles(); if (!in_array($form['default_style'], $styles)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } if ($form['time_format'] == '') { @@ -197,19 +197,19 @@ public function update_options() } if ($form['feed_type'] < 0 || $form['feed_type'] > 2) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } if ($form['feed_ttl'] < 0) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } if ($form['report_method'] < 0 || $form['report_method'] > 2) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } if ($form['default_email_setting'] < 0 || $form['default_email_setting'] > 2) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } if ($form['timeout_online'] >= $form['timeout_visit']) { diff --git a/model/admin/users.php b/model/admin/users.php index bf9b81d6..5f0e27fe 100644 --- a/model/admin/users.php +++ b/model/admin/users.php @@ -499,7 +499,7 @@ public function ban_users() public function get_user_search() { - global $db_type, $lang_common, $lang_admin_users; + global $db_type, $lang_admin_users; $form = $this->request->get('form') ? $this->request->get('form') : array(); @@ -618,7 +618,7 @@ public function get_user_search() public function print_users($conditions, $order_by, $direction, $start_from) { - global $lang_common, $lang_admin_users; + global $lang_admin_users; $user_data = array(); @@ -637,7 +637,7 @@ public function print_users($conditions, $order_by, $direction, $start_from) $cur_user['user_title'] = get_title($cur_user); // This script is a special case in that we want to display "Not verified" for non-verified users - if (($cur_user['g_id'] == '' || $cur_user['g_id'] == FEATHER_UNVERIFIED) && $cur_user['user_title'] != $lang_common['Banned']) { + if (($cur_user['g_id'] == '' || $cur_user['g_id'] == FEATHER_UNVERIFIED) && $cur_user['user_title'] != __('Banned')) { $cur_user['user_title'] = ''.$lang_admin_users['Not verified'].''; } diff --git a/model/delete.php b/model/delete.php index 0ac3cc9b..aa711016 100644 --- a/model/delete.php +++ b/model/delete.php @@ -24,7 +24,7 @@ public function __construct() public function get_info_delete($id) { - global $lang_common; + $select_get_info_delete = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.first_post_id', 't.closed', 'p.poster', 'p.posted', 'p.poster_id', 'p.message', 'p.hide_smilies'); $where_get_info_delete = array( @@ -44,7 +44,7 @@ public function get_info_delete($id) ->find_one(); if (!$cur_post) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $cur_post; diff --git a/model/edit.php b/model/edit.php index 61410dd3..18bf6b02 100644 --- a/model/edit.php +++ b/model/edit.php @@ -25,7 +25,7 @@ public function __construct() // Fetch some info about the post, the topic and the forum public function get_info_edit($id) { - global $lang_common; + $select_get_info_edit = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.posted', 't.first_post_id', 't.sticky', 't.closed', 'p.poster', 'p.poster_id', 'p.message', 'p.hide_smilies'); $where_get_info_edit = array( @@ -45,7 +45,7 @@ public function get_info_edit($id) ->find_one(); if (!$cur_post) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $cur_post; @@ -186,15 +186,15 @@ public function edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod) public function get_checkboxes($can_edit_subject, $is_admmod, $cur_post, $cur_index) { - global $lang_post, $lang_common; + global $lang_post; $checkboxes = array(); if ($can_edit_subject && $is_admmod) { if ($this->request->post('stick_topic') || $cur_post['sticky'] == '1') { - $checkboxes[] = ''; + $checkboxes[] = ''; } else { - $checkboxes[] = ''; + $checkboxes[] = ''; } } diff --git a/model/index.php b/model/index.php index 6d85307c..5e773df5 100644 --- a/model/index.php +++ b/model/index.php @@ -26,12 +26,12 @@ public function __construct() // Returns page head public function get_page_head() { - global $lang_common; + if ($this->config['o_feed_type'] == '1') { - $page_head = array('feed' => ''); + $page_head = array('feed' => ''); } elseif ($this->config['o_feed_type'] == '2') { - $page_head = array('feed' => ''); + $page_head = array('feed' => ''); } return $page_head; @@ -40,13 +40,11 @@ public function get_page_head() // Returns forum action public function get_forum_actions() { - global $lang_common; - $forum_actions = array(); // Display a "mark all as read" link if (!$this->user->is_guest) { - $forum_actions[] = ''.$lang_common['Mark all as read'].''; + $forum_actions[] = ''.__('Mark all as read').''; } return $forum_actions; @@ -106,7 +104,7 @@ public function get_new_posts() // Returns the elements needed to display categories and their forums public function print_categories_forums() { - global $lang_common, $lang_index; + global $lang_index; // Get list of forums and topics with new posts since last visit if (!$this->user->is_guest) { @@ -162,7 +160,7 @@ public function print_categories_forums() // Are there new posts since our last visit? if (isset($new_topics[$cur_forum->fid])) { $cur_forum->item_status .= ' inew'; - $forum_field_new = '[ '.$lang_common['New posts'].' ]'; + $forum_field_new = '[ '.__('New posts').' ]'; $cur_forum->icon_type = 'icon icon-new'; } @@ -184,11 +182,11 @@ public function print_categories_forums() // If there is a last_post/last_poster if ($cur_forum->last_post != '') { - $cur_forum->last_post_formatted = ''.format_time($cur_forum->last_post).' '.$lang_common['by'].' '.feather_escape($cur_forum->last_poster).''; + $cur_forum->last_post_formatted = ''.format_time($cur_forum->last_post).' '.__('by').' '.feather_escape($cur_forum->last_poster).''; } elseif ($cur_forum->redirect_url != '') { $cur_forum->last_post_formatted = '- - -'; } else { - $cur_forum->last_post_formatted = $lang_common['Never']; + $cur_forum->last_post_formatted = __('Never'); } if ($cur_forum->moderators != '') { @@ -203,7 +201,7 @@ public function print_categories_forums() } } - $cur_forum->moderators_formatted = "\t\t\t\t\t\t\t\t".'

    ('.$lang_common['Moderated by'].' '.implode(', ', $moderators).')

    '."\n"; + $cur_forum->moderators_formatted = "\t\t\t\t\t\t\t\t".'

    ('.__('Moderated by').' '.implode(', ', $moderators).')

    '."\n"; } else { $cur_forum->moderators_formatted = ''; } diff --git a/model/login.php b/model/login.php index 0e934b01..14a06e67 100644 --- a/model/login.php +++ b/model/login.php @@ -118,7 +118,7 @@ public function logout($id, $token) public function password_forgotten() { - global $lang_common, $lang_login; + global $lang_login; if (!$this->user->is_guest) { header('Location: '.get_base_url()); @@ -133,7 +133,7 @@ public function password_forgotten() // Validate the email address $email = strtolower(feather_trim($this->request->post('req_email'))); if (!is_valid_email($email)) { - $errors[] = $lang_common['Invalid email']; + $errors[] = __('Invalid email'); } // Did everything go according to plan? diff --git a/model/misc.php b/model/misc.php index db1b8d60..9e431f2d 100644 --- a/model/misc.php +++ b/model/misc.php @@ -32,7 +32,7 @@ public function update_last_visit() public function get_info_mail($recipient_id) { - global $lang_common; + $select_get_info_mail = array('username', 'email', 'email_setting'); @@ -42,7 +42,7 @@ public function get_info_mail($recipient_id) ->find_one(); if (!$mail) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $mail['recipient'] = $mail['username']; @@ -121,7 +121,7 @@ public function get_redirect_url($recipient_id) public function insert_report($post_id) { - global $lang_misc, $lang_common; + global $lang_misc; // Clean up reason from POST $reason = feather_linebreaks(feather_trim($this->request->post('req_reason'))); @@ -141,7 +141,7 @@ public function insert_report($post_id) ->find_one(); if (!$topic) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $select_report = array('subject', 'forum_id'); @@ -152,7 +152,7 @@ public function insert_report($post_id) ->find_one(); if (!$report) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Should we use the internal report handling? @@ -208,7 +208,7 @@ public function insert_report($post_id) public function get_info_report($post_id) { - global $lang_common; + $select_get_info_report = array('fid' => 'f.id', 'f.forum_name', 'tid' => 't.id', 't.subject'); $where_get_info_report = array( @@ -228,7 +228,7 @@ public function get_info_report($post_id) ->find_one(); if (!$cur_post) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $cur_post; @@ -236,10 +236,10 @@ public function get_info_report($post_id) public function subscribe_topic($topic_id) { - global $lang_common, $lang_misc; + global $lang_misc; if ($this->config['o_topic_subscriptions'] != '1') { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Make sure the user can view the topic @@ -258,7 +258,7 @@ public function subscribe_topic($topic_id) ->find_one(); if (!$authorized) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $is_subscribed = DB::for_table('topic_subscriptions') @@ -286,10 +286,10 @@ public function subscribe_topic($topic_id) public function unsubscribe_topic($topic_id) { - global $lang_common, $lang_misc; + global $lang_misc; if ($this->config['o_topic_subscriptions'] != '1') { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $is_subscribed = DB::for_table('topic_subscriptions') @@ -312,10 +312,10 @@ public function unsubscribe_topic($topic_id) public function unsubscribe_forum($forum_id) { - global $lang_common, $lang_misc; + global $lang_misc; if ($this->config['o_forum_subscriptions'] != '1') { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $is_subscribed = DB::for_table('forum_subscriptions') @@ -338,10 +338,10 @@ public function unsubscribe_forum($forum_id) public function subscribe_forum($forum_id) { - global $lang_common, $lang_misc; + global $lang_misc; if ($this->config['o_forum_subscriptions'] != '1') { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } // Make sure the user can view the forum @@ -359,7 +359,7 @@ public function subscribe_forum($forum_id) ->find_one(); if (!$authorized) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $is_subscribed = DB::for_table('forum_subscriptions') diff --git a/model/moderate.php b/model/moderate.php index 81a29caf..438dd280 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -34,14 +34,14 @@ public function display_ip_info($ip) public function display_ip_address_post($pid) { - global $lang_common; + $ip = DB::for_table('posts') ->where('id', $pid) ->find_one_col('poster_ip'); if (!$ip) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Load the misc.php language file @@ -61,7 +61,7 @@ public function get_moderators($fid) public function get_topic_info($fid, $tid) { - global $lang_common; + // Fetch some info about the topic $select_get_topic_info = array('forum_id' => 'f.id', 'f.forum_name', 't.subject', 't.num_replies', 't.first_post_id'); @@ -83,7 +83,7 @@ public function get_topic_info($fid, $tid) ->find_one(); if (!$cur_topic) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $cur_topic; @@ -91,7 +91,7 @@ public function get_topic_info($fid, $tid) public function delete_posts($tid, $fid, $p = null) { - global $lang_common, $lang_misc; + global $lang_misc; $posts = $this->request->post('posts') ? $this->request->post('posts') : array(); if (empty($posts)) { @@ -100,7 +100,7 @@ public function delete_posts($tid, $fid, $p = null) if ($this->request->post('delete_posts_comply')) { if (@preg_match('%[^0-9,]%', $posts)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Verify that the post IDs are valid @@ -116,7 +116,7 @@ public function delete_posts($tid, $fid, $p = null) } if (count($result) != substr_count($posts, ',') + 1) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Delete the posts @@ -161,7 +161,7 @@ public function delete_posts($tid, $fid, $p = null) public function split_posts($tid, $fid, $p = null) { - global $lang_common, $lang_misc, $lang_post; + global $lang_misc, $lang_post; $posts = $this->request->post('posts') ? $this->request->post('posts') : array(); if (empty($posts)) { @@ -170,12 +170,12 @@ public function split_posts($tid, $fid, $p = null) if ($this->request->post('split_posts_comply')) { if (@preg_match('%[^0-9,]%', $posts)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $move_to_forum = $this->request->post('move_to_forum') ? intval($this->request->post('move_to_forum')) : 0; if ($move_to_forum < 1) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // How many posts did we just split off? @@ -190,7 +190,7 @@ public function split_posts($tid, $fid, $p = null) ->find_many(); if (count($result) != $num_posts_splitted) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Verify that the move to forum ID is valid @@ -208,7 +208,7 @@ public function split_posts($tid, $fid, $p = null) ->find_one(); if (!$result) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Load the post.php language file @@ -468,16 +468,16 @@ public function display_posts_view($tid, $start_from) public function move_topics_to($fid, $tfid = null, $param = null) { - global $lang_common, $lang_misc; + global $lang_misc; if (@preg_match('%[^0-9,]%', $this->request->post('topics'))) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $topics = explode(',', $this->request->post('topics')); $move_to_forum = $this->request->post('move_to_forum') ? intval($this->request->post('move_to_forum')) : 0; if (empty($topics) || $move_to_forum < 1) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Verify that the topic IDs are valid @@ -487,7 +487,7 @@ public function move_topics_to($fid, $tfid = null, $param = null) ->find_many(); if (count($result) != count($topics)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } @@ -506,7 +506,7 @@ public function move_topics_to($fid, $tfid = null, $param = null) ->find_one(); if (!$authorized) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Delete any redirect topics if there are any (only if we moved/copied the topic back to where it was once moved from) @@ -586,10 +586,10 @@ public function check_move_possible() public function merge_topics($fid) { - global $lang_common, $lang_misc; + global $lang_misc; if (@preg_match('%[^0-9,]%', $this->request->post('topics'))) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $topics = explode(',', $this->request->post('topics')); @@ -604,7 +604,7 @@ public function merge_topics($fid) ->find_many(); if (count($result) != count($topics)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // The topic that we are merging into is the one with the smallest ID @@ -697,11 +697,11 @@ public function merge_topics($fid) public function delete_topics($topics, $fid) { - global $lang_misc, $lang_common; + global $lang_misc; if (@preg_match('%[^0-9,]%', $topics)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } require FEATHER_ROOT.'include/search_idx.php'; @@ -715,7 +715,7 @@ public function delete_topics($topics, $fid) ->find_many(); if (count($result) != substr_count($topics, ',') + 1) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Verify that the posts are not by admins @@ -725,7 +725,7 @@ public function delete_topics($topics, $fid) ->where('poster_id', get_admin_ids()) ->find_many(); if ($authorized) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } } @@ -772,7 +772,7 @@ public function delete_topics($topics, $fid) public function get_forum_info($fid) { - global $lang_common; + $select_get_forum_info = array('f.forum_name', 'f.redirect_url', 'f.num_topics', 'f.sort_by'); $where_get_forum_info = array( @@ -790,7 +790,7 @@ public function get_forum_info($fid) ->find_one(); if (!$cur_forum) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $cur_forum; @@ -819,7 +819,7 @@ public function forum_sort_by($forum_sort) public function display_topics($fid, $sort_by, $start_from) { - global $lang_forum, $lang_common; + global $lang_forum; $topic_data = array(); @@ -861,7 +861,7 @@ public function display_topics($fid, $sort_by, $start_from) $url_topic = url_friendly($cur_topic['subject']); if (is_null($cur_topic['moved_to'])) { - $cur_topic['last_post_disp'] = ''.format_time($cur_topic['last_post']).' '.$lang_common['by'].' '.feather_escape($cur_topic['last_poster']).''; + $cur_topic['last_post_disp'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; $cur_topic['ghost_topic'] = false; } else { $cur_topic['last_post_disp'] = '- - -'; @@ -878,13 +878,13 @@ public function display_topics($fid, $sort_by, $start_from) } if ($cur_topic['moved_to'] != 0) { - $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.$lang_common['by'].' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.$lang_forum['Moved'].''; $cur_topic['item_status'] .= ' imoved'; } elseif ($cur_topic['closed'] == '0') { - $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.$lang_common['by'].' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; } else { - $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.$lang_common['by'].' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.$lang_forum['Closed'].''; $cur_topic['item_status'] .= ' iclosed'; } @@ -893,7 +893,7 @@ public function display_topics($fid, $sort_by, $start_from) $cur_topic['item_status'] .= ' inew'; $cur_topic['icon_type'] = 'icon icon-new'; $cur_topic['subject_disp'] = ''.$cur_topic['subject_disp'].''; - $subject_new_posts = '[ '.$lang_common['New posts'].' ]'; + $subject_new_posts = '[ '.__('New posts').' ]'; } else { $subject_new_posts = null; } @@ -963,14 +963,14 @@ public function close_multiple_topics($action, $topics, $fid) public function get_subject_tid($id) { - global $lang_common; + $subject = DB::for_table('topics') ->where('id', $id) ->find_one_col('subject'); if (!$subject) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $subject; diff --git a/model/post.php b/model/post.php index 39fbba15..f5630676 100644 --- a/model/post.php +++ b/model/post.php @@ -25,7 +25,7 @@ public function __construct() // Get some info about the post public function get_info_post($tid, $fid) { - global $lang_common; + if ($tid) { $select_get_info_post = array('f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics', 't.subject', 't.closed', 'is_subscribed' => 's.user_id'); @@ -64,7 +64,7 @@ public function get_info_post($tid, $fid) } if (!$cur_posting) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $cur_posting; @@ -73,7 +73,7 @@ public function get_info_post($tid, $fid) // Checks the post for errors before posting public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) { - global $lang_post, $lang_common, $lang_prof_reg, $lang_register, $lang_antispam, $lang_antispam_questions, $pd; + global $lang_post, $lang_prof_reg, $lang_register, $lang_antispam, $lang_antispam_questions, $pd; // Antispam feature if ($this->user->is_guest) { @@ -105,13 +105,13 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) ->find_one_col('subject'); if (!$subject_tid) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $url_subject = url_friendly($subject_tid); } else { $url_subject = ''; } - + // If it's a new topic if ($fid) { $subject = feather_trim($this->request->post('req_subject')); @@ -141,7 +141,7 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) if ($this->config['p_force_guest_email'] == '1' || $email != '') { require FEATHER_ROOT.'include/email.php'; if (!is_valid_email($email)) { - $errors[] = $lang_common['Invalid email']; + $errors[] = __('Invalid email'); } // Check if it's a banned email address @@ -693,7 +693,7 @@ public function split_text($text, $start, $end, $retab = true) // If we are quoting a message public function get_quote_message($qid, $tid) { - global $lang_common; + $select_get_quote_message = array('poster', 'message'); @@ -703,7 +703,7 @@ public function get_quote_message($qid, $tid) ->find_one(); if (!$quote) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // If the message contains a code tag we have to split it up (text within [code][/code] shouldn't be touched) @@ -756,7 +756,7 @@ public function get_quote_message($qid, $tid) } $quote = '[quote='. $quote['poster'] .']'.$quote['message'].'[/quote]'."\n"; } else { - $quote = '> '.$quote['poster'].' '.$lang_common['wrote']."\n\n".'> '.$quote['message']."\n"; + $quote = '> '.$quote['poster'].' '.__('wrote')."\n\n".'> '.$quote['message']."\n"; } return $quote; @@ -765,13 +765,13 @@ public function get_quote_message($qid, $tid) // Get the current state of checkboxes public function get_checkboxes($fid, $is_admmod, $is_subscribed) { - global $lang_post, $lang_common; + global $lang_post; $cur_index = 1; $checkboxes = array(); if ($fid && $is_admmod) { - $checkboxes[] = ''; + $checkboxes[] = ''; } if (!$this->user->is_guest) { diff --git a/model/profile.php b/model/profile.php index ff440fad..7492f190 100644 --- a/model/profile.php +++ b/model/profile.php @@ -24,7 +24,7 @@ public function __construct() public function change_pass($id) { - global $lang_profile, $lang_common, $lang_prof_reg; + global $lang_profile, $lang_prof_reg; if ($this->request->get('key')) { // If the user is already logged in we shouldn't be here :) @@ -57,7 +57,7 @@ public function change_pass($id) // Make sure we are allowed to change this user's password if ($this->user->id != $id) { if (!$this->user->is_admmod) { // A regular user trying to change another user's password? - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } elseif ($this->user->g_moderator == '1') { // A moderator trying to change a user's password? @@ -71,11 +71,11 @@ public function change_pass($id) ->find_one(); if (!$user) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } if ($this->user->g_mod_edit_users == '0' || $this->user->g_mod_change_passwords == '0' || $user['group_id'] == FEATHER_ADMIN || $user['g_moderator'] == '1') { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } } } @@ -127,12 +127,12 @@ public function change_pass($id) public function change_email($id) { - global $lang_profile, $lang_common, $lang_prof_reg; + global $lang_profile, $lang_prof_reg; // Make sure we are allowed to change this user's email if ($this->user->id != $id) { if (!$this->user->is_admmod) { // A regular user trying to change another user's email? - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } elseif ($this->user->g_moderator == '1') { // A moderator trying to change a user's email? @@ -146,11 +146,11 @@ public function change_email($id) ->find_one(); if (!$user) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } if ($this->user->g_mod_edit_users == '0' || $this->user->g_mod_change_passwords == '0' || $user['group_id'] == FEATHER_ADMIN || $user['g_moderator'] == '1') { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } } } @@ -185,7 +185,7 @@ public function change_email($id) // Validate the email address $new_email = strtolower(feather_trim($this->request->post('req_new_email'))); if (!is_valid_email($new_email)) { - message($lang_common['Invalid email']); + message(__('Invalid email')); } // Check if it's a banned email address @@ -509,7 +509,7 @@ public function ban_user($id) public function promote_user($id) { - global $lang_profile, $lang_common; + global $lang_profile; $pid = $this->request->get('pid') ? intval($this->request->get('pid')) : 0; @@ -521,7 +521,7 @@ public function promote_user($id) ->find_one_col('g.g_promote_next_group'); if (!$next_group_id) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Update the user @@ -664,7 +664,7 @@ public function delete_user($id) public function fetch_user_group($id) { - global $lang_common; + $info = array(); @@ -678,7 +678,7 @@ public function fetch_user_group($id) ->find_one(); if (!$info) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $info; @@ -686,7 +686,7 @@ public function fetch_user_group($id) public function update_profile($id, $info, $section) { - global $lang_common, $lang_profile, $lang_prof_reg, $pd; + global $lang_profile, $lang_prof_reg, $pd; $username_updated = false; @@ -706,7 +706,7 @@ public function update_profile($id, $info, $section) $languages = forum_list_langs(); $form['language'] = feather_trim($this->request->post('form_language')); if (!in_array($form['language'], $languages)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } } @@ -743,7 +743,7 @@ public function update_profile($id, $info, $section) // Validate the email address $form['email'] = strtolower(feather_trim($this->request->post('req_email'))); if (!is_valid_email($form['email'])) { - message($lang_common['Invalid email']); + message(__('Invalid email')); } } @@ -785,7 +785,7 @@ public function update_profile($id, $info, $section) if ($form['title'] != '') { // A list of words that the title may not contain // If the language is English, there will be some duplicates, but it's not the end of the world - $forbidden = array('member', 'moderator', 'administrator', 'banned', 'guest', utf8_strtolower($lang_common['Member']), utf8_strtolower($lang_common['Moderator']), utf8_strtolower($lang_common['Administrator']), utf8_strtolower($lang_common['Banned']), utf8_strtolower($lang_common['Guest'])); + $forbidden = array('member', 'moderator', 'administrator', 'banned', 'guest', utf8_strtolower(__('Member')), utf8_strtolower(__('Moderator')), utf8_strtolower(__('Administrator')), utf8_strtolower(__('Banned')), utf8_strtolower(__('Guest'))); if (in_array(utf8_strtolower($form['title']), $forbidden)) { message($lang_profile['Forbidden title']); @@ -883,7 +883,7 @@ public function update_profile($id, $info, $section) $styles = forum_list_styles(); $form['style'] = feather_trim($this->request->post('form_style')); if (!in_array($form['style'], $styles)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } } @@ -906,7 +906,7 @@ public function update_profile($id, $info, $section) } default: - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } @@ -917,7 +917,7 @@ public function update_profile($id, $info, $section) } if (empty($temp)) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } DB::for_table('users')->where('id', $id) @@ -1004,7 +1004,7 @@ public function update_profile($id, $info, $section) public function get_user_info($id) { - global $lang_common; + $select_get_user_info = array('u.id', 'u.username', 'u.email', 'u.title', 'u.realname', 'u.url', 'u.jabber', 'u.icq', 'u.msn', 'u.aim', 'u.yahoo', 'u.location', 'u.signature', 'u.disp_topics', 'u.disp_posts', 'u.email_setting', 'u.notify_with_post', 'u.auto_notify', 'u.show_smilies', 'u.show_img', 'u.show_img_sig', 'u.show_avatars', 'u.show_sig', 'u.timezone', 'u.dst', 'u.language', 'u.style', 'u.num_posts', 'u.last_post', 'u.registered', 'u.registration_ip', 'u.admin_note', 'u.date_format', 'u.time_format', 'u.last_visit', 'g.g_id', 'g.g_user_title', 'g.g_moderator'); @@ -1016,7 +1016,7 @@ public function get_user_info($id) ->find_one(); if (!$user) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $user; @@ -1024,15 +1024,15 @@ public function get_user_info($id) public function parse_user_info($user) { - global $lang_common, $lang_profile; + global $lang_profile; $user_info = array(); - $user_info['personal'][] = '
    '.$lang_common['Username'].'
    '; + $user_info['personal'][] = '
    '.__('Username').'
    '; $user_info['personal'][] = '
    '.feather_escape($user['username']).'
    '; $user_title_field = get_title($user); - $user_info['personal'][] = '
    '.$lang_common['Title'].'
    '; + $user_info['personal'][] = '
    '.__('Title').'
    '; $user_info['personal'][] = '
    '.(($this->config['o_censoring'] == '1') ? censor_words($user_title_field) : $user_title_field).'
    '; if ($user['realname'] != '') { @@ -1054,12 +1054,12 @@ public function parse_user_info($user) if ($user['email_setting'] == '0' && !$this->user->is_guest && $this->user->g_send_email == '1') { $user['email_field'] = ''.feather_escape($user['email']).''; } elseif ($user['email_setting'] == '1' && !$this->user->is_guest && $this->user->g_send_email == '1') { - $user['email_field'] = ''.$lang_common['Send email'].''; + $user['email_field'] = ''.__('Send email').''; } else { $user['email_field'] = ''; } if ($user['email_field'] != '') { - $user_info['personal'][] = '
    '.$lang_common['Email'].'
    '; + $user_info['personal'][] = '
    '.__('Email').'
    '; $user_info['personal'][] = '
    '; } @@ -1122,16 +1122,16 @@ public function parse_user_info($user) } } if ($posts_field != '') { - $user_info['activity'][] = '
    '.$lang_common['Posts'].'
    '; + $user_info['activity'][] = '
    '.__('Posts').'
    '; $user_info['activity'][] = '
    '.$posts_field.'
    '; } if ($user['num_posts'] > 0) { - $user_info['activity'][] = '
    '.$lang_common['Last post'].'
    '; + $user_info['activity'][] = '
    '.__('Last post').'
    '; $user_info['activity'][] = '
    '.format_time($user['last_post']).'
    '; } - $user_info['activity'][] = '
    '.$lang_common['Registered'].'
    '; + $user_info['activity'][] = '
    '.__('Registered').'
    '; $user_info['activity'][] = '
    '.format_time($user['registered'], true).'
    '; return $user_info; @@ -1139,25 +1139,25 @@ public function parse_user_info($user) public function edit_essentials($id, $user) { - global $lang_profile, $lang_common; + global $lang_profile; $user_disp = array(); if ($this->user->is_admmod) { if ($this->user->g_id == FEATHER_ADMIN || $this->user->g_mod_rename_users == '1') { - $user_disp['username_field'] = ''."\n"; + $user_disp['username_field'] = ''."\n"; } else { $user_disp['username_field'] = '

    '.sprintf($lang_profile['Username info'], feather_escape($user['username'])).'

    '."\n"; } - $user_disp['email_field'] = '

    '."\n"; + $user_disp['email_field'] = '

    '."\n"; } else { - $user_disp['username_field'] = '

    '.$lang_common['Username'].': '.feather_escape($user['username']).'

    '."\n"; + $user_disp['username_field'] = '

    '.__('Username').': '.feather_escape($user['username']).'

    '."\n"; if ($this->config['o_regs_verify'] == '1') { $user_disp['email_field'] = '

    '.sprintf($lang_profile['Email info'], feather_escape($user['email']).' - '.$lang_profile['Change email'].'').'

    '."\n"; } else { - $user_disp['email_field'] = ''."\n"; + $user_disp['email_field'] = ''."\n"; } } @@ -1165,7 +1165,7 @@ public function edit_essentials($id, $user) $posts_actions = array(); if ($this->user->g_id == FEATHER_ADMIN) { - $user_disp['posts_field'] .= ''; + $user_disp['posts_field'] .= ''; } elseif ($this->config['o_show_post_count'] == '1' || $this->user->is_admmod) { $posts_actions[] = sprintf($lang_profile['Posts info'], forum_number_format($user['num_posts'])); } diff --git a/model/register.php b/model/register.php index 9c61b0a7..53de5d86 100644 --- a/model/register.php +++ b/model/register.php @@ -24,7 +24,7 @@ public function __construct() public function check_for_errors() { - global $lang_register, $lang_prof_reg, $lang_common, $lang_antispam, $lang_antispam_questions; + global $lang_register, $lang_prof_reg, $lang_antispam, $lang_antispam_questions; $user = array(); $user['errors'] = ''; @@ -78,7 +78,7 @@ public function check_for_errors() require FEATHER_ROOT.'include/email.php'; if (!is_valid_email($user['email1'])) { - $user['errors'][] = $lang_common['Invalid email']; + $user['errors'][] = __('Invalid email'); } elseif ($this->config['o_regs_verify'] == '1' && $user['email1'] != $email2) { $user['errors'][] = $lang_register['Email not match']; } @@ -112,7 +112,7 @@ public function check_for_errors() if ($this->request->post('language')) { $user['language'] = preg_replace('%[\.\\\/]%', '', $this->request->post('language')); if (!file_exists(FEATHER_ROOT.'lang/'.$user['language'].'/common.php')) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } } else { $user['language'] = $this->config['o_default_lang']; diff --git a/model/search.php b/model/search.php index fdf13f44..a510335a 100644 --- a/model/search.php +++ b/model/search.php @@ -25,7 +25,7 @@ public function __construct() public function get_search_results() { - global $db_type, $lang_common, $lang_search; + global $db_type, $lang_search; $search = array(); @@ -46,7 +46,7 @@ public function get_search_results() if ($this->request->get('search_id')) { $search_id = intval($this->request->get('search_id')); if ($search_id < 1) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } } // If it's a regular search (keywords and/or author) @@ -78,21 +78,21 @@ public function get_search_results() elseif ($action == 'show_user_posts' || $action == 'show_user_topics' || $action == 'show_subscriptions') { $user_id = ($this->request->get('user_id')) ? intval($this->request->get('user_id')) : $this->user->id; if ($user_id < 2) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } // Subscribed topics can only be viewed by admins, moderators and the users themselves if ($action == 'show_subscriptions' && !$this->user->is_admmod && $user_id != $this->user->id) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } } elseif ($action == 'show_recent') { $interval = $this->request->get('value') ? intval($this->request->get('value')) : 86400; } elseif ($action == 'show_replies') { if ($this->user->is_guest) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } } elseif ($action != 'show_new' && $action != 'show_unanswered') { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } @@ -252,7 +252,7 @@ public function get_search_results() } // If it's a search for author name (and that author name isn't Guest) - if ($author && $author != 'guest' && $author != utf8_strtolower($lang_common['Guest'])) { + if ($author && $author != 'guest' && $author != utf8_strtolower(__('Guest'))) { $username_exists = DB::for_table('users')->select('id')->where_like('username', $author)->find_many(); if ($username_exists) { @@ -313,7 +313,7 @@ public function get_search_results() // If it's a search for new posts since last visit if ($action == 'show_new') { if ($this->user->is_guest) { - message($lang_common['No permission'], '403'); + message(__('No permission'), '403'); } $result = DB::for_table('topics') @@ -438,7 +438,7 @@ public function get_search_results() // If it's a search for subscribed topics elseif ($action == 'show_subscriptions') { if ($this->user->is_guest) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $result = DB::for_table('topics') @@ -491,7 +491,7 @@ public function get_search_results() $pdo = DB::get_db(); $pdo = null; } else { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } @@ -543,7 +543,7 @@ public function get_search_results() // If we're on the new posts search, display a "mark all as read" link if (!$this->user->is_guest && $search_type[0] == 'action' && $search_type[1] == 'show_new') { - $search['forum_actions'][] = ''.$lang_common['Mark all as read'].''; + $search['forum_actions'][] = ''.__('Mark all as read').''; } // Fetch results to display @@ -578,7 +578,7 @@ public function get_search_results() $search['start_from'] = $start_from; // Generate paging links - $search['paging_links'] = ''.$lang_common['Pages'].' '.paginate_old($num_pages, $p, '?search_id='.$search_id); + $search['paging_links'] = ''.__('Pages').' '.paginate_old($num_pages, $p, '?search_id='.$search_id); // throw away the first $start_from of $search_ids, only keep the top $per_page of $search_ids $search_ids = array_slice($search_ids, $start_from, $per_page); @@ -627,7 +627,7 @@ public function get_search_results() $subscriber_name = DB::for_table('users')->where('id', $subscriber_id)->find_one_col('username'); if (!$subscriber_name) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $search['crumbs_text']['search_type'] = ''.sprintf($lang_search['Quick search show_subscriptions'], feather_escape($subscriber_name)).''; @@ -660,7 +660,7 @@ public function get_search_results() public function display_search_results($search) { - global $lang_forum, $lang_common, $lang_topic, $lang_search, $pd; + global $lang_forum, $lang_topic, $lang_search, $pd; // Get topic/forum tracking data if (!$this->user->is_guest) { @@ -708,7 +708,6 @@ public function display_search_results($search) 'url_topic' => $url_topic, 'cur_search' => $cur_search, 'forum' => $forum, - 'lang_common' => $lang_common, 'lang_search' => $lang_search, 'lang_topic' => $lang_topic, ) @@ -719,7 +718,7 @@ public function display_search_results($search) $cur_search['item_status'] = ($topic_count % 2 == 0) ? 'roweven' : 'rowodd'; $cur_search['icon_type'] = 'icon'; - $subject = ''.feather_escape($cur_search['subject']).' '.$lang_common['by'].' '.feather_escape($cur_search['poster']).''; + $subject = ''.feather_escape($cur_search['subject']).' '.__('by').' '.feather_escape($cur_search['poster']).''; if ($cur_search['sticky'] == '1') { $cur_search['item_status'] .= ' isticky'; @@ -735,7 +734,7 @@ public function display_search_results($search) $cur_search['item_status'] .= ' inew'; $cur_search['icon_type'] = 'icon icon-new'; $subject = ''.$subject.''; - $subject_new_posts = '[ '.$lang_common['New posts'].' ]'; + $subject_new_posts = '[ '.__('New posts').' ]'; } else { $subject_new_posts = null; } @@ -769,7 +768,6 @@ public function display_search_results($search) 'topic_count' => $topic_count, 'subject' => $subject, 'forum' => $forum, - 'lang_common' => $lang_common, ) ); } diff --git a/model/viewforum.php b/model/viewforum.php index 1f87ec5d..790d5384 100644 --- a/model/viewforum.php +++ b/model/viewforum.php @@ -25,7 +25,7 @@ public function __construct() // Returns basic informations about the forum public function get_info_forum($id) { - global $lang_common; + $where_get_info_forum = array( array('fp.read_forum' => 'IS NULL'), @@ -58,7 +58,7 @@ public function get_info_forum($id) } if (!$cur_forum) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $cur_forum; @@ -87,7 +87,7 @@ public function sort_forum_by($sort_by_sql) // Adds relationship meta tags public function get_page_head($forum_id, $num_pages, $p, $url_forum) { - global $lang_common; + $page_head = array(); $page_head['canonical'] = "\t".''; @@ -102,9 +102,9 @@ public function get_page_head($forum_id, $num_pages, $p, $url_forum) } if ($this->config['o_feed_type'] == '1') { - $page_head['feed'] = ''; + $page_head['feed'] = ''; } elseif ($this->config['o_feed_type'] == '2') { - $page_head['feed'] = ''; + $page_head['feed'] = ''; } return $page_head; @@ -113,7 +113,7 @@ public function get_page_head($forum_id, $num_pages, $p, $url_forum) // Returns forum action public function get_forum_actions($forum_id, $subscriptions, $is_subscribed) { - global $lang_forum, $lang_common; + global $lang_forum; $forum_actions = array(); @@ -126,7 +126,7 @@ public function get_forum_actions($forum_id, $subscriptions, $is_subscribed) } } - $forum_actions[] = ''.$lang_common['Mark forum read'].''; + $forum_actions[] = ''.__('Mark forum read').''; } return $forum_actions; @@ -135,7 +135,7 @@ public function get_forum_actions($forum_id, $subscriptions, $is_subscribed) // Returns the elements needed to display topics public function print_topics($forum_id, $sort_by, $start_from) { - global $lang_common, $lang_forum; + global $lang_forum; // Get topic/forum tracking data if (!$this->user->is_guest) { @@ -197,7 +197,7 @@ public function print_topics($forum_id, $sort_by, $start_from) $url_subject = url_friendly($cur_topic['subject']); if (is_null($cur_topic['moved_to'])) { - $cur_topic['last_post_formatted'] = ''.format_time($cur_topic['last_post']).' '.$lang_common['by'].' '.feather_escape($cur_topic['last_poster']).''; + $cur_topic['last_post_formatted'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; } else { $cur_topic['last_post_formatted'] = '- - -'; } @@ -212,13 +212,13 @@ public function print_topics($forum_id, $sort_by, $start_from) } if ($cur_topic['moved_to'] != 0) { - $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.$lang_common['by'].' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.$lang_forum['Moved'].''; $cur_topic['item_status'] .= ' imoved'; } elseif ($cur_topic['closed'] == '0') { - $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.$lang_common['by'].' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; } else { - $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.$lang_common['by'].' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.$lang_forum['Closed'].''; $cur_topic['item_status'] .= ' iclosed'; } @@ -227,7 +227,7 @@ public function print_topics($forum_id, $sort_by, $start_from) $cur_topic['item_status'] .= ' inew'; $cur_topic['icon_type'] = 'icon icon-new'; $cur_topic['subject_formatted'] = ''.$cur_topic['subject_formatted'].''; - $subject_new_posts = '[ '.$lang_common['New posts'].' ]'; + $subject_new_posts = '[ '.__('New posts').' ]'; } else { $subject_new_posts = null; } diff --git a/model/viewtopic.php b/model/viewtopic.php index c3006d89..81e48413 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -25,7 +25,7 @@ public function __construct() // Redirects to a post in particular public function redirect_to_post($post_id) { - global $lang_common; + $select_info_topic = array('topic_id', 'posted'); @@ -35,7 +35,7 @@ public function redirect_to_post($post_id) ->find_one(); if (!$result) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } $post['topic_id'] = $result['topic_id']; @@ -55,7 +55,7 @@ public function redirect_to_post($post_id) // Redirects to new posts or last post public function handle_actions($topic_id, $action) { - + // If action=new, we redirect to the first new post (if any) if ($action == 'new') { if (!$this->user->is_guest) { @@ -94,7 +94,7 @@ public function handle_actions($topic_id, $action) // Gets some info about the topic public function get_info_topic($id) { - global $lang_common; + $where_get_info_topic = array( array('fp.read_forum' => 'IS NULL'), @@ -133,7 +133,7 @@ public function get_info_topic($id) } if (!$cur_topic) { - message($lang_common['Bad request'], '404'); + message(__('Bad request'), '404'); } return $cur_topic; @@ -166,18 +166,18 @@ public function get_post_link($topic_id, $closed, $post_replies, $is_admmod) // Should we display the quickpost? public function is_quickpost($post_replies, $closed, $is_admmod) { - global $lang_common; + $quickpost = false; if ($this->config['o_quickpost'] == '1' && ($post_replies == '1' || ($post_replies == '' && $this->user->g_post_replies == '1')) && ($closed == '0' || $is_admmod)) { // Load the post.php language file require FEATHER_ROOT.'lang/'.$this->user->language.'/post.php'; - $required_fields = array('req_message' => $lang_common['Message']); + $required_fields = array('req_message' => __('Message')); if ($this->user->is_guest) { $required_fields['req_username'] = $lang_post['Guest name']; if ($this->config['p_force_guest_email'] == '1') { - $required_fields['req_email'] = $lang_common['Email']; + $required_fields['req_email'] = __('Email'); } } $quickpost = true; @@ -208,7 +208,7 @@ public function get_subscraction($is_subscribed, $topic_id) // Adds relationship meta tags public function get_page_head($topic_id, $num_pages, $p, $url_topic) { - global $lang_common; + $page_head = array(); $page_head['canonical'] = "\t".''; @@ -223,9 +223,9 @@ public function get_page_head($topic_id, $num_pages, $p, $url_topic) } if ($this->config['o_feed_type'] == '1') { - $page_head['feed'] = ''; + $page_head['feed'] = ''; } elseif ($this->config['o_feed_type'] == '2') { - $page_head['feed'] = ''; + $page_head['feed'] = ''; } return $page_head; @@ -234,7 +234,7 @@ public function get_page_head($topic_id, $num_pages, $p, $url_topic) // Prints the posts public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) { - global $lang_topic, $lang_common, $pd; + global $lang_topic, $pd; $post_data = array(); @@ -322,9 +322,9 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) // Now let's deal with the contact links (Email and URL) if ((($cur_post['email_setting'] == '0' && !$this->user->is_guest) || $this->user->is_admmod) && $this->user->g_send_email == '1') { - $cur_post['user_contacts'][] = ''; + $cur_post['user_contacts'][] = ''; } elseif ($cur_post['email_setting'] == '1' && !$this->user->is_guest && $this->user->g_send_email == '1') { - $cur_post['user_contacts'][] = ''; + $cur_post['user_contacts'][] = ''; } if ($cur_post['url'] != '') { @@ -360,7 +360,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) } if ($this->config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$this->user->is_guest && $this->user->g_send_email == '1') { - $cur_post['user_contacts'][] = ''; + $cur_post['user_contacts'][] = ''; } } diff --git a/style/FeatherBB/view/admin/groups/add_edit_group.php b/style/FeatherBB/view/admin/groups/add_edit_group.php index 8c4ddb91..3bd8018c 100644 --- a/style/FeatherBB/view/admin/groups/add_edit_group.php +++ b/style/FeatherBB/view/admin/groups/add_edit_group.php @@ -40,7 +40,7 @@ - + diff --git a/style/FeatherBB/view/delete.php b/style/FeatherBB/view/delete.php index 9d6afff9..fc4f5f0a 100644 --- a/style/FeatherBB/view/delete.php +++ b/style/FeatherBB/view/delete.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    • » 
    • » 
    • @@ -35,7 +35,7 @@

      '.$lang_delete['Topic warning'].'' : ''.$lang_delete['Warning'].'' ?>

    -

    +

    diff --git a/style/FeatherBB/view/edit.php b/style/FeatherBB/view/edit.php index 3d91e362..d4199e10 100644 --- a/style/FeatherBB/view/edit.php +++ b/style/FeatherBB/view/edit.php @@ -19,7 +19,7 @@
      -
    • +
    • » 
    • » 
    • » 
    • @@ -83,16 +83,16 @@
      -
      @@ -102,7 +102,7 @@ ?>
      - +
      @@ -113,7 +113,7 @@ -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index 6249ae34..80259a3b 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -11,7 +11,7 @@
      -

      +

      '."\n"; echo "\t\t\t\t".'
      '.$lang_forum['Mod controls'].'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_common['Moderate forum'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Moderate forum').'
      '."\n"; echo "\t\t\t".''."\n"; } elseif ($footer_style == 'viewtopic') { if (isset($pid)) { @@ -36,20 +36,20 @@ echo "\t\t\t".'
      '."\n"; echo "\t\t\t\t".'
      '.$lang_topic['Mod controls'].'
      '."\n"; // TODO: all - //echo "\t\t\t\t".'
      '.$lang_common['Moderate topic'].''.($num_pages > 1 ? ' ('.$lang_common['All'].')' : '').'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_common['Moderate topic'].'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_common['Move topic'].'
      '."\n"; + //echo "\t\t\t\t".'
      '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Moderate topic').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Move topic').'
      '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
      '.$lang_common['Open topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Open topic').'
      '."\n"; } else { - echo "\t\t\t\t".'
      '.$lang_common['Close topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Close topic').'
      '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
      '.$lang_common['Unstick topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Unstick topic').'
      '."\n"; } else { - echo "\t\t\t\t".'
      '.$lang_common['Stick topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Stick topic').'
      '."\n"; } echo "\t\t\t".'
      '."\n"; @@ -89,26 +89,26 @@ if ($footer_style == 'index') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewforum') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewtopic') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } ?> -

      FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

      +

      FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

      @@ -122,13 +122,13 @@ // Calculate script generation time $time_diff = sprintf('%.3f', get_microtime() - $feather_start); - echo sprintf($lang_common['Querytime'], $time_diff, count(\DB::get_query_log()[0])); + echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); if (function_exists('memory_get_usage')) { - echo ' - '.sprintf($lang_common['Memory usage'], file_size(memory_get_usage())); + echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage())); + echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); } } diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php index ec4c4b49..7b2b8d28 100644 --- a/style/FeatherBB/view/header.php +++ b/style/FeatherBB/view/header.php @@ -9,7 +9,7 @@ ?> - + @@ -57,7 +57,7 @@ function process_form(the_form) var elem = the_form.elements[i]; if (elem.name && required_fields[elem.name] && !elem.value && elem.type && (/^(?:text(?:area)?|password|file)$/i.test(elem.type))) { - alert('"' + required_fields[elem.name] + '" '); + alert('"' + required_fields[elem.name] + '" '); elem.focus(); return false; } @@ -89,7 +89,7 @@ function process_form(the_form)
    @@ -111,7 +111,7 @@ function process_form(the_form)
    user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?>
    -

    +

    @@ -122,7 +122,7 @@ function process_form(the_form)
    -

    ×

    +

    ×

    diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php index fd511285..65353802 100644 --- a/style/FeatherBB/view/help.php +++ b/style/FeatherBB/view/help.php @@ -67,7 +67,7 @@

    [quote=James][/quote]

    -
    James

    +
    James

    [quote][/quote]

    @@ -133,7 +133,7 @@ } foreach ($smiley_groups as $smiley_img => $smiley_texts) { - echo "\t\t

    ". implode(' ' .$lang_common['and']. ' ', $smiley_texts).' ' .$lang_help['produces']. ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

    '."\n"; + echo "\t\t

    ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .$lang_help['produces']. ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

    '."\n"; } ?> diff --git a/style/FeatherBB/view/index.php b/style/FeatherBB/view/index.php index 1ffce864..73d0ec3b 100644 --- a/style/FeatherBB/view/index.php +++ b/style/FeatherBB/view/index.php @@ -33,10 +33,10 @@ - + - - + + diff --git a/style/FeatherBB/view/login/form.php b/style/FeatherBB/view/login/form.php index 8d35d8b7..221f02db 100644 --- a/style/FeatherBB/view/login/form.php +++ b/style/FeatherBB/view/login/form.php @@ -14,7 +14,7 @@ ?>
    -

    +

    @@ -24,8 +24,8 @@
    - - + +
    @@ -36,7 +36,7 @@
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/FeatherBB/view/login/password_forgotten.php index 2712f630..7387bc54 100644 --- a/style/FeatherBB/view/login/password_forgotten.php +++ b/style/FeatherBB/view/login/password_forgotten.php @@ -46,12 +46,12 @@
    - +

    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/message.php b/style/FeatherBB/view/message.php index 7f26edad..d376bd09 100644 --- a/style/FeatherBB/view/message.php +++ b/style/FeatherBB/view/message.php @@ -14,11 +14,11 @@ ?>
    -

    +

    -

    +

    diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php index 054c7f34..0cd4f3c8 100644 --- a/style/FeatherBB/view/misc/email.php +++ b/style/FeatherBB/view/misc/email.php @@ -23,15 +23,15 @@
    -
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/misc/report.php b/style/FeatherBB/view/misc/report.php index 6cf01c90..adbb619f 100644 --- a/style/FeatherBB/view/misc/report.php +++ b/style/FeatherBB/view/misc/report.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    • » 
    • » 
    • @@ -34,11 +34,11 @@
      - +
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_posts.php b/style/FeatherBB/view/moderate/delete_posts.php index d3a8ea76..01269ca7 100644 --- a/style/FeatherBB/view/moderate/delete_posts.php +++ b/style/FeatherBB/view/moderate/delete_posts.php @@ -27,7 +27,7 @@ -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_topics.php b/style/FeatherBB/view/moderate/delete_topics.php index d18c7394..9b04ddaf 100644 --- a/style/FeatherBB/view/moderate/delete_topics.php +++ b/style/FeatherBB/view/moderate/delete_topics.php @@ -28,7 +28,7 @@ -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/merge_topics.php b/style/FeatherBB/view/moderate/merge_topics.php index 1c5cc5a4..0e328f1d 100644 --- a/style/FeatherBB/view/moderate/merge_topics.php +++ b/style/FeatherBB/view/moderate/merge_topics.php @@ -30,7 +30,7 @@ -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php index af90498d..114df22e 100644 --- a/style/FeatherBB/view/moderate/moderator_forum.php +++ b/style/FeatherBB/view/moderate/moderator_forum.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • » 
    @@ -38,10 +38,10 @@
    - - + + - + @@ -91,7 +91,7 @@
      -
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/moderate/move_topics.php b/style/FeatherBB/view/moderate/move_topics.php index 8dfedeaf..b792cf68 100644 --- a/style/FeatherBB/view/moderate/move_topics.php +++ b/style/FeatherBB/view/moderate/move_topics.php @@ -38,7 +38,7 @@ -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/FeatherBB/view/moderate/posts_view.php index 87d23e24..60477a50 100644 --- a/style/FeatherBB/view/moderate/posts_view.php +++ b/style/FeatherBB/view/moderate/posts_view.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    • » 
    • » 
    • @@ -53,7 +53,7 @@
    -

    +

      -
    • +
    • » 
    • » 
    • » 
    • diff --git a/style/FeatherBB/view/moderate/split_posts.php b/style/FeatherBB/view/moderate/split_posts.php index f3f5d88e..244c7fb8 100644 --- a/style/FeatherBB/view/moderate/split_posts.php +++ b/style/FeatherBB/view/moderate/split_posts.php @@ -23,7 +23,7 @@
      - +
    \ No newline at end of file diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php index 7bdfc449..603d4cac 100644 --- a/style/FeatherBB/view/post.php +++ b/style/FeatherBB/view/post.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • @@ -92,16 +92,16 @@
      - +
      user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.$lang_common['Email'].' '.$lang_common['Required'].'' : $lang_common['Email']; + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - @@ -114,17 +114,17 @@ } if ($fid): ?> - -
      @@ -134,7 +134,7 @@
      - +
      @@ -157,7 +157,7 @@ $question = array_keys($lang_antispam_questions); $qencoded = md5($question[$index_questions]); echo sprintf($lang_antispam['Robot question'], $question[$index_questions]);?> - +

      @@ -165,7 +165,7 @@
      -

      +

    diff --git a/style/FeatherBB/view/profile/change_mail.php b/style/FeatherBB/view/profile/change_mail.php index 68ae0012..f425e499 100644 --- a/style/FeatherBB/view/profile/change_mail.php +++ b/style/FeatherBB/view/profile/change_mail.php @@ -23,13 +23,13 @@
    - - + +

    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/profile/change_pass.php b/style/FeatherBB/view/profile/change_pass.php index 0231efa2..f5344967 100644 --- a/style/FeatherBB/view/profile/change_pass.php +++ b/style/FeatherBB/view/profile/change_pass.php @@ -23,17 +23,17 @@
    -user->is_admmod): ?>
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/profile/delete_user.php b/style/FeatherBB/view/profile/delete_user.php index 55c707c5..0f0ebc14 100644 --- a/style/FeatherBB/view/profile/delete_user.php +++ b/style/FeatherBB/view/profile/delete_user.php @@ -30,7 +30,7 @@ -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php index 8ac8fd27..7aacc2f0 100644 --- a/style/FeatherBB/view/profile/section_display.php +++ b/style/FeatherBB/view/profile/section_display.php @@ -93,7 +93,7 @@ -

    +

    diff --git a/style/FeatherBB/view/profile/section_essentials.php b/style/FeatherBB/view/profile/section_essentials.php index 25deccf6..364d5d8e 100644 --- a/style/FeatherBB/view/profile/section_essentials.php +++ b/style/FeatherBB/view/profile/section_essentials.php @@ -250,7 +250,7 @@ -

    +

    diff --git a/style/FeatherBB/view/profile/section_messaging.php b/style/FeatherBB/view/profile/section_messaging.php index 3a5be1a2..1ba9e14f 100644 --- a/style/FeatherBB/view/profile/section_messaging.php +++ b/style/FeatherBB/view/profile/section_messaging.php @@ -31,7 +31,7 @@ -

    +

    diff --git a/style/FeatherBB/view/profile/section_personal.php b/style/FeatherBB/view/profile/section_personal.php index 3accb5f7..6e2fd1e6 100644 --- a/style/FeatherBB/view/profile/section_personal.php +++ b/style/FeatherBB/view/profile/section_personal.php @@ -31,7 +31,7 @@ -

    +

    diff --git a/style/FeatherBB/view/profile/section_personality.php b/style/FeatherBB/view/profile/section_personality.php index d3e67cd6..cfb1d445 100644 --- a/style/FeatherBB/view/profile/section_personality.php +++ b/style/FeatherBB/view/profile/section_personality.php @@ -39,16 +39,16 @@
    -

    +

    diff --git a/style/FeatherBB/view/profile/section_privacy.php b/style/FeatherBB/view/profile/section_privacy.php index 34715516..030520e0 100644 --- a/style/FeatherBB/view/profile/section_privacy.php +++ b/style/FeatherBB/view/profile/section_privacy.php @@ -54,7 +54,7 @@ -

    +

    diff --git a/style/FeatherBB/view/profile/upload_avatar.php b/style/FeatherBB/view/profile/upload_avatar.php index 60487560..7a74e367 100644 --- a/style/FeatherBB/view/profile/upload_avatar.php +++ b/style/FeatherBB/view/profile/upload_avatar.php @@ -24,12 +24,12 @@
    - -

    + +

    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/profile/view_profile.php b/style/FeatherBB/view/profile/view_profile.php index da66b788..d9a5079e 100644 --- a/style/FeatherBB/view/profile/view_profile.php +++ b/style/FeatherBB/view/profile/view_profile.php @@ -14,7 +14,7 @@ ?>
    -

    +

    diff --git a/style/FeatherBB/view/register/email.php b/style/FeatherBB/view/register/email.php index e6355cb6..e8c36fe7 100644 --- a/style/FeatherBB/view/register/email.php +++ b/style/FeatherBB/view/register/email.php @@ -25,15 +25,15 @@
    -
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/register/form.php b/style/FeatherBB/view/register/form.php index 3344af93..a088cc25 100644 --- a/style/FeatherBB/view/register/form.php +++ b/style/FeatherBB/view/register/form.php @@ -43,7 +43,7 @@
    -

    +

    @@ -53,7 +53,7 @@ -
    @@ -63,10 +63,10 @@
    - -

    @@ -78,11 +78,11 @@

    -
    diff --git a/style/FeatherBB/view/search/footer.php b/style/FeatherBB/view/search/footer.php index 73ff5d13..a64e1cdf 100644 --- a/style/FeatherBB/view/search/footer.php +++ b/style/FeatherBB/view/search/footer.php @@ -30,7 +30,7 @@
      -
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/search/form.php b/style/FeatherBB/view/search/form.php index 642fb380..262bf4d9 100644 --- a/style/FeatherBB/view/search/form.php +++ b/style/FeatherBB/view/search/form.php @@ -73,7 +73,7 @@ -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/search/header.php b/style/FeatherBB/view/search/header.php index 47706687..79f9ee84 100644 --- a/style/FeatherBB/view/search/header.php +++ b/style/FeatherBB/view/search/header.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    • » 
    @@ -37,10 +37,10 @@
    - - - - + + + + diff --git a/style/FeatherBB/view/search/topics.php b/style/FeatherBB/view/search/topics.php index d60dce31..af843193 100644 --- a/style/FeatherBB/view/search/topics.php +++ b/style/FeatherBB/view/search/topics.php @@ -25,5 +25,5 @@ - + \ No newline at end of file diff --git a/style/FeatherBB/view/userlist.php b/style/FeatherBB/view/userlist.php index 66e2a20d..33594426 100644 --- a/style/FeatherBB/view/userlist.php +++ b/style/FeatherBB/view/userlist.php @@ -21,7 +21,7 @@
    -user->g_search_users == '1'): ?> +user->g_search_users == '1'): ?>
    -

    +

    @@ -70,16 +70,16 @@
    -

    +

    '.format_time($cur_search['last_post']).' '.$lang_common['by'].' '.feather_escape($cur_search['last_poster']) ?>'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
    - - - - + + + + diff --git a/style/FeatherBB/view/viewforum.php b/style/FeatherBB/view/viewforum.php index 332987ae..7f4a55b7 100644 --- a/style/FeatherBB/view/viewforum.php +++ b/style/FeatherBB/view/viewforum.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    @@ -34,10 +34,10 @@
    - - + + - + @@ -91,7 +91,7 @@
      -
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?> diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php index e5f55ab0..733bb59b 100644 --- a/style/FeatherBB/view/viewtopic.php +++ b/style/FeatherBB/view/viewtopic.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • » 
    @@ -107,7 +107,7 @@
      -
    • +
    • » 
    • » 
    @@ -130,7 +130,7 @@
    - +
    @@ -139,15 +139,15 @@ user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.$lang_common['Email'].' '.$lang_common['Required'].'' : $lang_common['Email']; + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
    '.$lang_common['Message'].' '.$lang_common['Required'].'
    '; + echo "\t\t\t\t\t\t".'
    @@ -186,7 +186,7 @@ $qencoded = md5($question[$index_questions]); echo sprintf($lang_antispam['Robot question'], $question[$index_questions]); ?> - +

    @@ -195,7 +195,7 @@
    -

    +

    diff --git a/view/admin/groups/add_edit_group.php b/view/admin/groups/add_edit_group.php index e2f0c0e8..26c9881c 100644 --- a/view/admin/groups/add_edit_group.php +++ b/view/admin/groups/add_edit_group.php @@ -40,7 +40,7 @@ diff --git a/view/delete.php b/view/delete.php index 9d6afff9..fc4f5f0a 100644 --- a/view/delete.php +++ b/view/delete.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    • » 
    • » 
    • @@ -35,7 +35,7 @@

      '.$lang_delete['Topic warning'].'' : ''.$lang_delete['Warning'].'' ?>

    -

    +

    diff --git a/view/edit.php b/view/edit.php index 3d91e362..d4199e10 100644 --- a/view/edit.php +++ b/view/edit.php @@ -19,7 +19,7 @@
      -
    • +
    • » 
    • » 
    • » 
    • @@ -83,16 +83,16 @@
      -
      @@ -102,7 +102,7 @@ ?>
      - +
      @@ -113,7 +113,7 @@ -

      +

      \ No newline at end of file diff --git a/view/footer.php b/view/footer.php index dde5eb31..98104ea5 100644 --- a/view/footer.php +++ b/view/footer.php @@ -11,7 +11,7 @@
      -

      +

      '."\n"; echo "\t\t\t\t".'
      '.$lang_forum['Mod controls'].'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_common['Moderate forum'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Moderate forum').'
      '."\n"; echo "\t\t\t".''."\n"; } elseif ($footer_style == 'viewtopic') { if (isset($pid)) { @@ -36,20 +36,20 @@ echo "\t\t\t".'
      '."\n"; echo "\t\t\t\t".'
      '.$lang_topic['Mod controls'].'
      '."\n"; // TODO: all - //echo "\t\t\t\t".'
      '.$lang_common['Moderate topic'].''.($num_pages > 1 ? ' ('.$lang_common['All'].')' : '').'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_common['Moderate topic'].'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_common['Move topic'].'
      '."\n"; + //echo "\t\t\t\t".'
      '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Moderate topic').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Move topic').'
      '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
      '.$lang_common['Open topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Open topic').'
      '."\n"; } else { - echo "\t\t\t\t".'
      '.$lang_common['Close topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Close topic').'
      '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
      '.$lang_common['Unstick topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Unstick topic').'
      '."\n"; } else { - echo "\t\t\t\t".'
      '.$lang_common['Stick topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Stick topic').'
      '."\n"; } echo "\t\t\t".'
      '."\n"; @@ -89,26 +89,26 @@ if ($footer_style == 'index') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewforum') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewtopic') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } ?> -

      FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

      +

      FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

      @@ -122,13 +122,13 @@ // Calculate script generation time $time_diff = sprintf('%.3f', get_microtime() - $feather_start); - echo sprintf($lang_common['Querytime'], $time_diff, count(\DB::get_query_log()[0])); + echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); if (function_exists('memory_get_usage')) { - echo ' - '.sprintf($lang_common['Memory usage'], file_size(memory_get_usage())); + echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage())); + echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); } } diff --git a/view/header.php b/view/header.php index 4492eaa0..88f0260a 100644 --- a/view/header.php +++ b/view/header.php @@ -9,7 +9,7 @@ ?> - + <?php echo generate_page_title($page_title, $p) ?> @@ -55,7 +55,7 @@ function process_form(the_form) var elem = the_form.elements[i]; if (elem.name && required_fields[elem.name] && !elem.value && elem.type && (/^(?:text(?:area)?|password|file)$/i.test(elem.type))) { - alert('"' + required_fields[elem.name] + '" '); + alert('"' + required_fields[elem.name] + '" '); elem.focus(); return false; } @@ -92,7 +92,7 @@ function process_form(the_form) user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?>
      -

      +

      @@ -104,7 +104,7 @@ function process_form(the_form)
      -

      ×

      +

      ×

      diff --git a/view/help.php b/view/help.php index fd511285..65353802 100644 --- a/view/help.php +++ b/view/help.php @@ -67,7 +67,7 @@

      [quote=James][/quote]

      -
      James

      +
      James

      [quote][/quote]

      @@ -133,7 +133,7 @@ } foreach ($smiley_groups as $smiley_img => $smiley_texts) { - echo "\t\t

      ". implode(' ' .$lang_common['and']. ' ', $smiley_texts).' ' .$lang_help['produces']. ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

      '."\n"; + echo "\t\t

      ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .$lang_help['produces']. ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

      '."\n"; } ?> diff --git a/view/index.php b/view/index.php index 1ffce864..73d0ec3b 100644 --- a/view/index.php +++ b/view/index.php @@ -33,10 +33,10 @@
    - +
    - + - - + + diff --git a/view/login/form.php b/view/login/form.php index 8d35d8b7..221f02db 100644 --- a/view/login/form.php +++ b/view/login/form.php @@ -14,7 +14,7 @@ ?>
    -

    +

    @@ -24,8 +24,8 @@
    - - + +
    @@ -36,7 +36,7 @@
    -

    +

    \ No newline at end of file diff --git a/view/login/password_forgotten.php b/view/login/password_forgotten.php index 2712f630..7387bc54 100644 --- a/view/login/password_forgotten.php +++ b/view/login/password_forgotten.php @@ -46,12 +46,12 @@
    - +

    -

    +

    \ No newline at end of file diff --git a/view/message.php b/view/message.php index 7f26edad..d376bd09 100644 --- a/view/message.php +++ b/view/message.php @@ -14,11 +14,11 @@ ?>
    -

    +

    -

    +

    diff --git a/view/misc/email.php b/view/misc/email.php index 054c7f34..0cd4f3c8 100644 --- a/view/misc/email.php +++ b/view/misc/email.php @@ -23,15 +23,15 @@
    -
    -

    +

    \ No newline at end of file diff --git a/view/misc/report.php b/view/misc/report.php index 6cf01c90..adbb619f 100644 --- a/view/misc/report.php +++ b/view/misc/report.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    • » 
    • » 
    • @@ -34,11 +34,11 @@
      - +
    -

    +

    \ No newline at end of file diff --git a/view/moderate/delete_posts.php b/view/moderate/delete_posts.php index d3a8ea76..01269ca7 100644 --- a/view/moderate/delete_posts.php +++ b/view/moderate/delete_posts.php @@ -27,7 +27,7 @@ -

    +

    \ No newline at end of file diff --git a/view/moderate/delete_topics.php b/view/moderate/delete_topics.php index d18c7394..9b04ddaf 100644 --- a/view/moderate/delete_topics.php +++ b/view/moderate/delete_topics.php @@ -28,7 +28,7 @@ -

    +

    \ No newline at end of file diff --git a/view/moderate/merge_topics.php b/view/moderate/merge_topics.php index 1c5cc5a4..0e328f1d 100644 --- a/view/moderate/merge_topics.php +++ b/view/moderate/merge_topics.php @@ -30,7 +30,7 @@ -

    +

    \ No newline at end of file diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index af90498d..114df22e 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • » 
    @@ -38,10 +38,10 @@
    - - + + - + @@ -91,7 +91,7 @@
      -
    • +
    • » 
    • » 
    diff --git a/view/moderate/move_topics.php b/view/moderate/move_topics.php index 8dfedeaf..b792cf68 100644 --- a/view/moderate/move_topics.php +++ b/view/moderate/move_topics.php @@ -38,7 +38,7 @@ -

    +

    \ No newline at end of file diff --git a/view/moderate/posts_view.php b/view/moderate/posts_view.php index 87d23e24..60477a50 100644 --- a/view/moderate/posts_view.php +++ b/view/moderate/posts_view.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    • » 
    • » 
    • @@ -53,7 +53,7 @@
    -

    +

      -
    • +
    • » 
    • » 
    • » 
    • diff --git a/view/moderate/split_posts.php b/view/moderate/split_posts.php index f3f5d88e..244c7fb8 100644 --- a/view/moderate/split_posts.php +++ b/view/moderate/split_posts.php @@ -23,7 +23,7 @@
      - +
    \ No newline at end of file diff --git a/view/post.php b/view/post.php index 7bdfc449..603d4cac 100644 --- a/view/post.php +++ b/view/post.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • @@ -92,16 +92,16 @@
      - +
      user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.$lang_common['Email'].' '.$lang_common['Required'].'' : $lang_common['Email']; + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - @@ -114,17 +114,17 @@ } if ($fid): ?> - -
      @@ -134,7 +134,7 @@
      - +
      @@ -157,7 +157,7 @@ $question = array_keys($lang_antispam_questions); $qencoded = md5($question[$index_questions]); echo sprintf($lang_antispam['Robot question'], $question[$index_questions]);?> - +

      @@ -165,7 +165,7 @@
      -

      +

    diff --git a/view/profile/change_mail.php b/view/profile/change_mail.php index 68ae0012..f425e499 100644 --- a/view/profile/change_mail.php +++ b/view/profile/change_mail.php @@ -23,13 +23,13 @@
    - - + +

    -

    +

    \ No newline at end of file diff --git a/view/profile/change_pass.php b/view/profile/change_pass.php index 0231efa2..f5344967 100644 --- a/view/profile/change_pass.php +++ b/view/profile/change_pass.php @@ -23,17 +23,17 @@
    -user->is_admmod): ?>
    -

    +

    \ No newline at end of file diff --git a/view/profile/delete_user.php b/view/profile/delete_user.php index 55c707c5..0f0ebc14 100644 --- a/view/profile/delete_user.php +++ b/view/profile/delete_user.php @@ -30,7 +30,7 @@ -

    +

    \ No newline at end of file diff --git a/view/profile/section_display.php b/view/profile/section_display.php index 8ac8fd27..7aacc2f0 100644 --- a/view/profile/section_display.php +++ b/view/profile/section_display.php @@ -93,7 +93,7 @@ -

    +

    diff --git a/view/profile/section_essentials.php b/view/profile/section_essentials.php index 25deccf6..364d5d8e 100644 --- a/view/profile/section_essentials.php +++ b/view/profile/section_essentials.php @@ -250,7 +250,7 @@ -

    +

    diff --git a/view/profile/section_messaging.php b/view/profile/section_messaging.php index 3a5be1a2..1ba9e14f 100644 --- a/view/profile/section_messaging.php +++ b/view/profile/section_messaging.php @@ -31,7 +31,7 @@ -

    +

    diff --git a/view/profile/section_personal.php b/view/profile/section_personal.php index 3accb5f7..6e2fd1e6 100644 --- a/view/profile/section_personal.php +++ b/view/profile/section_personal.php @@ -31,7 +31,7 @@ -

    +

    diff --git a/view/profile/section_personality.php b/view/profile/section_personality.php index d3e67cd6..cfb1d445 100644 --- a/view/profile/section_personality.php +++ b/view/profile/section_personality.php @@ -39,16 +39,16 @@
    -

    +

    diff --git a/view/profile/section_privacy.php b/view/profile/section_privacy.php index 34715516..030520e0 100644 --- a/view/profile/section_privacy.php +++ b/view/profile/section_privacy.php @@ -54,7 +54,7 @@ -

    +

    diff --git a/view/profile/upload_avatar.php b/view/profile/upload_avatar.php index 60487560..7a74e367 100644 --- a/view/profile/upload_avatar.php +++ b/view/profile/upload_avatar.php @@ -24,12 +24,12 @@
    - -

    + +

    -

    +

    \ No newline at end of file diff --git a/view/profile/view_profile.php b/view/profile/view_profile.php index da66b788..d9a5079e 100644 --- a/view/profile/view_profile.php +++ b/view/profile/view_profile.php @@ -14,7 +14,7 @@ ?>
    -

    +

    diff --git a/view/register/email.php b/view/register/email.php index e6355cb6..e8c36fe7 100644 --- a/view/register/email.php +++ b/view/register/email.php @@ -25,15 +25,15 @@
    -
    -

    +

    \ No newline at end of file diff --git a/view/register/form.php b/view/register/form.php index 3344af93..a088cc25 100644 --- a/view/register/form.php +++ b/view/register/form.php @@ -43,7 +43,7 @@
    -

    +

    @@ -53,7 +53,7 @@ -
    @@ -63,10 +63,10 @@
    - -

    @@ -78,11 +78,11 @@

    -
    diff --git a/view/search/footer.php b/view/search/footer.php index 73ff5d13..a64e1cdf 100644 --- a/view/search/footer.php +++ b/view/search/footer.php @@ -30,7 +30,7 @@
      -
    • +
    • » 
    • » 
    diff --git a/view/search/form.php b/view/search/form.php index 642fb380..262bf4d9 100644 --- a/view/search/form.php +++ b/view/search/form.php @@ -73,7 +73,7 @@ -

    +

    \ No newline at end of file diff --git a/view/search/header.php b/view/search/header.php index 47706687..79f9ee84 100644 --- a/view/search/header.php +++ b/view/search/header.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    • » 
    @@ -37,10 +37,10 @@
    - - - - + + + + diff --git a/view/search/topics.php b/view/search/topics.php index d60dce31..af843193 100644 --- a/view/search/topics.php +++ b/view/search/topics.php @@ -25,5 +25,5 @@ - + \ No newline at end of file diff --git a/view/userlist.php b/view/userlist.php index 66e2a20d..33594426 100644 --- a/view/userlist.php +++ b/view/userlist.php @@ -21,7 +21,7 @@
    -user->g_search_users == '1'): ?> +user->g_search_users == '1'): ?>
    -

    +

    @@ -70,16 +70,16 @@
    -

    +

    '.format_time($cur_search['last_post']).' '.$lang_common['by'].' '.feather_escape($cur_search['last_poster']) ?>'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
    - - - - + + + + diff --git a/view/viewforum.php b/view/viewforum.php index 332987ae..7f4a55b7 100644 --- a/view/viewforum.php +++ b/view/viewforum.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    @@ -34,10 +34,10 @@
    - - + + - + @@ -91,7 +91,7 @@
      -
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?> diff --git a/view/viewtopic.php b/view/viewtopic.php index e5f55ab0..733bb59b 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • » 
    @@ -107,7 +107,7 @@
      -
    • +
    • » 
    • » 
    @@ -130,7 +130,7 @@
    - +
    @@ -139,15 +139,15 @@ user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.$lang_common['Email'].' '.$lang_common['Required'].'' : $lang_common['Email']; + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
    '.$lang_common['Message'].' '.$lang_common['Required'].'
    '; + echo "\t\t\t\t\t\t".'
    @@ -186,7 +186,7 @@ $qencoded = md5($question[$index_questions]); echo sprintf($lang_antispam['Robot question'], $question[$index_questions]); ?> - +

    @@ -195,7 +195,7 @@
    -

    +

    From b3252fbbf6ec08134c35ddad66e9acd03030cb5f Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 13 Aug 2015 12:11:48 +0200 Subject: [PATCH 021/353] Implement gettext for user view --- controller/delete.php | 10 +- controller/edit.php | 15 +- controller/help.php | 15 +- controller/index.php | 5 +- controller/login.php | 23 +- controller/misc.php | 51 +-- controller/moderate.php | 76 +--- controller/post.php | 35 +- controller/profile.php | 83 ++-- controller/register.php | 35 +- controller/search.php | 20 +- controller/userlist.php | 13 +- controller/viewforum.php | 9 +- controller/viewtopic.php | 17 +- extern.php | 16 +- include/functions.php | 23 +- install/index.php | 210 +++++----- lang/English/antispam.mo | Bin 0 -> 751 bytes lang/English/antispam.po | 27 ++ lang/English/antispam_questions.mo | Bin 0 -> 765 bytes lang/English/antispam_questions.po | 43 ++ lang/English/bbeditor.mo | Bin 0 -> 1082 bytes lang/English/bbeditor.php | 25 -- lang/English/bbeditor.po | 63 +++ lang/English/convertor.php | 6 +- lang/English/delete.mo | Bin 0 -> 1003 bytes lang/English/delete.php | 16 - lang/English/delete.po | 42 ++ lang/English/forum.mo | Bin 0 -> 866 bytes lang/English/forum.php | 17 - lang/English/forum.po | 45 +++ lang/English/help.mo | Bin 0 -> 4255 bytes lang/English/help.php | 66 --- lang/English/help.po | 165 ++++++++ lang/English/index.mo | Bin 0 -> 1064 bytes lang/English/index.php | 20 - lang/English/index.po | 54 +++ lang/English/install.mo | Bin 0 -> 9441 bytes lang/English/install.php | 100 ----- lang/English/install.po | 291 ++++++++++++++ lang/English/login.mo | Bin 0 -> 1877 bytes lang/English/login.php | 26 -- lang/English/login.po | 63 +++ lang/English/misc.mo | Bin 0 -> 5068 bytes lang/English/misc.php | 93 ----- lang/English/misc.po | 225 +++++++++++ lang/English/post.mo | Bin 0 -> 2395 bytes lang/English/post.php | 38 -- lang/English/post.po | 93 +++++ lang/English/prof_reg.mo | Bin 0 -> 5891 bytes lang/English/prof_reg.php | 79 ---- lang/English/prof_reg.po | 225 +++++++++++ lang/English/profile.mo | Bin 0 -> 9585 bytes lang/English/profile.php | 143 ------- lang/English/profile.po | 378 ++++++++++++++++++ lang/English/register.mo | Bin 0 -> 3064 bytes lang/English/register.php | 37 -- lang/English/register.po | 84 ++++ lang/English/search.mo | Bin 0 -> 4068 bytes lang/English/search.php | 64 --- lang/English/search.po | 174 ++++++++ lang/English/topic.mo | Bin 0 -> 1475 bytes lang/English/topic.php | 33 -- lang/English/topic.po | 93 +++++ lang/English/update.mo | Bin 0 -> 7678 bytes lang/English/update.php | 74 ---- lang/English/update.po | 195 +++++++++ lang/English/userlist.mo | Bin 0 -> 898 bytes lang/English/userlist.php | 13 - lang/English/userlist.po | 33 ++ model/delete.php | 8 +- model/edit.php | 28 +- model/index.php | 4 +- model/login.php | 18 +- model/misc.php | 50 +-- model/moderate.php | 58 ++- model/post.php | 32 +- model/profile.php | 141 +++---- model/register.php | 22 +- model/search.php | 45 +-- model/viewforum.php | 14 +- model/viewtopic.php | 56 ++- style/FeatherBB/view/delete.php | 10 +- style/FeatherBB/view/edit.php | 23 +- style/FeatherBB/view/footer.php | 4 +- style/FeatherBB/view/help.php | 128 +++--- style/FeatherBB/view/index.php | 24 +- style/FeatherBB/view/login/form.php | 8 +- .../view/login/password_forgotten.php | 10 +- style/FeatherBB/view/misc/email.php | 10 +- style/FeatherBB/view/misc/report.php | 8 +- style/FeatherBB/view/misc/rules.php | 2 +- .../FeatherBB/view/moderate/delete_posts.php | 8 +- .../FeatherBB/view/moderate/delete_topics.php | 8 +- .../FeatherBB/view/moderate/merge_topics.php | 8 +- .../view/moderate/moderator_forum.php | 12 +- style/FeatherBB/view/moderate/move_topics.php | 10 +- style/FeatherBB/view/moderate/posts_view.php | 10 +- style/FeatherBB/view/moderate/split_posts.php | 12 +- style/FeatherBB/view/post.php | 19 +- style/FeatherBB/view/profile/change_mail.php | 8 +- style/FeatherBB/view/profile/change_pass.php | 12 +- style/FeatherBB/view/profile/delete_user.php | 12 +- style/FeatherBB/view/profile/menu.php | 16 +- .../FeatherBB/view/profile/section_admin.php | 20 +- .../view/profile/section_display.php | 30 +- .../view/profile/section_essentials.php | 118 +++--- .../view/profile/section_messaging.php | 16 +- .../view/profile/section_personal.php | 12 +- .../view/profile/section_personality.php | 14 +- .../view/profile/section_privacy.php | 20 +- .../FeatherBB/view/profile/upload_avatar.php | 10 +- style/FeatherBB/view/profile/view_profile.php | 8 +- style/FeatherBB/view/register/email.php | 10 +- style/FeatherBB/view/register/form.php | 36 +- style/FeatherBB/view/register/rules.php | 6 +- style/FeatherBB/view/search/form.php | 50 +-- style/FeatherBB/view/search/header.php | 2 +- style/FeatherBB/view/search/posts.php | 8 +- style/FeatherBB/view/userlist.php | 22 +- style/FeatherBB/view/viewforum.php | 4 +- style/FeatherBB/view/viewtopic.php | 17 +- view/delete.php | 10 +- view/edit.php | 117 +++--- view/footer.php | 4 +- view/help.php | 128 +++--- view/index.php | 24 +- view/login/form.php | 8 +- view/login/password_forgotten.php | 10 +- view/misc/email.php | 10 +- view/misc/report.php | 8 +- view/misc/rules.php | 2 +- view/moderate/delete_posts.php | 8 +- view/moderate/delete_topics.php | 8 +- view/moderate/merge_topics.php | 8 +- view/moderate/moderator_forum.php | 12 +- view/moderate/move_topics.php | 10 +- view/moderate/posts_view.php | 10 +- view/moderate/split_posts.php | 12 +- view/post.php | 19 +- view/profile/change_mail.php | 8 +- view/profile/change_pass.php | 12 +- view/profile/delete_user.php | 12 +- view/profile/menu.php | 16 +- view/profile/section_admin.php | 20 +- view/profile/section_display.php | 30 +- view/profile/section_essentials.php | 118 +++--- view/profile/section_messaging.php | 16 +- view/profile/section_personal.php | 12 +- view/profile/section_personality.php | 14 +- view/profile/section_privacy.php | 20 +- view/profile/upload_avatar.php | 10 +- view/profile/view_profile.php | 8 +- view/register/email.php | 10 +- view/register/form.php | 36 +- view/register/rules.php | 6 +- view/search/form.php | 50 +-- view/search/header.php | 2 +- view/search/posts.php | 8 +- view/userlist.php | 22 +- view/viewforum.php | 4 +- view/viewtopic.php | 17 +- 162 files changed, 3551 insertions(+), 2348 deletions(-) create mode 100644 lang/English/antispam.mo create mode 100644 lang/English/antispam.po create mode 100644 lang/English/antispam_questions.mo create mode 100644 lang/English/antispam_questions.po create mode 100644 lang/English/bbeditor.mo delete mode 100644 lang/English/bbeditor.php create mode 100644 lang/English/bbeditor.po create mode 100644 lang/English/delete.mo delete mode 100644 lang/English/delete.php create mode 100644 lang/English/delete.po create mode 100644 lang/English/forum.mo delete mode 100644 lang/English/forum.php create mode 100644 lang/English/forum.po create mode 100644 lang/English/help.mo delete mode 100644 lang/English/help.php create mode 100644 lang/English/help.po create mode 100644 lang/English/index.mo delete mode 100644 lang/English/index.php create mode 100644 lang/English/index.po create mode 100644 lang/English/install.mo delete mode 100644 lang/English/install.php create mode 100644 lang/English/install.po create mode 100644 lang/English/login.mo delete mode 100644 lang/English/login.php create mode 100644 lang/English/login.po create mode 100644 lang/English/misc.mo delete mode 100644 lang/English/misc.php create mode 100644 lang/English/misc.po create mode 100644 lang/English/post.mo delete mode 100644 lang/English/post.php create mode 100644 lang/English/post.po create mode 100644 lang/English/prof_reg.mo delete mode 100644 lang/English/prof_reg.php create mode 100644 lang/English/prof_reg.po create mode 100644 lang/English/profile.mo delete mode 100644 lang/English/profile.php create mode 100644 lang/English/profile.po create mode 100644 lang/English/register.mo delete mode 100644 lang/English/register.php create mode 100644 lang/English/register.po create mode 100644 lang/English/search.mo delete mode 100644 lang/English/search.php create mode 100644 lang/English/search.po create mode 100644 lang/English/topic.mo delete mode 100644 lang/English/topic.php create mode 100644 lang/English/topic.po create mode 100644 lang/English/update.mo delete mode 100644 lang/English/update.php create mode 100644 lang/English/update.po create mode 100644 lang/English/userlist.mo delete mode 100644 lang/English/userlist.php create mode 100644 lang/English/userlist.po diff --git a/controller/delete.php b/controller/delete.php index a933ad39..1c0848b4 100644 --- a/controller/delete.php +++ b/controller/delete.php @@ -21,6 +21,8 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\delete(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/delete.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); } public function __autoload($class_name) @@ -30,7 +32,7 @@ public function __autoload($class_name) public function deletepost($id) { - global $lang_post, $pd; + global $pd; if ($this->user->g_read_board == '0') { message(__('No view'), '403'); @@ -62,16 +64,13 @@ public function deletepost($id) message(__('No permission'), '403'); } - // Load the delete.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/delete.php'; - if ($this->feather->request()->isPost()) { $this->model->handle_deletion($is_topic_post, $id, $cur_post['tid'], $cur_post['fid']); } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_delete['Delete post']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Delete post')); define('FEATHER_ACTIVE_PAGE', 'delete'); @@ -81,7 +80,6 @@ public function deletepost($id) $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); $this->feather->render('delete.php', array( - 'lang_delete' => $lang_delete, 'cur_post' => $cur_post, 'id' => $id, 'is_topic_post' => $is_topic_post, diff --git a/controller/edit.php b/controller/edit.php index 57c02123..e412751a 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -21,6 +21,10 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\edit(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.mo'); } public function __autoload($class_name) @@ -30,8 +34,6 @@ public function __autoload($class_name) public function editpost($id) { - global $lang_prof_reg, $lang_post, $lang_register; - if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } @@ -58,9 +60,6 @@ public function editpost($id) if ($is_admmod && $this->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) { message(__('No permission'), '403'); } - - // Load the post.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/post.php'; // Load the bbeditor.php language file require FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.php'; @@ -80,14 +79,14 @@ public function editpost($id) // Edit the post $this->model->edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod); - redirect(get_link('post/'.$id.'/#p'.$id), $lang_post['Post redirect']); + redirect(get_link('post/'.$id.'/#p'.$id), __('Post redirect')); } } else { $post = ''; } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_post['Edit post']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Edit post')); $required_fields = array('req_subject' => __('Subject'), 'req_message' => __('Message')); $focus_element = array('edit', 'req_message'); @@ -104,7 +103,6 @@ public function editpost($id) $this->feather->render('edit.php', array( 'cur_post' => $cur_post, - 'lang_post' => $lang_post, 'errors' => $errors, 'preview_message' => $preview_message, 'id' => $id, @@ -114,7 +112,6 @@ public function editpost($id) 'feather' => $this->feather, 'can_edit_subject' => $can_edit_subject, 'post' => $post, - 'lang_bbeditor' => $lang_bbeditor, ) ); diff --git a/controller/help.php b/controller/help.php index 114a545f..3add1eb0 100644 --- a/controller/help.php +++ b/controller/help.php @@ -20,6 +20,7 @@ public function __construct() $this->request = $this->feather->request; $this->header = new \controller\header(); $this->footer = new \controller\footer(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/help.mo'); } public function __autoload($class_name) @@ -29,27 +30,17 @@ public function __autoload($class_name) public function display() { - - if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } - - // Load the help.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/help.php'; - - - $page_title = array(feather_escape($this->config['o_board_title']), $lang_help['Help']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Help')); define('FEATHER_ACTIVE_PAGE', 'help'); $this->header->setTitle($page_title)->display(); - $this->feather->render('help.php', array( - 'lang_help' => $lang_help, - ) - ); + $this->feather->render('help.php'); $this->footer->display(); } diff --git a/controller/index.php b/controller/index.php index 1d68cbfe..b94aed63 100644 --- a/controller/index.php +++ b/controller/index.php @@ -21,6 +21,7 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\index(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/index.mo'); } public function __autoload($class_name) @@ -34,9 +35,6 @@ public function display() message(__('No view'), '403'); } - // Load the index.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/index.php'; - $page_title = array(feather_escape($this->config['o_board_title'])); define('FEATHER_ALLOW_INDEX', 1); @@ -46,7 +44,6 @@ public function display() $this->feather->render('index.php', array( 'index_data' => $this->model->print_categories_forums(), - 'lang_index' => $lang_index, 'stats' => $this->model->collect_stats(), 'feather_config' => $this->config, 'online' => $this->model->fetch_users_online(), diff --git a/controller/login.php b/controller/login.php index 69b43cf9..277e6378 100644 --- a/controller/login.php +++ b/controller/login.php @@ -21,6 +21,7 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\login(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/login.mo'); } public function __autoload($class_name) @@ -35,9 +36,6 @@ public function display() exit; } - // Load the login.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/login.php'; - // TODO?: Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login) $redirect_url = $this->model->get_redirect_url($_SERVER); @@ -50,7 +48,6 @@ public function display() $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('login/form.php', array( - 'lang_login' => $lang_login, 'redirect_url' => $redirect_url, ) ); @@ -60,8 +57,6 @@ public function display() public function logmein() { - global $lang_login; - define('FEATHER_QUIET_VISIT', 1); if (!$this->user->is_guest) { @@ -69,28 +64,18 @@ public function logmein() exit; } - // Load the login.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/login.php'; - $this->model->login(); } public function logmeout($id, $token) { - - define('FEATHER_QUIET_VISIT', 1); - // Load the login.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/login.php'; - $this->model->logout($id, $token); } public function forget() { - global $lang_login; - define('FEATHER_QUIET_VISIT', 1); if (!$this->user->is_guest) { @@ -98,12 +83,9 @@ public function forget() exit; } - // Load the login.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/login.php'; - $errors = $this->model->password_forgotten(); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_login['Request pass']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Request pass')); $required_fields = array('req_email' => __('Email')); $focus_element = array('request_pass', 'req_email'); @@ -113,7 +95,6 @@ public function forget() $this->feather->render('login/password_forgotten.php', array( 'errors' => $errors, - 'lang_login' => $lang_login, ) ); diff --git a/controller/misc.php b/controller/misc.php index 9ebb3158..7ecadf0a 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -21,6 +21,8 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\misc(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/misc.mo'); } public function __autoload($class_name) @@ -30,21 +32,17 @@ public function __autoload($class_name) public function rules() { - - if ($this->config['o_rules'] == '0' || ($this->user->is_guest && $this->user->g_read_board == '0' && $this->config['o_regs_allow'] == '0')) { message(__('Bad request'), '404'); } - // Load the register.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/register.php'; + $page_title = array(feather_escape($this->config['o_board_title']), __('Forum rules')); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_register['Forum rules']); + $this->header->setTitle($page_title)->display(); define('FEATHER_ACTIVE_PAGE', 'rules'); $this->feather->render('misc/rules.php', array( - 'lang_register' => $lang_register, 'feather_config' => $this->config, ) ); @@ -54,45 +52,33 @@ public function rules() public function markread() { - - if ($this->user->is_guest) { message(__('No permission'), '403'); } - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - $this->model->update_last_visit(); // Reset tracked topics set_tracked_topics(null); - redirect(get_base_url(), $lang_misc['Mark read redirect']); + redirect(get_base_url(), __('Mark read redirect')); } public function markforumread($id) { - - if ($this->user->is_guest) { message(__('No permission'), '403'); } - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - $tracked_topics = get_tracked_topics(); $tracked_topics['forums'][$id] = time(); set_tracked_topics($tracked_topics); - redirect(get_link('forum/'.$id.'/'), $lang_misc['Mark forum read redirect']); + redirect(get_link('forum/'.$id.'/'), __('Mark forum read redirect')); } public function subscribeforum($id) { - global $lang_misc; - if ($this->user->is_guest) { message(__('No permission'), '403'); } @@ -105,8 +91,6 @@ public function subscribeforum($id) public function subscribetopic($id) { - global $lang_misc; - if ($this->user->is_guest) { message(__('No permission'), '403'); } @@ -119,8 +103,6 @@ public function subscribetopic($id) public function unsubscribeforum($id) { - global $lang_misc; - if ($this->user->is_guest) { message(__('No permission'), '403'); } @@ -133,8 +115,6 @@ public function unsubscribeforum($id) public function unsubscribetopic($id) { - global $lang_misc; - if ($this->user->is_guest) { message(__('No permission'), '403'); } @@ -147,8 +127,6 @@ public function unsubscribetopic($id) public function email($id) { - - if ($this->user->is_guest || $this->user->g_send_email == '0') { message(__('No permission'), '403'); } @@ -163,7 +141,7 @@ public function email($id) $mail = $this->model->get_info_mail($id); if ($mail['email_setting'] == 2 && !$this->user->is_admmod) { - message($lang_misc['Form email disabled']); + message(__('Form email disabled')); } @@ -171,8 +149,8 @@ public function email($id) $this->model->send_email($mail, $id); } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_misc['Send email to'].' '.feather_escape($mail['recipient'])); - $required_fields = array('req_subject' => $lang_misc['Email subject'], 'req_message' => $lang_misc['Email message']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Send email to').' '.feather_escape($mail['recipient'])); + $required_fields = array('req_subject' => __('Email subject'), 'req_message' => __('Email message')); $focus_element = array('email', 'req_subject'); define('FEATHER_ACTIVE_PAGE', 'email'); @@ -180,7 +158,6 @@ public function email($id) $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('misc/email.php', array( - 'lang_misc' => $lang_misc, 'id' => $id, 'mail' => $mail, ) @@ -191,15 +168,10 @@ public function email($id) public function report($id) { - - if ($this->user->is_guest) { message(__('No permission'), '403'); } - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - if ($this->feather->request()->isPost()) { $this->model->insert_report($id); } @@ -211,8 +183,8 @@ public function report($id) $cur_post['subject'] = censor_words($cur_post['subject']); } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_misc['Report post']); - $required_fields = array('req_reason' => $lang_misc['Reason']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Report post')); + $required_fields = array('req_reason' => __('Reason')); $focus_element = array('report', 'req_reason'); define('FEATHER_ACTIVE_PAGE', 'report'); @@ -220,7 +192,6 @@ public function report($id) $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('misc/report.php', array( - 'lang_misc' => $lang_misc, 'id' => $id, 'cur_post' => $cur_post, ) diff --git a/controller/moderate.php b/controller/moderate.php index 098e50f1..541b3de7 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -21,6 +21,9 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\moderate(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/misc.mo'); } public function __autoload($class_name) @@ -30,8 +33,6 @@ public function __autoload($class_name) public function gethostpost($pid) { - - if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } @@ -39,9 +40,6 @@ public function gethostpost($pid) // Load the viewforum.php language file require FEATHER_ROOT.'lang/'.$this->user->language.'/forum.php'; - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - // This particular function doesn't require forum-based moderator access. It can be used // by all moderators and admins if (!$this->user->is_admmod) { @@ -53,8 +51,6 @@ public function gethostpost($pid) public function gethostip($ip) { - - if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } @@ -62,9 +58,6 @@ public function gethostip($ip) // Load the viewforum.php language file require FEATHER_ROOT.'lang/'.$this->user->language.'/forum.php'; - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - // This particular function doesn't require forum-based moderator access. It can be used // by all moderators and admins if (!$this->user->is_admmod) { @@ -76,8 +69,6 @@ public function gethostip($ip) public function moderatetopic($id = null, $fid = null, $action = null, $param = null) { - global $lang_topic, $lang_misc; - if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } @@ -85,9 +76,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // Load the viewforum.php language file require FEATHER_ROOT.'lang/'.$this->user->language.'/forum.php'; - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - // This particular function doesn't require forum-based moderator access. It can be used // by all moderators and admins if ($action == 'get_host') { @@ -116,7 +104,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $topics = $this->request->post('topics') ? $this->request->post('topics') : array(); if (empty($topics)) { - message($lang_misc['No topics selected']); + message(__('No topics selected')); } $topics = implode(',', array_map('intval', array_keys($topics))); @@ -124,7 +112,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // Check if there are enough forums to move the topic $this->model->check_move_possible(); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_misc['Moderate']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); define('FEATHER_ACTIVE_PAGE', 'moderate'); @@ -134,7 +122,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = 'action' => 'multi', 'id' => $fid, 'topics' => $topics, - 'lang_misc' => $lang_misc, 'list_forums' => $this->model->get_forum_list_move($fid), ) ); @@ -148,7 +135,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->model->stick_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), $lang_misc['Stick topic redirect']); + redirect(get_link('topic/'.$id.'/'), __('Stick topic redirect')); } @@ -158,7 +145,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->model->unstick_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), $lang_misc['Unstick topic redirect']); + redirect(get_link('topic/'.$id.'/'), __('Unstick topic redirect')); } // Open a topic @@ -167,7 +154,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->model->open_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), $lang_misc['Unstick topic redirect']); + redirect(get_link('topic/'.$id.'/'), __('Unstick topic redirect')); } // Close a topic @@ -176,7 +163,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->model->close_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), $lang_misc['Unstick topic redirect']); + redirect(get_link('topic/'.$id.'/'), __('Unstick topic redirect')); } $cur_topic = $this->model->get_topic_info($fid, $id); @@ -193,7 +180,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // Check if there are enough forums to move the topic $this->model->check_move_possible(); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_misc['Moderate']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); define('FEATHER_ACTIVE_PAGE', 'moderate'); @@ -203,7 +190,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = 'action' => 'single', 'id' => $id, 'topics' => $id, - 'lang_misc' => $lang_misc, 'list_forums' => $this->model->get_forum_list_move($fid), ) ); @@ -218,14 +204,13 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = if ($this->request->post('delete_posts') || $this->request->post('delete_posts_comply')) { $posts = $this->model->delete_posts($id, $fid, $p); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_misc['Moderate']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); define('FEATHER_ACTIVE_PAGE', 'moderate'); $this->header->setTitle($page_title)->setPage($p)->display(); $this->feather->render('moderate/delete_posts.php', array( - 'lang_misc' => $lang_misc, 'id' => $id, 'posts' => $posts, ) @@ -236,7 +221,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = if ($this->request->post('split_posts') || $this->request->post('split_posts_comply')) { $posts = $this->model->split_posts($id, $fid, $p); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_misc['Moderate']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); $focus_element = array('subject','new_subject'); define('FEATHER_ACTIVE_PAGE', 'moderate'); @@ -244,7 +229,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->header->setTitle($page_title)->setPage($p)->setFocusElement($focus_element)->display(); $this->feather->render('moderate/split_posts.php', array( - 'lang_misc' => $lang_misc, 'id' => $id, 'posts' => $posts, 'list_forums' => $this->model->get_forum_list_split($id), @@ -256,9 +240,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // Show the moderate posts view - // Load the viewtopic.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/topic.php'; - // Used to disable the Move and Delete buttons if there are no replies to this topic $button_status = ($cur_topic['num_replies'] == 0) ? ' disabled="disabled"' : ''; @@ -280,8 +261,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->display(); $this->feather->render('moderate/posts_view.php', array( - 'lang_topic' => $lang_topic, - 'lang_misc' => $lang_misc, 'cur_topic' => $cur_topic, 'url_topic' => url_friendly($cur_topic['subject']), 'url_forum' => url_friendly($cur_topic['forum_name']), @@ -300,8 +279,6 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = public function display($id, $name = null, $page = null) { - global $lang_forum, $lang_misc; - if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } @@ -309,9 +286,6 @@ public function display($id, $name = null, $page = null) // Load the viewforum.php language file require FEATHER_ROOT.'lang/'.$this->user->language.'/forum.php'; - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - // Make sure that only admmods allowed access this page $moderators = $this->model->get_moderators($id); $mods_array = ($moderators != '') ? unserialize($moderators) : array(); @@ -347,14 +321,12 @@ public function display($id, $name = null, $page = null) $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->display(); $this->feather->render('moderate/moderator_forum.php', array( - 'lang_misc' => $lang_misc, 'id' => $id, 'p' => $p, 'url_forum' => $url_forum, 'cur_forum' => $cur_forum, 'paging_links' => $paging_links, 'feather_config' => $this->config, - 'lang_forum' => $lang_forum, 'topic_data' => $this->model->display_topics($id, $sort_by, $start_from), 'start_from' => $start_from, ) @@ -365,8 +337,6 @@ public function display($id, $name = null, $page = null) public function dealposts($fid) { - global $lang_forum, $lang_topic, $lang_misc; - if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } @@ -374,9 +344,6 @@ public function dealposts($fid) // Load the viewforum.php language file require FEATHER_ROOT.'lang/'.$this->user->language.'/forum.php'; - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - // Make sure that only admmods allowed access this page $moderators = $this->model->get_moderators($fid); $mods_array = ($moderators != '') ? unserialize($moderators) : array(); @@ -393,7 +360,7 @@ public function dealposts($fid) $topics = $this->request->post('topics') ? $this->request->post('topics') : array(); if (empty($topics)) { - message($lang_misc['No topics selected']); + message(__('No topics selected')); } $topics = implode(',', array_map('intval', array_keys($topics))); @@ -401,7 +368,7 @@ public function dealposts($fid) // Check if there are enough forums to move the topic $this->model->check_move_possible(); - $page_title = array(feather_escape($this->config['o_board_title']), $lang_misc['Moderate']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); define('FEATHER_ACTIVE_PAGE', 'moderate'); @@ -411,7 +378,6 @@ public function dealposts($fid) 'action' => 'multi', 'id' => $fid, 'topics' => $topics, - 'lang_misc' => $lang_misc, 'list_forums' => $this->model->get_forum_list_move($fid), ) ); @@ -427,10 +393,10 @@ public function dealposts($fid) $topics = $this->request->post('topics') ? $this->request->post('topics') : array(); if (count($topics) < 2) { - message($lang_misc['Not enough topics selected']); + message(__('Not enough topics selected')); } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_misc['Moderate']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); define('FEATHER_ACTIVE_PAGE', 'moderate'); @@ -439,7 +405,6 @@ public function dealposts($fid) $this->feather->render('moderate/merge_topics.php', array( 'id' => $fid, 'topics' => $topics, - 'lang_misc' => $lang_misc, ) ); @@ -450,14 +415,14 @@ public function dealposts($fid) elseif ($this->request->post('delete_topics') || $this->request->post('delete_topics_comply')) { $topics = $this->request->post('topics') ? $this->request->post('topics') : array(); if (empty($topics)) { - message($lang_misc['No topics selected']); + message(__('No topics selected')); } if ($this->request->post('delete_topics_comply')) { $this->model->delete_topics($topics, $fid); } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_misc['Moderate']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); define('FEATHER_ACTIVE_PAGE', 'moderate'); @@ -466,7 +431,6 @@ public function dealposts($fid) $this->feather->render('moderate/delete_topics.php', array( 'id' => $fid, 'topics' => $topics, - 'lang_misc' => $lang_misc, ) ); @@ -482,12 +446,12 @@ public function dealposts($fid) if ($this->request->post('open') || $this->request->post('close')) { $topics = $this->request->post('topics') ? @array_map('intval', @array_keys($this->request->post('topics'))) : array(); if (empty($topics)) { - message($lang_misc['No topics selected']); + message(__('No topics selected')); } $this->model->close_multiple_topics($action, $topics, $fid); - $redirect_msg = ($action) ? $lang_misc['Close topics redirect'] : $lang_misc['Open topics redirect']; + $redirect_msg = ($action) ? __('Close topics redirect') : __('Open topics redirect'); redirect(get_link('moderate/forum/'.$fid.'/'), $redirect_msg); } } diff --git a/controller/post.php b/controller/post.php index e7bca948..99616fa1 100644 --- a/controller/post.php +++ b/controller/post.php @@ -21,6 +21,9 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\post(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.mo'); } public function __autoload($class_name) @@ -30,29 +33,17 @@ public function __autoload($class_name) public function newreply($fid = null, $tid = null, $qid = null) { - self::newpost('', $fid, $tid); + $this->newpost('', $fid, $tid); } public function newpost($fid = null, $tid = null, $qid = null) { - global $lang_prof_reg, $lang_antispam_questions, $lang_antispam, $lang_post, $lang_register, $lang_bbeditor; - - // Load the register.php/profile.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.php'; - - // Load the register.php/profile.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/register.php'; - - // Load the bbeditor.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.php'; + global $lang_antispam_questions, $lang_antispam; // Antispam feature require FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); - // BBcode toolbar feature - require FEATHER_ROOT.'lang/'.$this->user['language'].'/bbeditor.php'; - // If $_POST['username'] is filled, we are facing a bot if ($this->request->post('username')) { message(__('Bad request'), '404'); @@ -80,9 +71,6 @@ public function newpost($fid = null, $tid = null, $qid = null) message(__('No permission'), '403'); } - // Load the post.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/post.php'; - // Start with a clean slate $errors = array(); @@ -91,7 +79,7 @@ public function newpost($fid = null, $tid = null, $qid = null) if (!$this->user->is_guest) { $focus_element[] = ($fid) ? 'req_subject' : 'req_message'; } else { - $required_fields['req_username'] = $lang_post['Guest name']; + $required_fields['req_username'] = __('Guest name'); $focus_element[] = 'req_username'; } @@ -152,7 +140,7 @@ public function newpost($fid = null, $tid = null, $qid = null) $this->model->increment_post_count($post, $new['tid']); } - redirect(get_link('post/'.$new['pid'].'/#p'.$new['pid']), $lang_post['Post redirect']); + redirect(get_link('post/'.$new['pid'].'/#p'.$new['pid']), __('Post redirect')); } } @@ -160,7 +148,7 @@ public function newpost($fid = null, $tid = null, $qid = null) // If a topic ID was specified in the url (it's a reply) if ($tid) { - $action = $lang_post['Post a reply']; + $action = __('Post a reply'); $form = '
    '; // If a quote ID was specified in the url @@ -171,7 +159,7 @@ public function newpost($fid = null, $tid = null, $qid = null) } // If a forum ID was specified in the url (new topic) elseif ($fid) { - $action = $lang_post['Post new topic']; + $action = __('Post new topic'); $form = ''; } else { message(__('Bad request'), '404'); @@ -190,7 +178,7 @@ public function newpost($fid = null, $tid = null, $qid = null) $page_title = array(feather_escape($this->config['o_board_title']), $action); $required_fields = array('req_email' => __('Email'), 'req_subject' => __('Subject'), 'req_message' => __('Message')); if ($this->user->is_guest) { - $required_fields['captcha'] = $lang_antispam['Robot title']; + $required_fields['captcha'] = __('Robot title'); } $focus_element = array('post'); @@ -215,10 +203,8 @@ public function newpost($fid = null, $tid = null, $qid = null) 'feather_config' => $this->config, 'feather_user' => $this->user, 'cur_posting' => $cur_posting, - 'lang_post' => $lang_post, 'lang_antispam' => $lang_antispam, 'lang_antispam_questions' => $lang_antispam_questions, - 'lang_bbeditor' => $lang_bbeditor, 'index_questions' => $index_questions, 'checkboxes' => $checkboxes, 'cur_posting' => $cur_posting, @@ -230,7 +216,6 @@ public function newpost($fid = null, $tid = null, $qid = null) 'url_topic' => $url_topic, 'quote' => $quote, 'errors' => $errors, - 'lang_bbeditor' => $lang_bbeditor, ) ); diff --git a/controller/profile.php b/controller/profile.php index 02b44ff5..7c47382e 100644 --- a/controller/profile.php +++ b/controller/profile.php @@ -21,6 +21,8 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\profile(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/profile.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); } public function __autoload($class_name) @@ -30,19 +32,13 @@ public function __autoload($class_name) public function display($id, $section = null) { - global $lang_prof_reg, $lang_profile, $pd, $forum_time_formats, $forum_date_formats; + global $lang_profile, $pd, $forum_time_formats, $forum_date_formats; // Include UTF-8 function require FEATHER_ROOT.'include/utf8/substr_replace.php'; require FEATHER_ROOT.'include/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace require FEATHER_ROOT.'include/utf8/strcasecmp.php'; - // Load the prof_reg.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.php'; - - // Load the profile.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/profile.php'; - if ($this->request->post('update_group_membership')) { if ($this->user->g_id > FEATHER_ADMIN) { message(__('No permission'), '403'); @@ -68,15 +64,14 @@ public function display($id, $section = null) $this->model->delete_user($id, $this->feather); - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Confirm delete user']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Confirm delete user')); define('FEATHER_ACTIVE_PAGE', 'profile'); $this->header->setTitle($page_title)->display(); $this->feather->render('profile/delete_user.php', array( - 'username' => $this->model->get_username($id), - 'lang_profile' => $lang_profile, + 'username' => $this->model->get_username($id), 'id' => $id, ) ); @@ -119,7 +114,7 @@ public function display($id, $section = null) // or the user is another mod $user_info = $this->model->parse_user_info($user); - $page_title = array(feather_escape($this->config['o_board_title']), sprintf($lang_profile['Users profile'], feather_escape($user['username']))); + $page_title = array(feather_escape($this->config['o_board_title']), sprintf(__('Users profile'), feather_escape($user['username']))); define('FEATHER_ALLOW_INDEX', 1); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -127,7 +122,6 @@ public function display($id, $section = null) $this->header->setTitle($page_title)->display(); $this->feather->render('profile/view_profile.php', array( - 'lang_profile' => $lang_profile, 'user_info' => $user_info, ) ); @@ -137,7 +131,7 @@ public function display($id, $section = null) if (!$section || $section == 'essentials') { $user_disp = $this->model->edit_essentials($id, $user); - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section essentials']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section essentials')); $required_fields = array('req_username' => __('Username'), 'req_email' => __('Email')); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -147,8 +141,6 @@ public function display($id, $section = null) $this->model->generate_profile_menu('essentials', $id); $this->feather->render('profile/section_essentials.php', array( - 'lang_profile' => $lang_profile, - 'lang_prof_reg' => $lang_prof_reg, 'feather' => $this->feather, 'id' => $id, 'user' => $user, @@ -159,10 +151,10 @@ public function display($id, $section = null) ); } elseif ($section == 'personal') { if ($this->user->g_set_title == '1') { - $title_field = ''."\n"; + $title_field = ''."\n"; } - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section personal']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section personal')); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -171,14 +163,13 @@ public function display($id, $section = null) $this->model->generate_profile_menu('personal', $id); $this->feather->render('profile/section_personal.php', array( - 'lang_profile' => $lang_profile, 'user' => $user, 'feather' => $this->feather, ) ); } elseif ($section == 'messaging') { - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section messaging']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section messaging')); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -187,7 +178,6 @@ public function display($id, $section = null) $this->model->generate_profile_menu('messaging', $id); $this->feather->render('profile/section_messaging.php', array( - 'lang_profile' => $lang_profile, 'user' => $user, ) ); @@ -197,22 +187,22 @@ public function display($id, $section = null) message(__('Bad request'), '404'); } - $avatar_field = ''.$lang_profile['Change avatar'].''; + $avatar_field = ''.__('Change avatar').''; $user_avatar = generate_avatar_markup($id); if ($user_avatar) { - $avatar_field .= ' '.$lang_profile['Delete avatar'].''; + $avatar_field .= ' '.__('Delete avatar').''; } else { - $avatar_field = ''.$lang_profile['Upload avatar'].''; + $avatar_field = ''.__('Upload avatar').''; } if ($user['signature'] != '') { - $signature_preview = '

    '.$lang_profile['Sig preview'].'

    '."\n\t\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t\t\t".$parsed_signature."\n\t\t\t\t\t\t\t".'
    '."\n"; + $signature_preview = '

    '.__('Sig preview').'

    '."\n\t\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t\t\t".$parsed_signature."\n\t\t\t\t\t\t\t".'
    '."\n"; } else { - $signature_preview = '

    '.$lang_profile['No sig'].'

    '."\n"; + $signature_preview = '

    '.__('No sig').'

    '."\n"; } - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section personality']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section personality')); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -221,7 +211,6 @@ public function display($id, $section = null) $this->model->generate_profile_menu('personality', $id); $this->feather->render('profile/section_personality.php', array( - 'lang_profile' => $lang_profile, 'user_avatar' => $user_avatar, 'avatar_field' => $avatar_field, 'signature_preview' => $signature_preview, @@ -231,7 +220,7 @@ public function display($id, $section = null) ); } elseif ($section == 'display') { - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section display']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section display')); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -240,13 +229,12 @@ public function display($id, $section = null) $this->model->generate_profile_menu('display', $id); $this->feather->render('profile/section_display.php', array( - 'lang_profile' => $lang_profile, 'user' => $user, ) ); } elseif ($section == 'privacy') { - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section privacy']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section privacy')); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -255,8 +243,6 @@ public function display($id, $section = null) $this->model->generate_profile_menu('privacy', $id); $this->feather->render('profile/section_privacy.php', array( - 'lang_profile' => $lang_profile, - 'lang_prof_reg' => $lang_prof_reg, 'user' => $user, ) ); @@ -266,7 +252,7 @@ public function display($id, $section = null) message(__('Bad request'), false, '403 Forbidden'); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Section admin']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section admin')); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -275,7 +261,6 @@ public function display($id, $section = null) $this->model->generate_profile_menu('admin', $id); $this->feather->render('profile/section_admin.php', array( - 'lang_profile' => $lang_profile, 'user' => $user, 'forum_list' => $this->model->get_forum_list($id), 'group_list' => $this->model->get_group_list($user), @@ -293,19 +278,13 @@ public function display($id, $section = null) public function action($id, $action) { - global $lang_prof_reg, $lang_profile; + global $lang_profile; // Include UTF-8 function require FEATHER_ROOT.'include/utf8/substr_replace.php'; require FEATHER_ROOT.'include/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace require FEATHER_ROOT.'include/utf8/strcasecmp.php'; - // Load the prof_reg.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.php'; - - // Load the profile.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/profile.php'; - if ($action != 'change_pass' || !$this->request->get('key')) { if ($this->user->g_read_board == '0') { message(__('No view'), '403'); @@ -317,8 +296,8 @@ public function action($id, $action) if ($action == 'change_pass') { $this->model->change_pass($id, $this->feather); - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Change pass']); - $required_fields = array('req_old_password' => $lang_profile['Old pass'], 'req_new_password1' => $lang_profile['New pass'], 'req_new_password2' => $lang_profile['Confirm new pass']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Change pass')); + $required_fields = array('req_old_password' => __('Old pass'), 'req_new_password1' => __('New pass'), 'req_new_password2' => __('Confirm new pass')); $focus_element = array('change_pass', ((!$this->user->is_admmod) ? 'req_old_password' : 'req_new_password1')); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -326,8 +305,7 @@ public function action($id, $action) $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('profile/change_pass.php', array( - 'feather' => $this->feather, - 'lang_profile' => $lang_profile, + 'feather' => $this->feather, 'id' => $id, ) ); @@ -336,8 +314,8 @@ public function action($id, $action) } elseif ($action == 'change_email') { $this->model->change_email($id, $this->feather); - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Change email']); - $required_fields = array('req_new_email' => $lang_profile['New email'], 'req_password' => __('Password')); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Change email')); + $required_fields = array('req_new_email' => __('New email'), 'req_password' => __('Password')); $focus_element = array('change_email', 'req_new_email'); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -345,7 +323,6 @@ public function action($id, $action) $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('profile/change_mail.php', array( - 'lang_profile' => $lang_profile, 'id' => $id, ) ); @@ -353,7 +330,7 @@ public function action($id, $action) $this->footer->display(); } elseif ($action == 'upload_avatar' || $action == 'upload_avatar2') { if ($this->config['o_avatars'] == '0') { - message($lang_profile['Avatars disabled']); + message(__('Avatars disabled')); } if ($this->user->id != $id && !$this->user->is_admmod) { @@ -364,8 +341,8 @@ public function action($id, $action) $this->model->upload_avatar($id, $_FILES); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), $lang_profile['Upload avatar']); - $required_fields = array('req_file' => $lang_profile['File']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Upload avatar')); + $required_fields = array('req_file' => __('File')); $focus_element = array('upload_avatar', 'req_file'); define('FEATHER_ACTIVE_PAGE', 'profile'); @@ -373,9 +350,7 @@ public function action($id, $action) $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('profile/upload_avatar.php', array( - 'lang_profile' => $lang_profile, 'feather_config' => $this->config, - 'lang_profile' => $lang_profile, 'id' => $id, ) ); @@ -391,7 +366,7 @@ public function action($id, $action) $this->model->delete_avatar($id); - redirect(get_link('user/'.$id.'/section/personality/'), $lang_profile['Avatar deleted redirect']); + redirect(get_link('user/'.$id.'/section/personality/'), __('Avatar deleted redirect')); } elseif ($action == 'promote') { if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_promote_users == '0')) { message(__('No permission'), '403'); diff --git a/controller/register.php b/controller/register.php index 8683d1c1..691635c4 100644 --- a/controller/register.php +++ b/controller/register.php @@ -21,6 +21,9 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\register(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.mo'); } public function __autoload($class_name) @@ -30,19 +33,13 @@ public function __autoload($class_name) public function display() { - global $lang_antispam_questions, $lang_antispam, $lang_register, $lang_prof_reg; + global $lang_antispam_questions, $lang_antispam; if (!$this->user->is_guest) { header('Location: '.get_base_url()); exit; } - // Load the register.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/register.php'; - - // Load the register.php/profile.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.php'; - // Antispam feature require FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); @@ -50,11 +47,11 @@ public function display() // Display an error message if new registrations are disabled // If $_REQUEST['username'] or $_REQUEST['password'] are filled, we are facing a bot if ($this->config['o_regs_allow'] == '0' || $this->request->post('username') || $this->request->post('password')) { - message($lang_register['No new regs']); + message(__('No new regs')); } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_register['Register']); - $required_fields = array('req_user' => __('Username'), 'req_password1' => __('Password'), 'req_password2' => $lang_prof_reg['Confirm pass'], 'req_email1' => __('Email'), 'req_email2' => __('Email').' 2', 'captcha' => $lang_antispam['Robot title']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Register')); + $required_fields = array('req_user' => __('Username'), 'req_password1' => __('Password'), 'req_password2' => __('Confirm pass'), 'req_email1' => __('Email'), 'req_email2' => __('Email').' 2', 'captcha' => __('Robot title')); $focus_element = array('register', 'req_user'); define('FEATHER_ACTIVE_PAGE', 'register'); @@ -78,8 +75,6 @@ public function display() $this->feather->render('register/form.php', array( 'errors' => $user['errors'], 'feather_config' => $this->config, - 'lang_register' => $lang_register, - 'lang_prof_reg' => $lang_prof_reg, 'lang_antispam' => $lang_antispam, 'lang_antispam_questions' => $lang_antispam_questions, 'index_questions' => $index_questions, @@ -99,9 +94,8 @@ public function cancel() } public function rules() - { // TODO: fix $_GET w/ URL rewriting - - global $lang_login, $lang_register; + { + // TODO: fix $_GET w/ URL rewriting // If we are logged in, we shouldn't be here if (!$this->user->is_guest) { @@ -111,27 +105,20 @@ public function rules() // Display an error message if new registrations are disabled if ($this->config['o_regs_allow'] == '0') { - message($lang_register['No new regs']); + message(__('No new regs')); } - // Load the register.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/register.php'; - - // Load the register.php/profile.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.php'; - if ($this->config['o_rules'] != '1') { redirect(get_link('register/agree/')); } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_register['Register'], $lang_register['Forum rules']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Register'), __('Forum rules')); define('FEATHER_ACTIVE_PAGE', 'register'); $this->header->setTitle($page_title)->display(); $this->feather->render('register/rules.php', array( - 'lang_register' => $lang_register, 'feather_config' => $this->config, ) ); diff --git a/controller/search.php b/controller/search.php index df7712b6..24672375 100644 --- a/controller/search.php +++ b/controller/search.php @@ -21,6 +21,9 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\search(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/search.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); } public function __autoload($class_name) @@ -30,16 +33,12 @@ public function __autoload($class_name) public function display() { - global $lang_search, $lang_forum, $lang_topic, $pd; - - // Load the search.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/search.php'; - require FEATHER_ROOT.'lang/'.$this->user->language.'/forum.php'; + global $pd; if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } elseif ($this->user->g_search == '0') { - message($lang_search['No search permission'], false, '403 Forbidden'); + message(__('No search permission'), false, '403 Forbidden'); } require FEATHER_ROOT.'include/search_idx.php'; @@ -50,20 +49,18 @@ public function display() // We have results to display if (isset($search['is_result'])) { - $page_title = array(feather_escape($this->config['o_board_title']), $lang_search['Search results']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Search results')); define('FEATHER_ACTIVE_PAGE', 'search'); $this->header->setTitle($page_title)->display(); $this->feather->render('search/header.php', array( - 'lang_search' => $lang_search, 'search' => $search, ) ); if ($search['show_as'] == 'posts') { - require FEATHER_ROOT.'lang/'.$this->user->language.'/topic.php'; require FEATHER_ROOT.'include/parser.php'; } @@ -76,11 +73,11 @@ public function display() $this->footer->display(); } else { - message($lang_search['No hits']); + message(__('No hits')); } } - $page_title = array(feather_escape($this->config['o_board_title']), $lang_search['Search']); + $page_title = array(feather_escape($this->config['o_board_title']), __('Search')); $focus_element = array('search', 'keywords'); define('FEATHER_ACTIVE_PAGE', 'search'); @@ -88,7 +85,6 @@ public function display() $this->header->setTitle($page_title)->setFocusElement($focus_element)->display(); $this->feather->render('search/form.php', array( - 'lang_search' => $lang_search, 'feather_config' => $this->config, 'feather' => $this->feather, 'forums' => $this->model->get_list_forums(), diff --git a/controller/userlist.php b/controller/userlist.php index 7de8f1c8..a22d849b 100644 --- a/controller/userlist.php +++ b/controller/userlist.php @@ -21,6 +21,8 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\userlist(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/search.mo'); } public function __autoload($class_name) @@ -30,21 +32,12 @@ public function __autoload($class_name) public function display() { - - if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } elseif ($this->user->g_view_users == '0') { message(__('No permission'), '403'); } - // Load the userlist.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.php'; - - // Load the search.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/search.php'; - - // Determine if we are allowed to view post counts $show_post_count = ($this->config['o_show_post_count'] == '1' || $this->user->is_admmod) ? true : false; @@ -76,8 +69,6 @@ public function display() $this->header->setTitle($page_title)->setPage($p)->setFocusElement($focus_element)->setPagingLinks($paging_links)->display(); $this->feather->render('userlist.php', array( - 'lang_search' => $lang_search, - 'lang_ul' => $lang_ul, 'feather' => $this->feather, 'username' => $username, 'show_group' => $show_group, diff --git a/controller/viewforum.php b/controller/viewforum.php index c500a8bd..5b9d207a 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -21,6 +21,7 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\viewforum(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); } public function __autoload($class_name) @@ -30,8 +31,6 @@ public function __autoload($class_name) public function display($id, $name = null, $page = null) { - global $lang_forum; - if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } @@ -40,9 +39,6 @@ public function display($id, $name = null, $page = null) message(__('Bad request'), '404'); } - // Load the viewforum.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/forum.php'; - // Fetch some informations about the forum $cur_forum = $this->model->get_info_forum($id); @@ -60,7 +56,7 @@ public function display($id, $name = null, $page = null) // Can we or can we not post new topics? if (($cur_forum['post_topics'] == '' && $this->user->g_post_topics == '1') || $cur_forum['post_topics'] == '1' || $is_admmod) { - $post_link = "\t\t\t".''."\n"; + $post_link = "\t\t\t".''."\n"; } else { $post_link = ''; } @@ -90,7 +86,6 @@ public function display($id, $name = null, $page = null) $this->feather->render('viewforum.php', array( 'id' => $id, 'forum_data' => $this->model->print_topics($id, $sort_by, $start_from), - 'lang_forum' => $lang_forum, 'cur_forum' => $cur_forum, 'paging_links' => $paging_links, 'post_link' => $post_link, diff --git a/controller/viewtopic.php b/controller/viewtopic.php index 385d6523..3cede850 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -21,6 +21,9 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\viewtopic(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.mo'); } public function __autoload($class_name) @@ -30,25 +33,16 @@ public function __autoload($class_name) public function display($id = null, $name = null, $page = null, $pid = null) { - global $lang_post, $lang_topic, $lang_bbeditor, $pd; + global $pd; if ($this->user->g_read_board == '0') { message(__('No view'), '403'); } - // Load the viewtopic.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/topic.php'; - - // Load the post.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/post.php'; - // Antispam feature require FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); - // BBcode toolbar feature - require FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.php'; - // Load the viewtopic.php model file require_once FEATHER_ROOT.'model/viewtopic.php'; @@ -108,9 +102,6 @@ public function display($id = null, $name = null, $page = null, $pid = null) 'id' => $id, 'p' => $p, 'post_data' => $this->model->print_posts($id, $start_from, $cur_topic, $is_admmod), - 'lang_topic' => $lang_topic, - 'lang_post' => $lang_post, - 'lang_bbeditor' => $lang_bbeditor, 'cur_topic' => $cur_topic, 'subscraction' => $subscraction, 'is_admmod' => $is_admmod, diff --git a/extern.php b/extern.php index 29da2f32..06d17a61 100644 --- a/extern.php +++ b/extern.php @@ -70,6 +70,8 @@ require FEATHER_ROOT.'include/common.php'; +load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/common.mo'); + // The length at which topic subjects will be truncated (for HTML output) if (!defined('FORUM_EXTERN_MAX_SUBJECT_LENGTH')) { define('FORUM_EXTERN_MAX_SUBJECT_LENGTH', 30); @@ -611,12 +613,12 @@ function output_html($feed) header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); - echo sprintf($lang_index['Guests online'], forum_number_format($num_guests)).'
    '."\n"; + echo sprintf(__('Guests online'), forum_number_format($num_guests)).'
    '."\n"; if ($action == 'online_full' && !empty($users)) { - echo sprintf($lang_index['Users online'], implode(', ', $users)).'
    '."\n"; + echo sprintf(__('Users online'), implode(', ', $users)).'
    '."\n"; } else { - echo sprintf($lang_index['Users online'], forum_number_format($num_users)).'
    '."\n"; + echo sprintf(__('Users online'), forum_number_format($num_users)).'
    '."\n"; } exit; @@ -655,10 +657,10 @@ function output_html($feed) header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); - echo sprintf($lang_index['No of users'], forum_number_format($stats['total_users'])).'
    '."\n"; - echo sprintf($lang_index['Newest user'], (($feather->user->g_view_users == '1') ? ''.feather_escape($stats['last_user']['username']).'' : feather_escape($stats['last_user']['username']))).'
    '."\n"; - echo sprintf($lang_index['No of topics'], forum_number_format($stats['total_topics'])).'
    '."\n"; - echo sprintf($lang_index['No of posts'], forum_number_format($stats['total_posts'])).'
    '."\n"; + echo sprintf(__('No of users'), forum_number_format($stats['total_users'])).'
    '."\n"; + echo sprintf(__('Newest user'), (($feather->user->g_view_users == '1') ? ''.feather_escape($stats['last_user']['username']).'' : feather_escape($stats['last_user']['username']))).'
    '."\n"; + echo sprintf(__('No of topics'), forum_number_format($stats['total_topics'])).'
    '."\n"; + echo sprintf(__('No of posts'), forum_number_format($stats['total_posts'])).'
    '."\n"; exit; } diff --git a/include/functions.php b/include/functions.php index ab906f78..2a61dcee 100644 --- a/include/functions.php +++ b/include/functions.php @@ -404,32 +404,35 @@ function check_bans() // function check_username($username, $errors, $exclude_id = null) { - global $feather, $feather_config, $errors, $lang_prof_reg, $lang_register, $feather_bans; + global $feather, $feather_config, $errors, $feather_bans; // Include UTF-8 function require_once FEATHER_ROOT.'include/utf8/strcasecmp.php'; + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/prof_reg.mo'); + // Convert multiple whitespace characters into one (to prevent people from registering with indistinguishable usernames) $username = preg_replace('%\s+%s', ' ', $username); // Validate username if (feather_strlen($username) < 2) { - $errors[] = $lang_prof_reg['Username too short']; + $errors[] = __('Username too short'); } elseif (feather_strlen($username) > 25) { // This usually doesn't happen since the form element only accepts 25 characters - $errors[] = $lang_prof_reg['Username too long']; + $errors[] = __('Username too long'); } elseif (!strcasecmp($username, 'Guest') || !utf8_strcasecmp($username, __('Guest'))) { - $errors[] = $lang_prof_reg['Username guest']; + $errors[] = __('Username guest'); } elseif (preg_match('%[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}%', $username) || preg_match('%((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))%', $username)) { - $errors[] = $lang_prof_reg['Username IP']; + $errors[] = __('Username IP'); } elseif ((strpos($username, '[') !== false || strpos($username, ']') !== false) && strpos($username, '\'') !== false && strpos($username, '"') !== false) { - $errors[] = $lang_prof_reg['Username reserved chars']; + $errors[] = __('Username reserved chars'); } elseif (preg_match('%(?:\[/?(?:b|u|s|ins|del|em|i|h|colou?r|quote|code|img|url|email|list|\*|topic|post|forum|user)\]|\[(?:img|url|quote|list)=)%i', $username)) { - $errors[] = $lang_prof_reg['Username BBCode']; + $errors[] = __('Username BBCode'); } // Check username for any censored words if ($feather_config['o_censoring'] == '1' && censor_words($username) != $username) { - $errors[] = $lang_register['Username censor']; + $errors[] = __('Username censor'); } // Check that the username (or a too similar username) is not already registered @@ -439,13 +442,13 @@ function check_username($username, $errors, $exclude_id = null) if ($result) { $busy = $result['username']; - $errors[] = $lang_register['Username dupe 1'].' '.feather_escape($busy).'. '.$lang_register['Username dupe 2']; + $errors[] = __('Username dupe 1').' '.feather_escape($busy).'. '.__('Username dupe 2'); } // Check username for any banned usernames foreach ($feather_bans as $cur_ban) { if ($cur_ban['username'] != '' && utf8_strtolower($username) == utf8_strtolower($cur_ban['username'])) { - $errors[] = $lang_prof_reg['Banned username']; + $errors[] = __('Banned username'); break; } } diff --git a/install/index.php b/install/index.php index 898a86a7..540f1681 100644 --- a/install/index.php +++ b/install/index.php @@ -79,11 +79,15 @@ function stripslashes_array($array) $install_lang = preg_replace('%[\.\\\/]%', '', $install_lang); // If such a language pack doesn't exist, or isn't up-to-date enough to translate this page, default to English -if (!file_exists(FEATHER_ROOT.'lang/'.$install_lang.'/install.php')) { +if (!file_exists(FEATHER_ROOT.'lang/'.$feather->user->language.'/install.mo')) { $install_lang = 'English'; } -require FEATHER_ROOT.'lang/'.$install_lang.'/install.php'; +// Load l10n +require_once FEATHER_ROOT.'include/pomo/MO.php'; +require_once FEATHER_ROOT.'include/l10n.php'; + +load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$install_lang.'/install.mo'); if (file_exists(FEATHER_ROOT.'include/config.php')) { // Check to see whether FeatherBB is already installed @@ -91,7 +95,7 @@ function stripslashes_array($array) // If FEATHER is defined, config.php is probably valid and thus the software is installed if (defined('FEATHER')) { - exit($lang_install['Already installed']); + exit(__('Already installed')); } } @@ -105,7 +109,7 @@ function stripslashes_array($array) // Make sure we are running at least MIN_PHP_VERSION if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) { - exit(sprintf($lang_install['You are running error'], 'PHP', PHP_VERSION, FORUM_VERSION, MIN_PHP_VERSION)); + exit(sprintf(__('You are running error'), 'PHP', PHP_VERSION, FORUM_VERSION, MIN_PHP_VERSION)); } @@ -226,8 +230,8 @@ function generate_config_file() $db_type = $db_name = $db_username = $db_prefix = $username = $email = ''; $db_host = 'localhost'; - $title = $lang_install['My FeatherBB Forum']; - $description = '

    '.$lang_install['Description'].'

    '; + $title = __('My FeatherBB Forum'); + $description = '

    '.__('Description').'

    '; $default_lang = $install_lang; $default_style = 'FeatherBB'; } else { @@ -255,55 +259,55 @@ function generate_config_file() // Validate username and passwords if (feather_strlen($username) < 2) { - $alerts[] = $lang_install['Username 1']; + $alerts[] = __('Username 1'); } elseif (feather_strlen($username) > 25) { // This usually doesn't happen since the form element only accepts 25 characters - $alerts[] = $lang_install['Username 2']; + $alerts[] = __('Username 2'); } elseif (!strcasecmp($username, 'Guest')) { - $alerts[] = $lang_install['Username 3']; + $alerts[] = __('Username 3'); } elseif (preg_match('%[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}%', $username) || preg_match('%((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))%', $username)) { - $alerts[] = $lang_install['Username 4']; + $alerts[] = __('Username 4'); } elseif ((strpos($username, '[') !== false || strpos($username, ']') !== false) && strpos($username, '\'') !== false && strpos($username, '"') !== false) { - $alerts[] = $lang_install['Username 5']; + $alerts[] = __('Username 5'); } elseif (preg_match('%(?:\[/?(?:b|u|i|h|colou?r|quote|code|img|url|email|list)\]|\[(?:code|quote|list)=)%i', $username)) { - $alerts[] = $lang_install['Username 6']; + $alerts[] = __('Username 6'); } if (feather_strlen($password1) < 6) { - $alerts[] = $lang_install['Short password']; + $alerts[] = __('Short password'); } elseif ($password1 != $password2) { - $alerts[] = $lang_install['Passwords not match']; + $alerts[] = __('Passwords not match'); } // Validate email require FEATHER_ROOT.'include/email.php'; if (!is_valid_email($email)) { - $alerts[] = $lang_install['Wrong email']; + $alerts[] = __('Wrong email'); } if ($title == '') { - $alerts[] = $lang_install['No board title']; + $alerts[] = __('No board title'); } $languages = forum_list_langs(); if (!in_array($default_lang, $languages)) { - $alerts[] = $lang_install['Error default language']; + $alerts[] = __('Error default language'); } $styles = forum_list_styles(); if (!in_array($default_style, $styles)) { - $alerts[] = $lang_install['Error default style']; + $alerts[] = __('Error default style'); } } // Check if the cache directory is writable if (!forum_is_writable(FORUM_CACHE_DIR)) { - $alerts[] = sprintf($lang_install['Alert cache'], FORUM_CACHE_DIR); + $alerts[] = sprintf(__('Alert cache'), FORUM_CACHE_DIR); } // Check if default avatar directory is writable if (!forum_is_writable(FEATHER_ROOT.'img/avatars/')) { - $alerts[] = sprintf($lang_install['Alert avatar'], FEATHER_ROOT.'img/avatars/'); + $alerts[] = sprintf(__('Alert avatar'), FEATHER_ROOT.'img/avatars/'); } if (!isset($_POST['form_sent']) || !empty($alerts)) { @@ -336,7 +340,7 @@ function generate_config_file() } if (empty($db_extensions)) { - error($lang_install['No DB extensions']); + error(__('No DB extensions')); } // Fetch a list of installed languages @@ -347,22 +351,22 @@ function generate_config_file() -<?php echo $lang_install['FeatherBB Installation'] ?> +<?php echo __('FeatherBB Installation') ?>
    -

    +

    - +
    @@ -113,7 +114,7 @@ -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index 80259a3b..0b1d2ae7 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -20,7 +20,7 @@ if ($footer_style == 'viewforum') { echo "\t\t\t".'
    '."\n"; - echo "\t\t\t\t".'
    '.$lang_forum['Mod controls'].'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; echo "\t\t\t".'
    '."\n"; } elseif ($footer_style == 'viewtopic') { @@ -34,7 +34,7 @@ echo "\t\t\t".'
    '."\n"; - echo "\t\t\t\t".'
    '.$lang_topic['Mod controls'].'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; // TODO: all //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php index 65353802..a7f9300d 100644 --- a/style/FeatherBB/view/help.php +++ b/style/FeatherBB/view/help.php @@ -14,113 +14,113 @@ ?> -

    +

    -

    -

    +

    +

    -

    +

    -

    -

    [b][/b]

    -

    [u][/u]

    -

    [i][/i]

    -

    [s][/s]

    -

    [del][/del]

    -

    [ins][/ins]

    -

    [em][/em]

    -

    [color=#FF0000][/color]

    -

    [color=blue][/color]

    -

    [h][/h]

    +

    +

    [b][/b]

    +

    [u][/u]

    +

    [i][/i]

    +

    [s][/s]

    +

    [del][/del]

    +

    [ins][/ins]

    +

    [em][/em]

    +

    [color=#FF0000][/color]

    +

    [color=blue][/color]

    +

    [h][/h]

    -

    +

    -

    -

    [url=][/url]

    -

    [url][/url]

    -

    [url=/help/][/url]

    -

    [email]myname@example.com[/email] myname@example.com

    -

    [email=myname@example.com][/email]

    -

    [topic=1][/topic]

    -

    [topic]1[/topic]

    -

    [post=1][/post]

    -

    [post]1[/post]

    -

    [forum=1][/forum]

    -

    [forum]1[/forum]

    -

    [user=2][/user]

    -

    [user]2[/user]

    +

    +

    [url=][/url]

    +

    [url][/url]

    +

    [url=/help/][/url]

    +

    [email]myname@example.com[/email] myname@example.com

    +

    [email=myname@example.com][/email]

    +

    [topic=1][/topic]

    +

    [topic]1[/topic]

    +

    [post=1][/post]

    +

    [post]1[/post]

    +

    [forum=1][/forum]

    +

    [forum]1[/forum]

    +

    [user=2][/user]

    +

    [user]2[/user]

    -

    -

    [img=]/img/test.png[/img] <?php echo $lang_help['FluxBB bbcode test'] ?>

    +

    +

    [img=]/img/test.png[/img] <?php echo __('FluxBB bbcode test') ?>

    -

    +

    -

    -

    [quote=James][/quote]

    -

    +

    +

    [quote=James][/quote]

    +

    -
    James

    +
    James

    -

    -

    [quote][/quote]

    -

    +

    +

    [quote][/quote]

    +

    -

    +

    -

    +

    -

    +

    -

    -

    [code][/code]

    -

    +

    +

    [code][/code]

    +

    -
    +
    -

    +

    -

    -

    [list][*][/*][*][/*][*][/*][/list] -

    +

    +

    [list][*][/*][*][/*][*][/*][/list] +

    -
    +
    -

    [list=1][*][/*][*][/*][*][/*][/list] -

    +

    [list=1][*][/*][*][/*][*][/*][/list] +

    -
    +
    -

    [list=a][*][/*][*][/*][*][/*][/list] -

    +

    [list=a][*][/*][*][/*][*][/*][/list] +

    -
    +
    -

    +

    -

    -

    [b][u][/u][/b]

    +

    +

    [b][u][/u][/b]

    -

    +

    -

    +

    $smiley_texts) { - echo "\t\t

    ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .$lang_help['produces']. ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

    '."\n"; + echo "\t\t

    ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .__('produces'). ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

    '."\n"; } ?> diff --git a/style/FeatherBB/view/index.php b/style/FeatherBB/view/index.php index 73d0ec3b..d9d5ca64 100644 --- a/style/FeatherBB/view/index.php +++ b/style/FeatherBB/view/index.php @@ -13,7 +13,7 @@ } if (empty($index_data)): ?> -

    +

    cid != $cur_cat) : @@ -34,7 +34,7 @@
    - + @@ -80,27 +80,27 @@ endif; ?>
    -

    +

    -
    -
    '.forum_number_format($stats['total_users']).'') ?>
    -
    '.forum_number_format($stats['total_topics']).'') ?>
    -
    '.forum_number_format($stats['total_posts']).'') ?>
    +
    +
    '.forum_number_format($stats['total_users']).'') ?>
    +
    '.forum_number_format($stats['total_topics']).'') ?>
    +
    '.forum_number_format($stats['total_posts']).'') ?>
    -
    -
    +
    +
    -
    '.forum_number_format($online['num_users']).'') ?>
    -
    '.forum_number_format($online['num_guests']).'') ?>
    +
    '.forum_number_format($online['num_users']).'') ?>
    +
    '.forum_number_format($online['num_guests']).'') ?>
    0) { - echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.$lang_index['Online'].'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; + echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.__('Online').'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; } else { echo "\t\t\t".'
    '."\n"; } diff --git a/style/FeatherBB/view/login/form.php b/style/FeatherBB/view/login/form.php index 221f02db..fb8f2404 100644 --- a/style/FeatherBB/view/login/form.php +++ b/style/FeatherBB/view/login/form.php @@ -20,7 +20,7 @@
    - +
    @@ -28,11 +28,11 @@
    - +
    -

    -

    +

    +

    diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/FeatherBB/view/login/password_forgotten.php index 7387bc54..979b915c 100644 --- a/style/FeatherBB/view/login/password_forgotten.php +++ b/style/FeatherBB/view/login/password_forgotten.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
    -

    +

    -

    +

      -

      +

      - +
      -

      +

      diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php index 0cd4f3c8..7004040d 100644 --- a/style/FeatherBB/view/misc/email.php +++ b/style/FeatherBB/view/misc/email.php @@ -14,20 +14,20 @@ ?>
      -

      +

      - +
      -
      diff --git a/style/FeatherBB/view/misc/report.php b/style/FeatherBB/view/misc/report.php index adbb619f..121feac2 100644 --- a/style/FeatherBB/view/misc/report.php +++ b/style/FeatherBB/view/misc/report.php @@ -19,22 +19,22 @@
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    -

    +

    - +
    - +
    diff --git a/style/FeatherBB/view/misc/rules.php b/style/FeatherBB/view/misc/rules.php index 00cff256..d32a805e 100644 --- a/style/FeatherBB/view/misc/rules.php +++ b/style/FeatherBB/view/misc/rules.php @@ -14,7 +14,7 @@ ?>
    -

    +

    diff --git a/style/FeatherBB/view/moderate/delete_posts.php b/style/FeatherBB/view/moderate/delete_posts.php index 01269ca7..4b95a5f1 100644 --- a/style/FeatherBB/view/moderate/delete_posts.php +++ b/style/FeatherBB/view/moderate/delete_posts.php @@ -14,20 +14,20 @@ ?>
    -

    +

    - +
    -

    +

    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_topics.php b/style/FeatherBB/view/moderate/delete_topics.php index 9b04ddaf..e414f734 100644 --- a/style/FeatherBB/view/moderate/delete_topics.php +++ b/style/FeatherBB/view/moderate/delete_topics.php @@ -15,20 +15,20 @@ ?>
    -

    +

    - +
    -

    +

    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/merge_topics.php b/style/FeatherBB/view/moderate/merge_topics.php index 0e328f1d..b55f586b 100644 --- a/style/FeatherBB/view/moderate/merge_topics.php +++ b/style/FeatherBB/view/moderate/merge_topics.php @@ -15,22 +15,22 @@ ?>
    -

    +

    - +
    - +
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php index 114df22e..bf893ce4 100644 --- a/style/FeatherBB/view/moderate/moderator_forum.php +++ b/style/FeatherBB/view/moderate/moderator_forum.php @@ -19,7 +19,7 @@
    • » 
    • -
    • » 
    • +
    • » 
    @@ -40,9 +40,9 @@
    - + - + @@ -74,7 +74,7 @@ if (empty($topic_data)): $colspan = ($feather_config['o_topic_views'] == '1') ? 5 : 4; $button_status = ' disabled="disabled"'; - echo "\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t".''."\n"; endif; ?> @@ -87,13 +87,13 @@
    -

    /> /> /> /> />

    +

    /> /> /> /> />

    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/style/FeatherBB/view/moderate/move_topics.php b/style/FeatherBB/view/moderate/move_topics.php index b792cf68..389f1f05 100644 --- a/style/FeatherBB/view/moderate/move_topics.php +++ b/style/FeatherBB/view/moderate/move_topics.php @@ -15,16 +15,16 @@ ?>
    -

    +

    - +
    -
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/FeatherBB/view/moderate/posts_view.php index 60477a50..f957ce8f 100644 --- a/style/FeatherBB/view/moderate/posts_view.php +++ b/style/FeatherBB/view/moderate/posts_view.php @@ -19,7 +19,7 @@
  • » 
  • » 
  • -
  • » 
  • +
  • » 
  • @@ -57,7 +57,7 @@
    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -66,7 +66,7 @@
    -

    ' : '

    '.$lang_misc['Cannot select first'].'

    ' ?>
    +

    ' : '

    '.__('Cannot select first').'

    ' ?>
    @@ -80,14 +80,14 @@
    -

    /> />

    +

    /> />

    • » 
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/style/FeatherBB/view/moderate/split_posts.php b/style/FeatherBB/view/moderate/split_posts.php index 244c7fb8..ac012ff3 100644 --- a/style/FeatherBB/view/moderate/split_posts.php +++ b/style/FeatherBB/view/moderate/split_posts.php @@ -14,27 +14,27 @@ ?>
    -

    +

    - +
    - -
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php index 603d4cac..0c341fd0 100644 --- a/style/FeatherBB/view/post.php +++ b/style/FeatherBB/view/post.php @@ -33,10 +33,10 @@ if (!empty($errors)) { ?>
    -

    +

    -

    +

      -

      +

      @@ -80,6 +80,7 @@ ?> +
      -

      +

      - +
      - - + +
      - -
      -
      - -
      -
      - + +
      +
      + +
      +
      + +
      -
      -
      -
      - -

      + +
      + +

      \ No newline at end of file diff --git a/view/footer.php b/view/footer.php index 98104ea5..6d9b7934 100644 --- a/view/footer.php +++ b/view/footer.php @@ -20,7 +20,7 @@ if ($footer_style == 'viewforum') { echo "\t\t\t".'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_forum['Mod controls'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Mod controls').'
      '."\n"; echo "\t\t\t\t".'
      '.__('Moderate forum').'
      '."\n"; echo "\t\t\t".'
      '."\n"; } elseif ($footer_style == 'viewtopic') { @@ -34,7 +34,7 @@ echo "\t\t\t".'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_topic['Mod controls'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Mod controls').'
      '."\n"; // TODO: all //echo "\t\t\t\t".'
      '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
      '."\n"; echo "\t\t\t\t".'
      '.__('Moderate topic').'
      '."\n"; diff --git a/view/help.php b/view/help.php index 65353802..a7f9300d 100644 --- a/view/help.php +++ b/view/help.php @@ -14,113 +14,113 @@ ?> -

      +

      -

      -

      +

      +

      -

      +

      -

      -

      [b][/b]

      -

      [u][/u]

      -

      [i][/i]

      -

      [s][/s]

      -

      [del][/del]

      -

      [ins][/ins]

      -

      [em][/em]

      -

      [color=#FF0000][/color]

      -

      [color=blue][/color]

      -

      [h][/h]

      +

      +

      [b][/b]

      +

      [u][/u]

      +

      [i][/i]

      +

      [s][/s]

      +

      [del][/del]

      +

      [ins][/ins]

      +

      [em][/em]

      +

      [color=#FF0000][/color]

      +

      [color=blue][/color]

      +

      [h][/h]

      -

      +

      -

      -

      [url=][/url]

      -

      [url][/url]

      -

      [url=/help/][/url]

      -

      [email]myname@example.com[/email] myname@example.com

      -

      [email=myname@example.com][/email]

      -

      [topic=1][/topic]

      -

      [topic]1[/topic]

      -

      [post=1][/post]

      -

      [post]1[/post]

      -

      [forum=1][/forum]

      -

      [forum]1[/forum]

      -

      [user=2][/user]

      -

      [user]2[/user]

      +

      +

      [url=][/url]

      +

      [url][/url]

      +

      [url=/help/][/url]

      +

      [email]myname@example.com[/email] myname@example.com

      +

      [email=myname@example.com][/email]

      +

      [topic=1][/topic]

      +

      [topic]1[/topic]

      +

      [post=1][/post]

      +

      [post]1[/post]

      +

      [forum=1][/forum]

      +

      [forum]1[/forum]

      +

      [user=2][/user]

      +

      [user]2[/user]

      -

      -

      [img=]/img/test.png[/img] <?php echo $lang_help['FluxBB bbcode test'] ?>

      +

      +

      [img=]/img/test.png[/img] <?php echo __('FluxBB bbcode test') ?>

      -

      +

      -

      -

      [quote=James][/quote]

      -

      +

      +

      [quote=James][/quote]

      +

      -
      James

      +
      James

      -

      -

      [quote][/quote]

      -

      +

      +

      [quote][/quote]

      +

      -

      +

      -

      +

      -

      +

      -

      -

      [code][/code]

      -

      +

      +

      [code][/code]

      +

      -
      +
      -

      +

      -

      -

      [list][*][/*][*][/*][*][/*][/list] -

      +

      +

      [list][*][/*][*][/*][*][/*][/list] +

      -
      +
      -

      [list=1][*][/*][*][/*][*][/*][/list] -

      +

      [list=1][*][/*][*][/*][*][/*][/list] +

      -
      +
      -

      [list=a][*][/*][*][/*][*][/*][/list] -

      +

      [list=a][*][/*][*][/*][*][/*][/list] +

      -
      +
      -

      +

      -

      -

      [b][u][/u][/b]

      +

      +

      [b][u][/u][/b]

      -

      +

      -

      +

      $smiley_texts) { - echo "\t\t

      ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .$lang_help['produces']. ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

      '."\n"; + echo "\t\t

      ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .__('produces'). ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

      '."\n"; } ?> diff --git a/view/index.php b/view/index.php index 73d0ec3b..d9d5ca64 100644 --- a/view/index.php +++ b/view/index.php @@ -13,7 +13,7 @@ } if (empty($index_data)): ?> -

      +

      cid != $cur_cat) : @@ -34,7 +34,7 @@
    - + @@ -80,27 +80,27 @@ endif; ?>
    -

    +

    -
    -
    '.forum_number_format($stats['total_users']).'') ?>
    -
    '.forum_number_format($stats['total_topics']).'') ?>
    -
    '.forum_number_format($stats['total_posts']).'') ?>
    +
    +
    '.forum_number_format($stats['total_users']).'') ?>
    +
    '.forum_number_format($stats['total_topics']).'') ?>
    +
    '.forum_number_format($stats['total_posts']).'') ?>
    -
    -
    +
    +
    -
    '.forum_number_format($online['num_users']).'') ?>
    -
    '.forum_number_format($online['num_guests']).'') ?>
    +
    '.forum_number_format($online['num_users']).'') ?>
    +
    '.forum_number_format($online['num_guests']).'') ?>
    0) { - echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.$lang_index['Online'].'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; + echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.__('Online').'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; } else { echo "\t\t\t".'
    '."\n"; } diff --git a/view/login/form.php b/view/login/form.php index 221f02db..fb8f2404 100644 --- a/view/login/form.php +++ b/view/login/form.php @@ -20,7 +20,7 @@
    - +
    @@ -28,11 +28,11 @@
    - +
    -

    -

    +

    +

    diff --git a/view/login/password_forgotten.php b/view/login/password_forgotten.php index 7387bc54..979b915c 100644 --- a/view/login/password_forgotten.php +++ b/view/login/password_forgotten.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
    -

    +

    -

    +

      -

      +

      - +
      -

      +

      diff --git a/view/misc/email.php b/view/misc/email.php index 0cd4f3c8..7004040d 100644 --- a/view/misc/email.php +++ b/view/misc/email.php @@ -14,20 +14,20 @@ ?>
      -

      +

      - +
      -
      diff --git a/view/misc/report.php b/view/misc/report.php index adbb619f..121feac2 100644 --- a/view/misc/report.php +++ b/view/misc/report.php @@ -19,22 +19,22 @@
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    -

    +

    - +
    - +
    diff --git a/view/misc/rules.php b/view/misc/rules.php index 00cff256..d32a805e 100644 --- a/view/misc/rules.php +++ b/view/misc/rules.php @@ -14,7 +14,7 @@ ?>
    -

    +

    diff --git a/view/moderate/delete_posts.php b/view/moderate/delete_posts.php index 01269ca7..4b95a5f1 100644 --- a/view/moderate/delete_posts.php +++ b/view/moderate/delete_posts.php @@ -14,20 +14,20 @@ ?>
    -

    +

    - +
    -

    +

    -

    +

    \ No newline at end of file diff --git a/view/moderate/delete_topics.php b/view/moderate/delete_topics.php index 9b04ddaf..e414f734 100644 --- a/view/moderate/delete_topics.php +++ b/view/moderate/delete_topics.php @@ -15,20 +15,20 @@ ?>
    -

    +

    - +
    -

    +

    -

    +

    \ No newline at end of file diff --git a/view/moderate/merge_topics.php b/view/moderate/merge_topics.php index 0e328f1d..b55f586b 100644 --- a/view/moderate/merge_topics.php +++ b/view/moderate/merge_topics.php @@ -15,22 +15,22 @@ ?>
    -

    +

    - +
    - +
    -

    +

    \ No newline at end of file diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index 114df22e..bf893ce4 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -19,7 +19,7 @@
    • » 
    • -
    • » 
    • +
    • » 
    @@ -40,9 +40,9 @@
    - + - + @@ -74,7 +74,7 @@ if (empty($topic_data)): $colspan = ($feather_config['o_topic_views'] == '1') ? 5 : 4; $button_status = ' disabled="disabled"'; - echo "\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t".''."\n"; endif; ?> @@ -87,13 +87,13 @@
    -

    /> /> /> /> />

    +

    /> /> /> /> />

    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/view/moderate/move_topics.php b/view/moderate/move_topics.php index b792cf68..389f1f05 100644 --- a/view/moderate/move_topics.php +++ b/view/moderate/move_topics.php @@ -15,16 +15,16 @@ ?>
    -

    +

    - +
    -
    -

    +

    \ No newline at end of file diff --git a/view/moderate/posts_view.php b/view/moderate/posts_view.php index 60477a50..f957ce8f 100644 --- a/view/moderate/posts_view.php +++ b/view/moderate/posts_view.php @@ -19,7 +19,7 @@
  • » 
  • » 
  • -
  • » 
  • +
  • » 
  • @@ -57,7 +57,7 @@
    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -66,7 +66,7 @@
    -

    ' : '

    '.$lang_misc['Cannot select first'].'

    ' ?>
    +

    ' : '

    '.__('Cannot select first').'

    ' ?>
    @@ -80,14 +80,14 @@
    -

    /> />

    +

    /> />

    • » 
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/view/moderate/split_posts.php b/view/moderate/split_posts.php index 244c7fb8..ac012ff3 100644 --- a/view/moderate/split_posts.php +++ b/view/moderate/split_posts.php @@ -14,27 +14,27 @@ ?>
    -

    +

    - +
    - -
    -

    +

    \ No newline at end of file diff --git a/view/post.php b/view/post.php index 603d4cac..0c341fd0 100644 --- a/view/post.php +++ b/view/post.php @@ -33,10 +33,10 @@ if (!empty($errors)) { ?>
    -

    +

    -

    +

      -

      +

      @@ -80,6 +80,7 @@ ?> +
      -

      +

      - +
      -
      @@ -102,7 +103,7 @@ ?>
      - +
      @@ -113,7 +114,7 @@ -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index 6249ae34..0b1d2ae7 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -11,7 +11,7 @@
      -

      +

      '."\n"; - echo "\t\t\t\t".'
      '.$lang_forum['Mod controls'].'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_common['Moderate forum'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Mod controls').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Moderate forum').'
      '."\n"; echo "\t\t\t".''."\n"; } elseif ($footer_style == 'viewtopic') { if (isset($pid)) { @@ -34,22 +34,22 @@ echo "\t\t\t".'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_topic['Mod controls'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Mod controls').'
      '."\n"; // TODO: all - //echo "\t\t\t\t".'
      '.$lang_common['Moderate topic'].''.($num_pages > 1 ? ' ('.$lang_common['All'].')' : '').'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_common['Moderate topic'].'
      '."\n"; - echo "\t\t\t\t".'
      '.$lang_common['Move topic'].'
      '."\n"; + //echo "\t\t\t\t".'
      '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Moderate topic').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Move topic').'
      '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
      '.$lang_common['Open topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Open topic').'
      '."\n"; } else { - echo "\t\t\t\t".'
      '.$lang_common['Close topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Close topic').'
      '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
      '.$lang_common['Unstick topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Unstick topic').'
      '."\n"; } else { - echo "\t\t\t\t".'
      '.$lang_common['Stick topic'].'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Stick topic').'
      '."\n"; } echo "\t\t\t".'
      '."\n"; @@ -89,26 +89,26 @@ if ($footer_style == 'index') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewforum') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewtopic') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } ?> -

      FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

      +

      FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

      @@ -122,13 +122,13 @@ // Calculate script generation time $time_diff = sprintf('%.3f', get_microtime() - $feather_start); - echo sprintf($lang_common['Querytime'], $time_diff, count(\DB::get_query_log()[0])); + echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); if (function_exists('memory_get_usage')) { - echo ' - '.sprintf($lang_common['Memory usage'], file_size(memory_get_usage())); + echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage())); + echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); } } diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php index ec4c4b49..7b2b8d28 100644 --- a/style/FeatherBB/view/header.php +++ b/style/FeatherBB/view/header.php @@ -9,7 +9,7 @@ ?> - + @@ -57,7 +57,7 @@ function process_form(the_form) var elem = the_form.elements[i]; if (elem.name && required_fields[elem.name] && !elem.value && elem.type && (/^(?:text(?:area)?|password|file)$/i.test(elem.type))) { - alert('"' + required_fields[elem.name] + '" '); + alert('"' + required_fields[elem.name] + '" '); elem.focus(); return false; } @@ -89,7 +89,7 @@ function process_form(the_form)
      @@ -111,7 +111,7 @@ function process_form(the_form)
      user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?>
      -

      +

      @@ -122,7 +122,7 @@ function process_form(the_form)
      -

      ×

      +

      ×

      diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php index fd511285..a7f9300d 100644 --- a/style/FeatherBB/view/help.php +++ b/style/FeatherBB/view/help.php @@ -14,113 +14,113 @@ ?> -

      +

      -

      -

      +

      +

      -

      +

      -

      -

      [b][/b]

      -

      [u][/u]

      -

      [i][/i]

      -

      [s][/s]

      -

      [del][/del]

      -

      [ins][/ins]

      -

      [em][/em]

      -

      [color=#FF0000][/color]

      -

      [color=blue][/color]

      -

      [h][/h]

      +

      +

      [b][/b]

      +

      [u][/u]

      +

      [i][/i]

      +

      [s][/s]

      +

      [del][/del]

      +

      [ins][/ins]

      +

      [em][/em]

      +

      [color=#FF0000][/color]

      +

      [color=blue][/color]

      +

      [h][/h]

      -

      +

      -

      -

      [url=][/url]

      -

      [url][/url]

      -

      [url=/help/][/url]

      -

      [email]myname@example.com[/email] myname@example.com

      -

      [email=myname@example.com][/email]

      -

      [topic=1][/topic]

      -

      [topic]1[/topic]

      -

      [post=1][/post]

      -

      [post]1[/post]

      -

      [forum=1][/forum]

      -

      [forum]1[/forum]

      -

      [user=2][/user]

      -

      [user]2[/user]

      +

      +

      [url=][/url]

      +

      [url][/url]

      +

      [url=/help/][/url]

      +

      [email]myname@example.com[/email] myname@example.com

      +

      [email=myname@example.com][/email]

      +

      [topic=1][/topic]

      +

      [topic]1[/topic]

      +

      [post=1][/post]

      +

      [post]1[/post]

      +

      [forum=1][/forum]

      +

      [forum]1[/forum]

      +

      [user=2][/user]

      +

      [user]2[/user]

      -

      -

      [img=]/img/test.png[/img] <?php echo $lang_help['FluxBB bbcode test'] ?>

      +

      +

      [img=]/img/test.png[/img] <?php echo __('FluxBB bbcode test') ?>

      -

      +

      -

      -

      [quote=James][/quote]

      -

      +

      +

      [quote=James][/quote]

      +

      -
      James

      +
      James

      -

      -

      [quote][/quote]

      -

      +

      +

      [quote][/quote]

      +

      -

      +

      -

      +

      -

      +

      -

      -

      [code][/code]

      -

      +

      +

      [code][/code]

      +

      -
      +
      -

      +

      -

      -

      [list][*][/*][*][/*][*][/*][/list] -

      +

      +

      [list][*][/*][*][/*][*][/*][/list] +

      -
      +
      -

      [list=1][*][/*][*][/*][*][/*][/list] -

      +

      [list=1][*][/*][*][/*][*][/*][/list] +

      -
      +
      -

      [list=a][*][/*][*][/*][*][/*][/list] -

      +

      [list=a][*][/*][*][/*][*][/*][/list] +

      -
      +
      -

      +

      -

      -

      [b][u][/u][/b]

      +

      +

      [b][u][/u][/b]

      -

      +

      -

      +

      $smiley_texts) { - echo "\t\t

      ". implode(' ' .$lang_common['and']. ' ', $smiley_texts).' ' .$lang_help['produces']. ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

      '."\n"; + echo "\t\t

      ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .__('produces'). ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

      '."\n"; } ?> diff --git a/style/FeatherBB/view/index.php b/style/FeatherBB/view/index.php index 1ffce864..d9d5ca64 100644 --- a/style/FeatherBB/view/index.php +++ b/style/FeatherBB/view/index.php @@ -13,7 +13,7 @@ } if (empty($index_data)): ?> -

      +

      cid != $cur_cat) : @@ -33,10 +33,10 @@
    '.$lang_forum['Empty forum'].'
    '.__('Empty forum').'
    '.$lang_forum['Empty forum'].'
    '.__('Empty forum').'
    - - - - + + + + @@ -80,27 +80,27 @@ endif; ?>
    -

    +

    -
    -
    '.forum_number_format($stats['total_users']).'') ?>
    -
    '.forum_number_format($stats['total_topics']).'') ?>
    -
    '.forum_number_format($stats['total_posts']).'') ?>
    +
    +
    '.forum_number_format($stats['total_users']).'') ?>
    +
    '.forum_number_format($stats['total_topics']).'') ?>
    +
    '.forum_number_format($stats['total_posts']).'') ?>
    -
    -
    +
    +
    -
    '.forum_number_format($online['num_users']).'') ?>
    -
    '.forum_number_format($online['num_guests']).'') ?>
    +
    '.forum_number_format($online['num_users']).'') ?>
    +
    '.forum_number_format($online['num_guests']).'') ?>
    0) { - echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.$lang_index['Online'].'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; + echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.__('Online').'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; } else { echo "\t\t\t".'
    '."\n"; } diff --git a/style/FeatherBB/view/login/form.php b/style/FeatherBB/view/login/form.php index 8d35d8b7..fb8f2404 100644 --- a/style/FeatherBB/view/login/form.php +++ b/style/FeatherBB/view/login/form.php @@ -14,29 +14,29 @@ ?>
    -

    +

    - +
    - - + +
    - +
    -

    -

    +

    +

    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/FeatherBB/view/login/password_forgotten.php index 2712f630..979b915c 100644 --- a/style/FeatherBB/view/login/password_forgotten.php +++ b/style/FeatherBB/view/login/password_forgotten.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
    -

    +

    -

    +

      -

      +

      - +
      - -

      + +

      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/message.php b/style/FeatherBB/view/message.php index 7f26edad..d376bd09 100644 --- a/style/FeatherBB/view/message.php +++ b/style/FeatherBB/view/message.php @@ -14,11 +14,11 @@ ?>
      -

      +

      -

      +

      diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php index 054c7f34..7004040d 100644 --- a/style/FeatherBB/view/misc/email.php +++ b/style/FeatherBB/view/misc/email.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      -
      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/misc/report.php b/style/FeatherBB/view/misc/report.php index 6cf01c90..121feac2 100644 --- a/style/FeatherBB/view/misc/report.php +++ b/style/FeatherBB/view/misc/report.php @@ -16,29 +16,29 @@
        -
      • +
      • » 
      • » 
      • -
      • » 
      • +
      • » 
      -

      +

      - +
      - +
      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/misc/rules.php b/style/FeatherBB/view/misc/rules.php index 00cff256..d32a805e 100644 --- a/style/FeatherBB/view/misc/rules.php +++ b/style/FeatherBB/view/misc/rules.php @@ -14,7 +14,7 @@ ?>
      -

      +

      diff --git a/style/FeatherBB/view/moderate/delete_posts.php b/style/FeatherBB/view/moderate/delete_posts.php index d3a8ea76..4b95a5f1 100644 --- a/style/FeatherBB/view/moderate/delete_posts.php +++ b/style/FeatherBB/view/moderate/delete_posts.php @@ -14,20 +14,20 @@ ?>
      -

      +

      - +
      -

      +

      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_topics.php b/style/FeatherBB/view/moderate/delete_topics.php index d18c7394..e414f734 100644 --- a/style/FeatherBB/view/moderate/delete_topics.php +++ b/style/FeatherBB/view/moderate/delete_topics.php @@ -15,20 +15,20 @@ ?>
      -

      +

      - +
      -

      +

      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/merge_topics.php b/style/FeatherBB/view/moderate/merge_topics.php index 1c5cc5a4..b55f586b 100644 --- a/style/FeatherBB/view/moderate/merge_topics.php +++ b/style/FeatherBB/view/moderate/merge_topics.php @@ -15,22 +15,22 @@ ?>
      -

      +

      - +
      - +
      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php index af90498d..bf893ce4 100644 --- a/style/FeatherBB/view/moderate/moderator_forum.php +++ b/style/FeatherBB/view/moderate/moderator_forum.php @@ -17,9 +17,9 @@
        -
      • +
      • » 
      • -
      • » 
      • +
      • » 
      @@ -38,11 +38,11 @@
    - - - - - + + + + + @@ -74,7 +74,7 @@ if (empty($topic_data)): $colspan = ($feather_config['o_topic_views'] == '1') ? 5 : 4; $button_status = ' disabled="disabled"'; - echo "\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t".''."\n"; endif; ?> @@ -87,13 +87,13 @@
    -

    /> /> /> /> />

    +

    /> /> /> /> />

      -
    • +
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/style/FeatherBB/view/moderate/move_topics.php b/style/FeatherBB/view/moderate/move_topics.php index 8dfedeaf..389f1f05 100644 --- a/style/FeatherBB/view/moderate/move_topics.php +++ b/style/FeatherBB/view/moderate/move_topics.php @@ -15,16 +15,16 @@ ?>
    -

    +

    - +
    -
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/FeatherBB/view/moderate/posts_view.php index 87d23e24..f957ce8f 100644 --- a/style/FeatherBB/view/moderate/posts_view.php +++ b/style/FeatherBB/view/moderate/posts_view.php @@ -16,10 +16,10 @@
      -
    • +
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    @@ -53,11 +53,11 @@
    -

    +

    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -66,7 +66,7 @@
    -

    ' : '

    '.$lang_misc['Cannot select first'].'

    ' ?>
    +

    ' : '

    '.__('Cannot select first').'

    ' ?>
    @@ -80,14 +80,14 @@
    -

    /> />

    +

    /> />

      -
    • +
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/style/FeatherBB/view/moderate/split_posts.php b/style/FeatherBB/view/moderate/split_posts.php index f3f5d88e..ac012ff3 100644 --- a/style/FeatherBB/view/moderate/split_posts.php +++ b/style/FeatherBB/view/moderate/split_posts.php @@ -14,27 +14,27 @@ ?>
    -

    +

    - +
    - -
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php index 7bdfc449..0c341fd0 100644 --- a/style/FeatherBB/view/post.php +++ b/style/FeatherBB/view/post.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • @@ -33,10 +33,10 @@ if (!empty($errors)) { ?>
      -

      +

      -

      +

        -

        +

        @@ -80,6 +80,7 @@ ?> +
        @@ -134,7 +135,7 @@
        - +
        @@ -150,14 +151,14 @@ user->is_guest) : ?>
        - +
        -

        +

        @@ -165,7 +166,7 @@
        -

        +

        @@ -175,7 +176,7 @@ if ($tid && $feather_config['o_topic_review'] != '0') : ?>
        -

        +

        -

        +

        - +
        - - -

        + + +

        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/profile/change_pass.php b/style/FeatherBB/view/profile/change_pass.php index 0231efa2..0f0ab452 100644 --- a/style/FeatherBB/view/profile/change_pass.php +++ b/style/FeatherBB/view/profile/change_pass.php @@ -14,26 +14,26 @@ ?>
        -

        +

        - +
        -user->is_admmod): ?>
        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/profile/delete_user.php b/style/FeatherBB/view/profile/delete_user.php index 55c707c5..d5d5bde2 100644 --- a/style/FeatherBB/view/profile/delete_user.php +++ b/style/FeatherBB/view/profile/delete_user.php @@ -14,23 +14,23 @@ ?>
        -

        +

        - +
        -

        '.feather_escape($username).'.' ?>

        +

        '.feather_escape($username).'.' ?>

        - +
        -

        +

        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/profile/menu.php b/style/FeatherBB/view/profile/menu.php index bcf803e1..e78d2c30 100644 --- a/style/FeatherBB/view/profile/menu.php +++ b/style/FeatherBB/view/profile/menu.php @@ -15,39 +15,39 @@ ?>
        -

        +

          > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
        diff --git a/style/FeatherBB/view/profile/section_admin.php b/style/FeatherBB/view/profile/section_admin.php index 16b4f80a..52a0ad54 100644 --- a/style/FeatherBB/view/profile/section_admin.php +++ b/style/FeatherBB/view/profile/section_admin.php @@ -14,7 +14,7 @@ ?>
        -

        +

        @@ -25,9 +25,9 @@ if ($feather->user->g_moderator == '1') { ?> - +
        -

        +

        @@ -36,12 +36,12 @@ } else { if ($feather->user->id != $id) { ?> - +
        - +
        @@ -52,9 +52,9 @@ } ?> - +
        - +
        @@ -64,13 +64,13 @@ ?>
        - +
        -

        +

        -
        +
      diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php index 8ac8fd27..506dd146 100644 --- a/style/FeatherBB/view/profile/section_display.php +++ b/style/FeatherBB/view/profile/section_display.php @@ -14,7 +14,7 @@ ?>
      -

      +

      @@ -30,9 +30,9 @@ ?>
      - +
      - +} ?> />
      +} ?> />
      +} ?> />
      +} ?> />
      @@ -85,15 +85,15 @@
      - +
      - - -

      + + +

      -

      +

      diff --git a/style/FeatherBB/view/profile/section_essentials.php b/style/FeatherBB/view/profile/section_essentials.php index 25deccf6..4f507a8c 100644 --- a/style/FeatherBB/view/profile/section_essentials.php +++ b/style/FeatherBB/view/profile/section_essentials.php @@ -14,23 +14,23 @@ ?>
      -

      +

      - +
      -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

      +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

      - +
      @@ -38,139 +38,139 @@
      - +
      -

      -
      diff --git a/style/FeatherBB/view/profile/section_messaging.php b/style/FeatherBB/view/profile/section_messaging.php index 3a5be1a2..148a78cf 100644 --- a/style/FeatherBB/view/profile/section_messaging.php +++ b/style/FeatherBB/view/profile/section_messaging.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      - - - - - + + + + +
      -

      +

      diff --git a/style/FeatherBB/view/profile/section_personal.php b/style/FeatherBB/view/profile/section_personal.php index 3accb5f7..7358bc85 100644 --- a/style/FeatherBB/view/profile/section_personal.php +++ b/style/FeatherBB/view/profile/section_personal.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      - + - -user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?> + +user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?>
      -

      +

      diff --git a/style/FeatherBB/view/profile/section_personality.php b/style/FeatherBB/view/profile/section_personality.php index d3e67cd6..9bd9440b 100644 --- a/style/FeatherBB/view/profile/section_personality.php +++ b/style/FeatherBB/view/profile/section_personality.php @@ -14,41 +14,41 @@ ?>
      -

      +

      - +
      -

      +

      - +
      -

      +

      -
      -

      +

      diff --git a/style/FeatherBB/view/profile/section_privacy.php b/style/FeatherBB/view/profile/section_privacy.php index 34715516..6c1ab357 100644 --- a/style/FeatherBB/view/profile/section_privacy.php +++ b/style/FeatherBB/view/profile/section_privacy.php @@ -14,47 +14,47 @@ ?>
      -

      +

      - +
      -

      +

      +} ?> />
      +} ?> />
      +} ?> />
      - +
      +} ?> />
      +} ?> />
      -

      +

      diff --git a/style/FeatherBB/view/profile/upload_avatar.php b/style/FeatherBB/view/profile/upload_avatar.php index 60487560..3f74f092 100644 --- a/style/FeatherBB/view/profile/upload_avatar.php +++ b/style/FeatherBB/view/profile/upload_avatar.php @@ -14,22 +14,22 @@ ?>
      -

      +

      - +
      - -

      + +

      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/view_profile.php b/style/FeatherBB/view/profile/view_profile.php index da66b788..ad1c5959 100644 --- a/style/FeatherBB/view/profile/view_profile.php +++ b/style/FeatherBB/view/profile/view_profile.php @@ -14,12 +14,12 @@ ?>
      -

      +

      - +
      @@ -30,7 +30,7 @@
      - +
      @@ -41,7 +41,7 @@
      - +
      @@ -52,7 +52,7 @@
      - +
      diff --git a/style/FeatherBB/view/register/email.php b/style/FeatherBB/view/register/email.php index e6355cb6..9f9b3424 100644 --- a/style/FeatherBB/view/register/email.php +++ b/style/FeatherBB/view/register/email.php @@ -15,25 +15,25 @@ ?>
      -

      +

      - +
      -
      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/register/form.php b/style/FeatherBB/view/register/form.php index 3344af93..fa2d2457 100644 --- a/style/FeatherBB/view/register/form.php +++ b/style/FeatherBB/view/register/form.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
      -

      +

      -

      +

        -

        +

        -

        -

        -

        +

        +

        +

        - +
        -
        @@ -61,28 +61,28 @@
        - +
        - - -

        +

        - +
        -

        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/register/rules.php b/style/FeatherBB/view/register/rules.php index d86c8c54..3a2fd06c 100644 --- a/style/FeatherBB/view/register/rules.php +++ b/style/FeatherBB/view/register/rules.php @@ -15,18 +15,18 @@ ?>
        -

        +

        - +
        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/search/footer.php b/style/FeatherBB/view/search/footer.php index 73ff5d13..a64e1cdf 100644 --- a/style/FeatherBB/view/search/footer.php +++ b/style/FeatherBB/view/search/footer.php @@ -30,7 +30,7 @@
          -
        • +
        • » 
        • » 
        diff --git a/style/FeatherBB/view/search/form.php b/style/FeatherBB/view/search/form.php index 642fb380..bb39c614 100644 --- a/style/FeatherBB/view/search/form.php +++ b/style/FeatherBB/view/search/form.php @@ -14,66 +14,66 @@ ?>
        -

        +

        - +
        - - -

        + + +

        - +
        -
        - +
        -
        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/search/header.php b/style/FeatherBB/view/search/header.php index 47706687..909a2108 100644 --- a/style/FeatherBB/view/search/header.php +++ b/style/FeatherBB/view/search/header.php @@ -16,7 +16,7 @@
          -
        • +
        • » 
        • » 
        @@ -31,16 +31,16 @@ if ($search['show_as'] == 'topics') : ?>
        -

        +

    '.$lang_forum['Empty forum'].'
    '.__('Empty forum').'
    - - - - + + + + diff --git a/style/FeatherBB/view/search/posts.php b/style/FeatherBB/view/search/posts.php index a1247133..872c349e 100644 --- a/style/FeatherBB/view/search/posts.php +++ b/style/FeatherBB/view/search/posts.php @@ -21,7 +21,7 @@ echo ' '.$cur_search['item_status']; } ?>">

    # »  » 

    @@ -29,7 +29,7 @@
    -
    +
    @@ -46,8 +46,8 @@
      -
    • -
    • +
    • +
    diff --git a/style/FeatherBB/view/search/topics.php b/style/FeatherBB/view/search/topics.php index d60dce31..af843193 100644 --- a/style/FeatherBB/view/search/topics.php +++ b/style/FeatherBB/view/search/topics.php @@ -25,5 +25,5 @@
    - + \ No newline at end of file diff --git a/style/FeatherBB/view/userlist.php b/style/FeatherBB/view/userlist.php index 66e2a20d..0bbedae6 100644 --- a/style/FeatherBB/view/userlist.php +++ b/style/FeatherBB/view/userlist.php @@ -14,50 +14,50 @@ ?>
    -

    +

    - +
    -user->g_search_users == '1'): ?> -
    -

    +

    @@ -70,16 +70,16 @@
    -

    +

    '.format_time($cur_search['last_post']).' '.$lang_common['by'].' '.feather_escape($cur_search['last_poster']) ?>'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
    - - - - + + + + @@ -98,7 +98,7 @@ } if (empty($userlist_data)) { - echo "\t\t\t".''."\n\t\t\t\t\t".''."\n"; + echo "\t\t\t".''."\n\t\t\t\t\t".''."\n"; } ?> diff --git a/style/FeatherBB/view/viewforum.php b/style/FeatherBB/view/viewforum.php index 332987ae..b9d04a1d 100644 --- a/style/FeatherBB/view/viewforum.php +++ b/style/FeatherBB/view/viewforum.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    @@ -34,10 +34,10 @@
    '.$lang_search['No hits'].'
    '.__('No hits').'
    - - - - + + + + @@ -70,7 +70,7 @@
    - +
    @@ -91,7 +91,7 @@
      -
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?> diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php index e5f55ab0..16535ff1 100644 --- a/style/FeatherBB/view/viewtopic.php +++ b/style/FeatherBB/view/viewtopic.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • » 
    @@ -64,13 +64,13 @@

    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -107,7 +107,7 @@
      -
    • +
    • » 
    • » 
    @@ -124,13 +124,13 @@ ?>
    -

    +

    - +
    @@ -139,21 +139,22 @@ user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.$lang_common['Email'].' '.$lang_common['Required'].'' : $lang_common['Email']; + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
    '.$lang_common['Message'].' '.$lang_common['Required'].'
    '; + echo "\t\t\t\t\t\t".'
    +
    + +

    \ No newline at end of file diff --git a/view/footer.php b/view/footer.php index dde5eb31..6d9b7934 100644 --- a/view/footer.php +++ b/view/footer.php @@ -11,7 +11,7 @@
    -

    +

    '."\n"; - echo "\t\t\t\t".'
    '.$lang_forum['Mod controls'].'
    '."\n"; - echo "\t\t\t\t".'
    '.$lang_common['Moderate forum'].'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; echo "\t\t\t".''."\n"; } elseif ($footer_style == 'viewtopic') { if (isset($pid)) { @@ -34,22 +34,22 @@ echo "\t\t\t".'
    '."\n"; - echo "\t\t\t\t".'
    '.$lang_topic['Mod controls'].'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; // TODO: all - //echo "\t\t\t\t".'
    '.$lang_common['Moderate topic'].''.($num_pages > 1 ? ' ('.$lang_common['All'].')' : '').'
    '."\n"; - echo "\t\t\t\t".'
    '.$lang_common['Moderate topic'].'
    '."\n"; - echo "\t\t\t\t".'
    '.$lang_common['Move topic'].'
    '."\n"; + //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
    '.$lang_common['Open topic'].'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.$lang_common['Close topic'].'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
    '.$lang_common['Unstick topic'].'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.$lang_common['Stick topic'].'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; } echo "\t\t\t".'
    '."\n"; @@ -89,26 +89,26 @@ if ($footer_style == 'index') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewforum') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewtopic') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } ?> -

    FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

    +

    FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

    @@ -122,13 +122,13 @@ // Calculate script generation time $time_diff = sprintf('%.3f', get_microtime() - $feather_start); - echo sprintf($lang_common['Querytime'], $time_diff, count(\DB::get_query_log()[0])); + echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); if (function_exists('memory_get_usage')) { - echo ' - '.sprintf($lang_common['Memory usage'], file_size(memory_get_usage())); + echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage())); + echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); } } diff --git a/view/header.php b/view/header.php index 4492eaa0..88f0260a 100644 --- a/view/header.php +++ b/view/header.php @@ -9,7 +9,7 @@ ?> - +<?php echo generate_page_title($page_title, $p) ?> @@ -55,7 +55,7 @@ function process_form(the_form) var elem = the_form.elements[i]; if (elem.name && required_fields[elem.name] && !elem.value && elem.type && (/^(?:text(?:area)?|password|file)$/i.test(elem.type))) { - alert('"' + required_fields[elem.name] + '" '); + alert('"' + required_fields[elem.name] + '" '); elem.focus(); return false; } @@ -92,7 +92,7 @@ function process_form(the_form) user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?>
    -

    +

    @@ -104,7 +104,7 @@ function process_form(the_form)
    -

    ×

    +

    ×

    diff --git a/view/help.php b/view/help.php index fd511285..a7f9300d 100644 --- a/view/help.php +++ b/view/help.php @@ -14,113 +14,113 @@ ?> -

    +

    -

    -

    +

    +

    -

    +

    -

    -

    [b][/b]

    -

    [u][/u]

    -

    [i][/i]

    -

    [s][/s]

    -

    [del][/del]

    -

    [ins][/ins]

    -

    [em][/em]

    -

    [color=#FF0000][/color]

    -

    [color=blue][/color]

    -

    [h][/h]

    +

    +

    [b][/b]

    +

    [u][/u]

    +

    [i][/i]

    +

    [s][/s]

    +

    [del][/del]

    +

    [ins][/ins]

    +

    [em][/em]

    +

    [color=#FF0000][/color]

    +

    [color=blue][/color]

    +

    [h][/h]

    -

    +

    -

    -

    [url=][/url]

    -

    [url][/url]

    -

    [url=/help/][/url]

    -

    [email]myname@example.com[/email] myname@example.com

    -

    [email=myname@example.com][/email]

    -

    [topic=1][/topic]

    -

    [topic]1[/topic]

    -

    [post=1][/post]

    -

    [post]1[/post]

    -

    [forum=1][/forum]

    -

    [forum]1[/forum]

    -

    [user=2][/user]

    -

    [user]2[/user]

    +

    +

    [url=][/url]

    +

    [url][/url]

    +

    [url=/help/][/url]

    +

    [email]myname@example.com[/email] myname@example.com

    +

    [email=myname@example.com][/email]

    +

    [topic=1][/topic]

    +

    [topic]1[/topic]

    +

    [post=1][/post]

    +

    [post]1[/post]

    +

    [forum=1][/forum]

    +

    [forum]1[/forum]

    +

    [user=2][/user]

    +

    [user]2[/user]

    -

    -

    [img=]/img/test.png[/img] <?php echo $lang_help['FluxBB bbcode test'] ?>

    +

    +

    [img=]/img/test.png[/img] <?php echo __('FluxBB bbcode test') ?>

    -

    +

    -

    -

    [quote=James][/quote]

    -

    +

    +

    [quote=James][/quote]

    +

    -
    James

    +
    James

    -

    -

    [quote][/quote]

    -

    +

    +

    [quote][/quote]

    +

    -

    +

    -

    +

    -

    +

    -

    -

    [code][/code]

    -

    +

    +

    [code][/code]

    +

    -
    +
    -

    +

    -

    -

    [list][*][/*][*][/*][*][/*][/list] -

    +

    +

    [list][*][/*][*][/*][*][/*][/list] +

    -
    +
    -

    [list=1][*][/*][*][/*][*][/*][/list] -

    +

    [list=1][*][/*][*][/*][*][/*][/list] +

    -
    +
    -

    [list=a][*][/*][*][/*][*][/*][/list] -

    +

    [list=a][*][/*][*][/*][*][/*][/list] +

    -
    +
    -

    +

    -

    -

    [b][u][/u][/b]

    +

    +

    [b][u][/u][/b]

    -

    +

    -

    +

    $smiley_texts) { - echo "\t\t

    ". implode(' ' .$lang_common['and']. ' ', $smiley_texts).' ' .$lang_help['produces']. ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

    '."\n"; + echo "\t\t

    ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .__('produces'). ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

    '."\n"; } ?> diff --git a/view/index.php b/view/index.php index 1ffce864..d9d5ca64 100644 --- a/view/index.php +++ b/view/index.php @@ -13,7 +13,7 @@ } if (empty($index_data)): ?> -

    +

    cid != $cur_cat) : @@ -33,10 +33,10 @@
    - - - - + + + + @@ -80,27 +80,27 @@ endif; ?>
    -

    +

    -
    -
    '.forum_number_format($stats['total_users']).'') ?>
    -
    '.forum_number_format($stats['total_topics']).'') ?>
    -
    '.forum_number_format($stats['total_posts']).'') ?>
    +
    +
    '.forum_number_format($stats['total_users']).'') ?>
    +
    '.forum_number_format($stats['total_topics']).'') ?>
    +
    '.forum_number_format($stats['total_posts']).'') ?>
    -
    -
    +
    +
    -
    '.forum_number_format($online['num_users']).'') ?>
    -
    '.forum_number_format($online['num_guests']).'') ?>
    +
    '.forum_number_format($online['num_users']).'') ?>
    +
    '.forum_number_format($online['num_guests']).'') ?>
    0) { - echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.$lang_index['Online'].'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; + echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.__('Online').'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; } else { echo "\t\t\t".'
    '."\n"; } diff --git a/view/login/form.php b/view/login/form.php index 8d35d8b7..fb8f2404 100644 --- a/view/login/form.php +++ b/view/login/form.php @@ -14,29 +14,29 @@ ?>
    -

    +

    - +
    - - + +
    - +
    -

    -

    +

    +

    -

    +

    \ No newline at end of file diff --git a/view/login/password_forgotten.php b/view/login/password_forgotten.php index 2712f630..979b915c 100644 --- a/view/login/password_forgotten.php +++ b/view/login/password_forgotten.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
    -

    +

    -

    +

      -

      +

      - +
      - -

      + +

      -

      +

      \ No newline at end of file diff --git a/view/message.php b/view/message.php index 7f26edad..d376bd09 100644 --- a/view/message.php +++ b/view/message.php @@ -14,11 +14,11 @@ ?>
      -

      +

      -

      +

      diff --git a/view/misc/email.php b/view/misc/email.php index 054c7f34..7004040d 100644 --- a/view/misc/email.php +++ b/view/misc/email.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      -
      -

      +

      \ No newline at end of file diff --git a/view/misc/report.php b/view/misc/report.php index 6cf01c90..121feac2 100644 --- a/view/misc/report.php +++ b/view/misc/report.php @@ -16,29 +16,29 @@
        -
      • +
      • » 
      • » 
      • -
      • » 
      • +
      • » 
      -

      +

      - +
      - +
      -

      +

      \ No newline at end of file diff --git a/view/misc/rules.php b/view/misc/rules.php index 00cff256..d32a805e 100644 --- a/view/misc/rules.php +++ b/view/misc/rules.php @@ -14,7 +14,7 @@ ?>
      -

      +

      diff --git a/view/moderate/delete_posts.php b/view/moderate/delete_posts.php index d3a8ea76..4b95a5f1 100644 --- a/view/moderate/delete_posts.php +++ b/view/moderate/delete_posts.php @@ -14,20 +14,20 @@ ?>
      -

      +

      - +
      -

      +

      -

      +

      \ No newline at end of file diff --git a/view/moderate/delete_topics.php b/view/moderate/delete_topics.php index d18c7394..e414f734 100644 --- a/view/moderate/delete_topics.php +++ b/view/moderate/delete_topics.php @@ -15,20 +15,20 @@ ?>
      -

      +

      - +
      -

      +

      -

      +

      \ No newline at end of file diff --git a/view/moderate/merge_topics.php b/view/moderate/merge_topics.php index 1c5cc5a4..b55f586b 100644 --- a/view/moderate/merge_topics.php +++ b/view/moderate/merge_topics.php @@ -15,22 +15,22 @@ ?>
      -

      +

      - +
      - +
      -

      +

      \ No newline at end of file diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index af90498d..bf893ce4 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -17,9 +17,9 @@
        -
      • +
      • » 
      • -
      • » 
      • +
      • » 
      @@ -38,11 +38,11 @@
    - - - - - + + + + + @@ -74,7 +74,7 @@ if (empty($topic_data)): $colspan = ($feather_config['o_topic_views'] == '1') ? 5 : 4; $button_status = ' disabled="disabled"'; - echo "\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t".''."\n"; endif; ?> @@ -87,13 +87,13 @@
    -

    /> /> /> /> />

    +

    /> /> /> /> />

      -
    • +
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/view/moderate/move_topics.php b/view/moderate/move_topics.php index 8dfedeaf..389f1f05 100644 --- a/view/moderate/move_topics.php +++ b/view/moderate/move_topics.php @@ -15,16 +15,16 @@ ?>
    -

    +

    - +
    -
    -

    +

    \ No newline at end of file diff --git a/view/moderate/posts_view.php b/view/moderate/posts_view.php index 87d23e24..f957ce8f 100644 --- a/view/moderate/posts_view.php +++ b/view/moderate/posts_view.php @@ -16,10 +16,10 @@
      -
    • +
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    @@ -53,11 +53,11 @@
    -

    +

    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -66,7 +66,7 @@
    -

    ' : '

    '.$lang_misc['Cannot select first'].'

    ' ?>
    +

    ' : '

    '.__('Cannot select first').'

    ' ?>
    @@ -80,14 +80,14 @@
    -

    /> />

    +

    /> />

      -
    • +
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/view/moderate/split_posts.php b/view/moderate/split_posts.php index f3f5d88e..ac012ff3 100644 --- a/view/moderate/split_posts.php +++ b/view/moderate/split_posts.php @@ -14,27 +14,27 @@ ?>
    -

    +

    - +
    - -
    -

    +

    \ No newline at end of file diff --git a/view/post.php b/view/post.php index 7bdfc449..0c341fd0 100644 --- a/view/post.php +++ b/view/post.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • @@ -33,10 +33,10 @@ if (!empty($errors)) { ?>
      -

      +

      -

      +

        -

        +

        @@ -80,6 +80,7 @@ ?> +
        @@ -134,7 +135,7 @@
        - +
        @@ -150,14 +151,14 @@ user->is_guest) : ?>
        - +
        -

        +

        @@ -165,7 +166,7 @@
        -

        +

        @@ -175,7 +176,7 @@ if ($tid && $feather_config['o_topic_review'] != '0') : ?>
        -

        +

        -

        +

        - +
        - - -

        + + +

        -

        +

        \ No newline at end of file diff --git a/view/profile/change_pass.php b/view/profile/change_pass.php index 0231efa2..0f0ab452 100644 --- a/view/profile/change_pass.php +++ b/view/profile/change_pass.php @@ -14,26 +14,26 @@ ?>
        -

        +

        - +
        -user->is_admmod): ?>
        -

        +

        \ No newline at end of file diff --git a/view/profile/delete_user.php b/view/profile/delete_user.php index 55c707c5..d5d5bde2 100644 --- a/view/profile/delete_user.php +++ b/view/profile/delete_user.php @@ -14,23 +14,23 @@ ?>
        -

        +

        - +
        -

        '.feather_escape($username).'.' ?>

        +

        '.feather_escape($username).'.' ?>

        - +
        -

        +

        -

        +

        \ No newline at end of file diff --git a/view/profile/menu.php b/view/profile/menu.php index bcf803e1..e78d2c30 100644 --- a/view/profile/menu.php +++ b/view/profile/menu.php @@ -15,39 +15,39 @@ ?>
        -

        +

          > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
        diff --git a/view/profile/section_admin.php b/view/profile/section_admin.php index 16b4f80a..52a0ad54 100644 --- a/view/profile/section_admin.php +++ b/view/profile/section_admin.php @@ -14,7 +14,7 @@ ?>
        -

        +

        @@ -25,9 +25,9 @@ if ($feather->user->g_moderator == '1') { ?> - +
        -

        +

        @@ -36,12 +36,12 @@ } else { if ($feather->user->id != $id) { ?> - +
        - +
        @@ -52,9 +52,9 @@ } ?> - +
        - +
        @@ -64,13 +64,13 @@ ?>
        - +
        -

        +

        -
        +
      diff --git a/view/profile/section_display.php b/view/profile/section_display.php index 8ac8fd27..506dd146 100644 --- a/view/profile/section_display.php +++ b/view/profile/section_display.php @@ -14,7 +14,7 @@ ?>
      -

      +

      @@ -30,9 +30,9 @@ ?>
      - +
      - +} ?> />
      +} ?> />
      +} ?> />
      +} ?> />
      @@ -85,15 +85,15 @@
      - +
      - - -

      + + +

      -

      +

      diff --git a/view/profile/section_essentials.php b/view/profile/section_essentials.php index 25deccf6..4f507a8c 100644 --- a/view/profile/section_essentials.php +++ b/view/profile/section_essentials.php @@ -14,23 +14,23 @@ ?>
      -

      +

      - +
      -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

      +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

      - +
      @@ -38,139 +38,139 @@
      - +
      -

      -
      diff --git a/view/profile/section_messaging.php b/view/profile/section_messaging.php index 3a5be1a2..148a78cf 100644 --- a/view/profile/section_messaging.php +++ b/view/profile/section_messaging.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      - - - - - + + + + +
      -

      +

      diff --git a/view/profile/section_personal.php b/view/profile/section_personal.php index 3accb5f7..7358bc85 100644 --- a/view/profile/section_personal.php +++ b/view/profile/section_personal.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      - + - -user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?> + +user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?>
      -

      +

      diff --git a/view/profile/section_personality.php b/view/profile/section_personality.php index d3e67cd6..9bd9440b 100644 --- a/view/profile/section_personality.php +++ b/view/profile/section_personality.php @@ -14,41 +14,41 @@ ?>
      -

      +

      - +
      -

      +

      - +
      -

      +

      -
      -

      +

      diff --git a/view/profile/section_privacy.php b/view/profile/section_privacy.php index 34715516..6c1ab357 100644 --- a/view/profile/section_privacy.php +++ b/view/profile/section_privacy.php @@ -14,47 +14,47 @@ ?>
      -

      +

      - +
      -

      +

      +} ?> />
      +} ?> />
      +} ?> />
      - +
      +} ?> />
      +} ?> />
      -

      +

      diff --git a/view/profile/upload_avatar.php b/view/profile/upload_avatar.php index 60487560..3f74f092 100644 --- a/view/profile/upload_avatar.php +++ b/view/profile/upload_avatar.php @@ -14,22 +14,22 @@ ?>
      -

      +

      - +
      - -

      + +

      -

      +

      \ No newline at end of file diff --git a/view/profile/view_profile.php b/view/profile/view_profile.php index da66b788..ad1c5959 100644 --- a/view/profile/view_profile.php +++ b/view/profile/view_profile.php @@ -14,12 +14,12 @@ ?>
      -

      +

      - +
      @@ -30,7 +30,7 @@
      - +
      @@ -41,7 +41,7 @@
      - +
      @@ -52,7 +52,7 @@
      - +
      diff --git a/view/register/email.php b/view/register/email.php index e6355cb6..9f9b3424 100644 --- a/view/register/email.php +++ b/view/register/email.php @@ -15,25 +15,25 @@ ?>
      -

      +

      - +
      -
      -

      +

      \ No newline at end of file diff --git a/view/register/form.php b/view/register/form.php index 3344af93..fa2d2457 100644 --- a/view/register/form.php +++ b/view/register/form.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
      -

      +

      -

      +

        -

        +

        -

        -

        -

        +

        +

        +

        - +
        -
        @@ -61,28 +61,28 @@
        - +
        - - -

        +

        - +
        -

        -
        \ No newline at end of file diff --git a/view/register/rules.php b/view/register/rules.php index d86c8c54..3a2fd06c 100644 --- a/view/register/rules.php +++ b/view/register/rules.php @@ -15,18 +15,18 @@ ?>
        -

        +

        - +
        -

        +

        \ No newline at end of file diff --git a/view/search/footer.php b/view/search/footer.php index 73ff5d13..a64e1cdf 100644 --- a/view/search/footer.php +++ b/view/search/footer.php @@ -30,7 +30,7 @@
          -
        • +
        • » 
        • » 
        diff --git a/view/search/form.php b/view/search/form.php index 642fb380..bb39c614 100644 --- a/view/search/form.php +++ b/view/search/form.php @@ -14,66 +14,66 @@ ?>
        -

        +

        - +
        - - -

        + + +

        - +
        -
        - +
        -
        -

        +

        \ No newline at end of file diff --git a/view/search/header.php b/view/search/header.php index 47706687..909a2108 100644 --- a/view/search/header.php +++ b/view/search/header.php @@ -16,7 +16,7 @@
          -
        • +
        • » 
        • » 
        @@ -31,16 +31,16 @@ if ($search['show_as'] == 'topics') : ?>
        -

        +

    '.$lang_forum['Empty forum'].'
    '.__('Empty forum').'
    - - - - + + + + diff --git a/view/search/posts.php b/view/search/posts.php index a1247133..872c349e 100644 --- a/view/search/posts.php +++ b/view/search/posts.php @@ -21,7 +21,7 @@ echo ' '.$cur_search['item_status']; } ?>">

    # »  » 

    @@ -29,7 +29,7 @@
    -
    +
    @@ -46,8 +46,8 @@
      -
    • -
    • +
    • +
    diff --git a/view/search/topics.php b/view/search/topics.php index d60dce31..af843193 100644 --- a/view/search/topics.php +++ b/view/search/topics.php @@ -25,5 +25,5 @@
    - + \ No newline at end of file diff --git a/view/userlist.php b/view/userlist.php index 66e2a20d..0bbedae6 100644 --- a/view/userlist.php +++ b/view/userlist.php @@ -14,50 +14,50 @@ ?>
    -

    +

    - +
    -user->g_search_users == '1'): ?> -
    -

    +

    @@ -70,16 +70,16 @@
    -

    +

    '.format_time($cur_search['last_post']).' '.$lang_common['by'].' '.feather_escape($cur_search['last_poster']) ?>'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
    - - - - + + + + @@ -98,7 +98,7 @@ } if (empty($userlist_data)) { - echo "\t\t\t".''."\n\t\t\t\t\t".''."\n"; + echo "\t\t\t".''."\n\t\t\t\t\t".''."\n"; } ?> diff --git a/view/viewforum.php b/view/viewforum.php index 332987ae..b9d04a1d 100644 --- a/view/viewforum.php +++ b/view/viewforum.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    @@ -34,10 +34,10 @@
    '.$lang_search['No hits'].'
    '.__('No hits').'
    - - - - + + + + @@ -70,7 +70,7 @@
    - +
    @@ -91,7 +91,7 @@
      -
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?> diff --git a/view/viewtopic.php b/view/viewtopic.php index e5f55ab0..16535ff1 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • » 
    @@ -64,13 +64,13 @@

    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -107,7 +107,7 @@
      -
    • +
    • » 
    • » 
    @@ -124,13 +124,13 @@ ?>
    -

    +

    - +
    @@ -139,21 +139,22 @@ user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.$lang_common['Email'].' '.$lang_common['Required'].'' : $lang_common['Email']; + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
    '.$lang_common['Message'].' '.$lang_common['Required'].'
    '; + echo "\t\t\t\t\t\t".'
    - - - - + + + + @@ -80,27 +80,27 @@ endif; ?>
    -

    +

    -
    -
    '.forum_number_format($stats['total_users']).'') ?>
    -
    '.forum_number_format($stats['total_topics']).'') ?>
    -
    '.forum_number_format($stats['total_posts']).'') ?>
    +
    +
    '.forum_number_format($stats['total_users']).'') ?>
    +
    '.forum_number_format($stats['total_topics']).'') ?>
    +
    '.forum_number_format($stats['total_posts']).'') ?>
    -
    -
    +
    +
    -
    '.forum_number_format($online['num_users']).'') ?>
    -
    '.forum_number_format($online['num_guests']).'') ?>
    +
    '.forum_number_format($online['num_users']).'') ?>
    +
    '.forum_number_format($online['num_guests']).'') ?>
    0) { - echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.__('Online').'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; + echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.$lang_index['Online'].'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; } else { echo "\t\t\t".'
    '."\n"; } diff --git a/style/FeatherBB/view/login/form.php b/style/FeatherBB/view/login/form.php index fb8f2404..8d35d8b7 100644 --- a/style/FeatherBB/view/login/form.php +++ b/style/FeatherBB/view/login/form.php @@ -14,29 +14,29 @@ ?>
    -

    +

    - +
    - - + +
    - +
    -

    -

    +

    +

    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/FeatherBB/view/login/password_forgotten.php index 979b915c..2712f630 100644 --- a/style/FeatherBB/view/login/password_forgotten.php +++ b/style/FeatherBB/view/login/password_forgotten.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
    -

    +

    -

    +

      -

      +

      - +
      - -

      + +

      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/message.php b/style/FeatherBB/view/message.php index d376bd09..7f26edad 100644 --- a/style/FeatherBB/view/message.php +++ b/style/FeatherBB/view/message.php @@ -14,11 +14,11 @@ ?>
      -

      +

      -

      +

      diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php index 7004040d..054c7f34 100644 --- a/style/FeatherBB/view/misc/email.php +++ b/style/FeatherBB/view/misc/email.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      -
      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/misc/report.php b/style/FeatherBB/view/misc/report.php index 121feac2..6cf01c90 100644 --- a/style/FeatherBB/view/misc/report.php +++ b/style/FeatherBB/view/misc/report.php @@ -16,29 +16,29 @@
        -
      • +
      • » 
      • » 
      • -
      • » 
      • +
      • » 
      -

      +

      - +
      - +
      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/misc/rules.php b/style/FeatherBB/view/misc/rules.php index d32a805e..00cff256 100644 --- a/style/FeatherBB/view/misc/rules.php +++ b/style/FeatherBB/view/misc/rules.php @@ -14,7 +14,7 @@ ?>
      -

      +

      diff --git a/style/FeatherBB/view/moderate/delete_posts.php b/style/FeatherBB/view/moderate/delete_posts.php index 4b95a5f1..d3a8ea76 100644 --- a/style/FeatherBB/view/moderate/delete_posts.php +++ b/style/FeatherBB/view/moderate/delete_posts.php @@ -14,20 +14,20 @@ ?>
      -

      +

      - +
      -

      +

      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_topics.php b/style/FeatherBB/view/moderate/delete_topics.php index e414f734..d18c7394 100644 --- a/style/FeatherBB/view/moderate/delete_topics.php +++ b/style/FeatherBB/view/moderate/delete_topics.php @@ -15,20 +15,20 @@ ?>
      -

      +

      - +
      -

      +

      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/merge_topics.php b/style/FeatherBB/view/moderate/merge_topics.php index b55f586b..1c5cc5a4 100644 --- a/style/FeatherBB/view/moderate/merge_topics.php +++ b/style/FeatherBB/view/moderate/merge_topics.php @@ -15,22 +15,22 @@ ?>
      -

      +

      - +
      - +
      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php index bf893ce4..af90498d 100644 --- a/style/FeatherBB/view/moderate/moderator_forum.php +++ b/style/FeatherBB/view/moderate/moderator_forum.php @@ -17,9 +17,9 @@
        -
      • +
      • » 
      • -
      • » 
      • +
      • » 
      @@ -38,11 +38,11 @@
    - - - - - + + + + + @@ -74,7 +74,7 @@ if (empty($topic_data)): $colspan = ($feather_config['o_topic_views'] == '1') ? 5 : 4; $button_status = ' disabled="disabled"'; - echo "\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t".''."\n"; endif; ?> @@ -87,13 +87,13 @@
    -

    /> /> /> /> />

    +

    /> /> /> /> />

      -
    • +
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/style/FeatherBB/view/moderate/move_topics.php b/style/FeatherBB/view/moderate/move_topics.php index 389f1f05..8dfedeaf 100644 --- a/style/FeatherBB/view/moderate/move_topics.php +++ b/style/FeatherBB/view/moderate/move_topics.php @@ -15,16 +15,16 @@ ?>
    -

    +

    - +
    -
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/FeatherBB/view/moderate/posts_view.php index f957ce8f..87d23e24 100644 --- a/style/FeatherBB/view/moderate/posts_view.php +++ b/style/FeatherBB/view/moderate/posts_view.php @@ -16,10 +16,10 @@
      -
    • +
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    @@ -53,11 +53,11 @@
    -

    +

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -66,7 +66,7 @@
    -

    ' : '

    '.__('Cannot select first').'

    ' ?>
    +

    ' : '

    '.$lang_misc['Cannot select first'].'

    ' ?>
    @@ -80,14 +80,14 @@
    -

    /> />

    +

    /> />

      -
    • +
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/style/FeatherBB/view/moderate/split_posts.php b/style/FeatherBB/view/moderate/split_posts.php index ac012ff3..f3f5d88e 100644 --- a/style/FeatherBB/view/moderate/split_posts.php +++ b/style/FeatherBB/view/moderate/split_posts.php @@ -14,27 +14,27 @@ ?>
    -

    +

    - +
    - -
    -

    +

    \ No newline at end of file diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php index 0c341fd0..7bdfc449 100644 --- a/style/FeatherBB/view/post.php +++ b/style/FeatherBB/view/post.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • @@ -33,10 +33,10 @@ if (!empty($errors)) { ?>
      -

      +

      -

      +

        -

        +

        @@ -80,7 +80,6 @@ ?> -
        @@ -135,7 +134,7 @@
        - +
        @@ -151,14 +150,14 @@ user->is_guest) : ?>
        - +
        -

        +

        @@ -166,7 +165,7 @@
        -

        +

        @@ -176,7 +175,7 @@ if ($tid && $feather_config['o_topic_review'] != '0') : ?>
        -

        +

        -

        +

        - +
        - - -

        + + +

        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/profile/change_pass.php b/style/FeatherBB/view/profile/change_pass.php index 0f0ab452..0231efa2 100644 --- a/style/FeatherBB/view/profile/change_pass.php +++ b/style/FeatherBB/view/profile/change_pass.php @@ -14,26 +14,26 @@ ?>
        -

        +

        - +
        -user->is_admmod): ?>
        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/profile/delete_user.php b/style/FeatherBB/view/profile/delete_user.php index d5d5bde2..55c707c5 100644 --- a/style/FeatherBB/view/profile/delete_user.php +++ b/style/FeatherBB/view/profile/delete_user.php @@ -14,23 +14,23 @@ ?>
        -

        +

        - +
        -

        '.feather_escape($username).'.' ?>

        +

        '.feather_escape($username).'.' ?>

        - +
        -

        +

        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/profile/menu.php b/style/FeatherBB/view/profile/menu.php index e78d2c30..bcf803e1 100644 --- a/style/FeatherBB/view/profile/menu.php +++ b/style/FeatherBB/view/profile/menu.php @@ -15,39 +15,39 @@ ?>
        -

        +

          > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
        diff --git a/style/FeatherBB/view/profile/section_admin.php b/style/FeatherBB/view/profile/section_admin.php index 52a0ad54..16b4f80a 100644 --- a/style/FeatherBB/view/profile/section_admin.php +++ b/style/FeatherBB/view/profile/section_admin.php @@ -14,7 +14,7 @@ ?>
        -

        +

        @@ -25,9 +25,9 @@ if ($feather->user->g_moderator == '1') { ?> - +
        -

        +

        @@ -36,12 +36,12 @@ } else { if ($feather->user->id != $id) { ?> - +
        - +
        @@ -52,9 +52,9 @@ } ?> - +
        - +
        @@ -64,13 +64,13 @@ ?>
        - +
        -

        +

        -
        +
      diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php index 506dd146..8ac8fd27 100644 --- a/style/FeatherBB/view/profile/section_display.php +++ b/style/FeatherBB/view/profile/section_display.php @@ -14,7 +14,7 @@ ?>
      -

      +

      @@ -30,9 +30,9 @@ ?>
      - +
      - +} ?> />
      +} ?> />
      +} ?> />
      +} ?> />
      @@ -85,15 +85,15 @@
      - +
      - - -

      + + +

      -

      +

      diff --git a/style/FeatherBB/view/profile/section_essentials.php b/style/FeatherBB/view/profile/section_essentials.php index 4f507a8c..25deccf6 100644 --- a/style/FeatherBB/view/profile/section_essentials.php +++ b/style/FeatherBB/view/profile/section_essentials.php @@ -14,23 +14,23 @@ ?>
      -

      +

      - +
      -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

      +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

      - +
      @@ -38,139 +38,139 @@
      - +
      -

      -
      diff --git a/style/FeatherBB/view/profile/section_messaging.php b/style/FeatherBB/view/profile/section_messaging.php index 148a78cf..3a5be1a2 100644 --- a/style/FeatherBB/view/profile/section_messaging.php +++ b/style/FeatherBB/view/profile/section_messaging.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      - - - - - + + + + +
      -

      +

      diff --git a/style/FeatherBB/view/profile/section_personal.php b/style/FeatherBB/view/profile/section_personal.php index 7358bc85..3accb5f7 100644 --- a/style/FeatherBB/view/profile/section_personal.php +++ b/style/FeatherBB/view/profile/section_personal.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      - + - -user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?> + +user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?>
      -

      +

      diff --git a/style/FeatherBB/view/profile/section_personality.php b/style/FeatherBB/view/profile/section_personality.php index 9bd9440b..d3e67cd6 100644 --- a/style/FeatherBB/view/profile/section_personality.php +++ b/style/FeatherBB/view/profile/section_personality.php @@ -14,41 +14,41 @@ ?>
      -

      +

      - +
      -

      +

      - +
      -

      +

      -
      -

      +

      diff --git a/style/FeatherBB/view/profile/section_privacy.php b/style/FeatherBB/view/profile/section_privacy.php index 6c1ab357..34715516 100644 --- a/style/FeatherBB/view/profile/section_privacy.php +++ b/style/FeatherBB/view/profile/section_privacy.php @@ -14,47 +14,47 @@ ?>
      -

      +

      - +
      -

      +

      +} ?> />
      +} ?> />
      +} ?> />
      - +
      +} ?> />
      +} ?> />
      -

      +

      diff --git a/style/FeatherBB/view/profile/upload_avatar.php b/style/FeatherBB/view/profile/upload_avatar.php index 3f74f092..60487560 100644 --- a/style/FeatherBB/view/profile/upload_avatar.php +++ b/style/FeatherBB/view/profile/upload_avatar.php @@ -14,22 +14,22 @@ ?>
      -

      +

      - +
      - -

      + +

      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/view_profile.php b/style/FeatherBB/view/profile/view_profile.php index ad1c5959..da66b788 100644 --- a/style/FeatherBB/view/profile/view_profile.php +++ b/style/FeatherBB/view/profile/view_profile.php @@ -14,12 +14,12 @@ ?>
      -

      +

      - +
      @@ -30,7 +30,7 @@
      - +
      @@ -41,7 +41,7 @@
      - +
      @@ -52,7 +52,7 @@
      - +
      diff --git a/style/FeatherBB/view/register/email.php b/style/FeatherBB/view/register/email.php index 9f9b3424..e6355cb6 100644 --- a/style/FeatherBB/view/register/email.php +++ b/style/FeatherBB/view/register/email.php @@ -15,25 +15,25 @@ ?>
      -

      +

      - +
      -
      -

      +

      \ No newline at end of file diff --git a/style/FeatherBB/view/register/form.php b/style/FeatherBB/view/register/form.php index fa2d2457..3344af93 100644 --- a/style/FeatherBB/view/register/form.php +++ b/style/FeatherBB/view/register/form.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
      -

      +

      -

      +

        -

        +

        -

        -

        -

        +

        +

        +

        - +
        -
        @@ -61,28 +61,28 @@
        - +
        - - -

        +

        - +
        -

        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/register/rules.php b/style/FeatherBB/view/register/rules.php index 3a2fd06c..d86c8c54 100644 --- a/style/FeatherBB/view/register/rules.php +++ b/style/FeatherBB/view/register/rules.php @@ -15,18 +15,18 @@ ?>
        -

        +

        - +
        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/search/footer.php b/style/FeatherBB/view/search/footer.php index a64e1cdf..73ff5d13 100644 --- a/style/FeatherBB/view/search/footer.php +++ b/style/FeatherBB/view/search/footer.php @@ -30,7 +30,7 @@
          -
        • +
        • » 
        • » 
        diff --git a/style/FeatherBB/view/search/form.php b/style/FeatherBB/view/search/form.php index bb39c614..642fb380 100644 --- a/style/FeatherBB/view/search/form.php +++ b/style/FeatherBB/view/search/form.php @@ -14,66 +14,66 @@ ?>
        -

        +

        - +
        - - -

        + + +

        - +
        -
        - +
        -
        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/search/header.php b/style/FeatherBB/view/search/header.php index 909a2108..47706687 100644 --- a/style/FeatherBB/view/search/header.php +++ b/style/FeatherBB/view/search/header.php @@ -16,7 +16,7 @@
          -
        • +
        • » 
        • » 
        @@ -31,16 +31,16 @@ if ($search['show_as'] == 'topics') : ?>
        -

        +

    '.__('Empty forum').'
    '.$lang_forum['Empty forum'].'
    - - - - + + + + diff --git a/style/FeatherBB/view/search/posts.php b/style/FeatherBB/view/search/posts.php index 872c349e..a1247133 100644 --- a/style/FeatherBB/view/search/posts.php +++ b/style/FeatherBB/view/search/posts.php @@ -21,7 +21,7 @@ echo ' '.$cur_search['item_status']; } ?>">

    # »  » 

    @@ -29,7 +29,7 @@
    -
    +
    @@ -46,8 +46,8 @@
      -
    • -
    • +
    • +
    diff --git a/style/FeatherBB/view/search/topics.php b/style/FeatherBB/view/search/topics.php index af843193..d60dce31 100644 --- a/style/FeatherBB/view/search/topics.php +++ b/style/FeatherBB/view/search/topics.php @@ -25,5 +25,5 @@
    - + \ No newline at end of file diff --git a/style/FeatherBB/view/userlist.php b/style/FeatherBB/view/userlist.php index 0bbedae6..66e2a20d 100644 --- a/style/FeatherBB/view/userlist.php +++ b/style/FeatherBB/view/userlist.php @@ -14,50 +14,50 @@ ?>
    -

    +

    - +
    -user->g_search_users == '1'): ?> -
    -

    +

    @@ -70,16 +70,16 @@
    -

    +

    '.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>'.format_time($cur_search['last_post']).' '.$lang_common['by'].' '.feather_escape($cur_search['last_poster']) ?>
    - - - - + + + + @@ -98,7 +98,7 @@ } if (empty($userlist_data)) { - echo "\t\t\t".''."\n\t\t\t\t\t".''."\n"; + echo "\t\t\t".''."\n\t\t\t\t\t".''."\n"; } ?> diff --git a/style/FeatherBB/view/viewforum.php b/style/FeatherBB/view/viewforum.php index b9d04a1d..332987ae 100644 --- a/style/FeatherBB/view/viewforum.php +++ b/style/FeatherBB/view/viewforum.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    @@ -34,10 +34,10 @@
    '.__('No hits').'
    '.$lang_search['No hits'].'
    - - - - + + + + @@ -70,7 +70,7 @@
    - +
    @@ -91,7 +91,7 @@
      -
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?> diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php index 16535ff1..e5f55ab0 100644 --- a/style/FeatherBB/view/viewtopic.php +++ b/style/FeatherBB/view/viewtopic.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • » 
    @@ -64,13 +64,13 @@

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -107,7 +107,7 @@
      -
    • +
    • » 
    • » 
    @@ -124,13 +124,13 @@ ?>
    -

    +

    - +
    @@ -139,22 +139,21 @@ user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.$lang_common['Email'].' '.$lang_common['Required'].'' : $lang_common['Email']; $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
    '.__('Message').' '.__('Required').'
    '; + echo "\t\t\t\t\t\t".'
    -

    +

    '."\n"; - echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; + echo "\t\t\t\t".'
    '.$lang_forum['Mod controls'].'
    '."\n"; + echo "\t\t\t\t".'
    '.$lang_common['Moderate forum'].'
    '."\n"; echo "\t\t\t".''."\n"; } elseif ($footer_style == 'viewtopic') { if (isset($pid)) { @@ -34,22 +34,22 @@ echo "\t\t\t".'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; + echo "\t\t\t\t".'
    '.$lang_topic['Mod controls'].'
    '."\n"; // TODO: all - //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; + //echo "\t\t\t\t".'
    '.$lang_common['Moderate topic'].''.($num_pages > 1 ? ' ('.$lang_common['All'].')' : '').'
    '."\n"; + echo "\t\t\t\t".'
    '.$lang_common['Moderate topic'].'
    '."\n"; + echo "\t\t\t\t".'
    '.$lang_common['Move topic'].'
    '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.$lang_common['Open topic'].'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.$lang_common['Close topic'].'
    '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.$lang_common['Unstick topic'].'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.$lang_common['Stick topic'].'
    '."\n"; } echo "\t\t\t".'
    '."\n"; @@ -89,26 +89,26 @@ if ($footer_style == 'index') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewforum') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewtopic') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } ?> -

    FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

    +

    FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

    @@ -122,13 +122,13 @@ // Calculate script generation time $time_diff = sprintf('%.3f', get_microtime() - $feather_start); - echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); + echo sprintf($lang_common['Querytime'], $time_diff, count(\DB::get_query_log()[0])); if (function_exists('memory_get_usage')) { - echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); + echo ' - '.sprintf($lang_common['Memory usage'], file_size(memory_get_usage())); if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); + echo ' '.sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage())); } } diff --git a/view/header.php b/view/header.php index 88f0260a..4492eaa0 100644 --- a/view/header.php +++ b/view/header.php @@ -9,7 +9,7 @@ ?> - + <?php echo generate_page_title($page_title, $p) ?> @@ -55,7 +55,7 @@ function process_form(the_form) var elem = the_form.elements[i]; if (elem.name && required_fields[elem.name] && !elem.value && elem.type && (/^(?:text(?:area)?|password|file)$/i.test(elem.type))) { - alert('"' + required_fields[elem.name] + '" '); + alert('"' + required_fields[elem.name] + '" '); elem.focus(); return false; } @@ -92,7 +92,7 @@ function process_form(the_form) user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?>
    -

    +

    @@ -104,7 +104,7 @@ function process_form(the_form)
    -

    ×

    +

    ×

    diff --git a/view/help.php b/view/help.php index a7f9300d..fd511285 100644 --- a/view/help.php +++ b/view/help.php @@ -14,113 +14,113 @@ ?> -

    +

    -

    -

    +

    +

    -

    +

    -

    -

    [b][/b]

    -

    [u][/u]

    -

    [i][/i]

    -

    [s][/s]

    -

    [del][/del]

    -

    [ins][/ins]

    -

    [em][/em]

    -

    [color=#FF0000][/color]

    -

    [color=blue][/color]

    -

    [h][/h]

    +

    +

    [b][/b]

    +

    [u][/u]

    +

    [i][/i]

    +

    [s][/s]

    +

    [del][/del]

    +

    [ins][/ins]

    +

    [em][/em]

    +

    [color=#FF0000][/color]

    +

    [color=blue][/color]

    +

    [h][/h]

    -

    +

    -

    -

    [url=][/url]

    -

    [url][/url]

    -

    [url=/help/][/url]

    -

    [email]myname@example.com[/email] myname@example.com

    -

    [email=myname@example.com][/email]

    -

    [topic=1][/topic]

    -

    [topic]1[/topic]

    -

    [post=1][/post]

    -

    [post]1[/post]

    -

    [forum=1][/forum]

    -

    [forum]1[/forum]

    -

    [user=2][/user]

    -

    [user]2[/user]

    +

    +

    [url=][/url]

    +

    [url][/url]

    +

    [url=/help/][/url]

    +

    [email]myname@example.com[/email] myname@example.com

    +

    [email=myname@example.com][/email]

    +

    [topic=1][/topic]

    +

    [topic]1[/topic]

    +

    [post=1][/post]

    +

    [post]1[/post]

    +

    [forum=1][/forum]

    +

    [forum]1[/forum]

    +

    [user=2][/user]

    +

    [user]2[/user]

    -

    -

    [img=]/img/test.png[/img] <?php echo __('FluxBB bbcode test') ?>

    +

    +

    [img=]/img/test.png[/img] <?php echo $lang_help['FluxBB bbcode test'] ?>

    -

    +

    -

    -

    [quote=James][/quote]

    -

    +

    +

    [quote=James][/quote]

    +

    -
    James

    +
    James

    -

    -

    [quote][/quote]

    -

    +

    +

    [quote][/quote]

    +

    -

    +

    -

    +

    -

    +

    -

    -

    [code][/code]

    -

    +

    +

    [code][/code]

    +

    -
    +
    -

    +

    -

    -

    [list][*][/*][*][/*][*][/*][/list] -

    +

    +

    [list][*][/*][*][/*][*][/*][/list] +

    -
    +
    -

    [list=1][*][/*][*][/*][*][/*][/list] -

    +

    [list=1][*][/*][*][/*][*][/*][/list] +

    -
    +
    -

    [list=a][*][/*][*][/*][*][/*][/list] -

    +

    [list=a][*][/*][*][/*][*][/*][/list] +

    -
    +
    -

    +

    -

    -

    [b][u][/u][/b]

    +

    +

    [b][u][/u][/b]

    -

    +

    -

    +

    $smiley_texts) { - echo "\t\t

    ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .__('produces'). ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

    '."\n"; + echo "\t\t

    ". implode(' ' .$lang_common['and']. ' ', $smiley_texts).' ' .$lang_help['produces']. ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

    '."\n"; } ?> diff --git a/view/index.php b/view/index.php index d9d5ca64..1ffce864 100644 --- a/view/index.php +++ b/view/index.php @@ -13,7 +13,7 @@ } if (empty($index_data)): ?> -

    +

    cid != $cur_cat) : @@ -33,10 +33,10 @@
    - - - - + + + + @@ -80,27 +80,27 @@ endif; ?>
    -

    +

    -
    -
    '.forum_number_format($stats['total_users']).'') ?>
    -
    '.forum_number_format($stats['total_topics']).'') ?>
    -
    '.forum_number_format($stats['total_posts']).'') ?>
    +
    +
    '.forum_number_format($stats['total_users']).'') ?>
    +
    '.forum_number_format($stats['total_topics']).'') ?>
    +
    '.forum_number_format($stats['total_posts']).'') ?>
    -
    -
    +
    +
    -
    '.forum_number_format($online['num_users']).'') ?>
    -
    '.forum_number_format($online['num_guests']).'') ?>
    +
    '.forum_number_format($online['num_users']).'') ?>
    +
    '.forum_number_format($online['num_guests']).'') ?>
    0) { - echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.__('Online').'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; + echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.$lang_index['Online'].'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; } else { echo "\t\t\t".'
    '."\n"; } diff --git a/view/login/form.php b/view/login/form.php index fb8f2404..8d35d8b7 100644 --- a/view/login/form.php +++ b/view/login/form.php @@ -14,29 +14,29 @@ ?>
    -

    +

    - +
    - - + +
    - +
    -

    -

    +

    +

    -

    +

    \ No newline at end of file diff --git a/view/login/password_forgotten.php b/view/login/password_forgotten.php index 979b915c..2712f630 100644 --- a/view/login/password_forgotten.php +++ b/view/login/password_forgotten.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
    -

    +

    -

    +

      -

      +

      - +
      - -

      + +

      -

      +

      \ No newline at end of file diff --git a/view/message.php b/view/message.php index d376bd09..7f26edad 100644 --- a/view/message.php +++ b/view/message.php @@ -14,11 +14,11 @@ ?>
      -

      +

      -

      +

      diff --git a/view/misc/email.php b/view/misc/email.php index 7004040d..054c7f34 100644 --- a/view/misc/email.php +++ b/view/misc/email.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      -
      -

      +

      \ No newline at end of file diff --git a/view/misc/report.php b/view/misc/report.php index 121feac2..6cf01c90 100644 --- a/view/misc/report.php +++ b/view/misc/report.php @@ -16,29 +16,29 @@
        -
      • +
      • » 
      • » 
      • -
      • » 
      • +
      • » 
      -

      +

      - +
      - +
      -

      +

      \ No newline at end of file diff --git a/view/misc/rules.php b/view/misc/rules.php index d32a805e..00cff256 100644 --- a/view/misc/rules.php +++ b/view/misc/rules.php @@ -14,7 +14,7 @@ ?>
      -

      +

      diff --git a/view/moderate/delete_posts.php b/view/moderate/delete_posts.php index 4b95a5f1..d3a8ea76 100644 --- a/view/moderate/delete_posts.php +++ b/view/moderate/delete_posts.php @@ -14,20 +14,20 @@ ?>
      -

      +

      - +
      -

      +

      -

      +

      \ No newline at end of file diff --git a/view/moderate/delete_topics.php b/view/moderate/delete_topics.php index e414f734..d18c7394 100644 --- a/view/moderate/delete_topics.php +++ b/view/moderate/delete_topics.php @@ -15,20 +15,20 @@ ?>
      -

      +

      - +
      -

      +

      -

      +

      \ No newline at end of file diff --git a/view/moderate/merge_topics.php b/view/moderate/merge_topics.php index b55f586b..1c5cc5a4 100644 --- a/view/moderate/merge_topics.php +++ b/view/moderate/merge_topics.php @@ -15,22 +15,22 @@ ?>
      -

      +

      - +
      - +
      -

      +

      \ No newline at end of file diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index bf893ce4..af90498d 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -17,9 +17,9 @@
        -
      • +
      • » 
      • -
      • » 
      • +
      • » 
      @@ -38,11 +38,11 @@
    - - - - - + + + + + @@ -74,7 +74,7 @@ if (empty($topic_data)): $colspan = ($feather_config['o_topic_views'] == '1') ? 5 : 4; $button_status = ' disabled="disabled"'; - echo "\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t".''."\n"; endif; ?> @@ -87,13 +87,13 @@
    -

    /> /> /> /> />

    +

    /> /> /> /> />

      -
    • +
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/view/moderate/move_topics.php b/view/moderate/move_topics.php index 389f1f05..8dfedeaf 100644 --- a/view/moderate/move_topics.php +++ b/view/moderate/move_topics.php @@ -15,16 +15,16 @@ ?>
    -

    +

    - +
    -
    -

    +

    \ No newline at end of file diff --git a/view/moderate/posts_view.php b/view/moderate/posts_view.php index f957ce8f..87d23e24 100644 --- a/view/moderate/posts_view.php +++ b/view/moderate/posts_view.php @@ -16,10 +16,10 @@
      -
    • +
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    @@ -53,11 +53,11 @@
    -

    +

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -66,7 +66,7 @@
    -

    ' : '

    '.__('Cannot select first').'

    ' ?>
    +

    ' : '

    '.$lang_misc['Cannot select first'].'

    ' ?>
    @@ -80,14 +80,14 @@
    -

    /> />

    +

    /> />

      -
    • +
    • » 
    • » 
    • -
    • » 
    • +
    • » 
    diff --git a/view/moderate/split_posts.php b/view/moderate/split_posts.php index ac012ff3..f3f5d88e 100644 --- a/view/moderate/split_posts.php +++ b/view/moderate/split_posts.php @@ -14,27 +14,27 @@ ?>
    -

    +

    - +
    - -
    -

    +

    \ No newline at end of file diff --git a/view/post.php b/view/post.php index 0c341fd0..7bdfc449 100644 --- a/view/post.php +++ b/view/post.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • @@ -33,10 +33,10 @@ if (!empty($errors)) { ?>
      -

      +

      -

      +

        -

        +

        @@ -80,7 +80,6 @@ ?> -
        @@ -135,7 +134,7 @@
        - +
        @@ -151,14 +150,14 @@ user->is_guest) : ?>
        - +
        -

        +

        @@ -166,7 +165,7 @@
        -

        +

        @@ -176,7 +175,7 @@ if ($tid && $feather_config['o_topic_review'] != '0') : ?>
        -

        +

        -

        +

        - +
        - - -

        + + +

        -

        +

        \ No newline at end of file diff --git a/view/profile/change_pass.php b/view/profile/change_pass.php index 0f0ab452..0231efa2 100644 --- a/view/profile/change_pass.php +++ b/view/profile/change_pass.php @@ -14,26 +14,26 @@ ?>
        -

        +

        - +
        -user->is_admmod): ?>
        -

        +

        \ No newline at end of file diff --git a/view/profile/delete_user.php b/view/profile/delete_user.php index d5d5bde2..55c707c5 100644 --- a/view/profile/delete_user.php +++ b/view/profile/delete_user.php @@ -14,23 +14,23 @@ ?>
        -

        +

        - +
        -

        '.feather_escape($username).'.' ?>

        +

        '.feather_escape($username).'.' ?>

        - +
        -

        +

        -

        +

        \ No newline at end of file diff --git a/view/profile/menu.php b/view/profile/menu.php index e78d2c30..bcf803e1 100644 --- a/view/profile/menu.php +++ b/view/profile/menu.php @@ -15,39 +15,39 @@ ?>
        -

        +

          > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
        diff --git a/view/profile/section_admin.php b/view/profile/section_admin.php index 52a0ad54..16b4f80a 100644 --- a/view/profile/section_admin.php +++ b/view/profile/section_admin.php @@ -14,7 +14,7 @@ ?>
        -

        +

        @@ -25,9 +25,9 @@ if ($feather->user->g_moderator == '1') { ?> - +
        -

        +

        @@ -36,12 +36,12 @@ } else { if ($feather->user->id != $id) { ?> - +
        - +
        @@ -52,9 +52,9 @@ } ?> - +
        - +
        @@ -64,13 +64,13 @@ ?>
        - +
        -

        +

        -
        +
      diff --git a/view/profile/section_display.php b/view/profile/section_display.php index 506dd146..8ac8fd27 100644 --- a/view/profile/section_display.php +++ b/view/profile/section_display.php @@ -14,7 +14,7 @@ ?>
      -

      +

      @@ -30,9 +30,9 @@ ?>
      - +
      - +} ?> />
      +} ?> />
      +} ?> />
      +} ?> />
      @@ -85,15 +85,15 @@
      - +
      - - -

      + + +

      -

      +

      diff --git a/view/profile/section_essentials.php b/view/profile/section_essentials.php index 4f507a8c..25deccf6 100644 --- a/view/profile/section_essentials.php +++ b/view/profile/section_essentials.php @@ -14,23 +14,23 @@ ?>
      -

      +

      - +
      -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

      +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

      - +
      @@ -38,139 +38,139 @@
      - +
      -

      -
      diff --git a/view/profile/section_messaging.php b/view/profile/section_messaging.php index 148a78cf..3a5be1a2 100644 --- a/view/profile/section_messaging.php +++ b/view/profile/section_messaging.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      - - - - - + + + + +
      -

      +

      diff --git a/view/profile/section_personal.php b/view/profile/section_personal.php index 7358bc85..3accb5f7 100644 --- a/view/profile/section_personal.php +++ b/view/profile/section_personal.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      - + - -user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?> + +user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?>
      -

      +

      diff --git a/view/profile/section_personality.php b/view/profile/section_personality.php index 9bd9440b..d3e67cd6 100644 --- a/view/profile/section_personality.php +++ b/view/profile/section_personality.php @@ -14,41 +14,41 @@ ?>
      -

      +

      - +
      -

      +

      - +
      -

      +

      -
      -

      +

      diff --git a/view/profile/section_privacy.php b/view/profile/section_privacy.php index 6c1ab357..34715516 100644 --- a/view/profile/section_privacy.php +++ b/view/profile/section_privacy.php @@ -14,47 +14,47 @@ ?>
      -

      +

      - +
      -

      +

      +} ?> />
      +} ?> />
      +} ?> />
      - +
      +} ?> />
      +} ?> />
      -

      +

      diff --git a/view/profile/upload_avatar.php b/view/profile/upload_avatar.php index 3f74f092..60487560 100644 --- a/view/profile/upload_avatar.php +++ b/view/profile/upload_avatar.php @@ -14,22 +14,22 @@ ?>
      -

      +

      - +
      - -

      + +

      -

      +

      \ No newline at end of file diff --git a/view/profile/view_profile.php b/view/profile/view_profile.php index ad1c5959..da66b788 100644 --- a/view/profile/view_profile.php +++ b/view/profile/view_profile.php @@ -14,12 +14,12 @@ ?>
      -

      +

      - +
      @@ -30,7 +30,7 @@
      - +
      @@ -41,7 +41,7 @@
      - +
      @@ -52,7 +52,7 @@
      - +
      diff --git a/view/register/email.php b/view/register/email.php index 9f9b3424..e6355cb6 100644 --- a/view/register/email.php +++ b/view/register/email.php @@ -15,25 +15,25 @@ ?>
      -

      +

      - +
      -
      -

      +

      \ No newline at end of file diff --git a/view/register/form.php b/view/register/form.php index fa2d2457..3344af93 100644 --- a/view/register/form.php +++ b/view/register/form.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
      -

      +

      -

      +

        -

        +

        -

        -

        -

        +

        +

        +

        - +
        -
        @@ -61,28 +61,28 @@
        - +
        - - -

        +

        - +
        -

        -
        \ No newline at end of file diff --git a/view/register/rules.php b/view/register/rules.php index 3a2fd06c..d86c8c54 100644 --- a/view/register/rules.php +++ b/view/register/rules.php @@ -15,18 +15,18 @@ ?>
        -

        +

        - +
        -

        +

        \ No newline at end of file diff --git a/view/search/footer.php b/view/search/footer.php index a64e1cdf..73ff5d13 100644 --- a/view/search/footer.php +++ b/view/search/footer.php @@ -30,7 +30,7 @@
          -
        • +
        • » 
        • » 
        diff --git a/view/search/form.php b/view/search/form.php index bb39c614..642fb380 100644 --- a/view/search/form.php +++ b/view/search/form.php @@ -14,66 +14,66 @@ ?>
        -

        +

        - +
        - - -

        + + +

        - +
        -
        - +
        -
        -

        +

        \ No newline at end of file diff --git a/view/search/header.php b/view/search/header.php index 909a2108..47706687 100644 --- a/view/search/header.php +++ b/view/search/header.php @@ -16,7 +16,7 @@
          -
        • +
        • » 
        • » 
        @@ -31,16 +31,16 @@ if ($search['show_as'] == 'topics') : ?>
        -

        +

    '.__('Empty forum').'
    '.$lang_forum['Empty forum'].'
    - - - - + + + + diff --git a/view/search/posts.php b/view/search/posts.php index 872c349e..a1247133 100644 --- a/view/search/posts.php +++ b/view/search/posts.php @@ -21,7 +21,7 @@ echo ' '.$cur_search['item_status']; } ?>">

    # »  » 

    @@ -29,7 +29,7 @@
    -
    +
    @@ -46,8 +46,8 @@
      -
    • -
    • +
    • +
    diff --git a/view/search/topics.php b/view/search/topics.php index af843193..d60dce31 100644 --- a/view/search/topics.php +++ b/view/search/topics.php @@ -25,5 +25,5 @@
    - + \ No newline at end of file diff --git a/view/userlist.php b/view/userlist.php index 0bbedae6..66e2a20d 100644 --- a/view/userlist.php +++ b/view/userlist.php @@ -14,50 +14,50 @@ ?>
    -

    +

    - +
    -user->g_search_users == '1'): ?> -
    -

    +

    @@ -70,16 +70,16 @@
    -

    +

    '.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>'.format_time($cur_search['last_post']).' '.$lang_common['by'].' '.feather_escape($cur_search['last_poster']) ?>
    - - - - + + + + @@ -98,7 +98,7 @@ } if (empty($userlist_data)) { - echo "\t\t\t".''."\n\t\t\t\t\t".''."\n"; + echo "\t\t\t".''."\n\t\t\t\t\t".''."\n"; } ?> diff --git a/view/viewforum.php b/view/viewforum.php index b9d04a1d..332987ae 100644 --- a/view/viewforum.php +++ b/view/viewforum.php @@ -16,7 +16,7 @@
      -
    • +
    • » 
    @@ -34,10 +34,10 @@
    '.__('No hits').'
    '.$lang_search['No hits'].'
    - - - - + + + + @@ -70,7 +70,7 @@
    - +
    @@ -91,7 +91,7 @@
      -
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?> diff --git a/view/viewtopic.php b/view/viewtopic.php index 16535ff1..e5f55ab0 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -17,7 +17,7 @@
      -
    • +
    • » 
    • » 
    @@ -64,13 +64,13 @@

    '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; + echo "\t\t\t\t\t\t".'

    '.$lang_topic['Last edit'].' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

    '."\n"; } ?>
    @@ -107,7 +107,7 @@
      -
    • +
    • » 
    • » 
    @@ -124,13 +124,13 @@ ?>
    -

    +

    - +
    @@ -139,22 +139,21 @@ user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.$lang_common['Email'].' '.$lang_common['Required'].'' : $lang_common['Email']; $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
    '.__('Message').' '.__('Required').'
    '; + echo "\t\t\t\t\t\t".'
    - + - + - +
    - +
    - '.$lang_admin_common['here'].''); + '.__('here').''); } ?>
    - +
    -

    +

    - +
    - + - +
    - +
    - +
    -

    +

    diff --git a/style/FeatherBB/view/admin/bans/admin_bans.php b/style/FeatherBB/view/admin/bans/admin_bans.php index 17664a89..e6f2b5f7 100644 --- a/style/FeatherBB/view/admin/bans/admin_bans.php +++ b/style/FeatherBB/view/admin/bans/admin_bans.php @@ -14,20 +14,20 @@ ?>
    -

    +

    - +
    - +
    - +
    @@ -37,56 +37,56 @@
    -

    +

    -

    +

    - +
    -

    +

    - + - + - + - + - + + - + + - + @@ -94,7 +94,7 @@ -

    +

    diff --git a/style/FeatherBB/view/admin/bans/search_ban.php b/style/FeatherBB/view/admin/bans/search_ban.php index b39642e9..4285f695 100644 --- a/style/FeatherBB/view/admin/bans/search_ban.php +++ b/style/FeatherBB/view/admin/bans/search_ban.php @@ -16,9 +16,9 @@
      -
    • -
    • » 
    • -
    • » 
    • +
    • +
    • » 
    • +
    • » 
    @@ -29,19 +29,19 @@
    -

    +

    -
    -
       
    - - - - - - - + + + + + + + @@ -55,14 +55,14 @@ - - + + '."\n"; + echo "\t\t\t\t".''."\n"; } ?> @@ -78,9 +78,9 @@
      -
    • -
    • » 
    • -
    • » 
    • +
    • +
    • » 
    • +
    • » 
    diff --git a/style/FeatherBB/view/admin/categories.php b/style/FeatherBB/view/admin/categories.php index 13959991..0a150cc1 100644 --- a/style/FeatherBB/view/admin/categories.php +++ b/style/FeatherBB/view/admin/categories.php @@ -14,20 +14,20 @@ ?>
    -

    +

    - +
    '.feather_escape($cur_ban['ban_creator_username']).'' : $lang_admin_bans['Unknown'] ?>'.$lang_admin_common['Edit'].' | '.$lang_admin_common['Remove'].'' ?>'.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>'.__('Edit').' | '.__('Remove').'' ?>
    '.$lang_admin_bans['No match'].'
    '.__('No match').'
    - +
    - '.$lang_admin_common['Forums'].'') ?> + '.__('Forums').'') ?>
    @@ -37,17 +37,17 @@
    -

    +

    - +
    - +
    - +
    @@ -69,19 +69,19 @@
    -

    +

    - +
    - - + + @@ -100,7 +100,7 @@ ?>
    -
    +
    diff --git a/style/FeatherBB/view/admin/censoring.php b/style/FeatherBB/view/admin/censoring.php index 5131e64c..b8dc9f88 100644 --- a/style/FeatherBB/view/admin/censoring.php +++ b/style/FeatherBB/view/admin/censoring.php @@ -14,28 +14,28 @@ ?>
    -

    +

    - +
    -

    '.$lang_admin_common['Options'].'') : sprintf($lang_admin_censoring['Censoring disabled'], ''.$lang_admin_common['Options'].'')) ?>

    +

    '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    - - - + + + - +
    @@ -44,7 +44,7 @@
    - +
    - - - + + +  '."\n"; + echo "\t\t\t\t\t\t\t\t".' '."\n"; } ?> @@ -70,7 +70,7 @@ '.$lang_admin_censoring['No words in list'].'

    '."\n"; + echo "\t\t\t\t\t\t\t".'

    '.__('No words in list').'

    '."\n"; } ?> diff --git a/style/FeatherBB/view/admin/forums/admin_forums.php b/style/FeatherBB/view/admin/forums/admin_forums.php index d6562aad..1771986a 100644 --- a/style/FeatherBB/view/admin/forums/admin_forums.php +++ b/style/FeatherBB/view/admin/forums/admin_forums.php @@ -14,7 +14,7 @@ ?>
    -

    +

    @@ -23,18 +23,18 @@ ?>
    - +
    - +
    - +
    @@ -47,9 +47,9 @@ ?>
    - +
    -

    +

    @@ -63,24 +63,24 @@ -

    +

    -

    +

    $cat_data) { ?>
    - +
    - - - + + + @@ -88,7 +88,7 @@ foreach ($cat_data['cat_forums'] as $forum) { ?> - + @@ -103,7 +103,7 @@ -

    +

    diff --git a/style/FeatherBB/view/admin/forums/delete_forum.php b/style/FeatherBB/view/admin/forums/delete_forum.php index 5d7bc983..213e4090 100644 --- a/style/FeatherBB/view/admin/forums/delete_forum.php +++ b/style/FeatherBB/view/admin/forums/delete_forum.php @@ -14,20 +14,20 @@ ?>
    -

    +

    - +
    -

    -

    +

    +

    -

    +

    diff --git a/style/FeatherBB/view/admin/forums/permissions.php b/style/FeatherBB/view/admin/forums/permissions.php index b4591bc1..f66d00db 100644 --- a/style/FeatherBB/view/admin/forums/permissions.php +++ b/style/FeatherBB/view/admin/forums/permissions.php @@ -14,26 +14,26 @@ ?>
    -

    +

    -

    +

    - +
    | |
    - + - + - + - + - - + +
    '; ?>'; ?>
    @@ -69,16 +69,16 @@
    - +
    -

    '.$lang_admin_common['User groups'].'') ?>

    +

    '.__('User groups').'') ?>

    - - - + + + @@ -125,11 +125,11 @@ ?>
     
    -
    +
    -

    +

    diff --git a/style/FeatherBB/view/admin/groups/add_edit_group.php b/style/FeatherBB/view/admin/groups/add_edit_group.php index 3bd8018c..3c3c146c 100644 --- a/style/FeatherBB/view/admin/groups/add_edit_group.php +++ b/style/FeatherBB/view/admin/groups/add_edit_group.php @@ -14,22 +14,22 @@ ?>
    -

    +

    -

    +

    - +
    -

    +

    - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    + - +
    - +
    +} ?> tabindex="5" />  - +} ?> tabindex="6" />  +
    +} ?> tabindex="7" />  - +} ?> tabindex="8" />  +
    +} ?> tabindex="9" />  - +} ?> tabindex="10" />  +
    +} ?> tabindex="11" />  - +} ?> tabindex="12" />  +
    +} ?> tabindex="13" />  - +} ?> tabindex="14" />  +
    +} ?> tabindex="15" />  - +} ?> tabindex="16" />  +
    +} ?> tabindex="17" />  - +} ?> tabindex="18" />  +
    +} ?> tabindex="19" />  - +} ?> tabindex="20" />  +
    +} ?> tabindex="21" />  - +} ?> tabindex="22" />  +
    +} ?> tabindex="23" />  - +} ?> tabindex="24" />  +
    +} ?> tabindex="25" />  - +} ?> tabindex="26" />  +
    +} ?> tabindex="27" />  - +} ?> tabindex="28" />  +
    +} ?> tabindex="29" />  - +} ?> tabindex="30" />  +
    +} ?> tabindex="31" />  - +} ?> tabindex="32" />  +
    +} ?> tabindex="33" />  - +} ?> tabindex="34" />  +
    +} ?> tabindex="35" />  - +} ?> tabindex="36" />  +
    +} ?> tabindex="37" />  - +} ?> tabindex="38" />  +
    +} ?> tabindex="39" />  - +} ?> tabindex="40" />  +
    - +
    - +
    - +
    - +
    -

    +

    -

    +

    diff --git a/style/FeatherBB/view/admin/groups/admin_groups.php b/style/FeatherBB/view/admin/groups/admin_groups.php index c6fcf41a..1bf9a10e 100644 --- a/style/FeatherBB/view/admin/groups/admin_groups.php +++ b/style/FeatherBB/view/admin/groups/admin_groups.php @@ -14,17 +14,17 @@ ?>
    -

    +

    - +
    - +
    - +
    @@ -53,11 +53,11 @@
    - +
    - +
    - +
    @@ -84,18 +84,18 @@
    -

    +

    - +
    -

    +

    '."\n"; + echo "\t\t\t\t\t\t\t\t".''."\n"; } ?> diff --git a/style/FeatherBB/view/admin/groups/confirm_delete.php b/style/FeatherBB/view/admin/groups/confirm_delete.php index c6c34bc8..936fb2fb 100644 --- a/style/FeatherBB/view/admin/groups/confirm_delete.php +++ b/style/FeatherBB/view/admin/groups/confirm_delete.php @@ -14,21 +14,21 @@ ?>
    -

    +

    - +
    -

    -

    +

    +

    -

    +

    diff --git a/style/FeatherBB/view/admin/groups/delete_group.php b/style/FeatherBB/view/admin/groups/delete_group.php index bbafdb36..fee07d5b 100644 --- a/style/FeatherBB/view/admin/groups/delete_group.php +++ b/style/FeatherBB/view/admin/groups/delete_group.php @@ -14,16 +14,16 @@ ?>
    -

    +

    - +
    -

    -
    -

    +

    diff --git a/style/FeatherBB/view/admin/index.php b/style/FeatherBB/view/admin/index.php index 18f1e853..50afbad1 100644 --- a/style/FeatherBB/view/admin/index.php +++ b/style/FeatherBB/view/admin/index.php @@ -14,46 +14,46 @@ ?>
    -

    +

    -

    +

      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    -

    +

    -

    '.$lang_admin_index['Delete install file'].'') ?>

    +

    '.__('Delete install file').'') ?>

    -

    +

    -
    +
    - '.$lang_admin_index['Check for upgrade'].'') ?> + '.__('Check for upgrade').'') ?>
    -
    +
    - +
    -
    +
    - - + -
    diff --git a/style/FeatherBB/view/admin/maintenance/admin_maintenance.php b/style/FeatherBB/view/admin/maintenance/admin_maintenance.php index 6d08e608..77c8404e 100644 --- a/style/FeatherBB/view/admin/maintenance/admin_maintenance.php +++ b/style/FeatherBB/view/admin/maintenance/admin_maintenance.php @@ -14,39 +14,39 @@ ?>
    -

    +

    - +
    -

    '.$lang_admin_common['Maintenance mode'].'') ?>

    +

    '.__('Maintenance mode').'') ?>

    '.$lang_admin_groups['Edit link'].''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.$lang_admin_groups['Delete link'].'' : '').''.feather_escape($cur_group['g_title']).'
    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
    - + - + - +
    - +
    - +
    - +
    -

    -
    +

    +
    @@ -57,38 +57,38 @@
    - +
    - + - + - +
    - +
    - - - + + +
    - +
    -

    '.$lang_admin_common['Maintenance mode'].'') ?>

    -
    +

    '.__('Maintenance mode').'') ?>

    +
    diff --git a/style/FeatherBB/view/admin/maintenance/prune.php b/style/FeatherBB/view/admin/maintenance/prune.php index d668d98a..8801a979 100644 --- a/style/FeatherBB/view/admin/maintenance/prune.php +++ b/style/FeatherBB/view/admin/maintenance/prune.php @@ -14,7 +14,7 @@ ?>
    -

    +

    @@ -24,14 +24,14 @@
    - +
    -

    -

    +

    +

    -

    +

    diff --git a/style/FeatherBB/view/admin/maintenance/rebuild.php b/style/FeatherBB/view/admin/maintenance/rebuild.php index ebf049ef..36947974 100644 --- a/style/FeatherBB/view/admin/maintenance/rebuild.php +++ b/style/FeatherBB/view/admin/maintenance/rebuild.php @@ -34,5 +34,5 @@ -

    +


    \ No newline at end of file diff --git a/style/FeatherBB/view/admin/menu.php b/style/FeatherBB/view/admin/menu.php index ef12247c..e2870921 100644 --- a/style/FeatherBB/view/admin/menu.php +++ b/style/FeatherBB/view/admin/menu.php @@ -15,27 +15,27 @@ ?>
    -

    +

      > + ?>> > + ?>> user->g_mod_ban_users == '1'): ?> > + ?>> > + ?>>
    @@ -44,42 +44,42 @@ if ($is_admin) { ?> -

    +

      > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>>
    @@ -90,7 +90,7 @@ // Did we find any plugins? if (!empty($plugins)) { ?> -

    +

      diff --git a/style/FeatherBB/view/admin/options.php b/style/FeatherBB/view/admin/options.php index 00d01f78..a19ccddb 100644 --- a/style/FeatherBB/view/admin/options.php +++ b/style/FeatherBB/view/admin/options.php @@ -14,180 +14,180 @@ ?>
      -

      +

      -

      +

      - +
      - + - + - + - + - + - + - +
      - +
      - +
      - +
      - +
      +} ?> />  - +} ?> />  +
      - +
      - +
      @@ -225,42 +225,42 @@ ?>
      - +
      - + - + - + - + - +
      - '.$lang_admin_options['PHP manual'].'') ?> + '.__('PHP manual').'') ?>
      - '.$lang_admin_options['PHP manual'].'') ?> + '.__('PHP manual').'') ?>
      - +
      - +
      - +
      @@ -269,114 +269,114 @@
      - +
      - + - + - + - + - + - + - + - + - + - + - +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      - +
      - +
      - +
      - +
      - +
      @@ -385,122 +385,122 @@
      - +
      - + - + - + - + - + - + - + - + - + - +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - '.$lang_admin_common['Censoring'].'') ?> +} ?> />  + '.__('Censoring').'') ?>
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      - +
      @@ -509,34 +509,34 @@
      - +
      - + - +
      +} ?> />  +} ?> />  - +} ?> />  +
      - +
      @@ -545,29 +545,29 @@
      - +
      - + - +
      +} ?> />  +} ?> />  - +} ?> />  +
      - +
      @@ -576,47 +576,47 @@
      - +
      - + - + - + - + - +
      +} ?> />  - +} ?> />  +
      - +
      - +
      - +
      - +
      @@ -625,81 +625,81 @@
      - +
      - + - + - + - + - + - + - + - +
      - +
      - +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      - +
      - +
      - + - +
      +} ?> />  - +} ?> />  +
      @@ -708,77 +708,77 @@
      - +
      - + - + - + - + - + - +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      - +
      - + +} ?> />  +} ?> />  +} ?> /> 
      @@ -787,26 +787,26 @@
      - +
      - + - +
      +} ?> />  - +} ?> />  +
      - +
      @@ -815,33 +815,33 @@
      - +
      - + - +
      +} ?> />  - +} ?> />  +
      - +
      -

      +

      diff --git a/style/FeatherBB/view/admin/parser.php b/style/FeatherBB/view/admin/parser.php index 84a0528e..8049bc52 100644 --- a/style/FeatherBB/view/admin/parser.php +++ b/style/FeatherBB/view/admin/parser.php @@ -19,7 +19,7 @@

      - +

      @@ -33,9 +33,9 @@ /> /> /> +} ?> /> @@ -46,9 +46,9 @@ /> /> /> +} ?> /> @@ -59,9 +59,9 @@ /> /> /> +} ?> /> @@ -72,9 +72,9 @@ /> /> /> +} ?> /> @@ -88,12 +88,12 @@ echo ' checked="checked"'; } if (!ini_get('allow_url_fopen')) { echo(' disabled="disabled" title="'. feather_escape($lang_admin_parser['unavailable']) .'"'); -} ?> /> +} ?> /> /> +} ?> /> @@ -257,19 +257,19 @@ /> /> /> + ?> /> /> /> /> + ?> /> - +

      diff --git a/style/FeatherBB/view/admin/permissions.php b/style/FeatherBB/view/admin/permissions.php index bb73f56c..34fe64cb 100644 --- a/style/FeatherBB/view/admin/permissions.php +++ b/style/FeatherBB/view/admin/permissions.php @@ -14,75 +14,75 @@ ?>
      -

      +

      -

      +

      - +
      - + - + - + - + - +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      @@ -91,57 +91,57 @@
      - +
      - + - + - + - + - +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      - +
      - +
      @@ -150,38 +150,38 @@
      - +
      - + - +
      +} ?> />  - +} ?> />  +
      +} ?> />  - +} ?> />  +
      -

      +

      diff --git a/style/FeatherBB/view/admin/reports.php b/style/FeatherBB/view/admin/reports.php index 77523caa..605637c6 100644 --- a/style/FeatherBB/view/admin/reports.php +++ b/style/FeatherBB/view/admin/reports.php @@ -14,7 +14,7 @@ ?>
      -

      +

      @@ -24,17 +24,17 @@ ?>
      - +
      - + + sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?> - +
      '.feather_escape($report['reporter']).'' : $lang_admin_reports['Deleted user']) ?>'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf($lang_admin_reports['Post ID'], $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
      ', feather_escape($report['message'])) ?>
      @@ -48,9 +48,9 @@ ?>
      - +
      -

      +

      @@ -64,7 +64,7 @@
      -

      +

      - '.feather_escape($report['zapped_by']).'' : $lang_admin_reports['NA']) ?> + '.feather_escape($report['zapped_by']).'' : __('NA')) ?>
      - + + sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?> - +
      '.feather_escape($report['reporter']).'' : $lang_admin_reports['Deleted user']) ?>'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf($lang_admin_reports['Post ID'], $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
      ', feather_escape($report['message'])) ?>
      @@ -98,9 +98,9 @@ ?>
      - +
      -

      +

      diff --git a/style/FeatherBB/view/admin/statistics.php b/style/FeatherBB/view/admin/statistics.php index cd714e16..522bbb5d 100644 --- a/style/FeatherBB/view/admin/statistics.php +++ b/style/FeatherBB/view/admin/statistics.php @@ -14,24 +14,24 @@ ?>
      -

      +

      -
      +
      - +
      -user->g_id == FEATHER_ADMIN): ?>
      +user->g_id == FEATHER_ADMIN): ?>
      -
      - '.$lang_admin_index['Show info'].'') ?>
      - +
      + '.__('Show info').'') ?>
      +
      -
      +
      - -
      + +
      diff --git a/style/FeatherBB/view/admin/users/admin_users.php b/style/FeatherBB/view/admin/users/admin_users.php index 207d4ecd..f29830af 100644 --- a/style/FeatherBB/view/admin/users/admin_users.php +++ b/style/FeatherBB/view/admin/users/admin_users.php @@ -14,128 +14,128 @@ ?>
      -

      +

      -

      +

      - +
      -

      +

      - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + + - + + - + + - + + - + + - + - + @@ -144,22 +144,22 @@ -

      +

      -

      +

      - +
      -
      -
      -
      -
      -
      -
         
      - + +
      -
      diff --git a/style/FeatherBB/view/admin/users/ban_users.php b/style/FeatherBB/view/admin/users/ban_users.php index 0d2c8b69..5d782379 100644 --- a/style/FeatherBB/view/admin/users/ban_users.php +++ b/style/FeatherBB/view/admin/users/ban_users.php @@ -14,43 +14,43 @@ ?>
      -

      +

      - +
      - + - + - +
      - +
      - +
      - - - + + +
      -

      +

      diff --git a/style/FeatherBB/view/admin/users/delete_users.php b/style/FeatherBB/view/admin/users/delete_users.php index 3f1388f6..b3b3c36e 100644 --- a/style/FeatherBB/view/admin/users/delete_users.php +++ b/style/FeatherBB/view/admin/users/delete_users.php @@ -14,24 +14,24 @@ ?>
      -

      +

      - +
      -

      +

      - +
      -

      +

      -

      +

      diff --git a/style/FeatherBB/view/admin/users/find_users.php b/style/FeatherBB/view/admin/users/find_users.php index 47e7763a..ee79eef6 100644 --- a/style/FeatherBB/view/admin/users/find_users.php +++ b/style/FeatherBB/view/admin/users/find_users.php @@ -16,9 +16,9 @@
        -
      • -
      • » 
      • -
      • » 
      • +
      • +
      • » 
      • +
      • » 
      @@ -31,19 +31,19 @@
      -

      +

      - - - - - - - + + + + + + + @@ -59,7 +59,7 @@ - + @@ -68,7 +68,7 @@ } } else { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } ?> @@ -82,17 +82,17 @@
      -

        -
      • -
      • » 
      • -
      • » 
      • +
      • +
      • » 
      • +
      • » 
      diff --git a/style/FeatherBB/view/admin/users/move_users.php b/style/FeatherBB/view/admin/users/move_users.php index b82d0e71..9b785654 100644 --- a/style/FeatherBB/view/admin/users/move_users.php +++ b/style/FeatherBB/view/admin/users/move_users.php @@ -14,32 +14,32 @@ ?>
      -

      +

      - +
      '.$lang_admin_users['Results view IP link'].' | '.$lang_admin_users['Results show posts link'].'' ?>'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
      '.$lang_admin_users['No match'].'
      '.__('No match').'
      - +
      - +
      -

      +

      diff --git a/style/FeatherBB/view/admin/users/search_ip.php b/style/FeatherBB/view/admin/users/search_ip.php index 108d0948..0fbb89f8 100644 --- a/style/FeatherBB/view/admin/users/search_ip.php +++ b/style/FeatherBB/view/admin/users/search_ip.php @@ -16,9 +16,9 @@
        -
      • -
      • » 
      • -
      • » 
      • +
      • +
      • » 
      • +
      • » 
      @@ -28,16 +28,16 @@
      -

      +

      - - - - + + + + @@ -48,13 +48,13 @@ - + '."\n"; + echo "\t\t\t\t".''."\n"; endif; ?> @@ -70,9 +70,9 @@
        -
      • -
      • » 
      • -
      • » 
      • +
      • +
      • » 
      • +
      • » 
      diff --git a/style/FeatherBB/view/admin/users/show_users.php b/style/FeatherBB/view/admin/users/show_users.php index ab94c9f9..f93dba7a 100644 --- a/style/FeatherBB/view/admin/users/show_users.php +++ b/style/FeatherBB/view/admin/users/show_users.php @@ -16,9 +16,9 @@
        -
      • -
      • » 
      • -
      • » 
      • +
      • +
      • » 
      • +
      • » 
      @@ -28,18 +28,18 @@
      -

      +

      '.$lang_admin_users['Results no posts found'].'
      '.__('Results no posts found').'
      - - - - - - + + + + + + @@ -56,7 +56,7 @@ - + - + @@ -75,7 +75,7 @@ } } } else { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } ?> @@ -91,9 +91,9 @@
        -
      • -
      • » 
      • -
      • » 
      • +
      • +
      • » 
      • +
      • » 
      diff --git a/view/admin/bans/add_ban.php b/view/admin/bans/add_ban.php index c5943d99..28b73f89 100644 --- a/view/admin/bans/add_ban.php +++ b/view/admin/bans/add_ban.php @@ -14,7 +14,7 @@ ?>
      -

      +

      @@ -24,71 +24,71 @@
      - +
      '.$lang_admin_users['Results view IP link'].' | '.$lang_admin_users['Results show posts link'].'' ?>'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
             
      '.$lang_admin_users['Results no IP found'].'
      '.__('Results no IP found').'
      - + - + - +
      - +
      - '.$lang_admin_common['here'].''); + '.__('here').''); } ?>
      - +
      -

      +

      - +
      - + - +
      - +
      - +
      -

      +

      diff --git a/view/admin/bans/admin_bans.php b/view/admin/bans/admin_bans.php index 17664a89..e6f2b5f7 100644 --- a/view/admin/bans/admin_bans.php +++ b/view/admin/bans/admin_bans.php @@ -14,20 +14,20 @@ ?>
      -

      +

      - +
      - +
      - +
      @@ -37,56 +37,56 @@
      -

      +

      -

      +

      - +
      -

      +

      - + - + - + - + - + + - + + - + @@ -94,7 +94,7 @@ -

      +

      diff --git a/view/admin/bans/search_ban.php b/view/admin/bans/search_ban.php index b39642e9..4285f695 100644 --- a/view/admin/bans/search_ban.php +++ b/view/admin/bans/search_ban.php @@ -16,9 +16,9 @@
        -
      • -
      • » 
      • -
      • » 
      • +
      • +
      • » 
      • +
      • » 
      @@ -29,19 +29,19 @@
      -

      +

      -
      -
         
      - - - - - - - + + + + + + + @@ -55,14 +55,14 @@ - - + + '."\n"; + echo "\t\t\t\t".''."\n"; } ?> @@ -78,9 +78,9 @@
        -
      • -
      • » 
      • -
      • » 
      • +
      • +
      • » 
      • +
      • » 
      diff --git a/view/admin/categories.php b/view/admin/categories.php index 96375c24..20f1fdd9 100644 --- a/view/admin/categories.php +++ b/view/admin/categories.php @@ -14,20 +14,20 @@ ?>
      -

      +

      - +
      '.feather_escape($cur_ban['ban_creator_username']).'' : $lang_admin_bans['Unknown'] ?>'.$lang_admin_common['Edit'].' | '.$lang_admin_common['Remove'].'' ?>'.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>'.__('Edit').' | '.__('Remove').'' ?>
      '.$lang_admin_bans['No match'].'
      '.__('No match').'
      - +
      - '.$lang_admin_common['Forums'].'') ?> + '.__('Forums').'') ?>
      @@ -37,17 +37,17 @@
      -

      +

      - +
      - +
      - +
      @@ -69,19 +69,19 @@
      -

      +

      - +
      - - + + @@ -100,7 +100,7 @@ ?>
      -
      +
      diff --git a/view/admin/censoring.php b/view/admin/censoring.php index 5131e64c..b8dc9f88 100644 --- a/view/admin/censoring.php +++ b/view/admin/censoring.php @@ -14,28 +14,28 @@ ?>
      -

      +

      - +
      -

      '.$lang_admin_common['Options'].'') : sprintf($lang_admin_censoring['Censoring disabled'], ''.$lang_admin_common['Options'].'')) ?>

      +

      '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

      - - - + + + - +
      @@ -44,7 +44,7 @@
      - +
      - - - + + +  '."\n"; + echo "\t\t\t\t\t\t\t\t".' '."\n"; } ?> @@ -70,7 +70,7 @@ '.$lang_admin_censoring['No words in list'].'

      '."\n"; + echo "\t\t\t\t\t\t\t".'

      '.__('No words in list').'

      '."\n"; } ?> diff --git a/view/admin/forums/admin_forums.php b/view/admin/forums/admin_forums.php index 44eebdf4..0d6adc16 100644 --- a/view/admin/forums/admin_forums.php +++ b/view/admin/forums/admin_forums.php @@ -14,7 +14,7 @@ ?>
      -

      +

      @@ -23,16 +23,16 @@ ?>
      - +
      - +
      - +
      @@ -45,9 +45,9 @@ ?>
      - +
      -

      +

      @@ -61,11 +61,11 @@ -

      +

      -

      +

      - +
      - - - + + + @@ -96,7 +96,7 @@ ?> - + @@ -110,7 +110,7 @@ -

      +

      -

      +

      - +
      -

      -

      +

      +

      -

      +

      diff --git a/view/admin/forums/permissions.php b/view/admin/forums/permissions.php index 4c303c56..fc3feae5 100644 --- a/view/admin/forums/permissions.php +++ b/view/admin/forums/permissions.php @@ -14,26 +14,26 @@ ?>
      -

      +

      -

      +

      - +
      | |
      - + - + - + - + - - + +
      '; ?>'; ?>
      @@ -66,16 +66,16 @@
      - +
      -

      '.$lang_admin_common['User groups'].'') ?>

      +

      '.__('User groups').'') ?>

      - - - + + + @@ -122,11 +122,11 @@ ?>
       
      -
      +
      -

      +

      diff --git a/view/admin/groups/add_edit_group.php b/view/admin/groups/add_edit_group.php index 26c9881c..6246e104 100644 --- a/view/admin/groups/add_edit_group.php +++ b/view/admin/groups/add_edit_group.php @@ -14,22 +14,22 @@ ?>
      -

      +

      -

      +

      - +
      -

      +

      - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
      + - +
      - +
      + } ?> tabindex="5" />  - + } ?> tabindex="6" />  +
      + } ?> tabindex="7" />  - + } ?> tabindex="8" />  +
      + } ?> tabindex="9" />  - + } ?> tabindex="10" />  +
      + } ?> tabindex="11" />  - + } ?> tabindex="12" />  +
      + } ?> tabindex="13" />  - + } ?> tabindex="14" />  +
      + } ?> tabindex="15" />  - + } ?> tabindex="16" />  +
      + } ?> tabindex="17" />  - + } ?> tabindex="18" />  +
      + } ?> tabindex="19" />  - + } ?> tabindex="20" />  +
      + } ?> tabindex="21" />  - + } ?> tabindex="22" />  +
      + } ?> tabindex="23" />  - + } ?> tabindex="24" />  +
      + } ?> tabindex="25" />  - + } ?> tabindex="26" />  +
      + } ?> tabindex="27" />  - + } ?> tabindex="28" />  +
      + } ?> tabindex="29" />  - + } ?> tabindex="30" />  +
      + } ?> tabindex="31" />  - + } ?> tabindex="32" />  +
      + } ?> tabindex="33" />  - + } ?> tabindex="34" />  +
      + } ?> tabindex="35" />  - + } ?> tabindex="36" />  +
      + } ?> tabindex="37" />  - + } ?> tabindex="38" />  +
      + } ?> tabindex="39" />  - + } ?> tabindex="40" />  +
      - +
      - +
      - +
      - +
      -

      +

      -

      +

      diff --git a/view/admin/groups/admin_groups.php b/view/admin/groups/admin_groups.php index c6fcf41a..1bf9a10e 100644 --- a/view/admin/groups/admin_groups.php +++ b/view/admin/groups/admin_groups.php @@ -14,17 +14,17 @@ ?>
      -

      +

      - +
      - +
      - +
      @@ -53,11 +53,11 @@
      - +
      - +
      - +
      @@ -84,18 +84,18 @@
      -

      +

      - +
      -

      +

      '."\n"; + echo "\t\t\t\t\t\t\t\t".''."\n"; } ?> diff --git a/view/admin/groups/confirm_delete.php b/view/admin/groups/confirm_delete.php index 983830f1..a6200b6f 100644 --- a/view/admin/groups/confirm_delete.php +++ b/view/admin/groups/confirm_delete.php @@ -14,21 +14,21 @@ ?>
      -

      +

      - +
      -

      -

      +

      +

      -

      +

      diff --git a/view/admin/groups/delete_group.php b/view/admin/groups/delete_group.php index bbafdb36..fee07d5b 100644 --- a/view/admin/groups/delete_group.php +++ b/view/admin/groups/delete_group.php @@ -14,16 +14,16 @@ ?>
      -

      +

      - +
      -

      -
      -

      +

      diff --git a/view/admin/index.php b/view/admin/index.php index 18f1e853..50afbad1 100644 --- a/view/admin/index.php +++ b/view/admin/index.php @@ -14,46 +14,46 @@ ?>
      -

      +

      -

      +

        -
      • -
      • -
      • -
      • -
      • -
      • -
      • -
      • -
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      -

      +

      -

      '.$lang_admin_index['Delete install file'].'') ?>

      +

      '.__('Delete install file').'') ?>

      -

      +

      -
      +
      - '.$lang_admin_index['Check for upgrade'].'') ?> + '.__('Check for upgrade').'') ?>
      -
      +
      - +
      -
      +
      - - + -
      diff --git a/view/admin/maintenance/admin_maintenance.php b/view/admin/maintenance/admin_maintenance.php index 6d08e608..77c8404e 100644 --- a/view/admin/maintenance/admin_maintenance.php +++ b/view/admin/maintenance/admin_maintenance.php @@ -14,39 +14,39 @@ ?>
      -

      +

      - +
      -

      '.$lang_admin_common['Maintenance mode'].'') ?>

      +

      '.__('Maintenance mode').'') ?>

      '.$lang_admin_groups['Edit link'].''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.$lang_admin_groups['Delete link'].'' : '').''.feather_escape($cur_group['g_title']).'
      '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
      - + - + - +
      - +
      - +
      - +
      -

      -
      +

      +
      @@ -57,38 +57,38 @@
      - +
      - + - + - +
      - +
      - - - + + +
      - +
      -

      '.$lang_admin_common['Maintenance mode'].'') ?>

      -
      +

      '.__('Maintenance mode').'') ?>

      +
      diff --git a/view/admin/maintenance/prune.php b/view/admin/maintenance/prune.php index d668d98a..8801a979 100644 --- a/view/admin/maintenance/prune.php +++ b/view/admin/maintenance/prune.php @@ -14,7 +14,7 @@ ?>
      -

      +

      @@ -24,14 +24,14 @@
      - +
      -

      -

      +

      +

      -

      +

      diff --git a/view/admin/maintenance/rebuild.php b/view/admin/maintenance/rebuild.php index ebf049ef..36947974 100644 --- a/view/admin/maintenance/rebuild.php +++ b/view/admin/maintenance/rebuild.php @@ -34,5 +34,5 @@ -

      +


      \ No newline at end of file diff --git a/view/admin/menu.php b/view/admin/menu.php index ef12247c..e2870921 100644 --- a/view/admin/menu.php +++ b/view/admin/menu.php @@ -15,27 +15,27 @@ ?>
      -

      +

        > + ?>> > + ?>> user->g_mod_ban_users == '1'): ?> > + ?>> > + ?>>
      @@ -44,42 +44,42 @@ if ($is_admin) { ?> -

      +

        > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>>
      @@ -90,7 +90,7 @@ // Did we find any plugins? if (!empty($plugins)) { ?> -

      +

        diff --git a/view/admin/options.php b/view/admin/options.php index 00d01f78..a19ccddb 100644 --- a/view/admin/options.php +++ b/view/admin/options.php @@ -14,180 +14,180 @@ ?>
        -

        +

        -

        +

        - +
        - + - + - + - + - + - + - +
        - +
        - +
        - +
        - +
        +} ?> />  - +} ?> />  +
        - +
        - +
        @@ -225,42 +225,42 @@ ?>
        - +
        - + - + - + - + - +
        - '.$lang_admin_options['PHP manual'].'') ?> + '.__('PHP manual').'') ?>
        - '.$lang_admin_options['PHP manual'].'') ?> + '.__('PHP manual').'') ?>
        - +
        - +
        - +
        @@ -269,114 +269,114 @@
        - +
        - + - + - + - + - + - + - + - + - + - + - +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        - +
        - +
        - +
        - +
        - +
        @@ -385,122 +385,122 @@
        - +
        - + - + - + - + - + - + - + - + - + - +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - '.$lang_admin_common['Censoring'].'') ?> +} ?> />  + '.__('Censoring').'') ?>
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        - +
        @@ -509,34 +509,34 @@
        - +
        - + - +
        +} ?> />  +} ?> />  - +} ?> />  +
        - +
        @@ -545,29 +545,29 @@
        - +
        - + - +
        +} ?> />  +} ?> />  - +} ?> />  +
        - +
        @@ -576,47 +576,47 @@
        - +
        - + - + - + - + - +
        +} ?> />  - +} ?> />  +
        - +
        - +
        - +
        - +
        @@ -625,81 +625,81 @@
        - +
        - + - + - + - + - + - + - + - +
        - +
        - +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        - +
        - +
        - + - +
        +} ?> />  - +} ?> />  +
        @@ -708,77 +708,77 @@
        - +
        - + - + - + - + - + - +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        - +
        - + +} ?> />  +} ?> />  +} ?> /> 
        @@ -787,26 +787,26 @@
        - +
        - + - +
        +} ?> />  - +} ?> />  +
        - +
        @@ -815,33 +815,33 @@
        - +
        - + - +
        +} ?> />  - +} ?> />  +
        - +
        -

        +

        diff --git a/view/admin/parser.php b/view/admin/parser.php index 84a0528e..8049bc52 100644 --- a/view/admin/parser.php +++ b/view/admin/parser.php @@ -19,7 +19,7 @@

        - +

        @@ -33,9 +33,9 @@ /> /> /> +} ?> /> @@ -46,9 +46,9 @@ /> /> /> +} ?> /> @@ -59,9 +59,9 @@ /> /> /> +} ?> /> @@ -72,9 +72,9 @@ /> /> /> +} ?> /> @@ -88,12 +88,12 @@ echo ' checked="checked"'; } if (!ini_get('allow_url_fopen')) { echo(' disabled="disabled" title="'. feather_escape($lang_admin_parser['unavailable']) .'"'); -} ?> /> +} ?> /> /> +} ?> /> @@ -257,19 +257,19 @@ /> /> /> + ?> /> /> /> /> + ?> /> - +

        diff --git a/view/admin/permissions.php b/view/admin/permissions.php index bb73f56c..34fe64cb 100644 --- a/view/admin/permissions.php +++ b/view/admin/permissions.php @@ -14,75 +14,75 @@ ?>
        -

        +

        -

        +

        - +
        - + - + - + - + - +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        @@ -91,57 +91,57 @@
        - +
        - + - + - + - + - +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        - +
        - +
        @@ -150,38 +150,38 @@
        - +
        - + - +
        +} ?> />  - +} ?> />  +
        +} ?> />  - +} ?> />  +
        -

        +

        diff --git a/view/admin/reports.php b/view/admin/reports.php index 82605fce..619980c1 100644 --- a/view/admin/reports.php +++ b/view/admin/reports.php @@ -14,7 +14,7 @@ ?>
        -

        +

        @@ -24,17 +24,17 @@ ?>
        - +
        - + + sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?> - +
        '.feather_escape($report['reporter']).'' : $lang_admin_reports['Deleted user']) ?>'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf($lang_admin_reports['Post ID'], $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
        ', feather_escape($report['message'])) ?>
        @@ -48,9 +48,9 @@ ?>
        - +
        -

        +

        @@ -64,7 +64,7 @@
        -

        +

        - '.feather_escape($report['zapped_by']).'' : $lang_admin_reports['NA']) ?> + '.feather_escape($report['zapped_by']).'' : __('NA')) ?>
        - + + sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?> - +
        '.feather_escape($report['reporter']).'' : $lang_admin_reports['Deleted user']) ?>'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf($lang_admin_reports['Post ID'], $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
        ', feather_escape($report['message'])) ?>
        @@ -98,9 +98,9 @@ ?>
        - +
        -

        +

        diff --git a/view/admin/statistics.php b/view/admin/statistics.php index cd714e16..522bbb5d 100644 --- a/view/admin/statistics.php +++ b/view/admin/statistics.php @@ -14,24 +14,24 @@ ?>
        -

        +

        -
        +
        - +
        -user->g_id == FEATHER_ADMIN): ?>
        +user->g_id == FEATHER_ADMIN): ?>
        -
        - '.$lang_admin_index['Show info'].'') ?>
        - +
        + '.__('Show info').'') ?>
        +
        -
        +
        - -
        + +
        diff --git a/view/admin/users/admin_users.php b/view/admin/users/admin_users.php index 207d4ecd..f29830af 100644 --- a/view/admin/users/admin_users.php +++ b/view/admin/users/admin_users.php @@ -14,128 +14,128 @@ ?>
        -

        +

        -

        +

        - +
        -

        +

        - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + + - + + - + + - + + - + + - + - + @@ -144,22 +144,22 @@ -

        +

        -

        +

        - +
        -
        -
        -
        -
        -
        -
           
        - + +
        -
        diff --git a/view/admin/users/ban_users.php b/view/admin/users/ban_users.php index 0d2c8b69..5d782379 100644 --- a/view/admin/users/ban_users.php +++ b/view/admin/users/ban_users.php @@ -14,43 +14,43 @@ ?>
        -

        +

        - +
        - + - + - +
        - +
        - +
        - - - + + +
        -

        +

        diff --git a/view/admin/users/delete_users.php b/view/admin/users/delete_users.php index 3f1388f6..b3b3c36e 100644 --- a/view/admin/users/delete_users.php +++ b/view/admin/users/delete_users.php @@ -14,24 +14,24 @@ ?>
        -

        +

        - +
        -

        +

        - +
        -

        +

        -

        +

        diff --git a/view/admin/users/find_users.php b/view/admin/users/find_users.php index e6053496..bf05ced4 100644 --- a/view/admin/users/find_users.php +++ b/view/admin/users/find_users.php @@ -16,9 +16,9 @@
          -
        • -
        • » 
        • -
        • » 
        • +
        • +
        • » 
        • +
        • » 
        @@ -31,19 +31,19 @@
        -

        +

        - - - - - - - + + + + + + + @@ -59,7 +59,7 @@ - + @@ -68,7 +68,7 @@ } } else { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } ?> @@ -82,17 +82,17 @@
        -

          -
        • -
        • » 
        • -
        • » 
        • +
        • +
        • » 
        • +
        • » 
        diff --git a/view/admin/users/move_users.php b/view/admin/users/move_users.php index b82d0e71..9b785654 100644 --- a/view/admin/users/move_users.php +++ b/view/admin/users/move_users.php @@ -14,32 +14,32 @@ ?>
        -

        +

        - +
        '.$lang_admin_users['Results view IP link'].' | '.$lang_admin_users['Results show posts link'].'' ?>'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
        '.$lang_admin_users['No match'].'
        '.__('No match').'
        - +
        - +
        -

        +

        diff --git a/view/admin/users/search_ip.php b/view/admin/users/search_ip.php index 108d0948..0fbb89f8 100644 --- a/view/admin/users/search_ip.php +++ b/view/admin/users/search_ip.php @@ -16,9 +16,9 @@
          -
        • -
        • » 
        • -
        • » 
        • +
        • +
        • » 
        • +
        • » 
        @@ -28,16 +28,16 @@
        -

        +

        - - - - + + + + @@ -48,13 +48,13 @@ - + '."\n"; + echo "\t\t\t\t".''."\n"; endif; ?> @@ -70,9 +70,9 @@
          -
        • -
        • » 
        • -
        • » 
        • +
        • +
        • » 
        • +
        • » 
        diff --git a/view/admin/users/show_users.php b/view/admin/users/show_users.php index ab94c9f9..f93dba7a 100644 --- a/view/admin/users/show_users.php +++ b/view/admin/users/show_users.php @@ -16,9 +16,9 @@
          -
        • -
        • » 
        • -
        • » 
        • +
        • +
        • » 
        • +
        • » 
        @@ -28,18 +28,18 @@
        -

        +

        '.$lang_admin_users['Results no posts found'].'
        '.__('Results no posts found').'
        - - - - - - + + + + + + @@ -56,7 +56,7 @@ - + - + @@ -75,7 +75,7 @@ } } } else { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } ?> @@ -91,9 +91,9 @@
          -
        • -
        • » 
        • -
        • » 
        • +
        • +
        • » 
        • +
        • » 
        From 3e4ca20270bc31ea038cd52c7df008dcf730fe09 Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 13 Aug 2015 19:24:51 +0200 Subject: [PATCH 035/353] Use _e( instead of echo __( --- include/cache.php | 4 +- include/functions.php | 6 +- install/index.php | 122 ++--- style/FeatherBB/view/admin/bans/add_ban.php | 30 +- .../FeatherBB/view/admin/bans/admin_bans.php | 48 +- .../FeatherBB/view/admin/bans/search_ban.php | 28 +- style/FeatherBB/view/admin/categories.php | 24 +- style/FeatherBB/view/admin/censoring.php | 22 +- .../view/admin/forums/admin_forums.php | 28 +- .../view/admin/forums/delete_forum.php | 8 +- .../view/admin/forums/permissions.php | 34 +- .../view/admin/groups/add_edit_group.php | 180 +++---- .../view/admin/groups/admin_groups.php | 20 +- .../view/admin/groups/confirm_delete.php | 8 +- .../view/admin/groups/delete_group.php | 8 +- style/FeatherBB/view/admin/index.php | 36 +- .../admin/maintenance/admin_maintenance.php | 42 +- .../view/admin/maintenance/prune.php | 8 +- .../view/admin/maintenance/rebuild.php | 2 +- style/FeatherBB/view/admin/menu.php | 30 +- style/FeatherBB/view/admin/options.php | 468 +++++++++--------- style/FeatherBB/view/admin/parser.php | 32 +- style/FeatherBB/view/admin/permissions.php | 100 ++-- style/FeatherBB/view/admin/reports.php | 16 +- style/FeatherBB/view/admin/statistics.php | 8 +- .../view/admin/users/admin_users.php | 96 ++-- .../FeatherBB/view/admin/users/ban_users.php | 22 +- .../view/admin/users/delete_users.php | 12 +- .../FeatherBB/view/admin/users/find_users.php | 34 +- .../FeatherBB/view/admin/users/move_users.php | 10 +- .../FeatherBB/view/admin/users/search_ip.php | 24 +- .../FeatherBB/view/admin/users/show_users.php | 28 +- style/FeatherBB/view/delete.php | 10 +- style/FeatherBB/view/edit.php | 30 +- style/FeatherBB/view/footer.php | 2 +- style/FeatherBB/view/header.php | 10 +- style/FeatherBB/view/help.php | 126 ++--- style/FeatherBB/view/index.php | 16 +- style/FeatherBB/view/login/form.php | 16 +- .../view/login/password_forgotten.php | 14 +- style/FeatherBB/view/message.php | 4 +- style/FeatherBB/view/misc/email.php | 12 +- style/FeatherBB/view/misc/report.php | 12 +- style/FeatherBB/view/misc/rules.php | 2 +- .../FeatherBB/view/moderate/delete_posts.php | 8 +- .../FeatherBB/view/moderate/delete_topics.php | 8 +- .../FeatherBB/view/moderate/merge_topics.php | 8 +- .../view/moderate/moderator_forum.php | 20 +- style/FeatherBB/view/moderate/move_topics.php | 8 +- style/FeatherBB/view/moderate/posts_view.php | 12 +- style/FeatherBB/view/moderate/split_posts.php | 12 +- style/FeatherBB/view/post.php | 36 +- style/FeatherBB/view/profile/change_mail.php | 12 +- style/FeatherBB/view/profile/change_pass.php | 14 +- style/FeatherBB/view/profile/delete_user.php | 12 +- style/FeatherBB/view/profile/menu.php | 16 +- .../FeatherBB/view/profile/section_admin.php | 18 +- .../view/profile/section_display.php | 28 +- .../view/profile/section_essentials.php | 106 ++-- .../view/profile/section_messaging.php | 14 +- .../view/profile/section_personal.php | 10 +- .../view/profile/section_personality.php | 18 +- .../view/profile/section_privacy.php | 18 +- .../FeatherBB/view/profile/upload_avatar.php | 10 +- style/FeatherBB/view/profile/view_profile.php | 10 +- style/FeatherBB/view/register/email.php | 12 +- style/FeatherBB/view/register/form.php | 42 +- style/FeatherBB/view/register/rules.php | 6 +- style/FeatherBB/view/search/footer.php | 2 +- style/FeatherBB/view/search/form.php | 50 +- style/FeatherBB/view/search/header.php | 12 +- style/FeatherBB/view/search/posts.php | 8 +- style/FeatherBB/view/userlist.php | 36 +- style/FeatherBB/view/viewforum.php | 14 +- style/FeatherBB/view/viewtopic.php | 28 +- view/admin/bans/add_ban.php | 30 +- view/admin/bans/admin_bans.php | 48 +- view/admin/bans/search_ban.php | 28 +- view/admin/categories.php | 24 +- view/admin/censoring.php | 22 +- view/admin/forums/admin_forums.php | 28 +- view/admin/forums/delete_forum.php | 8 +- view/admin/forums/permissions.php | 34 +- view/admin/groups/add_edit_group.php | 180 +++---- view/admin/groups/admin_groups.php | 20 +- view/admin/groups/confirm_delete.php | 8 +- view/admin/groups/delete_group.php | 8 +- view/admin/index.php | 36 +- view/admin/maintenance/admin_maintenance.php | 42 +- view/admin/maintenance/prune.php | 8 +- view/admin/maintenance/rebuild.php | 2 +- view/admin/menu.php | 30 +- view/admin/options.php | 468 +++++++++--------- view/admin/parser.php | 32 +- view/admin/permissions.php | 100 ++-- view/admin/reports.php | 16 +- view/admin/statistics.php | 8 +- view/admin/users/admin_users.php | 96 ++-- view/admin/users/ban_users.php | 22 +- view/admin/users/delete_users.php | 12 +- view/admin/users/find_users.php | 34 +- view/admin/users/move_users.php | 10 +- view/admin/users/search_ip.php | 24 +- view/admin/users/show_users.php | 28 +- view/delete.php | 10 +- view/edit.php | 30 +- view/footer.php | 2 +- view/header.php | 8 +- view/help.php | 126 ++--- view/index.php | 16 +- view/login/form.php | 16 +- view/login/password_forgotten.php | 14 +- view/message.php | 4 +- view/misc/email.php | 12 +- view/misc/report.php | 12 +- view/misc/rules.php | 2 +- view/moderate/delete_posts.php | 8 +- view/moderate/delete_topics.php | 8 +- view/moderate/merge_topics.php | 8 +- view/moderate/moderator_forum.php | 20 +- view/moderate/move_topics.php | 8 +- view/moderate/posts_view.php | 12 +- view/moderate/split_posts.php | 12 +- view/post.php | 36 +- view/profile/change_mail.php | 12 +- view/profile/change_pass.php | 14 +- view/profile/delete_user.php | 12 +- view/profile/menu.php | 16 +- view/profile/section_admin.php | 18 +- view/profile/section_display.php | 28 +- view/profile/section_essentials.php | 106 ++-- view/profile/section_messaging.php | 14 +- view/profile/section_personal.php | 10 +- view/profile/section_personality.php | 18 +- view/profile/section_privacy.php | 18 +- view/profile/upload_avatar.php | 10 +- view/profile/view_profile.php | 10 +- view/register/email.php | 12 +- view/register/form.php | 42 +- view/register/rules.php | 6 +- view/search/footer.php | 2 +- view/search/form.php | 50 +- view/search/header.php | 12 +- view/search/posts.php | 8 +- view/userlist.php | 36 +- view/viewforum.php | 14 +- view/viewtopic.php | 28 +- 147 files changed, 2333 insertions(+), 2333 deletions(-) diff --git a/include/cache.php b/include/cache.php index b275e400..77dc13dd 100644 --- a/include/cache.php +++ b/include/cache.php @@ -103,7 +103,7 @@ function generate_quickjump_cache($group_id = false) ->find_many(); if ($result) { - $output .= "\t\t\t\t".'
        '."\n\t\t\t\t\t".'
        '."\n\t\t\t\t\t".''."\n\t\t\t\t\t".'
        '."\n\t\t\t\t".''."\n"; + $output .= "\t\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t".''."\n"; } } diff --git a/include/functions.php b/include/functions.php index 3db67c33..e02b7f2f 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1506,14 +1506,14 @@ function display_saved_queries() ?>
        -

        +

        '.$lang_admin_users['Results view IP link'].' | '.$lang_admin_users['Results show posts link'].'' ?>'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
               
        '.$lang_admin_users['Results no IP found'].'
        '.__('Results no IP found').'
        - - + + diff --git a/install/index.php b/install/index.php index 540f1681..da804d25 100644 --- a/install/index.php +++ b/install/index.php @@ -351,22 +351,22 @@ function generate_config_file() -<?php echo __('FeatherBB Installation') ?> +<?php _e('FeatherBB Installation') ?>
        -

        +

        - +
        -
        @@ -103,7 +103,7 @@ ?>
        - +
        @@ -114,7 +114,7 @@ -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index 0b1d2ae7..5231f252 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -11,7 +11,7 @@
        -

        +

        - + @@ -57,7 +57,7 @@ function process_form(the_form) var elem = the_form.elements[i]; if (elem.name && required_fields[elem.name] && !elem.value && elem.type && (/^(?:text(?:area)?|password|file)$/i.test(elem.type))) { - alert('"' + required_fields[elem.name] + '" '); + alert('"' + required_fields[elem.name] + '" '); elem.focus(); return false; } @@ -89,7 +89,7 @@ function process_form(the_form)
        @@ -111,7 +111,7 @@ function process_form(the_form)
        user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?>
        -

        +

        @@ -122,7 +122,7 @@ function process_form(the_form)
        -

        ×

        +

        ×

        diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php index a7f9300d..b5477db4 100644 --- a/style/FeatherBB/view/help.php +++ b/style/FeatherBB/view/help.php @@ -14,113 +14,113 @@ ?> -

        +

        -

        -

        +

        +

        -

        +

        -

        -

        [b][/b]

        -

        [u][/u]

        -

        [i][/i]

        -

        [s][/s]

        -

        [del][/del]

        -

        [ins][/ins]

        -

        [em][/em]

        -

        [color=#FF0000][/color]

        -

        [color=blue][/color]

        -

        [h][/h]

        +

        +

        [b][/b]

        +

        [u][/u]

        +

        [i][/i]

        +

        [s][/s]

        +

        [del][/del]

        +

        [ins][/ins]

        +

        [em][/em]

        +

        [color=#FF0000][/color]

        +

        [color=blue][/color]

        +

        [h][/h]

        -

        +

        -

        -

        [url=][/url]

        -

        [url][/url]

        -

        [url=/help/][/url]

        -

        [email]myname@example.com[/email] myname@example.com

        -

        [email=myname@example.com][/email]

        -

        [topic=1][/topic]

        -

        [topic]1[/topic]

        -

        [post=1][/post]

        -

        [post]1[/post]

        -

        [forum=1][/forum]

        -

        [forum]1[/forum]

        -

        [user=2][/user]

        -

        [user]2[/user]

        +

        +

        [url=][/url]

        +

        [url][/url]

        +

        [url=/help/][/url]

        +

        [email]myname@example.com[/email] myname@example.com

        +

        [email=myname@example.com][/email]

        +

        [topic=1][/topic]

        +

        [topic]1[/topic]

        +

        [post=1][/post]

        +

        [post]1[/post]

        +

        [forum=1][/forum]

        +

        [forum]1[/forum]

        +

        [user=2][/user]

        +

        [user]2[/user]

        -

        -

        [img=]/img/test.png[/img] <?php echo __('FluxBB bbcode test') ?>

        +

        +

        [img=]/img/test.png[/img] <?php _e('FluxBB bbcode test') ?>

        -

        +

        -

        -

        [quote=James][/quote]

        -

        +

        +

        [quote=James][/quote]

        +

        -
        James

        +
        James

        -

        -

        [quote][/quote]

        -

        +

        +

        [quote][/quote]

        +

        -

        +

        -

        +

        -

        +

        -

        -

        [code][/code]

        -

        +

        +

        [code][/code]

        +

        -
        +
        -

        +

        -

        -

        [list][*][/*][*][/*][*][/*][/list] -

        +

        +

        [list][*][/*][*][/*][*][/*][/list] +

        -
        +
        -

        [list=1][*][/*][*][/*][*][/*][/list] -

        +

        [list=1][*][/*][*][/*][*][/*][/list] +

        -
        +
        -

        [list=a][*][/*][*][/*][*][/*][/list] -

        +

        [list=a][*][/*][*][/*][*][/*][/list] +

        -
        +
        -

        +

        -

        -

        [b][u][/u][/b]

        +

        +

        [b][u][/u][/b]

        -

        +

        -

        +

        -

        +

        cid != $cur_cat) : @@ -33,10 +33,10 @@
        - - - - + + + + @@ -80,17 +80,17 @@ endif; ?>
        -

        +

        -
        +
        '.forum_number_format($stats['total_users']).'') ?>
        '.forum_number_format($stats['total_topics']).'') ?>
        '.forum_number_format($stats['total_posts']).'') ?>
        -
        +
        '.forum_number_format($online['num_users']).'') ?>
        diff --git a/style/FeatherBB/view/login/form.php b/style/FeatherBB/view/login/form.php index fb8f2404..13d1744b 100644 --- a/style/FeatherBB/view/login/form.php +++ b/style/FeatherBB/view/login/form.php @@ -14,29 +14,29 @@ ?>
        -

        +

        - +
        - - + +
        - +
        -

        -

        +

        +

        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/FeatherBB/view/login/password_forgotten.php index 979b915c..41c0a121 100644 --- a/style/FeatherBB/view/login/password_forgotten.php +++ b/style/FeatherBB/view/login/password_forgotten.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
        -

        +

        -

        +

          -

          +

          - +
          - -

          + +

          -

          +

          \ No newline at end of file diff --git a/style/FeatherBB/view/message.php b/style/FeatherBB/view/message.php index d376bd09..740b040e 100644 --- a/style/FeatherBB/view/message.php +++ b/style/FeatherBB/view/message.php @@ -14,11 +14,11 @@ ?>
          -

          +

          -

          +

          diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php index 7004040d..eb44dafb 100644 --- a/style/FeatherBB/view/misc/email.php +++ b/style/FeatherBB/view/misc/email.php @@ -14,24 +14,24 @@ ?>
          -

          +

          - +
          -
          -

          +

          \ No newline at end of file diff --git a/style/FeatherBB/view/misc/report.php b/style/FeatherBB/view/misc/report.php index 121feac2..252042c7 100644 --- a/style/FeatherBB/view/misc/report.php +++ b/style/FeatherBB/view/misc/report.php @@ -16,29 +16,29 @@
            -
          • +
          • » 
          • » 
          • -
          • » 
          • +
          • » 
          -

          +

          - +
          - +
          -

          +

          \ No newline at end of file diff --git a/style/FeatherBB/view/misc/rules.php b/style/FeatherBB/view/misc/rules.php index d32a805e..366880ee 100644 --- a/style/FeatherBB/view/misc/rules.php +++ b/style/FeatherBB/view/misc/rules.php @@ -14,7 +14,7 @@ ?>
          -

          +

          diff --git a/style/FeatherBB/view/moderate/delete_posts.php b/style/FeatherBB/view/moderate/delete_posts.php index 4b95a5f1..00b80920 100644 --- a/style/FeatherBB/view/moderate/delete_posts.php +++ b/style/FeatherBB/view/moderate/delete_posts.php @@ -14,20 +14,20 @@ ?>
          -

          +

          - +
          -

          +

          -

          +

          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_topics.php b/style/FeatherBB/view/moderate/delete_topics.php index e414f734..d0ab1eed 100644 --- a/style/FeatherBB/view/moderate/delete_topics.php +++ b/style/FeatherBB/view/moderate/delete_topics.php @@ -15,20 +15,20 @@ ?>
          -

          +

          - +
          -

          +

          -

          +

          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/merge_topics.php b/style/FeatherBB/view/moderate/merge_topics.php index b55f586b..820cedee 100644 --- a/style/FeatherBB/view/moderate/merge_topics.php +++ b/style/FeatherBB/view/moderate/merge_topics.php @@ -15,22 +15,22 @@ ?>
          -

          +

          - +
          - +
          -

          +

          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php index bf893ce4..35b67b41 100644 --- a/style/FeatherBB/view/moderate/moderator_forum.php +++ b/style/FeatherBB/view/moderate/moderator_forum.php @@ -17,9 +17,9 @@
            -
          • +
          • » 
          • -
          • » 
          • +
          • » 
          @@ -38,11 +38,11 @@
        - - - - - + + + + + @@ -87,13 +87,13 @@
        -

        /> /> /> /> />

        +

        /> /> /> /> />

          -
        • +
        • » 
        • -
        • » 
        • +
        • » 
        diff --git a/style/FeatherBB/view/moderate/move_topics.php b/style/FeatherBB/view/moderate/move_topics.php index 389f1f05..e72ae5cb 100644 --- a/style/FeatherBB/view/moderate/move_topics.php +++ b/style/FeatherBB/view/moderate/move_topics.php @@ -22,9 +22,9 @@
        - +
        -
        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/FeatherBB/view/moderate/posts_view.php index f957ce8f..482a1c49 100644 --- a/style/FeatherBB/view/moderate/posts_view.php +++ b/style/FeatherBB/view/moderate/posts_view.php @@ -16,10 +16,10 @@
          -
        • +
        • » 
        • » 
        • -
        • » 
        • +
        • » 
        @@ -53,7 +53,7 @@
        -

        +

        -

        /> />

        +

        /> />

          -
        • +
        • » 
        • » 
        • -
        • » 
        • +
        • » 
        diff --git a/style/FeatherBB/view/moderate/split_posts.php b/style/FeatherBB/view/moderate/split_posts.php index ac012ff3..7c59b0b9 100644 --- a/style/FeatherBB/view/moderate/split_posts.php +++ b/style/FeatherBB/view/moderate/split_posts.php @@ -14,27 +14,27 @@ ?>
        -

        +

        - +
        - -
        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php index 0c341fd0..fbfd6840 100644 --- a/style/FeatherBB/view/post.php +++ b/style/FeatherBB/view/post.php @@ -17,7 +17,7 @@
          -
        • +
        • » 
        • request->post('req_subject')): ?>
        • » request->post('req_subject')) ?>
        • @@ -33,10 +33,10 @@ if (!empty($errors)) { ?>
          -

          +

          -

          +

            -

            +

            @@ -93,7 +93,7 @@
            - +
            @@ -102,7 +102,7 @@ $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - @@ -115,17 +115,17 @@ } if ($fid): ?> - -
            @@ -135,7 +135,7 @@
            - +
            @@ -151,14 +151,14 @@ user->is_guest) : ?>
            - +
            -

            +

            @@ -166,7 +166,7 @@
            -

            +

            @@ -176,7 +176,7 @@ if ($tid && $feather_config['o_topic_review'] != '0') : ?>
            -

            +

            -

            +

            - +
            - - -

            + + +

            -

            +

            \ No newline at end of file diff --git a/style/FeatherBB/view/profile/change_pass.php b/style/FeatherBB/view/profile/change_pass.php index 0f0ab452..3f4285fb 100644 --- a/style/FeatherBB/view/profile/change_pass.php +++ b/style/FeatherBB/view/profile/change_pass.php @@ -14,26 +14,26 @@ ?>
            -

            +

            - +
            -user->is_admmod): ?>
            -

            +

            \ No newline at end of file diff --git a/style/FeatherBB/view/profile/delete_user.php b/style/FeatherBB/view/profile/delete_user.php index d5d5bde2..0fd42f52 100644 --- a/style/FeatherBB/view/profile/delete_user.php +++ b/style/FeatherBB/view/profile/delete_user.php @@ -14,23 +14,23 @@ ?>
            -

            +

            - +
            -

            '.feather_escape($username).'.' ?>

            +

            '.feather_escape($username).'.' ?>

            - +
            -

            +

            -

            +

            \ No newline at end of file diff --git a/style/FeatherBB/view/profile/menu.php b/style/FeatherBB/view/profile/menu.php index e78d2c30..4627f8db 100644 --- a/style/FeatherBB/view/profile/menu.php +++ b/style/FeatherBB/view/profile/menu.php @@ -15,39 +15,39 @@ ?>
            -

            +

              > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
            diff --git a/style/FeatherBB/view/profile/section_admin.php b/style/FeatherBB/view/profile/section_admin.php index 52a0ad54..18ba2f12 100644 --- a/style/FeatherBB/view/profile/section_admin.php +++ b/style/FeatherBB/view/profile/section_admin.php @@ -25,9 +25,9 @@ if ($feather->user->g_moderator == '1') { ?> - +
            -

            +

            @@ -36,12 +36,12 @@ } else { if ($feather->user->id != $id) { ?> - +
            - +
            @@ -52,9 +52,9 @@ } ?> - +
            - +
            @@ -64,13 +64,13 @@ ?>
            - +
            -

            +

            -
            +
            diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php index 506dd146..5da0f4b4 100644 --- a/style/FeatherBB/view/profile/section_display.php +++ b/style/FeatherBB/view/profile/section_display.php @@ -30,9 +30,9 @@ ?>
            - +
            - +} ?> />
            +} ?> />
            +} ?> />
            +} ?> />
            @@ -85,15 +85,15 @@
            - +
            - - -

            + + +

            -

            +

          diff --git a/style/FeatherBB/view/profile/section_essentials.php b/style/FeatherBB/view/profile/section_essentials.php index 4f507a8c..0050f89c 100644 --- a/style/FeatherBB/view/profile/section_essentials.php +++ b/style/FeatherBB/view/profile/section_essentials.php @@ -20,17 +20,17 @@
          - +
          -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

          +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

          - +
          @@ -38,139 +38,139 @@
          - +
          -

          -
          diff --git a/style/FeatherBB/view/profile/section_messaging.php b/style/FeatherBB/view/profile/section_messaging.php index 148a78cf..d944ee43 100644 --- a/style/FeatherBB/view/profile/section_messaging.php +++ b/style/FeatherBB/view/profile/section_messaging.php @@ -20,18 +20,18 @@
          - +
          - - - - - + + + + +
          -

          +

        diff --git a/style/FeatherBB/view/profile/section_personal.php b/style/FeatherBB/view/profile/section_personal.php index 7358bc85..a765e0aa 100644 --- a/style/FeatherBB/view/profile/section_personal.php +++ b/style/FeatherBB/view/profile/section_personal.php @@ -20,18 +20,18 @@
        - +
        - + - -user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?> + +user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?>
        -

        +

        diff --git a/style/FeatherBB/view/profile/section_personality.php b/style/FeatherBB/view/profile/section_personality.php index 9bd9440b..3624e5e6 100644 --- a/style/FeatherBB/view/profile/section_personality.php +++ b/style/FeatherBB/view/profile/section_personality.php @@ -21,34 +21,34 @@
        - +
        -

        +

        - +
        -

        +

        -

        +

        diff --git a/style/FeatherBB/view/profile/section_privacy.php b/style/FeatherBB/view/profile/section_privacy.php index 6c1ab357..36930415 100644 --- a/style/FeatherBB/view/profile/section_privacy.php +++ b/style/FeatherBB/view/profile/section_privacy.php @@ -20,41 +20,41 @@
        - +
        -

        +

        +} ?> />
        +} ?> />
        +} ?> />
        - +
        +} ?> />
        +} ?> />
        -

        +

        diff --git a/style/FeatherBB/view/profile/upload_avatar.php b/style/FeatherBB/view/profile/upload_avatar.php index 3f74f092..4131569c 100644 --- a/style/FeatherBB/view/profile/upload_avatar.php +++ b/style/FeatherBB/view/profile/upload_avatar.php @@ -14,22 +14,22 @@ ?>
        -

        +

        - +
        - -

        + +

        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/profile/view_profile.php b/style/FeatherBB/view/profile/view_profile.php index ad1c5959..d30181fd 100644 --- a/style/FeatherBB/view/profile/view_profile.php +++ b/style/FeatherBB/view/profile/view_profile.php @@ -14,12 +14,12 @@ ?>
        -

        +

        - +
        @@ -30,7 +30,7 @@
        - +
        @@ -41,7 +41,7 @@
        - +
        @@ -52,7 +52,7 @@
        - +
        diff --git a/style/FeatherBB/view/register/email.php b/style/FeatherBB/view/register/email.php index 9f9b3424..e26ad690 100644 --- a/style/FeatherBB/view/register/email.php +++ b/style/FeatherBB/view/register/email.php @@ -15,25 +15,25 @@ ?>
        -

        +

        - +
        -
        -

        +

        \ No newline at end of file diff --git a/style/FeatherBB/view/register/form.php b/style/FeatherBB/view/register/form.php index fa2d2457..f1a360ef 100644 --- a/style/FeatherBB/view/register/form.php +++ b/style/FeatherBB/view/register/form.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
        -

        +

        -

        +

          -

          +

          -

          -

          -

          +

          +

          +

          - +
          -
          @@ -61,15 +61,15 @@
          - +
          - - -

          +

          @@ -77,12 +77,12 @@
          -

          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/register/rules.php b/style/FeatherBB/view/register/rules.php index 3a2fd06c..cef62405 100644 --- a/style/FeatherBB/view/register/rules.php +++ b/style/FeatherBB/view/register/rules.php @@ -15,18 +15,18 @@ ?>
          -

          +

          - +
          -

          +

          \ No newline at end of file diff --git a/style/FeatherBB/view/search/footer.php b/style/FeatherBB/view/search/footer.php index a64e1cdf..a73ed5aa 100644 --- a/style/FeatherBB/view/search/footer.php +++ b/style/FeatherBB/view/search/footer.php @@ -30,7 +30,7 @@
            -
          • +
          • » 
          • » 
          diff --git a/style/FeatherBB/view/search/form.php b/style/FeatherBB/view/search/form.php index bb39c614..4731b068 100644 --- a/style/FeatherBB/view/search/form.php +++ b/style/FeatherBB/view/search/form.php @@ -14,66 +14,66 @@ ?>
          -

          +

          - +
          - - -

          + + +

          - +
          -
          - +
          -
          -

          +

          \ No newline at end of file diff --git a/style/FeatherBB/view/search/header.php b/style/FeatherBB/view/search/header.php index 909a2108..01af597a 100644 --- a/style/FeatherBB/view/search/header.php +++ b/style/FeatherBB/view/search/header.php @@ -16,7 +16,7 @@
            -
          • +
          • » 
          • » 
          @@ -31,16 +31,16 @@ if ($search['show_as'] == 'topics') : ?>
          -

          +

        - - - - + + + + diff --git a/style/FeatherBB/view/search/posts.php b/style/FeatherBB/view/search/posts.php index 872c349e..c575f9c2 100644 --- a/style/FeatherBB/view/search/posts.php +++ b/style/FeatherBB/view/search/posts.php @@ -21,7 +21,7 @@ echo ' '.$cur_search['item_status']; } ?>">

        # »  » 

        @@ -29,7 +29,7 @@
        -
        +
        @@ -46,8 +46,8 @@
          -
        • -
        • +
        • +
        diff --git a/style/FeatherBB/view/userlist.php b/style/FeatherBB/view/userlist.php index 0bbedae6..26c24027 100644 --- a/style/FeatherBB/view/userlist.php +++ b/style/FeatherBB/view/userlist.php @@ -14,50 +14,50 @@ ?>
        -

        +

        - +
        -user->g_search_users == '1'): ?> -
        -

        +

        @@ -70,16 +70,16 @@
        -

        +

        - - - - + + + + diff --git a/style/FeatherBB/view/viewforum.php b/style/FeatherBB/view/viewforum.php index b9d04a1d..a35faf22 100644 --- a/style/FeatherBB/view/viewforum.php +++ b/style/FeatherBB/view/viewforum.php @@ -16,7 +16,7 @@
          -
        • +
        • » 
        @@ -34,10 +34,10 @@
        - - - - + + + + @@ -70,7 +70,7 @@
        - +
        @@ -91,7 +91,7 @@
          -
        • +
        • » 
        '.implode(' - ', $forum_actions).'

        '."\n" : '') ?> diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php index 16535ff1..95de6a99 100644 --- a/style/FeatherBB/view/viewtopic.php +++ b/style/FeatherBB/view/viewtopic.php @@ -17,7 +17,7 @@
          -
        • +
        • » 
        • » 
        @@ -64,7 +64,7 @@

        @@ -107,7 +107,7 @@
          -
        • +
        • » 
        • » 
        @@ -124,13 +124,13 @@ ?>
        -

        +

        - +
        @@ -142,7 +142,7 @@ $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
        ">
        @@ -179,15 +179,15 @@ user->is_guest) : ?>
        - +
        -

        +

        @@ -196,7 +196,7 @@
        -

        +

        diff --git a/view/admin/bans/add_ban.php b/view/admin/bans/add_ban.php index 28b73f89..8170a2a9 100644 --- a/view/admin/bans/add_ban.php +++ b/view/admin/bans/add_ban.php @@ -14,7 +14,7 @@ ?>
        -

        +

        @@ -24,71 +24,71 @@
        - +
        - + - + - +
        - +
        - '.__('here').''); } ?>
        - +
        -

        +

        - +
        - + - +
        - +
        - +
        -

        +

        diff --git a/view/admin/bans/admin_bans.php b/view/admin/bans/admin_bans.php index e6f2b5f7..3d714e7f 100644 --- a/view/admin/bans/admin_bans.php +++ b/view/admin/bans/admin_bans.php @@ -14,20 +14,20 @@ ?>
        -

        +

        - +
        - +
        - +
        @@ -37,56 +37,56 @@
        -

        +

        -

        +

        - +
        -

        +

        - + - + - + - + - + + - + + - + @@ -94,7 +94,7 @@ -

        +

        diff --git a/view/admin/bans/search_ban.php b/view/admin/bans/search_ban.php index 4285f695..0d057182 100644 --- a/view/admin/bans/search_ban.php +++ b/view/admin/bans/search_ban.php @@ -16,9 +16,9 @@
          -
        • -
        • » 
        • -
        • » 
        • +
        • +
        • » 
        • +
        • » 
        @@ -29,19 +29,19 @@
        -

        +

        -
        -
           
        - - - - - - - + + + + + + + @@ -78,9 +78,9 @@
          -
        • -
        • » 
        • -
        • » 
        • +
        • +
        • » 
        • +
        • » 
        diff --git a/view/admin/categories.php b/view/admin/categories.php index 20f1fdd9..23929e47 100644 --- a/view/admin/categories.php +++ b/view/admin/categories.php @@ -14,16 +14,16 @@ ?>
        -

        +

        - +
        - + - - - + + + diff --git a/view/admin/forums/admin_forums.php b/view/admin/forums/admin_forums.php index 0d6adc16..fb4b716e 100644 --- a/view/admin/forums/admin_forums.php +++ b/view/admin/forums/admin_forums.php @@ -14,7 +14,7 @@ ?>
        -

        +

        @@ -23,16 +23,16 @@ ?>
        - +
        @@ -37,17 +37,17 @@ -

        +

        - +
        - +
        - +
        @@ -69,19 +69,19 @@
        -

        +

        - +
        - - + + @@ -100,7 +100,7 @@ ?>
        -
        +
        diff --git a/view/admin/censoring.php b/view/admin/censoring.php index b8dc9f88..71c253f7 100644 --- a/view/admin/censoring.php +++ b/view/admin/censoring.php @@ -14,28 +14,28 @@ ?>
        -

        +

        - +
        -

        '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

        +

        '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

        - - - + + + - +
        @@ -44,7 +44,7 @@
        - +
        - +
        - +
        @@ -45,9 +45,9 @@ ?>
        - +
        -

        +

        @@ -61,11 +61,11 @@ -

        +

        -

        +

        - +
        - - - + + + @@ -96,7 +96,7 @@ ?> - + @@ -110,7 +110,7 @@ -

        +

        -

        +

        - +

        -

        +

        -

        +

        diff --git a/view/admin/forums/permissions.php b/view/admin/forums/permissions.php index fc3feae5..e6869913 100644 --- a/view/admin/forums/permissions.php +++ b/view/admin/forums/permissions.php @@ -14,26 +14,26 @@ ?>
        -

        +

        -

        +

        - +
        | |
        - + - + - + - + - +
        '; ?>
        @@ -66,16 +66,16 @@
        - +

        '.__('User groups').'') ?>

        - - - + + + @@ -122,11 +122,11 @@ ?>
         
        -
        +
        -

        +

        diff --git a/view/admin/groups/add_edit_group.php b/view/admin/groups/add_edit_group.php index 6246e104..9a91a65f 100644 --- a/view/admin/groups/add_edit_group.php +++ b/view/admin/groups/add_edit_group.php @@ -14,22 +14,22 @@ ?>
        -

        +

        -

        +

        - +
        -

        +

        - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
        +
        @@ -55,255 +55,255 @@
        + } ?> tabindex="5" />  - + } ?> tabindex="6" />  +
        + } ?> tabindex="7" />  - + } ?> tabindex="8" />  +
        + } ?> tabindex="9" />  - + } ?> tabindex="10" />  +
        + } ?> tabindex="11" />  - + } ?> tabindex="12" />  +
        + } ?> tabindex="13" />  - + } ?> tabindex="14" />  +
        + } ?> tabindex="15" />  - + } ?> tabindex="16" />  +
        + } ?> tabindex="17" />  - + } ?> tabindex="18" />  +
        + } ?> tabindex="19" />  - + } ?> tabindex="20" />  +
        + } ?> tabindex="21" />  - + } ?> tabindex="22" />  +
        + } ?> tabindex="23" />  - + } ?> tabindex="24" />  +
        + } ?> tabindex="25" />  - + } ?> tabindex="26" />  +
        + } ?> tabindex="27" />  - + } ?> tabindex="28" />  +
        + } ?> tabindex="29" />  - + } ?> tabindex="30" />  +
        + } ?> tabindex="31" />  - + } ?> tabindex="32" />  +
        + } ?> tabindex="33" />  - + } ?> tabindex="34" />  +
        + } ?> tabindex="35" />  - + } ?> tabindex="36" />  +
        + } ?> tabindex="37" />  - + } ?> tabindex="38" />  +
        + } ?> tabindex="39" />  - + } ?> tabindex="40" />  +
        - +
        - +
        - +
        - +
        -

        +

        -

        +

        diff --git a/view/admin/groups/admin_groups.php b/view/admin/groups/admin_groups.php index 1bf9a10e..643b4883 100644 --- a/view/admin/groups/admin_groups.php +++ b/view/admin/groups/admin_groups.php @@ -14,17 +14,17 @@ ?>
        -

        +

        - +
        - +
        - +
        @@ -53,11 +53,11 @@
        - +
        - +
        - +
        @@ -84,14 +84,14 @@
        -

        +

        - +
        -

        +

        -

        +

        - +

        -

        +

        -

        +

        diff --git a/view/admin/groups/delete_group.php b/view/admin/groups/delete_group.php index fee07d5b..693baab1 100644 --- a/view/admin/groups/delete_group.php +++ b/view/admin/groups/delete_group.php @@ -14,16 +14,16 @@ ?>
        -

        +

        - +

        -
        -

        +

        diff --git a/view/admin/index.php b/view/admin/index.php index 50afbad1..dc0dcf8c 100644 --- a/view/admin/index.php +++ b/view/admin/index.php @@ -14,46 +14,46 @@ ?>
        -

        +

        -

        +

          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        -

        +

        '.__('Delete install file').'') ?>

        -

        +

        -
        +
        '.__('Check for upgrade').'') ?>
        -
        +
        - +
        -
        +
        - - + -
        diff --git a/view/admin/maintenance/admin_maintenance.php b/view/admin/maintenance/admin_maintenance.php index 77c8404e..068b914b 100644 --- a/view/admin/maintenance/admin_maintenance.php +++ b/view/admin/maintenance/admin_maintenance.php @@ -14,39 +14,39 @@ ?>
        -

        +

        - +

        '.__('Maintenance mode').'') ?>

        - + - + - +
        - +
        - +
        - +
        -

        -
        +

        +
        @@ -57,38 +57,38 @@
        - +
        - + - + - +
        - +
        - - - + + +
        - +

        '.__('Maintenance mode').'') ?>

        -
        +
        diff --git a/view/admin/maintenance/prune.php b/view/admin/maintenance/prune.php index 8801a979..9e3b0d2b 100644 --- a/view/admin/maintenance/prune.php +++ b/view/admin/maintenance/prune.php @@ -14,7 +14,7 @@ ?>
        -

        +

        @@ -24,14 +24,14 @@
        - +

        -

        +

        -

        +

        diff --git a/view/admin/maintenance/rebuild.php b/view/admin/maintenance/rebuild.php index 36947974..5bd6ffc0 100644 --- a/view/admin/maintenance/rebuild.php +++ b/view/admin/maintenance/rebuild.php @@ -34,5 +34,5 @@ -

        +


        \ No newline at end of file diff --git a/view/admin/menu.php b/view/admin/menu.php index e2870921..b33c2727 100644 --- a/view/admin/menu.php +++ b/view/admin/menu.php @@ -15,27 +15,27 @@ ?>
        -

        +

          > + ?>> > + ?>> user->g_mod_ban_users == '1'): ?> > + ?>> > + ?>>
        @@ -44,42 +44,42 @@ if ($is_admin) { ?> -

        +

          > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>>
        @@ -90,7 +90,7 @@ // Did we find any plugins? if (!empty($plugins)) { ?> -

        +

          diff --git a/view/admin/options.php b/view/admin/options.php index a19ccddb..faa8e34c 100644 --- a/view/admin/options.php +++ b/view/admin/options.php @@ -14,180 +14,180 @@ ?>
          -

          +

          -

          +

          - +
          - + - + - + - + - + - + - +
          - +
          - +
          - +
          - +
          +} ?> />  - +} ?> />  +
          - +
          - +
          @@ -225,42 +225,42 @@ ?>
          - +
          - + - + - + - + - +
          '.__('PHP manual').'') ?>
          '.__('PHP manual').'') ?>
          - +
          - +
          - +
          @@ -269,114 +269,114 @@
          - +
          - + - + - + - + - + - + - + - + - + - + - +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          - +
          - +
          - +
          - +
          - +
          @@ -385,122 +385,122 @@
          - +
          - + - + - + - + - + - + - + - + - + - +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  +} ?> />  '.__('Censoring').'') ?>
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          - +
          @@ -509,34 +509,34 @@
          - +
          - + - +
          +} ?> />  +} ?> />  - +} ?> />  +
          - +
          @@ -545,29 +545,29 @@
          - +
          - + - +
          +} ?> />  +} ?> />  - +} ?> />  +
          - +
          @@ -576,47 +576,47 @@
          - +
          - + - + - + - + - +
          +} ?> />  - +} ?> />  +
          - +
          - +
          - +
          - +
          @@ -625,81 +625,81 @@
          - +
          - + - + - + - + - + - + - + - +
          - +
          - +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          - +
          - +
          - + - +
          +} ?> />  - +} ?> />  +
          @@ -708,77 +708,77 @@
          - +
          - + - + - + - + - + - +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          - +
          - + +} ?> />  +} ?> />  +} ?> /> 
          @@ -787,26 +787,26 @@
          - +
          - + - +
          +} ?> />  - +} ?> />  +
          - +
          @@ -815,33 +815,33 @@
          - +
          - + - +
          +} ?> />  - +} ?> />  +
          - +
          -

          +

          diff --git a/view/admin/parser.php b/view/admin/parser.php index 8049bc52..aec1f767 100644 --- a/view/admin/parser.php +++ b/view/admin/parser.php @@ -19,7 +19,7 @@

          - +

          @@ -33,9 +33,9 @@ /> /> /> +} ?> /> @@ -46,9 +46,9 @@ /> /> /> +} ?> /> @@ -59,9 +59,9 @@ /> /> /> +} ?> /> @@ -72,9 +72,9 @@ /> /> /> +} ?> /> @@ -88,12 +88,12 @@ echo ' checked="checked"'; } if (!ini_get('allow_url_fopen')) { echo(' disabled="disabled" title="'. feather_escape($lang_admin_parser['unavailable']) .'"'); -} ?> /> +} ?> /> /> +} ?> /> @@ -257,19 +257,19 @@ /> /> /> + ?> /> /> /> /> + ?> /> - +

          diff --git a/view/admin/permissions.php b/view/admin/permissions.php index 34fe64cb..a70328ae 100644 --- a/view/admin/permissions.php +++ b/view/admin/permissions.php @@ -14,75 +14,75 @@ ?>
          -

          +

          -

          +

          - +
          - + - + - + - + - +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          @@ -91,57 +91,57 @@
          - +
          - + - + - + - + - +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          - +
          - +
          @@ -150,38 +150,38 @@
          - +
          - + - +
          +} ?> />  - +} ?> />  +
          +} ?> />  - +} ?> />  +
          -

          +

          diff --git a/view/admin/reports.php b/view/admin/reports.php index 619980c1..d9a027e3 100644 --- a/view/admin/reports.php +++ b/view/admin/reports.php @@ -14,7 +14,7 @@ ?>
          -

          +

          @@ -34,7 +34,7 @@ sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?> -
          +
          ', feather_escape($report['message'])) ?> @@ -48,9 +48,9 @@ ?>
          - +
          -

          +

          @@ -64,7 +64,7 @@
          -

          +

          get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?> - + ', feather_escape($report['message'])) ?> @@ -98,9 +98,9 @@ ?>
          - +
          -

          +

          diff --git a/view/admin/statistics.php b/view/admin/statistics.php index 522bbb5d..5306b027 100644 --- a/view/admin/statistics.php +++ b/view/admin/statistics.php @@ -14,21 +14,21 @@ ?>
          -

          +

          -
          +
          -user->g_id == FEATHER_ADMIN): ?>
          +user->g_id == FEATHER_ADMIN): ?>

          '.__('Show info').'') ?>
          -
          +

          diff --git a/view/admin/users/admin_users.php b/view/admin/users/admin_users.php index f29830af..27e99a16 100644 --- a/view/admin/users/admin_users.php +++ b/view/admin/users/admin_users.php @@ -14,128 +14,128 @@ ?>
          -

          +

          -

          +

          - +
          -

          +

          - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + + - + + - + + - + + - + + - + - + @@ -144,22 +144,22 @@ -

          +

          -

          +

          - +
          -
          -
          -
          -
          -
          -
             
          - + +
          -
          diff --git a/view/admin/users/ban_users.php b/view/admin/users/ban_users.php index 5d782379..e929c043 100644 --- a/view/admin/users/ban_users.php +++ b/view/admin/users/ban_users.php @@ -14,43 +14,43 @@ ?>
          -

          +

          - +
          - + - + - +
          - +
          - +
          - - - + + +
          -

          +

          diff --git a/view/admin/users/delete_users.php b/view/admin/users/delete_users.php index b3b3c36e..a82c22ec 100644 --- a/view/admin/users/delete_users.php +++ b/view/admin/users/delete_users.php @@ -14,24 +14,24 @@ ?>
          -

          +

          - +
          -

          +

          - +
          -

          +

          -

          +

          diff --git a/view/admin/users/find_users.php b/view/admin/users/find_users.php index bf05ced4..cf547cc5 100644 --- a/view/admin/users/find_users.php +++ b/view/admin/users/find_users.php @@ -16,9 +16,9 @@
            -
          • -
          • » 
          • -
          • » 
          • +
          • +
          • » 
          • +
          • » 
          @@ -31,19 +31,19 @@
          -

          +

          - - - - - - - + + + + + + + @@ -82,17 +82,17 @@
          -

            -
          • -
          • » 
          • -
          • » 
          • +
          • +
          • » 
          • +
          • » 
          diff --git a/view/admin/users/move_users.php b/view/admin/users/move_users.php index 9b785654..d43303e8 100644 --- a/view/admin/users/move_users.php +++ b/view/admin/users/move_users.php @@ -14,32 +14,32 @@ ?>
          -

          +

          - +
          - +
          - +
          -

          +

          diff --git a/view/admin/users/search_ip.php b/view/admin/users/search_ip.php index 0fbb89f8..a17e7ac5 100644 --- a/view/admin/users/search_ip.php +++ b/view/admin/users/search_ip.php @@ -16,9 +16,9 @@
            -
          • -
          • » 
          • -
          • » 
          • +
          • +
          • » 
          • +
          • » 
          @@ -28,16 +28,16 @@
          -

          +

          - - - - + + + + @@ -48,7 +48,7 @@ - +

            -
          • -
          • » 
          • -
          • » 
          • +
          • +
          • » 
          • +
          • » 
          diff --git a/view/admin/users/show_users.php b/view/admin/users/show_users.php index f93dba7a..4ab008c7 100644 --- a/view/admin/users/show_users.php +++ b/view/admin/users/show_users.php @@ -16,9 +16,9 @@
            -
          • -
          • » 
          • -
          • » 
          • +
          • +
          • » 
          • +
          • » 
          @@ -28,18 +28,18 @@
          -

          +

          - - - - - - + + + + + + @@ -65,7 +65,7 @@ - + @@ -91,9 +91,9 @@
            -
          • -
          • » 
          • -
          • » 
          • +
          • +
          • » 
          • +
          • » 
          diff --git a/view/delete.php b/view/delete.php index 65f2440b..8a2d6959 100644 --- a/view/delete.php +++ b/view/delete.php @@ -16,26 +16,26 @@
            -
          • +
          • » 
          • » 
          • -
          • » 
          • +
          • » 
          -

          +

          '.feather_escape($cur_post['poster']).'', format_time($cur_post['posted'])) ?>

          -

          '.__('Topic warning').'' : ''.__('Warning').'' ?>

          +

          '.__('Topic warning').'' : ''.__('Warning').'' ?>

          -

          +

          diff --git a/view/edit.php b/view/edit.php index 8f2fe702..7b6234bd 100644 --- a/view/edit.php +++ b/view/edit.php @@ -19,10 +19,10 @@
            -
          • +
          • » 
          • » 
          • -
          • » 
          • +
          • » 
          @@ -33,10 +33,10 @@ if (!empty($errors)) : ?>
          -

          +

          -

          +

            request->post('preview')): ?>
            -

            +

            @@ -75,25 +75,25 @@
            -

            +

            - +
            -
            @@ -103,7 +103,7 @@ ?>
            - +
            @@ -114,7 +114,7 @@ -

            +

            \ No newline at end of file diff --git a/view/footer.php b/view/footer.php index 6d9b7934..f4b79085 100644 --- a/view/footer.php +++ b/view/footer.php @@ -11,7 +11,7 @@
            -

            +

            - + <?php echo generate_page_title($page_title, $p) ?> @@ -55,7 +55,7 @@ function process_form(the_form) var elem = the_form.elements[i]; if (elem.name && required_fields[elem.name] && !elem.value && elem.type && (/^(?:text(?:area)?|password|file)$/i.test(elem.type))) { - alert('"' + required_fields[elem.name] + '" '); + alert('"' + required_fields[elem.name] + '" '); elem.focus(); return false; } @@ -92,7 +92,7 @@ function process_form(the_form) user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?>
            -

            +

            @@ -104,7 +104,7 @@ function process_form(the_form)
            -

            ×

            +

            ×

            diff --git a/view/help.php b/view/help.php index a7f9300d..b5477db4 100644 --- a/view/help.php +++ b/view/help.php @@ -14,113 +14,113 @@ ?> -

            +

            -

            -

            +

            +

            -

            +

            -

            -

            [b][/b]

            -

            [u][/u]

            -

            [i][/i]

            -

            [s][/s]

            -

            [del][/del]

            -

            [ins][/ins]

            -

            [em][/em]

            -

            [color=#FF0000][/color]

            -

            [color=blue][/color]

            -

            [h][/h]

            +

            +

            [b][/b]

            +

            [u][/u]

            +

            [i][/i]

            +

            [s][/s]

            +

            [del][/del]

            +

            [ins][/ins]

            +

            [em][/em]

            +

            [color=#FF0000][/color]

            +

            [color=blue][/color]

            +

            [h][/h]

            -

            +

            -

            -

            [url=][/url]

            -

            [url][/url]

            -

            [url=/help/][/url]

            -

            [email]myname@example.com[/email] myname@example.com

            -

            [email=myname@example.com][/email]

            -

            [topic=1][/topic]

            -

            [topic]1[/topic]

            -

            [post=1][/post]

            -

            [post]1[/post]

            -

            [forum=1][/forum]

            -

            [forum]1[/forum]

            -

            [user=2][/user]

            -

            [user]2[/user]

            +

            +

            [url=][/url]

            +

            [url][/url]

            +

            [url=/help/][/url]

            +

            [email]myname@example.com[/email] myname@example.com

            +

            [email=myname@example.com][/email]

            +

            [topic=1][/topic]

            +

            [topic]1[/topic]

            +

            [post=1][/post]

            +

            [post]1[/post]

            +

            [forum=1][/forum]

            +

            [forum]1[/forum]

            +

            [user=2][/user]

            +

            [user]2[/user]

            -

            -

            [img=]/img/test.png[/img] <?php echo __('FluxBB bbcode test') ?>

            +

            +

            [img=]/img/test.png[/img] <?php _e('FluxBB bbcode test') ?>

            -

            +

            -

            -

            [quote=James][/quote]

            -

            +

            +

            [quote=James][/quote]

            +

            -
            James

            +
            James

            -

            -

            [quote][/quote]

            -

            +

            +

            [quote][/quote]

            +

            -

            +

            -

            +

            -

            +

            -

            -

            [code][/code]

            -

            +

            +

            [code][/code]

            +

            -
            +
            -

            +

            -

            -

            [list][*][/*][*][/*][*][/*][/list] -

            +

            +

            [list][*][/*][*][/*][*][/*][/list] +

            -
            +
            -

            [list=1][*][/*][*][/*][*][/*][/list] -

            +

            [list=1][*][/*][*][/*][*][/*][/list] +

            -
            +
            -

            [list=a][*][/*][*][/*][*][/*][/list] -

            +

            [list=a][*][/*][*][/*][*][/*][/list] +

            -
            +
            -

            +

            -

            -

            [b][u][/u][/b]

            +

            +

            [b][u][/u][/b]

            -

            +

            -

            +

            -

            +

            cid != $cur_cat) : @@ -33,10 +33,10 @@
                 
          - - - - + + + + @@ -80,17 +80,17 @@ endif; ?>
          -

          +

          -
          +
          '.forum_number_format($stats['total_users']).'') ?>
          '.forum_number_format($stats['total_topics']).'') ?>
          '.forum_number_format($stats['total_posts']).'') ?>
          -
          +
          '.forum_number_format($online['num_users']).'') ?>
          diff --git a/view/login/form.php b/view/login/form.php index fb8f2404..13d1744b 100644 --- a/view/login/form.php +++ b/view/login/form.php @@ -14,29 +14,29 @@ ?>
          -

          +

          - +
          - - + +
          - +
          -

          -

          +

          +

          -

          +

          \ No newline at end of file diff --git a/view/login/password_forgotten.php b/view/login/password_forgotten.php index 979b915c..41c0a121 100644 --- a/view/login/password_forgotten.php +++ b/view/login/password_forgotten.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
          -

          +

          -

          +

            -

            +

            - +
            - -

            + +

            -

            +

            \ No newline at end of file diff --git a/view/message.php b/view/message.php index d376bd09..740b040e 100644 --- a/view/message.php +++ b/view/message.php @@ -14,11 +14,11 @@ ?>
            -

            +

            -

            +

            diff --git a/view/misc/email.php b/view/misc/email.php index 7004040d..eb44dafb 100644 --- a/view/misc/email.php +++ b/view/misc/email.php @@ -14,24 +14,24 @@ ?>
            -

            +

            - +
            -
            -

            +

            \ No newline at end of file diff --git a/view/misc/report.php b/view/misc/report.php index 121feac2..252042c7 100644 --- a/view/misc/report.php +++ b/view/misc/report.php @@ -16,29 +16,29 @@
              -
            • +
            • » 
            • » 
            • -
            • » 
            • +
            • » 
            -

            +

            - +
            - +
            -

            +

            \ No newline at end of file diff --git a/view/misc/rules.php b/view/misc/rules.php index d32a805e..366880ee 100644 --- a/view/misc/rules.php +++ b/view/misc/rules.php @@ -14,7 +14,7 @@ ?>
            -

            +

            diff --git a/view/moderate/delete_posts.php b/view/moderate/delete_posts.php index 4b95a5f1..00b80920 100644 --- a/view/moderate/delete_posts.php +++ b/view/moderate/delete_posts.php @@ -14,20 +14,20 @@ ?>
            -

            +

            - +
            -

            +

            -

            +

            \ No newline at end of file diff --git a/view/moderate/delete_topics.php b/view/moderate/delete_topics.php index e414f734..d0ab1eed 100644 --- a/view/moderate/delete_topics.php +++ b/view/moderate/delete_topics.php @@ -15,20 +15,20 @@ ?>
            -

            +

            - +
            -

            +

            -

            +

            \ No newline at end of file diff --git a/view/moderate/merge_topics.php b/view/moderate/merge_topics.php index b55f586b..820cedee 100644 --- a/view/moderate/merge_topics.php +++ b/view/moderate/merge_topics.php @@ -15,22 +15,22 @@ ?>
            -

            +

            - +
            - +
            -

            +

            \ No newline at end of file diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index bf893ce4..35b67b41 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -17,9 +17,9 @@
              -
            • +
            • » 
            • -
            • » 
            • +
            • » 
            @@ -38,11 +38,11 @@
          - - - - - + + + + + @@ -87,13 +87,13 @@
          -

          /> /> /> /> />

          +

          /> /> /> /> />

            -
          • +
          • » 
          • -
          • » 
          • +
          • » 
          diff --git a/view/moderate/move_topics.php b/view/moderate/move_topics.php index 389f1f05..e72ae5cb 100644 --- a/view/moderate/move_topics.php +++ b/view/moderate/move_topics.php @@ -22,9 +22,9 @@
          - +
          -
          -

          +

          \ No newline at end of file diff --git a/view/moderate/posts_view.php b/view/moderate/posts_view.php index f957ce8f..482a1c49 100644 --- a/view/moderate/posts_view.php +++ b/view/moderate/posts_view.php @@ -16,10 +16,10 @@
            -
          • +
          • » 
          • » 
          • -
          • » 
          • +
          • » 
          @@ -53,7 +53,7 @@
          -

          +

          -

          /> />

          +

          /> />

            -
          • +
          • » 
          • » 
          • -
          • » 
          • +
          • » 
          diff --git a/view/moderate/split_posts.php b/view/moderate/split_posts.php index ac012ff3..7c59b0b9 100644 --- a/view/moderate/split_posts.php +++ b/view/moderate/split_posts.php @@ -14,27 +14,27 @@ ?>
          -

          +

          - +
          - -
          -

          +

          \ No newline at end of file diff --git a/view/post.php b/view/post.php index 0c341fd0..fbfd6840 100644 --- a/view/post.php +++ b/view/post.php @@ -17,7 +17,7 @@
            -
          • +
          • » 
          • request->post('req_subject')): ?>
          • » request->post('req_subject')) ?>
          • @@ -33,10 +33,10 @@ if (!empty($errors)) { ?>
            -

            +

            -

            +

              -

              +

              @@ -93,7 +93,7 @@
              - +
              @@ -102,7 +102,7 @@ $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - @@ -115,17 +115,17 @@ } if ($fid): ?> - -
              @@ -135,7 +135,7 @@
              - +
              @@ -151,14 +151,14 @@ user->is_guest) : ?>
              - +
              -

              +

              @@ -166,7 +166,7 @@
              -

              +

              @@ -176,7 +176,7 @@ if ($tid && $feather_config['o_topic_review'] != '0') : ?>
              -

              +

              -

              +

              - +
              - - -

              + + +

              -

              +

              \ No newline at end of file diff --git a/view/profile/change_pass.php b/view/profile/change_pass.php index 0f0ab452..3f4285fb 100644 --- a/view/profile/change_pass.php +++ b/view/profile/change_pass.php @@ -14,26 +14,26 @@ ?>
              -

              +

              - +
              -user->is_admmod): ?>
              -

              +

              \ No newline at end of file diff --git a/view/profile/delete_user.php b/view/profile/delete_user.php index d5d5bde2..0fd42f52 100644 --- a/view/profile/delete_user.php +++ b/view/profile/delete_user.php @@ -14,23 +14,23 @@ ?>
              -

              +

              - +
              -

              '.feather_escape($username).'.' ?>

              +

              '.feather_escape($username).'.' ?>

              - +
              -

              +

              -

              +

              \ No newline at end of file diff --git a/view/profile/menu.php b/view/profile/menu.php index e78d2c30..4627f8db 100644 --- a/view/profile/menu.php +++ b/view/profile/menu.php @@ -15,39 +15,39 @@ ?>
              -

              +

                > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
              diff --git a/view/profile/section_admin.php b/view/profile/section_admin.php index 52a0ad54..18ba2f12 100644 --- a/view/profile/section_admin.php +++ b/view/profile/section_admin.php @@ -25,9 +25,9 @@ if ($feather->user->g_moderator == '1') { ?> - +
              -

              +

              @@ -36,12 +36,12 @@ } else { if ($feather->user->id != $id) { ?> - +
              - +
              @@ -52,9 +52,9 @@ } ?> - +
              - +
              @@ -64,13 +64,13 @@ ?>
              - +
              -

              +

              -
              +
              diff --git a/view/profile/section_display.php b/view/profile/section_display.php index 506dd146..5da0f4b4 100644 --- a/view/profile/section_display.php +++ b/view/profile/section_display.php @@ -30,9 +30,9 @@ ?>
              - +
              - +} ?> />
              +} ?> />
              +} ?> />
              +} ?> />
              @@ -85,15 +85,15 @@
              - +
              - - -

              + + +

              -

              +

            diff --git a/view/profile/section_essentials.php b/view/profile/section_essentials.php index 4f507a8c..0050f89c 100644 --- a/view/profile/section_essentials.php +++ b/view/profile/section_essentials.php @@ -20,17 +20,17 @@
            - +
            -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

            +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

            - +
            @@ -38,139 +38,139 @@
            - +
            -

            -
            diff --git a/view/profile/section_messaging.php b/view/profile/section_messaging.php index 148a78cf..d944ee43 100644 --- a/view/profile/section_messaging.php +++ b/view/profile/section_messaging.php @@ -20,18 +20,18 @@
            - +
            - - - - - + + + + +
            -

            +

          diff --git a/view/profile/section_personal.php b/view/profile/section_personal.php index 7358bc85..a765e0aa 100644 --- a/view/profile/section_personal.php +++ b/view/profile/section_personal.php @@ -20,18 +20,18 @@
          - +
          - + - -user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?> + +user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?>
          -

          +

          diff --git a/view/profile/section_personality.php b/view/profile/section_personality.php index 9bd9440b..3624e5e6 100644 --- a/view/profile/section_personality.php +++ b/view/profile/section_personality.php @@ -21,34 +21,34 @@
          - +
          -

          +

          - +
          -

          +

          -

          +

          diff --git a/view/profile/section_privacy.php b/view/profile/section_privacy.php index 6c1ab357..36930415 100644 --- a/view/profile/section_privacy.php +++ b/view/profile/section_privacy.php @@ -20,41 +20,41 @@
          - +
          -

          +

          +} ?> />
          +} ?> />
          +} ?> />
          - +
          +} ?> />
          +} ?> />
          -

          +

          diff --git a/view/profile/upload_avatar.php b/view/profile/upload_avatar.php index 3f74f092..4131569c 100644 --- a/view/profile/upload_avatar.php +++ b/view/profile/upload_avatar.php @@ -14,22 +14,22 @@ ?>
          -

          +

          - +
          - -

          + +

          -

          +

          \ No newline at end of file diff --git a/view/profile/view_profile.php b/view/profile/view_profile.php index ad1c5959..d30181fd 100644 --- a/view/profile/view_profile.php +++ b/view/profile/view_profile.php @@ -14,12 +14,12 @@ ?>
          -

          +

          - +
          @@ -30,7 +30,7 @@
          - +
          @@ -41,7 +41,7 @@
          - +
          @@ -52,7 +52,7 @@
          - +
          diff --git a/view/register/email.php b/view/register/email.php index 9f9b3424..e26ad690 100644 --- a/view/register/email.php +++ b/view/register/email.php @@ -15,25 +15,25 @@ ?>
          -

          +

          - +
          -
          -

          +

          \ No newline at end of file diff --git a/view/register/form.php b/view/register/form.php index fa2d2457..f1a360ef 100644 --- a/view/register/form.php +++ b/view/register/form.php @@ -16,10 +16,10 @@ if (!empty($errors)) { ?>
          -

          +

          -

          +

            -

            +

            -

            -

            -

            +

            +

            +

            - +
            -
            @@ -61,15 +61,15 @@
            - +
            - - -

            +

            @@ -77,12 +77,12 @@
            -

            -
            \ No newline at end of file diff --git a/view/register/rules.php b/view/register/rules.php index 3a2fd06c..cef62405 100644 --- a/view/register/rules.php +++ b/view/register/rules.php @@ -15,18 +15,18 @@ ?>
            -

            +

            - +
            -

            +

            \ No newline at end of file diff --git a/view/search/footer.php b/view/search/footer.php index a64e1cdf..a73ed5aa 100644 --- a/view/search/footer.php +++ b/view/search/footer.php @@ -30,7 +30,7 @@
              -
            • +
            • » 
            • » 
            diff --git a/view/search/form.php b/view/search/form.php index bb39c614..4731b068 100644 --- a/view/search/form.php +++ b/view/search/form.php @@ -14,66 +14,66 @@ ?>
            -

            +

            - +
            - - -

            + + +

            - +
            -
            - +
            -
            -

            +

            \ No newline at end of file diff --git a/view/search/header.php b/view/search/header.php index 909a2108..01af597a 100644 --- a/view/search/header.php +++ b/view/search/header.php @@ -16,7 +16,7 @@
              -
            • +
            • » 
            • » 
            @@ -31,16 +31,16 @@ if ($search['show_as'] == 'topics') : ?>
            -

            +

          - - - - + + + + diff --git a/view/search/posts.php b/view/search/posts.php index 872c349e..c575f9c2 100644 --- a/view/search/posts.php +++ b/view/search/posts.php @@ -21,7 +21,7 @@ echo ' '.$cur_search['item_status']; } ?>">

          # »  » 

          @@ -29,7 +29,7 @@
          -
          +
          @@ -46,8 +46,8 @@
            -
          • -
          • +
          • +
          diff --git a/view/userlist.php b/view/userlist.php index 0bbedae6..26c24027 100644 --- a/view/userlist.php +++ b/view/userlist.php @@ -14,50 +14,50 @@ ?>
          -

          +

          - +
          -user->g_search_users == '1'): ?> -
          -

          +

          @@ -70,16 +70,16 @@
          -

          +

          - - - - + + + + diff --git a/view/viewforum.php b/view/viewforum.php index b9d04a1d..a35faf22 100644 --- a/view/viewforum.php +++ b/view/viewforum.php @@ -16,7 +16,7 @@
            -
          • +
          • » 
          @@ -34,10 +34,10 @@
          - - - - + + + + @@ -70,7 +70,7 @@
          - +
          @@ -91,7 +91,7 @@
            -
          • +
          • » 
          '.implode(' - ', $forum_actions).'

          '."\n" : '') ?> diff --git a/view/viewtopic.php b/view/viewtopic.php index 16535ff1..95de6a99 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -17,7 +17,7 @@
            -
          • +
          • » 
          • » 
          @@ -64,7 +64,7 @@

          @@ -107,7 +107,7 @@
            -
          • +
          • » 
          • » 
          @@ -124,13 +124,13 @@ ?>
          -

          +

          - +
          @@ -142,7 +142,7 @@ $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
          ">
          @@ -179,15 +179,15 @@ user->is_guest) : ?>
          - +
          -

          +

          @@ -196,7 +196,7 @@
          -

          +

          From 6416c3b2199e91a7c6fd4df5c53fba81d6bd1288 Mon Sep 17 00:00:00 2001 From: beaver Date: Thu, 13 Aug 2015 23:32:06 +0200 Subject: [PATCH 036/353] Use POMO as language manager for BBcode editor. --- controller/post.php | 21 +++++++++++++++++++++ controller/viewtopic.php | 20 ++++++++++++++++++++ style/FeatherBB/view/post.php | 3 +-- style/FeatherBB/view/viewtopic.php | 1 - view/post.php | 3 +-- view/viewtopic.php | 1 - 6 files changed, 43 insertions(+), 6 deletions(-) diff --git a/controller/post.php b/controller/post.php index 99616fa1..298e8b15 100644 --- a/controller/post.php +++ b/controller/post.php @@ -24,6 +24,7 @@ public function __construct() load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.mo'); } public function __autoload($class_name) @@ -196,6 +197,25 @@ public function newpost($fid = null, $tid = null, $qid = null) $post_data = ''; } + $lang_bbeditor = array( + 'btnBold' => __('btnBold'), + 'btnItalic' => __('btnItalic'), + 'btnUnderline' => __('btnUnderline'), + 'btnColor' => __('btnColor'), + 'btnLeft' => __('btnLeft'), + 'btnRight' => __('btnRight'), + 'btnJustify' => __('btnJustify'), + 'btnCenter' => __('btnCenter'), + 'btnLink' => __('btnLink'), + 'btnPicture' => __('btnPicture'), + 'btnList' => __('btnList'), + 'btnQuote' => __('btnQuote'), + 'btnCode' => __('btnCode'), + 'promptImage' => __('promptImage'), + 'promptUrl' => __('promptUrl'), + 'promptQuote' => __('promptQuote') + ); + $this->feather->render('post.php', array( 'post' => $post, 'tid' => $tid, @@ -205,6 +225,7 @@ public function newpost($fid = null, $tid = null, $qid = null) 'cur_posting' => $cur_posting, 'lang_antispam' => $lang_antispam, 'lang_antispam_questions' => $lang_antispam_questions, + 'lang_bbeditor' => $lang_bbeditor, 'index_questions' => $index_questions, 'checkboxes' => $checkboxes, 'cur_posting' => $cur_posting, diff --git a/controller/viewtopic.php b/controller/viewtopic.php index 3cede850..6c8f6901 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -98,6 +98,25 @@ public function display($id = null, $name = null, $page = null, $pid = null) require FEATHER_ROOT.'include/parser.php'; + $lang_bbeditor = array( + 'btnBold' => __('btnBold'), + 'btnItalic' => __('btnItalic'), + 'btnUnderline' => __('btnUnderline'), + 'btnColor' => __('btnColor'), + 'btnLeft' => __('btnLeft'), + 'btnRight' => __('btnRight'), + 'btnJustify' => __('btnJustify'), + 'btnCenter' => __('btnCenter'), + 'btnLink' => __('btnLink'), + 'btnPicture' => __('btnPicture'), + 'btnList' => __('btnList'), + 'btnQuote' => __('btnQuote'), + 'btnCode' => __('btnCode'), + 'promptImage' => __('promptImage'), + 'promptUrl' => __('promptUrl'), + 'promptQuote' => __('promptQuote') + ); + $this->feather->render('viewtopic.php', array( 'id' => $id, 'p' => $p, @@ -114,6 +133,7 @@ public function display($id = null, $name = null, $page = null, $pid = null) 'quickpost' => $quickpost, 'index_questions' => $index_questions, 'lang_antispam_questions' => $lang_antispam_questions, + 'lang_bbeditor' => $lang_bbeditor, 'url_forum' => $url_forum, 'url_topic' => $url_topic, 'feather' => $this->feather, diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php index fbfd6840..f1d22d07 100644 --- a/style/FeatherBB/view/post.php +++ b/style/FeatherBB/view/post.php @@ -80,10 +80,9 @@ ?> - diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php index 95de6a99..e2681757 100644 --- a/style/FeatherBB/view/viewtopic.php +++ b/style/FeatherBB/view/viewtopic.php @@ -154,7 +154,6 @@ ?> - diff --git a/view/viewtopic.php b/view/viewtopic.php index 95de6a99..e2681757 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -154,7 +154,6 @@ ?> -
          diff --git a/view/edit.php b/view/edit.php index 7b6234bd..2c926634 100644 --- a/view/edit.php +++ b/view/edit.php @@ -9,7 +9,7 @@ // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { - exit; + exit; } $cur_index = 1; @@ -17,104 +17,103 @@ ?>
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          • » 
          • -
          -
          +
          +
            +
          • +
          • » 
          • +
          • » 
          • +
          • » 
          • +
          +
          -
          -

          -
          -
          -

          -
            - '.$cur_error.''."\n"; - } - ?> -
          -
          -
          -
          - +
          +

          +
          +
          +

          +
            + '.$cur_error.''."\n"; + } + ?> +
          +
          +
          +
          + request->post('preview')): - ?> -
          -

          -
          -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          - +
          +

          +
          +
          +
          +
          +
          + +
          +
          +
          +
          +
          +
          + -
          -

          -
          -
          - -
          -
          - - -
          - - - -
          -
          -
          - -
          -
          - -
          -
          - -
          -
          -
          -
          - -

          - -
          +

          +
          +
          + +
          +
          + + +
          + + + +
          +
          +
          + +
          +
          + +
          +
          + +
          +
          +
          +
          + +

          + +
          \ No newline at end of file From 675950ef42a72290b1c7d25eaab38ea64c03a170 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 14 Aug 2015 11:45:39 +0200 Subject: [PATCH 038/353] Remove old requires for lang files --- extern.php | 4 ---- model/moderate.php | 9 --------- model/post.php | 4 ---- model/profile.php | 3 --- model/register.php | 2 +- 5 files changed, 1 insertion(+), 21 deletions(-) diff --git a/extern.php b/extern.php index c91490d2..1229f8db 100644 --- a/extern.php +++ b/extern.php @@ -645,8 +645,6 @@ function output_html($feed) // Show users online elseif ($action == 'online' || $action == 'online_full') { - // Load the index.php language file - require FEATHER_ROOT.'lang/'.$feather_config['o_default_lang'].'/index.php'; // Fetch users online info and generate strings for output $num_guests = $num_users = 0; @@ -690,8 +688,6 @@ function output_html($feed) // Show board statistics elseif ($action == 'stats') { - // Load the index.php language file - require FEATHER_ROOT.'lang/'.$feather_config['o_default_lang'].'/index.php'; // Collect some statistics from the database if (file_exists(FORUM_CACHE_DIR.'cache_users_info.php')) { diff --git a/model/moderate.php b/model/moderate.php index df7fe2d8..210d649b 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -24,9 +24,6 @@ public function __construct() public function display_ip_info($ip) { - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - message(sprintf(__('Host info 1'), $ip).'
          '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

          '.__('Show more users').''); } @@ -42,9 +39,6 @@ public function display_ip_address_post($pid) message(__('Bad request'), '404'); } - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - message(sprintf(__('Host info 1'), $ip).'
          '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

          '.__('Show more users').''); } @@ -207,9 +201,6 @@ public function split_posts($tid, $fid, $p = null) message(__('Bad request'), '404'); } - // Load the post.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/post.php'; - // Check subject $new_subject = $this->request->post('new_subject') ? feather_trim($this->request->post('new_subject')) : ''; diff --git a/model/post.php b/model/post.php index 0c55d616..62724236 100644 --- a/model/post.php +++ b/model/post.php @@ -134,10 +134,6 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) if ($this->user->is_guest) { $email = strtolower(feather_trim(($this->config['p_force_guest_email'] == '1') ? $this->request->post('req_email') : $this->request->post('email'))); - // Load the register.php/prof_reg.php language files - require FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.php'; - require FEATHER_ROOT.'lang/'.$this->user->language.'/register.php'; - if ($this->config['p_force_guest_email'] == '1' || $email != '') { require FEATHER_ROOT.'include/email.php'; if (!is_valid_email($email)) { diff --git a/model/profile.php b/model/profile.php index 49e8fe69..7fee36e6 100644 --- a/model/profile.php +++ b/model/profile.php @@ -702,9 +702,6 @@ public function update_profile($id, $info, $section) $form['username'] = feather_trim($this->request->post('req_username')); if ($form['username'] != $info['old_username']) { - // Check username - require FEATHER_ROOT.'lang/'.$this->user->language.'/register.php'; - $errors = ''; $errors = check_username($form['username'], $errors, $id); if (!empty($errors)) { diff --git a/model/register.php b/model/register.php index d88001fd..68f27844 100644 --- a/model/register.php +++ b/model/register.php @@ -111,7 +111,7 @@ public function check_for_errors() // Make sure we got a valid language string if ($this->request->post('language')) { $user['language'] = preg_replace('%[\.\\\/]%', '', $this->request->post('language')); - if (!file_exists(FEATHER_ROOT.'lang/'.$user['language'].'/common.php')) { + if (!file_exists(FEATHER_ROOT.'lang/'.$user['language'].'/common.po')) { message(__('Bad request'), '404'); } } else { From ff0c067fb8dfc064fdda3f3f246b9305d1219f09 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 14 Aug 2015 12:01:43 +0200 Subject: [PATCH 039/353] Load more lang files --- controller/moderate.php | 1 + controller/post.php | 1 + controller/profile.php | 1 + extern.php | 11 ++++++++++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/controller/moderate.php b/controller/moderate.php index 0baeedd6..b1e7a889 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -24,6 +24,7 @@ public function __construct() load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/misc.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); } public function __autoload($class_name) diff --git a/controller/post.php b/controller/post.php index 298e8b15..2dcb6498 100644 --- a/controller/post.php +++ b/controller/post.php @@ -23,6 +23,7 @@ public function __construct() $this->model = new \model\post(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.mo'); } diff --git a/controller/profile.php b/controller/profile.php index 3ffe0031..68895ab9 100644 --- a/controller/profile.php +++ b/controller/profile.php @@ -22,6 +22,7 @@ public function __construct() $this->footer = new \controller\footer(); $this->model = new \model\profile(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/profile.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); } diff --git a/extern.php b/extern.php index 1229f8db..50f9bb09 100644 --- a/extern.php +++ b/extern.php @@ -68,9 +68,18 @@ // Instantiate Slim $feather = new \Slim\Slim(); -require FEATHER_ROOT.'include/common.php'; +// Load the config +require 'include/config.php'; + +// Load middlewares +$feather->add(new \Slim\Extras\Middleware\CsrfGuard('featherbb_csrf')); // CSRF +$feather->add(new \Slim\Extras\Middleware\FeatherBB($feather_user_settings)); // FeatherBB + +$feather->config('cookies.encrypt', true); +$feather->config('debug', true); // As long as we're developing FeatherBB load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/common.mo'); +load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/index.mo'); // The length at which topic subjects will be truncated (for HTML output) if (!defined('FORUM_EXTERN_MAX_SUBJECT_LENGTH')) { From 2d9e98fa95f39d81ec3c21b43c84ac8e79bd2718 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 14 Aug 2015 12:10:18 +0200 Subject: [PATCH 040/353] Fix po files --- controller/viewtopic.php | 2 +- model/viewtopic.php | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/controller/viewtopic.php b/controller/viewtopic.php index 6c8f6901..88fb8980 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -21,9 +21,9 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\viewtopic(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); } public function __autoload($class_name) diff --git a/model/viewtopic.php b/model/viewtopic.php index 61cdfe66..1ba4caf9 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -53,7 +53,6 @@ public function redirect_to_post($post_id) // Redirects to new posts or last post public function handle_actions($topic_id, $action) { - // If action=new, we redirect to the first new post (if any) if ($action == 'new') { if (!$this->user->is_guest) { @@ -92,8 +91,6 @@ public function handle_actions($topic_id, $action) // Gets some info about the topic public function get_info_topic($id) { - - $where_get_info_topic = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') From c5b4a0a71a7c77b582916887a90204fc1a4ec576 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 14 Aug 2015 12:11:34 +0200 Subject: [PATCH 041/353] Remove useless requires --- controller/misc.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/controller/misc.php b/controller/misc.php index 7ecadf0a..be6c2e2e 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -83,9 +83,6 @@ public function subscribeforum($id) message(__('No permission'), '403'); } - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - $this->model->subscribe_forum($id); } @@ -95,9 +92,6 @@ public function subscribetopic($id) message(__('No permission'), '403'); } - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - $this->model->subscribe_topic($id); } @@ -107,9 +101,6 @@ public function unsubscribeforum($id) message(__('No permission'), '403'); } - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - $this->model->unsubscribe_forum($id); } @@ -119,9 +110,6 @@ public function unsubscribetopic($id) message(__('No permission'), '403'); } - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - $this->model->unsubscribe_topic($id); } @@ -135,9 +123,6 @@ public function email($id) message(__('Bad request'), '404'); } - // Load the misc.php language file - require FEATHER_ROOT.'lang/'.$this->user->language.'/misc.php'; - $mail = $this->model->get_info_mail($id); if ($mail['email_setting'] == 2 && !$this->user->is_admmod) { From 06e17f136499f035fbada6600b0d571aea453411 Mon Sep 17 00:00:00 2001 From: beaver Date: Fri, 14 Aug 2015 16:23:46 +0200 Subject: [PATCH 042/353] New config file generator. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Everything’s fine, except when adding a prefix to tables. See later with FeatherBB middleware TODO line 47 ? --- index.php | 1 + install/index.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 39db116a..cc432991 100644 --- a/index.php +++ b/index.php @@ -11,6 +11,7 @@ session_cache_limiter(false); session_start(); error_reporting(E_ALL); // Let's report everything for development +ini_set('display_errors', 1); // Load Slim Framework require 'Slim/Slim.php'; diff --git a/install/index.php b/install/index.php index da804d25..f069b5d8 100644 --- a/install/index.php +++ b/install/index.php @@ -195,7 +195,7 @@ function generate_config_file() { global $db_type, $db_host, $db_name, $db_username, $db_password, $db_prefix, $cookie_name, $cookie_seed; - return ' \''.$db_type."',\n\t".'\'db_host\' => \''.$db_host."',\n\t".'\'db_name\' => \''.addslashes($db_name)."',\n\t".'\'db_user\' => \''.addslashes($db_username)."',\n\t".'\'db_pass\' => \''.addslashes($db_password)."',\n\t".'\'db_prefix\' => \''.addslashes($db_prefix)."'\n);\n\n".'$p_connect = false;'."\n\n".'$cookie_name = '."'".$cookie_name."';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n".'$cookie_seed = \''.random_key(16, false, true)."';\n"; } @@ -609,7 +609,7 @@ function process_form(the_form) case 'sqlite': require FEATHER_ROOT.'install/dblayer/sqlite.php'; break; - + case 'sqlite3': require FEATHER_ROOT.'install/dblayer/sqlite3.php'; break; From 89e2302f7b5d4e587403f467365d707d79a292d0 Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 12:28:33 +0200 Subject: [PATCH 043/353] Fix translation conflict --- controller/viewtopic.php | 2 +- lang/English/topic.mo | Bin 1475 -> 1487 bytes lang/English/topic.po | 4 ++-- model/viewtopic.php | 8 +++----- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/controller/viewtopic.php b/controller/viewtopic.php index 88fb8980..839ccea0 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -21,9 +21,9 @@ public function __construct() $this->header = new \controller\header(); $this->footer = new \controller\footer(); $this->model = new \model\viewtopic(); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); } public function __autoload($class_name) diff --git a/lang/English/topic.mo b/lang/English/topic.mo index 680eb6f72a32f79359530e4da6cac94432ef590e..b5dbc93c8358f0e216f8001e84e2d1a83cfc13cb 100644 GIT binary patch delta 443 zcmYk&ze>YU6vy%7P5;G2TMMmyH7avgxUQh|% zP=!B{4@-*fVTGwnO>>mwDx&_{7IXd5A3KPBcd~jZ$z0{BD(}Y^?kRVCeKooq#6PZ? JE+-{#;+9NZBcA{O delta 433 zcmXZYzfQtX6vy%7Ed^^)0aJz8!N}H)iN%F5k`P88z{$Y}aOvP?985aOBnuM^xH+1z zIx;!>0I);&{z`A|?dSeEJ?FN+;ZOMfmilJ4a%L6$!z%vc32sp5Tcn%k9rnwp_&S!c zg#q56-cK;ZE-J2%qa(8cDt=rtquZopXQ6?4;8pY zB~DNm?-c91;=GT#*Z_60d!*ZgpYl~q9*ct~RDowy!WX>4S5$&eRDwCG@Hg^ddC?}e w7;3sSM|m!-Ym8G(XwiZEkDX_MYe(0`jxt{|RN1ng`^biVob6n55qk@_2gOt$YybcN diff --git a/lang/English/topic.po b/lang/English/topic.po index 4f143767..bca23a6f 100644 --- a/lang/English/topic.po +++ b/lang/English/topic.po @@ -32,10 +32,10 @@ msgstr "IP address logged" msgid "Note" msgstr "Note:" -msgid "Posts" +msgid "Posts topic" msgstr "Posts:" -msgid "Registered" +msgid "Registered topic" msgstr "Registered:" msgid "Replies" diff --git a/model/viewtopic.php b/model/viewtopic.php index 1ba4caf9..827b5596 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -21,7 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + // Redirects to a post in particular public function redirect_to_post($post_id) { @@ -159,8 +159,6 @@ public function get_post_link($topic_id, $closed, $post_replies, $is_admmod) // Should we display the quickpost? public function is_quickpost($post_replies, $closed, $is_admmod) { - - $quickpost = false; if ($this->config['o_quickpost'] == '1' && ($post_replies == '1' || ($post_replies == '' && $this->user->g_post_replies == '1')) && ($closed == '0' || $is_admmod)) { @@ -303,10 +301,10 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) $cur_post['user_info'][] = '
          '.__('From').' '.feather_escape($cur_post['location']).'
          '; } - $cur_post['user_info'][] = '
          '.__('Registered').' '.format_time($cur_post['registered'], true).'
          '; + $cur_post['user_info'][] = '
          '.__('Registered topic').' '.format_time($cur_post['registered'], true).'
          '; if ($this->config['o_show_post_count'] == '1' || $this->user->is_admmod) { - $cur_post['user_info'][] = '
          '.__('Posts').' '.forum_number_format($cur_post['num_posts']).'
          '; + $cur_post['user_info'][] = '
          '.__('Posts topic').' '.forum_number_format($cur_post['num_posts']).'
          '; } // Now let's deal with the contact links (Email and URL) From 8ab730890ca2ddccd768df43a3ec32ec3f411b3a Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 12:28:48 +0200 Subject: [PATCH 044/353] Rebrand the translator --- include/l10n.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/l10n.php b/include/l10n.php index ce27af92..0c155dcd 100644 --- a/include/l10n.php +++ b/include/l10n.php @@ -39,12 +39,12 @@ function load_textdomain($domain, $mofile) { function __($text, $domain = 'featherbb') { - return luna_translate($text, $domain); + return feather_translate($text, $domain); } function _e($text, $domain = 'featherbb') { - echo luna_translate($text, $domain); + echo feather_translate($text, $domain); } function _n($single, $plural, $number, $domain = 'featherbb') { @@ -55,7 +55,7 @@ function _n($single, $plural, $number, $domain = 'featherbb') { return $translation; } -function luna_translate($text, $domain = 'featherbb') { +function feather_translate($text, $domain = 'featherbb') { $translations = load_translations($domain); $translations = $translations->translate($text); From 6f7989096f9abd54889affafeb69d35186013a2a Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 12:31:24 +0200 Subject: [PATCH 045/353] Rewrite old link --- model/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/viewtopic.php b/model/viewtopic.php index 827b5596..c84d7105 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -343,7 +343,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) $cur_post['user_title_formatted'] = get_title($cur_post); if ($this->user->is_admmod) { - $cur_post['user_info'][] = '
          '.__('IP address logged').'
          '; + $cur_post['user_info'][] = '
          '.__('IP address logged').'
          '; } if ($this->config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$this->user->is_guest && $this->user->g_send_email == '1') { From 60d0b90a694b26b39f60a6e759a9c1b0e44b71e0 Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 12:38:48 +0200 Subject: [PATCH 046/353] Refactor functions.php --- Slim/Extras/Middleware/FeatherBB.php | 108 +++++++++++++++++++++- include/functions.php | 128 --------------------------- 2 files changed, 106 insertions(+), 130 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index d6b6a3f3..3d46232d 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -318,6 +318,110 @@ public function update_online() } } + public function update_users_online() + { + global $feather_config; + + $now = time(); + + // Fetch all online list entries that are older than "o_timeout_online" + $select_update_users_online = array('user_id', 'ident', 'logged', 'idle'); + + $result = \DB::for_table('online')->select_many($select_update_users_online) + ->where_lt('logged', $now-$feather_config['o_timeout_online']) + ->find_many(); + + foreach ($result as $cur_user) { + // If the entry is a guest, delete it + if ($cur_user['user_id'] == '1') { + \DB::for_table('online')->where('ident', $cur_user['ident']) + ->delete_many(); + } else { + // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list + if ($cur_user['logged'] < ($now-$feather_config['o_timeout_visit'])) { + \DB::for_table('users')->where('id', $cur_user['user_id']) + ->find_one() + ->set('last_visit', $cur_user['logged']) + ->save(); + \DB::for_table('online')->where('user_id', $cur_user['user_id']) + ->delete_many(); + } elseif ($cur_user['idle'] == '0') { + \DB::for_table('online')->where('user_id', $cur_user['user_id']) + ->update_many('idle', 1); + } + } + } + } + + public function check_bans() + { + global $feather_config, $feather_bans; + + // Get Slim current session + $feather = \Slim\Slim::getInstance(); + + // Admins and moderators aren't affected + if ($feather->user->is_admmod || !$feather_bans) { + return; + } + + // Add a dot or a colon (depending on IPv4/IPv6) at the end of the IP address to prevent banned address + // 192.168.0.5 from matching e.g. 192.168.0.50 + $user_ip = get_remote_address(); + $user_ip .= (strpos($user_ip, '.') !== false) ? '.' : ':'; + + $bans_altered = false; + $is_banned = false; + + foreach ($feather_bans as $cur_ban) { + // Has this ban expired? + if ($cur_ban['expire'] != '' && $cur_ban['expire'] <= time()) { + \DB::for_table('bans')->where('id', $cur_ban['id']) + ->delete_many(); + $bans_altered = true; + continue; + } + + if ($cur_ban['username'] != '' && utf8_strtolower($feather->user->username) == utf8_strtolower($cur_ban['username'])) { + $is_banned = true; + } + + if ($cur_ban['ip'] != '') { + $cur_ban_ips = explode(' ', $cur_ban['ip']); + + $num_ips = count($cur_ban_ips); + for ($i = 0; $i < $num_ips; ++$i) { + // Add the proper ending to the ban + if (strpos($user_ip, '.') !== false) { + $cur_ban_ips[$i] = $cur_ban_ips[$i].'.'; + } else { + $cur_ban_ips[$i] = $cur_ban_ips[$i].':'; + } + + if (substr($user_ip, 0, strlen($cur_ban_ips[$i])) == $cur_ban_ips[$i]) { + $is_banned = true; + break; + } + } + } + + if ($is_banned) { + \DB::for_table('online')->where('ident', $feather->user->username) + ->delete_many(); + message(__('Ban message').' '.(($cur_ban['expire'] != '') ? __('Ban message 2').' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? __('Ban message 3').'

          '.feather_escape($cur_ban['message']).'

          ' : '

          ').__('Ban message 4').' '.feather_escape($feather_config['o_admin_email']).'.', true, true, true); + } + } + + // If we removed any expired bans during our run-through, we need to regenerate the bans cache + if ($bans_altered) { + if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { + require FEATHER_ROOT.'include/cache.php'; + } + + generate_bans_cache(); + } + } + // public function call() @@ -394,10 +498,10 @@ public function call() } // Check if current user is banned - check_bans(); + $this->check_bans(); // Update online list - update_users_online(); + $this->update_users_online(); // Configure Slim $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); diff --git a/include/functions.php b/include/functions.php index e02b7f2f..28fb1c8a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -127,79 +127,6 @@ function feather_setcookie($user_id, $password, $expires) } -// -// Check whether the connecting user is banned (and delete any expired bans while we're at it) -// -function check_bans() -{ - global $feather_config, $feather_bans; - - // Get Slim current session - $feather = \Slim\Slim::getInstance(); - - // Admins and moderators aren't affected - if ($feather->user->is_admmod || !$feather_bans) { - return; - } - - // Add a dot or a colon (depending on IPv4/IPv6) at the end of the IP address to prevent banned address - // 192.168.0.5 from matching e.g. 192.168.0.50 - $user_ip = get_remote_address(); - $user_ip .= (strpos($user_ip, '.') !== false) ? '.' : ':'; - - $bans_altered = false; - $is_banned = false; - - foreach ($feather_bans as $cur_ban) { - // Has this ban expired? - if ($cur_ban['expire'] != '' && $cur_ban['expire'] <= time()) { - \DB::for_table('bans')->where('id', $cur_ban['id']) - ->delete_many(); - $bans_altered = true; - continue; - } - - if ($cur_ban['username'] != '' && utf8_strtolower($feather->user->username) == utf8_strtolower($cur_ban['username'])) { - $is_banned = true; - } - - if ($cur_ban['ip'] != '') { - $cur_ban_ips = explode(' ', $cur_ban['ip']); - - $num_ips = count($cur_ban_ips); - for ($i = 0; $i < $num_ips; ++$i) { - // Add the proper ending to the ban - if (strpos($user_ip, '.') !== false) { - $cur_ban_ips[$i] = $cur_ban_ips[$i].'.'; - } else { - $cur_ban_ips[$i] = $cur_ban_ips[$i].':'; - } - - if (substr($user_ip, 0, strlen($cur_ban_ips[$i])) == $cur_ban_ips[$i]) { - $is_banned = true; - break; - } - } - } - - if ($is_banned) { - \DB::for_table('online')->where('ident', $feather->user->username) - ->delete_many(); - message(__('Ban message').' '.(($cur_ban['expire'] != '') ? __('Ban message 2').' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? __('Ban message 3').'

          '.feather_escape($cur_ban['message']).'

          ' : '

          ').__('Ban message 4').' '.feather_escape($feather_config['o_admin_email']).'.', true, true, true); - } - } - - // If we removed any expired bans during our run-through, we need to regenerate the bans cache - if ($bans_altered) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_bans_cache(); - } -} - - // // Check username // @@ -258,45 +185,6 @@ function check_username($username, $errors, $exclude_id = null) } -// -// Update "Users online" -// -function update_users_online() -{ - global $feather, $feather_config; - - $now = time(); - - // Fetch all online list entries that are older than "o_timeout_online" - $select_update_users_online = array('user_id', 'ident', 'logged', 'idle'); - - $result = \DB::for_table('online')->select_many($select_update_users_online) - ->where_lt('logged', $now-$feather_config['o_timeout_online']) - ->find_many(); - - foreach ($result as $cur_user) { - // If the entry is a guest, delete it - if ($cur_user['user_id'] == '1') { - \DB::for_table('online')->where('ident', $cur_user['ident']) - ->delete_many(); - } else { - // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list - if ($cur_user['logged'] < ($now-$feather_config['o_timeout_visit'])) { - \DB::for_table('users')->where('id', $cur_user['user_id']) - ->find_one() - ->set('last_visit', $cur_user['logged']) - ->save(); - \DB::for_table('online')->where('user_id', $cur_user['user_id']) - ->delete_many(); - } elseif ($cur_user['idle'] == '0') { - \DB::for_table('online')->where('user_id', $cur_user['user_id']) - ->update_many('idle', 1); - } - } - } -} - - // // Outputs markup to display a user's avatar // @@ -325,8 +213,6 @@ function generate_avatar_markup($user_id) // function generate_page_title($page_title, $p = null) { - - if (!is_array($page_title)) { $page_title = array($page_title); } @@ -390,9 +276,6 @@ function get_tracked_topics() // function update_forum($forum_id) { - // Get Slim current session - $feather = \Slim\Slim::getInstance(); - $stats_query = \DB::for_table('topics') ->where('forum_id', $forum_id) ->select_expr('COUNT(id)', 'total_topics') @@ -462,9 +345,6 @@ function delete_avatar($user_id) // function delete_topic($topic_id) { - // Get Slim current session - $feather = \Slim\Slim::getInstance(); - // Delete the topic and any redirect topics $where_delete_topic = array( array('id' => $topic_id), @@ -492,9 +372,6 @@ function delete_topic($topic_id) // function delete_post($post_id, $topic_id) { - // Get Slim current session - $feather = \Slim\Slim::getInstance(); - $result = \DB::for_table('posts') ->select_many('id', 'poster', 'posted') ->where('topic_id', $topic_id) @@ -703,8 +580,6 @@ function paginate($num_pages, $cur_page, $link, $args = null) // function paginate_old($num_pages, $cur_page, $link) { - - $pages = array(); $link_to_all = false; @@ -1617,10 +1492,7 @@ function get_sublink($link, $sublink, $subarg, $args = null) } // Generate breadcrumbs from an array of name and URLs - function breadcrumbs(array $links) { - global $lang_admin_reports; - foreach ($links as $name => $url) { if ($name != '' && $url != '') { $tmp[] = ''.feather_escape($name).''; From d135332c8b04e2b3f36fd1227646d4d5b8ddf601 Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 12:45:33 +0200 Subject: [PATCH 047/353] Get rid of some globals --- Slim/Extras/Middleware/FeatherBB.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 3d46232d..e6b9a26d 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -320,15 +320,13 @@ public function update_online() public function update_users_online() { - global $feather_config; - $now = time(); // Fetch all online list entries that are older than "o_timeout_online" $select_update_users_online = array('user_id', 'ident', 'logged', 'idle'); $result = \DB::for_table('online')->select_many($select_update_users_online) - ->where_lt('logged', $now-$feather_config['o_timeout_online']) + ->where_lt('logged', $now-$this->data['forum_settings']['o_timeout_online']) ->find_many(); foreach ($result as $cur_user) { @@ -338,7 +336,7 @@ public function update_users_online() ->delete_many(); } else { // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list - if ($cur_user['logged'] < ($now-$feather_config['o_timeout_visit'])) { + if ($cur_user['logged'] < ($now-$this->data['forum_settings']['o_timeout_visit'])) { \DB::for_table('users')->where('id', $cur_user['user_id']) ->find_one() ->set('last_visit', $cur_user['logged']) @@ -355,13 +353,10 @@ public function update_users_online() public function check_bans() { - global $feather_config, $feather_bans; - - // Get Slim current session - $feather = \Slim\Slim::getInstance(); + global $feather_bans; // Admins and moderators aren't affected - if ($feather->user->is_admmod || !$feather_bans) { + if ($this->app->user->is_admmod || !$feather_bans) { return; } @@ -382,7 +377,7 @@ public function check_bans() continue; } - if ($cur_ban['username'] != '' && utf8_strtolower($feather->user->username) == utf8_strtolower($cur_ban['username'])) { + if ($cur_ban['username'] != '' && utf8_strtolower($this->app->user->username) == utf8_strtolower($cur_ban['username'])) { $is_banned = true; } @@ -406,9 +401,9 @@ public function check_bans() } if ($is_banned) { - \DB::for_table('online')->where('ident', $feather->user->username) + \DB::for_table('online')->where('ident', $this->app->user->username) ->delete_many(); - message(__('Ban message').' '.(($cur_ban['expire'] != '') ? __('Ban message 2').' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? __('Ban message 3').'

          '.feather_escape($cur_ban['message']).'

          ' : '

          ').__('Ban message 4').' '.feather_escape($feather_config['o_admin_email']).'.', true, true, true); + message(__('Ban message').' '.(($cur_ban['expire'] != '') ? __('Ban message 2').' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? __('Ban message 3').'

          '.feather_escape($cur_ban['message']).'

          ' : '

          ').__('Ban message 4').' '.feather_escape($this->data['forum_settings']['o_admin_email']).'.', true, true, true); } } From 7ee81317bc18d32efef4ad656b53c3427e9926ff Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 13:03:22 +0200 Subject: [PATCH 048/353] Fix some more prefixes issues --- include/functions.php | 4 +--- model/admin/groups.php | 2 +- model/admin/maintenance.php | 8 ++++---- model/admin/statistics.php | 2 +- model/admin/users.php | 2 +- model/moderate.php | 6 +++--- model/post.php | 8 ++++---- model/register.php | 2 +- model/search.php | 6 +++--- 9 files changed, 19 insertions(+), 21 deletions(-) diff --git a/include/functions.php b/include/functions.php index 28fb1c8a..7c3cf2a9 100644 --- a/include/functions.php +++ b/include/functions.php @@ -519,8 +519,6 @@ function get_title($user) // function paginate($num_pages, $cur_page, $link, $args = null) { - - $pages = array(); $link_to_all = false; @@ -915,7 +913,7 @@ function is_all_uppercase($string) // function maintenance_message() { - global $feather_config, $tpl_main; + global $feather_config; // Deal with newlines, tabs and multiple spaces $pattern = array("\t", ' ', ' '); diff --git a/model/admin/groups.php b/model/admin/groups.php index eb0687b2..bf3cd7df 100644 --- a/model/admin/groups.php +++ b/model/admin/groups.php @@ -184,7 +184,7 @@ public function add_edit_group($groups) ->create() ->set($insert_update_group) ->save(); - $new_group_id = DB::get_db()->lastInsertId($this->feather->prefix.'groups'); + $new_group_id = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'groups'); // Now lets copy the forum specific permissions from the group which this group is based on $select_forum_perms = array('forum_id', 'read_forum', 'post_replies', 'post_topics'); diff --git a/model/admin/maintenance.php b/model/admin/maintenance.php index b8534959..d05fb7ec 100644 --- a/model/admin/maintenance.php +++ b/model/admin/maintenance.php @@ -35,8 +35,8 @@ public function rebuild() // If this is the first cycle of posts we empty the search index before we proceed if ($this->request->get('i_empty_index')) { - DB::for_table('search_words')->raw_execute('TRUNCATE '.$this->feather->prefix.'search_words'); - DB::for_table('search_matches')->raw_execute('TRUNCATE '.$this->feather->prefix.'search_matches'); + DB::for_table('search_words')->raw_execute('TRUNCATE '.$this->feather->forum_settings['db_prefix'].'search_words'); + DB::for_table('search_matches')->raw_execute('TRUNCATE '.$this->feather->forum_settings['db_prefix'].'search_matches'); // Reset the sequence for the search words (not needed for SQLite) switch ($this->feather->forum_settings['db_type']) { @@ -44,11 +44,11 @@ public function rebuild() case 'mysqli': case 'mysql_innodb': case 'mysqli_innodb': - DB::for_table('search_words')->raw_execute('ALTER TABLE '.$this->feather->prefix.'search_words auto_increment=1'); + DB::for_table('search_words')->raw_execute('ALTER TABLE '.$this->feather->forum_settings['db_prefix'].'search_words auto_increment=1'); break; case 'pgsql'; - DB::for_table('search_words')->raw_execute('SELECT setval(\''.$this->feather->prefix.'search_words_id_seq\', 1, false)'); + DB::for_table('search_words')->raw_execute('SELECT setval(\''.$this->feather->forum_settings['db_prefix'].'search_words_id_seq\', 1, false)'); } } } diff --git a/model/admin/statistics.php b/model/admin/statistics.php index a2246741..225392e0 100644 --- a/model/admin/statistics.php +++ b/model/admin/statistics.php @@ -62,7 +62,7 @@ public function get_total_size() if ($this->feather->forum_settings['db_type'] == 'mysql' || $this->feather->forum_settings['db_type'] == 'mysqli' || $this->feather->forum_settings['db_type'] == 'mysql_innodb' || $this->feather->forum_settings['db_type'] == 'mysqli_innodb') { // Calculate total db size/row count - $result = DB::for_table('users')->raw_query('SHOW TABLE STATUS LIKE \''.$this->feather->prefix.'%\'')->find_many(); + $result = DB::for_table('users')->raw_query('SHOW TABLE STATUS LIKE \''.$this->feather->forum_settings['db_prefix'].'%\'')->find_many(); $total['size'] = $total['records'] = 0; foreach ($result as $status) { diff --git a/model/admin/users.php b/model/admin/users.php index 6f0daef7..d7c80e0c 100644 --- a/model/admin/users.php +++ b/model/admin/users.php @@ -448,7 +448,7 @@ public function ban_users() // Overwrite the registration IP with one from the last post (if it exists) if ($ban_the_ip != 0) { - $result = DB::for_table('posts')->raw_query('SELECT p.poster_id, p.poster_ip FROM ' . $this->feather->prefix . 'posts AS p INNER JOIN (SELECT MAX(id) AS id FROM ' . $this->feather->prefix . 'posts WHERE poster_id IN (' . implode(',', $user_ids) . ') GROUP BY poster_id) AS i ON p.id=i.id')->find_many(); + $result = DB::for_table('posts')->raw_query('SELECT p.poster_id, p.poster_ip FROM ' . $this->feather->forum_settings['db_prefix'] . 'posts AS p INNER JOIN (SELECT MAX(id) AS id FROM ' . $this->feather->forum_settings['db_prefix'] . 'posts WHERE poster_id IN (' . implode(',', $user_ids) . ') GROUP BY poster_id) AS i ON p.id=i.id')->find_many(); foreach ($result as $cur_address) { $user_info[$cur_address['poster_id']]['ip'] = $cur_address['poster_ip']; } diff --git a/model/moderate.php b/model/moderate.php index 210d649b..218bf78e 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -233,7 +233,7 @@ public function split_posts($tid, $fid, $p = null) ->set($insert_topic) ->save(); - $new_tid = DB::get_db()->lastInsertId($this->feather->prefix.'topics'); + $new_tid = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'topics'); // Move the posts to the new topic DB::for_table('posts')->where_in('id', $posts_array) @@ -242,7 +242,7 @@ public function split_posts($tid, $fid, $p = null) ->save(); // Apply every subscription to both topics - DB::for_table('topic_subscriptions')->raw_query('INSERT INTO '.$this->feather->prefix.'topic_subscriptions (user_id, topic_id) SELECT user_id, '.$new_tid.' FROM '.$this->feather->prefix.'topic_subscriptions WHERE topic_id=:tid', array('tid' => $tid)); + DB::for_table('topic_subscriptions')->raw_query('INSERT INTO '.$this->feather->forum_settings['db_prefix'].'topic_subscriptions (user_id, topic_id) SELECT user_id, '.$new_tid.' FROM '.$this->feather->forum_settings['db_prefix'].'topic_subscriptions WHERE topic_id=:tid', array('tid' => $tid)); // Get last_post, last_post_id, and last_poster from the topic and update it $select_last_post = array('id', 'poster', 'posted'); @@ -599,7 +599,7 @@ public function merge_topics($fid) ->find_one_col('id'); // Make any redirect topics point to our new, merged topic - $query = 'UPDATE '.$this->feather->prefix.'topics SET moved_to='.$merge_to_tid.' WHERE moved_to IN('.implode(',', $topics).')'; + $query = 'UPDATE '.$this->feather->forum_settings['db_prefix'].'topics SET moved_to='.$merge_to_tid.' WHERE moved_to IN('.implode(',', $topics).')'; // Should we create redirect topics? if ($this->request->post('with_redirect')) { diff --git a/model/post.php b/model/post.php index 62724236..52756e50 100644 --- a/model/post.php +++ b/model/post.php @@ -247,7 +247,7 @@ public function insert_reply($post, $tid, $cur_posting, $is_subscribed) ->set($insert_post) ->save(); - $new['pid'] = DB::get_db()->lastInsertId($this->feather->prefix.'posts'); + $new['pid'] = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'posts'); // To subscribe or not to subscribe, that ... if ($this->config['o_topic_subscriptions'] == '1') { @@ -296,7 +296,7 @@ public function insert_reply($post, $tid, $cur_posting, $is_subscribed) ->save(); - $new['pid'] = DB::get_db()->lastInsertId($this->feather->prefix.'posts'); + $new['pid'] = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'posts'); } // Update topic @@ -442,7 +442,7 @@ public function insert_topic($post, $fid) ->set($insert_topic) ->save(); - $new['tid'] = DB::get_db()->lastInsertId($this->feather->prefix.'topics'); + $new['tid'] = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'topics'); if (!$this->user->is_guest) { // To subscribe or not to subscribe, that ... @@ -496,7 +496,7 @@ public function insert_topic($post, $fid) ->set($insert_post) ->save(); } - $new['pid'] = DB::get_db()->lastInsertId($this->feather->prefix.'topics'); + $new['pid'] = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'topics'); // Update the topic with last_post_id $update_topic = array( diff --git a/model/register.php b/model/register.php index 68f27844..8152bc20 100644 --- a/model/register.php +++ b/model/register.php @@ -150,7 +150,7 @@ public function insert_user($user) ->set($insert_user) ->save(); - $new_uid = DB::get_db()->lastInsertId($this->feather->prefix.'users'); + $new_uid = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'users'); if ($this->config['o_regs_verify'] == '0') { diff --git a/model/search.php b/model/search.php index 6ed3c053..ba8ba002 100644 --- a/model/search.php +++ b/model/search.php @@ -196,9 +196,9 @@ public function get_search_results() $where_cond = str_replace('*', '%', $cur_word); $where_cond_cjk = ($search_in ? (($search_in > 0) ? 'p.message LIKE %:where_cond%' : 't.subject LIKE %:where_cond%') : 'p.message LIKE %:where_cond% OR t.subject LIKE %:where_cond%'); - $result = DB::for_table('posts')->raw_query('SELECT p.id AS post_id, p.topic_id, '.$sort_by_sql.' AS sort_by FROM '.$this->feather->prefix.'posts AS p INNER JOIN '.$this->feather->prefix.'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->prefix.'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE ('.$where_cond_cjk.') AND (fp.read_forum IS NULL OR fp.read_forum=1)'.$forum_sql, array(':where_cond' => $where_cond))->find_many(); + $result = DB::for_table('posts')->raw_query('SELECT p.id AS post_id, p.topic_id, '.$sort_by_sql.' AS sort_by FROM '.$this->feather->forum_settings['db_prefix'].'posts AS p INNER JOIN '.$this->feather->forum_settings['db_prefix'].'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->forum_settings['db_prefix'].'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE ('.$where_cond_cjk.') AND (fp.read_forum IS NULL OR fp.read_forum=1)'.$forum_sql, array(':where_cond' => $where_cond))->find_many(); } else { - $result = DB::for_table('posts')->raw_query('SELECT m.post_id, p.topic_id, '.$sort_by_sql.' AS sort_by FROM '.$this->feather->prefix.'search_words AS w INNER JOIN '.$this->feather->prefix.'search_matches AS m ON m.word_id = w.id INNER JOIN '.$this->feather->prefix.'posts AS p ON p.id=m.post_id INNER JOIN '.$this->feather->prefix.'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->prefix.'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE w.word LIKE :where_cond'.$search_in_cond.' AND (fp.read_forum IS NULL OR fp.read_forum=1)'.$forum_sql, array(':where_cond' => str_replace('*', '%', $cur_word)))->find_many(); + $result = DB::for_table('posts')->raw_query('SELECT m.post_id, p.topic_id, '.$sort_by_sql.' AS sort_by FROM '.$this->feather->forum_settings['db_prefix'].'search_words AS w INNER JOIN '.$this->feather->forum_settings['db_prefix'].'search_matches AS m ON m.word_id = w.id INNER JOIN '.$this->feather->forum_settings['db_prefix'].'posts AS p ON p.id=m.post_id INNER JOIN '.$this->feather->forum_settings['db_prefix'].'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->forum_settings['db_prefix'].'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE w.word LIKE :where_cond'.$search_in_cond.' AND (fp.read_forum IS NULL OR fp.read_forum=1)'.$forum_sql, array(':where_cond' => str_replace('*', '%', $cur_word)))->find_many(); } $row = array(); @@ -261,7 +261,7 @@ public function get_search_results() $user_ids[] = $row['id']; } - $result = DB::for_table('posts')->raw_query('SELECT p.id AS post_id, p.topic_id FROM '.$this->feather->prefix.'posts AS p INNER JOIN '.$this->feather->prefix.'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->prefix.'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.poster_id IN('.implode(',', $user_ids).')'.$forum_sql.' ORDER BY '.$sort_by_sql.' '.$sort_dir)->find_many(); + $result = DB::for_table('posts')->raw_query('SELECT p.id AS post_id, p.topic_id FROM '.$this->feather->forum_settings['db_prefix'].'posts AS p INNER JOIN '.$this->feather->forum_settings['db_prefix'].'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->forum_settings['db_prefix'].'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.poster_id IN('.implode(',', $user_ids).')'.$forum_sql.' ORDER BY '.$sort_by_sql.' '.$sort_dir)->find_many(); foreach($result as $temp) { $author_results[$temp['post_id']] = $temp['topic_id']; From 768b4f857017fd7c79f28407072263775dea9ced Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 13:14:10 +0200 Subject: [PATCH 049/353] Delete bbcd.php --- include/bbcd.php | 961 ----------------------------------------------- 1 file changed, 961 deletions(-) delete mode 100644 include/bbcd.php diff --git a/include/bbcd.php b/include/bbcd.php deleted file mode 100644 index 3a8105ac..00000000 --- a/include/bbcd.php +++ /dev/null @@ -1,961 +0,0 @@ - true, // Allow simple textile phrase extensions. - 'quote_links' => true, // Make quote citation a link back to source post. - 'quote_imgs' => false, // Allow IMG tags withing QUOTEs flag. - 'valid_imgs' => true, // Validate images and clip size during pre-parsing. - 'click_imgs' => true, // Wrap IMG tags in a url link to the original image. - 'max_size' => 100000, // Maximum remote filesize for posting IMG links. - 'max_width' => 800, // Max width of visual media objects in pixels. - 'max_height' => 600, // Max height of visual media objects in pixels. - 'def_width' => 240, // Default width of visual media objects in pixels. - 'def_height' => 180, // Default height of visual media objects in pixels. - 'smiley_size' => 100, // Percent size adjust for display of smilies. -); // End $config array. - -// Array of smileys. These files are located in the img/smilies folder). -$smilies = array( - ':)' => array('file' => 'smile.png'), - '=)' => array('file' => 'smile.png'), - ':|' => array('file' => 'neutral.png'), - '=|' => array('file' => 'neutral.png'), - ':(' => array('file' => 'sad.png'), - '=(' => array('file' => 'sad.png'), - ':D' => array('file' => 'big_smile.png'), - '=D' => array('file' => 'big_smile.png'), - ':o' => array('file' => 'yikes.png'), - ':O' => array('file' => 'yikes.png'), - ';)' => array('file' => 'wink.png'), - ':/' => array('file' => 'hmm.png'), - ':P' => array('file' => 'tongue.png'), - ':p' => array('file' => 'tongue.png'), - ':lol:' => array('file' => 'lol.png'), - ':mad:' => array('file' => 'mad.png'), - ':rolleyes:' => array('file' => 'roll.png'), - ':cool:' => array('file' => 'cool.png') -); // End $smilies array. - -/* -FluxBB 1.4.3 Old parser tags: -array('quote', 'code', 'b', 'i', 'u', 's', 'ins', 'del', 'em', 'color', 'colour', 'url', 'email', 'img', 'list', '*', 'h') -array('quote', 'code', 'b', 'i', 'u', -*/ -$bbcd = array( // Array of recognised BBCode tag structures (arrays). - 'b' => array( - 'html_name' => 'strong' - ), - 'code' => array( - 'html_name' => 'pre', - 'tag_type' => 'hidden', - 'html_type' => 'block', - 'handlers' => array( - 'ATTRIB' => array( - 'format' => ' -

          -
          -

          Code: "%a_str%"

          -
          %c_str%
          -
          -

          ' - ), - 'NO_ATTRIB' => array( - 'format' => ' -

          -
          -
          %c_str%
          -
          -

          ' - ) - ) - ), - 'color' => array( - 'html_name' => 'span', - 'nest_type' => 'err', - 'handlers' => array( - 'ATTRIB' => array( - 'a_type' => 'color', - 'format' => '%c_str%' - ) - ) - ), - 'colour' => array( - 'html_name' => 'span', - 'nest_type' => 'err', - 'handlers' => array( - 'ATTRIB' => array( - 'a_type' => 'color', - 'format' => '%c_str%' - ) - ) - ), - 'del' => array( - 'html_name' => 'del' - ), - 'email' => array( - 'html_name' => 'a', - 'nest_type' => 'err', - 'tags_excluded' => array('email' => true, 'url' => true), - 'handlers' => array( - 'ATTRIB' => array( - 'a_type' => 'email', - 'c_type' => 'text', - 'format' => '%c_str%' - ), - 'NO_ATTRIB' => array( - 'a_type' => 'none', - 'c_type' => 'email', - 'format' => '%c_str%' - ) - ) - ), - 'em' => array( - 'html_name' => 'em' - ), - 'h' => array( - 'html_name' => 'h5', - 'handlers' => array( - 'NO_ATTRIB' => array( - 'format' => '

          %c_str%

          ' - ) - ) - ), - 'img' => array( - 'html_name' => 'img', - 'tag_type' => 'atomic', - 'tags_allowed' => array('img' => true), - 'handlers' => array( - 'ATTRIB' => array( - 'a_type' => 'width_height', - 'c_type' => 'url', - 'format' => '%a_str%' - ), - 'NO_ATTRIB' => array( - 'a_type' => 'none', - 'c_type' => 'url', - 'format' => '%c_str%' - ) - ) - ), - 'ins' => array( - 'html_name' => 'ins' - ), - 'i' => array( - 'html_name' => 'em' - ), - - - 'table' => array( - 'html_name' => 'table', - 'html_type' => 'block', - 'handlers' => array( - 'NO_ATTRIB' => array('format' => '

          %c_str%

          ' ) - ), - 'tags_only' => true, - 'tags_allowed' => array( - 'tr' => true, - 'err' => true, - ) - ), - 'tr' => array( - 'html_name' => 'tr', - 'html_type' => 'block', - 'parents' => array('table' => true), - 'handlers' => array( - 'NO_ATTRIB' => array('format' => '%c_str%' ) - ), - 'tags_only' => true, - 'tags_allowed' => array( - 'th' => true, - 'td' => true, - 'err' => true, - ) - ), - 'th' => array( - 'html_name' => 'th', - 'html_type' => 'block', - 'parents' => array('tr' => true), - 'handlers' => array( - 'NO_ATTRIB' => array('format' => '

          %c_str%

          ' ) - ), - ), - 'td' => array( - 'html_name' => 'td', - 'html_type' => 'block', - 'parents' => array('tr' => true), - 'handlers' => array( - 'NO_ATTRIB' => array('format' => '

          %c_str%

          ' ) - ), - ), - - - 'list' => array( - 'html_name' => 'ul', - 'html_type' => 'block', - 'handlers' => array( - '1' => array('format' => '

            %c_str%

          '), - 'a' => array('format' => '

            %c_str%

          '), - '*' => array('format' => '

            %c_str%

          '), - 'NO_ATTRIB' => array('format' => '

            %c_str%

          ' ) - ), - 'tags_only' => true, - 'tags_allowed' => array( - 'list' => true, - '*' => true) - ), - '*' => array( - 'html_name' => 'li', - 'html_type' => 'block', - 'parents' => array('list' => true), - 'handlers' => array( - 'NO_ATTRIB' => array('format' => '

        • %c_str%

        • ' ) - ) - ), - 'quote' => array( - 'html_name' => 'blockquote', - 'html_type' => 'block', - 'tag_type' => 'zombie', - 'nest_type' => 'clip', -// 'depth_max' => 3, - 'handlers' => array( - 'ATTRIB' => array( - 'format' => ' -

          -
          - %a_str% -
          -
          -

          %c_str%

          -
          -
          -
          -

          ' - ), - 'NO_ATTRIB' => array( - 'format' => ' -

          -
          -
          -
          -

          %c_str%

          -
          -
          -
          -

          ' - ), - ), - ), - 'sub' => array( - 'html_name' => 'sub' - ), - 'sup' => array( - 'html_name' => 'sup' - ), - 's' => array( - 'html_name' => 'span', - 'handlers' => array( - 'NO_ATTRIB' => array( - 'format' => '%c_str%' - ) - ) - ), - 'tt' => array( - 'html_name' => 'tt', - 'tag_type' => 'hidden', - 'handlers' => array( // count == 1 - 'NO_ATTRIB' => array( // count == 3 - 'a_type' => 'none', - 'c_type' => 'text', - 'format' => '%c_str%' - ) - ), - - - ), - 'url' => array( - 'html_name' => 'a', -// 'nest_type' => 'err', - 'tags_excluded' => array('email' => true, 'url' => true), - 'handlers' => array( - 'ATTRIB' => array( - 'a_type' => 'url', - 'c_type' => 'text', - 'format' => '%c_str%' - ), - 'NO_ATTRIB' => array( - 'a_type' => 'none', - 'c_type' => 'url', - 'format' => '%c_str%' - ) - ) - ), - 'u' => array( - 'html_name' => 'span', - 'handlers' => array( - 'NO_ATTRIB' => array( - 'format' => '%c_str%' - ) - ) - ), - - 'center' => array( - 'html_name' => 'div', - 'handlers' => array( - 'NO_ATTRIB' => array( - 'format' => '

          %c_str%

          ' - ) - ) - ), - 'right' => array( - 'html_name' => 'div', - 'handlers' => array( - 'NO_ATTRIB' => array( - 'format' => '

          %c_str%

          ' - ) - ) - ), - 'left' => array( - 'html_name' => 'div', - 'handlers' => array( - 'NO_ATTRIB' => array( - 'format' => '

          %c_str%

          ' - ) - ) - ), - 'justify' => array( - 'html_name' => 'div', - 'handlers' => array( - 'NO_ATTRIB' => array( - 'format' => '

          %c_str%

          ' - ) - ) - ), - - - 'youtube' => array( - /* Supplied in one of three acceptable formats: (Note: smallest good youtube dimensions: 260x225) - 1. XWlhKllqnAk - 2. http://www.youtube.com/watch?v=XWlhKllqnAk - 3. - SIZING: - With wxh set to 480x385 and no borders, the object uses 480x385 and the image takes 480x360. - With wxh set to 480x385 and borders, the object uses 480x385 and the image takes 460x340. - Border width = 10px. Controller height = 25. - */ - 'in_post' => true, - 'in_sig' => false, - 'html_name' => 'object', - 'tags_allowed' => array(), - 'x_padding' => 20, - 'y_padding' => 45, - 'handlers' => array( - 'ATTRIB' => array( - 'a_type' => 'width_height', - 'c_type' => 'text', - 'c_regex' => '%(?:^|\bv[=/])(\w{10,12})\b%S', - 'format' => ' - - - - ' - ), - 'NO_ATTRIB' => array( - 'a_type' => 'width_height', - 'c_type' => 'width_height', - 'c_regex' => '%(?:^|\bv[=/])(\w{10,12})\b%S', - 'format' => ' - - - - ' - ) - ) - ), - - 'large' => array( - 'html_name' => 'span', - 'handlers' => array( - 'NO_ATTRIB' => array( - 'format' => '%c_str%' - ) - ) - ), - 'small' => array( - 'html_name' => 'span', - 'handlers' => array( - 'NO_ATTRIB' => array( - 'format' => '%c_str%' - ) - ) - ), - - - - - - - - // System Tags. DO NOT DISABLE - 'err' => array( - 'html_name' => 'span', - 'tag_type' => 'hidden', - 'html_type' => 'inline', - 'handlers' => array( - 'ATTRIB' => array( - 'format' => - '%c_str%' - ), - 'NO_ATTRIB' => array( - 'format' => - '%c_str%' - ) - ) - ), - 'dbug' => array( - 'html_name' => 'div', - 'html_type' => 'block', - 'handlers' => array( - 'ATTRIB' => array( - 'format' => - '

          %c_str%

          ' - ) - ) - ), - '_ROOT_' => array( - 'in_post' => false, - 'in_sig' => false, - 'html_name' => 'div', - 'tag_type' => 'normal', - 'html_type' => 'block', - 'depth_max' => 1, - 'handlers' => array( // Default handler for erroneously defined tag. - 'NO_ATTRIB' => array( - 'a_type' => 'text', - 'c_type' => 'text', - 'format' => "\1\2%c_str%\1", - ) - ) - ) -); // End $bbcd array. - -// This script compiles the $options, $smilies and $bbcd arrays (from bbcd_source.php script -// or from an admin page web form) into the cache/cache_parser_data.php. - -// Initialize a new global parser data array $pd: -$pd = array( - 'newer_php_version' => version_compare(PHP_VERSION, '5.2.0', '>='), // PHP version affects PCRE error checking. - 'in_signature' => false, // TRUE when parsing signatures, FALSE when parsing posts. - 'ipass' => 0, // Pass number (for multi-pass pre-parsing). - 'tag_stack' => array('_ROOT_'), // current stack trace of tags in recursive callback - 'config' => $config, // Array of various global parser options. - -// ----------------------------------------------------------------------------- -// Parser Regular Expressions. (All fully commented in 'x'-"free-spacing" mode.) -// ----------------------------------------------------------------------------- - 're_smilies' => '/ # re_smilies Rev:20110220_1200 -# Match special smiley character sequences within BBCode content. -(?<=^|[>\s]) # Only if preceeded by ">" or whitespace. -(?:%smilies%) -(?=$|[\[<\s]) # Only if followed by "<", "[" or whitespace. - /Sx', - - 're_color' => '% # re_color Rev:20110220_1200 -# Match a valid CSS color value. #123, #123456, or "red", "blue", etc. -^ # Anchor to start of string. -( # $1: Foreground color (required). - \#(?:[0-9A-Fa-f]{3}){1,2} # Either a "#" and a 3 or 6 digit hex number, -| (?: maroon|red|orange|yellow| # or a recognized CSS color word. - olive|purple|fuchsia|white| - lime|green|navy|blue|aqua| - teal|black|silver|gray - ) # End group of recognized color words. -) # End $1. Foreground color. -# Match optional CSS background color value. ;#123, ;#123456, or ;"red", "blue", etc. -(?: # Begin group for optional background color - ;?+ # foreground;background delimiter: e.g. "#123;#456". - ((?1)) # $2: Background color. (Same regex as the first.) -)?+ # Background color spec is optional. -$ # Anchor to end of string. - %ix', - - 're_textile' => '/ # re_textile Rev:20110220_1200 -# Match textile inline phrase: _em_ *strong* @tt@ ^super^ ~sub~ -del- +ins+ -([+\-@*_\^~]) # $1: literal exposed start of phrase char, but -(?<= # only if preceded by... - ^ [+\-@*_] # start of string (for _em_ *strong* -del- +ins+ @code) -| \s [+\-@*_] # or whitespace (for _em_ *strong* -del- +ins+ @code) -| [A-Za-z0-9)}\]>][\^~] # or alphanum or bracket (for ^superscript^ ~subscript~). -) # only if preceded by whitespace or start of string. -( # $2: Textile phrase contents. - [A-Za-z0-9({\[<] # First char following delim must be alphanum or bracket. - [^+\-@*_\^~\n]*+ # "normal*" == Zero or more non-delim, non-newline. - (?> # Begin unrolling-the-loop. "(special normal*)*" - (?! # One of two conditions must be true for inside delim: - (?:(?<=[A-Za-z0-9)}\]>][.,;:!?])(?=\1(?:\s|$))) - | (?:(?<=[A-Za-z0-9)}\]>])(?=\1(?:[\s.,;:!?]|$))) - )[+\-@*_\^~] # If so then not yet at phrase end. Match delim and - [^+\-@*_\^~\n]*+ # more "normal*" non-delim, non-linefeeds. - )*+ # Continue unrolling. "(special normal*)*" -) # End $2: Textile phrase contents. -(?> - (?:(?<=[A-Za-z0-9)}\]>][.,;:!?])(?=\1(?:\s|$))) -| (?:(?<=[A-Za-z0-9)}\]>])(?=\1(?:[\s.,;:!?]|$))) -) -\1 # Match delim end of phrase, but only if - /Smx', - - 're_bbcode' => '% # re_bbcode Rev:20110220_1200 -# First, match opening tag of syntax: "[TAGNAME (= ("\')ATTRIBUTE("\') )]"; -\[ # Match opening bracket of outermost opening TAGNAME tag. -(?>(%taglist%)\s*+) # $1: -(?> # Atomically group remainder of opening tag. - (?: # Optional attribute. - (=)\s*+ # $2: = Optional attribute\'s equals sign delimiter, ws. - (?: # Group for 1-line attribute value alternatives. - \'([^\'\r\n\\\\]*+(?:\\\\.[^\'\r\n\\\\]*+)*+)\' # Either $3: == single quoted, - | "([^"\r\n\\\\]*+(?:\\\\.[^"\r\n\\\\]*+)*+)" # or $4: == double quoted, - | ( [^[\]\r\n]*+ # or $5: == un-or-any-quoted. "normal*" == non-"[]" - (?: # Begin "(special normal*)*" "Unrolling-the-loop" construct. - \[[^[\]\r\n]*+\] # Allow matching [square brackets] 1 level deep. "special". - [^[\]\r\n]*+ # More "normal*" any non-"[]", non-newline characters. - )*+ # End "(special normal*)*" "Unrolling-the-loop" construct. - ) # End $5: Un-or-any-quoted attribute value. - ) # End group of attribute values alternatives. - \s*+ # Optional whitespace following quoted values. - )? # End optional attribute group. - \] # Match closing bracket of outermost opening TAGNAME tag. -) # End atomic group with opening tag remainder. -# Second, match the contents of the tag. -( # $6: Non-trimmed contents of TAGNAME tag. - (?> # Atomic group for contents alternatives. - [^\[]++ # Option 1: Match non-tag chars (starting with non-"["). - (?: # Begin "(special normal*)*" "Unrolling-the-loop" construct. - (?!\[/?+\1[\]=\s])\[ # "special" = "[" if not start of [TAGNAME*] or [/TAGNAME]. - [^\[]*+ # More "normal*". - )*+ # Zero or more "special normal*"s allowed for option 1. - | (?: # or Option 2: Match non-tag chars (starting with "["). - (?!\[/?+\1[\]=\s])\[ # "special" = "[" if not start of [TAGNAME*] or [/TAGNAME]. - [^\[]*+ # More "normal*". - )++ # One or more "special normal*"s required for option 2. - | (?R) # Or option 3: recursively match nested [TAGNAME]..[/TAGNAME]. - )*+ # One of these three options as many times as necessary. -) # End $6: Non-trimmed contents of TAGNAME tag. -# Finally, match the closing tag. -\[/\1\s*+\] # Match outermost closing [/ TAGNAME ] - %ix', - - 're_bbtag' => '%# re_bbtag Rev:20110220_1200 -# Match open or close BBtag. -\[/?+ # Match opening bracket of outermost opening TAGNAME tag. -(?>(%taglist%)\s*+) #$1: -(?: # Optional attribute. - (=)\s*+ # $2: = Optional attribute\'s equals sign delimiter, ws. - (?: # Group for 1-line attribute value alternatives. - \'([^\'\r\n\\\\]*+(?:\\\\.[^\'\r\n\\\\]*+)*+)\' # Either $3: == single quoted, - | "([^"\r\n\\\\]*+(?:\\\\.[^"\r\n\\\\]*+)*+)" # or $4: == double quoted, - | ( [^[\]\r\n]*+ # or $5: == un-or-any-quoted. "normal*" == non-"[]" - (?: # Begin "(special normal*)*" "Unrolling-the-loop" construct. - \[[^[\]\r\n]*+\] # Allow matching [square brackets] 1 level deep. "special". - [^[\]\r\n]*+ # More "normal*" any non-"[]", non-newline characters. - )*+ # End loop construct. See: "Mastering Regular Expressions". - ) # End $5: Un-or-any-quoted attribute value. - ) # End group of attribute values alternatives. - \s*+ # Optional whitespace following quoted values. -)? # End optional attribute. -\] # Match closing bracket of outermost opening TAGNAME tag. - %ix', - 're_fixlist_1' => '%# re_fixlist_1 Rev:20110220_1200 -# Match and repair invalid characters at start of LIST tag (before first [*]). -^ # Anchor to start of subject text. -( # $1: Substring with invalid chars to be enclosed. - \s*+ # Optional whitespace before first invalid char. - (?!\[(?:\*|/list)\]) # Assert invalid char(s). (i.e. valid if [*] or [/list]). - [^[]* # (Normal*) Zero or more non-[. - (?: # Begin (special normal*)* "Unroll-the-loop- construct. - (?!\[(?:\*|/list)\]) # If this [ is not the start of [*] or [/list], then - \[ # go ahead and match non-[*], non-[/list] left bracket. - [^[]* # More (normal*). - )* # End (special normal*)* "unroll-the-loop- construct. -) # End $1: non-whitespace before first [*] (or [/list]). -(? '%# re_fixlist_2 Rev:20110220_1200 -# Match and repair invalid characters between [/*] and next [*] (or [/list]]. -\[/\*\] # Match [/*] close tag. -( # $1: Substring with invalid chars to be enclosed. - \s*+ # Optional whitespace before first invalid char. - (?!\[(?:\*|/list)\]) # Assert invalid char(s). (i.e. valid if [*] or [/list]). - [^[]* # (Normal*) Zero or more non-[. - (?: # Begin (special normal*)* "Unroll-the-loop- construct. - (?!\[(?:\*|/list)\]) # If this [ is not the start of [*] or [/list], then - \[ # go ahead and match non-[*], non-[/list] left bracket. - [^[]* # More (normal*). - )* # End (special normal*)* "unroll-the-loop- construct. -) # End $1: non-whitespace before first [*] (or [/list]). -(? array(), // Array of Smilies, each an array with filename and html. - 'bbcd' => array(), // Array of BBCode tag definitions. - -); -unset($config); - -// If this server's PHP installation won't allow access to remote files, -// then unconditionally turn off validate images option. -if (!ini_get('allow_url_fopen')) { - $pd['config']['valid_imgs'] = false; -} - -// Validate and compute replacement texts for smilies array. -$re_keys = array(); // Array of regex-safe smiley texts. -$file_path = FEATHER_ROOT . 'img/smilies/'; // File system path to smilies. -$url_path = get_base_url(true); // Convert abs URL to relative URL. -$url_path = preg_replace('%^https?://[^/]++(.*)$%i', '$1', $url_path) . '/img/smilies/'; -foreach ($smilies as $smiley_text => $smiley_img) { // Loop through all smilieys in array. - $file = $file_path . $smiley_img['file']; // Local file system address of smiley. - if (!file_exists($file)) { - continue; - } // Skip if the file does not exist. - $info = getimagesize($file); // Fetch width & height the image. - // Scale the smiley image to fit inside tiny smiley box; default = 15 by 15 pixels (@ 100%). - if (isset($info) && is_array($info) && ($iw = (int)$info[0]) && ($ih = (int)$info[1])) { - $ar = (float)$iw / (float)$ih; - if ($iw > $ih) { // Check if landscape? - $w = (int)((($pd['config']['smiley_size'] * 15.0) / 100.0) + 0.5); - $h = (int)round((float)$w / $ar); - } else { - $h = (int)((($pd['config']['smiley_size'] * 15.0) / 100.0) + 0.5); - $w = (int)round((float)$h * $ar); - } - unset($ar); - } - $re_keys[] = preg_quote($smiley_text, '/'); // Gather array of regex-safe smiley texts. - $url = $url_path . $smiley_img['file']; // url address of this smiley. - $url = htmlspecialchars($url); // Make sure all [&<>""] are escaped. - $desc = file2title($smiley_img['file']); // Convert filename to a title. - $format = '%s'; - $pd['smilies'][$smiley_text] = array( - 'file' => $smiley_img['file'], - 'html' => sprintf($format, $w, $h, $url, $desc, $desc) - ); -} -// Assemble "the-one-regex-to-match-them-all" (smilies that is!) 8^) -$pd['re_smilies'] = str_replace('%smilies%', implode('|', $re_keys), $pd['re_smilies']); -unset($re_keys); unset($file_path); unset($url_path); unset($file); -unset($info); unset($url); unset($desc); unset($format); -unset($smiley_text); unset($smiley_img); unset($smilies); -unset($w); unset($h); unset($iw); unset($ih); - -// Local arrays: -$all_tags = array(); // array of all tag names allowed in posts -$all_tags_re = array(); // array of all tag names allowed in posts (preg_quoted) -$all_block_tags = array(); // array of all block type tag names - -// loop through all BBCodes to pre-assemble and initialize-once global data structures -foreach ($bbcd as $tagname => $tagdata) { // pass 1: accumulate regex pattern string fragments counting block and inline types - $pd['bbcd'][$tagname] = $tagdata; // Copy initial tag data to $pd['bbcd']['tagname']. - $tag =& $pd['bbcd'][$tagname]; // tag is shortcut to member of $pd['bbcd']['tagname'] array - $tag['depth'] = 0; // initialize tag nesting depth level to zero - - // assign default values for members that were not specified - if (!isset($tag['in_post'])) { - $tag['in_post'] = true; - } // default in_post = TRUE - if (!isset($tag['in_sig'])) { - $tag['in_sig'] = true; - } // default in_sig = TRUE - if (!isset($tag['html_type'])) { - $tag['html_type'] = 'inline'; - } // default html_type = inline - if (!isset($tag['tag_type'])) { - $tag['tag_type'] = 'normal'; - } // default tag_type = normal - if (!isset($tag['nest_type'])) { - if ($tag['html_type'] === 'inline') { - $tag['nest_type'] = 'fix'; - } // default inline nest_type = fix - else { - $tag['nest_type'] = 'err'; - } // default block nest_type = err - } - if (!isset($tag['handlers'])) { - $tag['handlers'] = array( - 'NO_ATTRIB' => array( - 'format' => '<'. $tag['html_name'] .'>%c_str%' - ) - ); - } - // Loop through attribute handlers assigning default values to a_type and c_type. - foreach ($tag['handlers'] as $key => $value) { - $handler =& $tag['handlers'][$key]; - // Detect when width/height types are being used. - $w_typ = (preg_match('/%[wh]_str%/', $handler['format'])) ? 'width_height' : false; - switch ($key) { - case 'ATTRIB': // Variable attribute handler. - if (!isset($handler['a_type'])) { - $handler['a_type'] = ($w_typ) ? $w_typ : 'text'; - } - if (!isset($handler['c_type'])) { - $handler['c_type'] = 'text'; - } - break; - - case 'NO_ATTRIB': // No attribute handler. - if (!isset($handler['a_type'])) { - $handler['a_type'] = 'none'; - } - if (!isset($handler['c_type'])) { - $handler['c_type'] = ($w_typ) ? $w_typ : 'text'; - } - break; - - default: // Fixed attribute handlers. - if (!isset($handler['a_type'])) { - $handler['a_type'] = ($w_typ) ? $w_typ : 'text'; - } - if (!isset($handler['c_type'])) { - $handler['c_type'] = 'text'; - } - break; - } - ksort($handler); - } - unset($w_typ); - // fill arrays with names of tags for block, inline and hidden tag categories - if ($tagname == '_ROOT_') { - continue; - } // Dont add _ROOT_ to tag lists - $all_tags[$tagname] = true; // Array of all tags. with the names stored in the $keys. - $re_name = preg_quote($tagname); // this name is metachar-safe to concatenate into a regex pattern string - $all_tags_re[] = $re_name; - if ($tag['html_type'] == 'block') { - $all_block_tags[] = $tagname; - if (!isset($tag['depth_max'])) { - $tag['depth_max'] = 5; // default block tags max depth = 5 - } - } - if ($tag['html_type'] == 'inline') { - $tag['depth_max'] = 1; // all inline tags max depth = 1 - } - if ($tag['tag_type'] === 'hidden') { - $tag['depth_max'] = 1; // all hidden tags max depth = 1 - $tag['tags_allowed'] = array(); // no tags allowed in hidden tags. - } - // clean excess whitespace (added for human readable formatting above) from format conversion strings - foreach ($tag['handlers'] as $ikey => $i) { // loop through all tag attribute handlers - if (isset($tag['handlers'][$ikey]['format'])) { - $format_str =& $tag['handlers'][$ikey]['format']; - // Strip all whitespace between tags. - $format_str = preg_replace('/(^|>)\s++(<|$)/S', '$1$2', $format_str); - // Consolidate consecutive whitespace into a single space. - $format_str = preg_replace('/\s++/S', ' ', $format_str); - // Clean out any old version byte marker cruft. - $format_str = str_replace(array("\1", "\2"), '', $format_str); - // Wrap all hidden chunks like so: "\1\2\1 stuff \1\2\1". - if ($tag['tag_type'] === 'hidden' || $tag['handlers'][$ikey]['c_type'] === 'url') { - $format_str = "\1\2". $format_str ."\1"; - } else { - $format_str = preg_replace('/((?:<[^>]*+>)++(?:%a_str%(?:<[^>]*+>)++)?+)/S', "\1\2$1\1", $format_str); - } - } else { - exit(sprintf("Compile error! \$bbcd['%s']['handlers']['%s']['format'] format string is missing!", - $tagname, $ikey)); - } - } - unset($i); - unset($ikey); -} // end pass 1 - -// Now we can complete the regex patterns with precise list of recognized tags. -$re_tag_names = empty($all_tags_re) ? '_ROOT_' : implode($all_tags_re, "|"); -$pd['re_bbcode'] = str_replace('%taglist%', $re_tag_names, $pd['re_bbcode']); -$pd['re_bbtag'] = str_replace('%taglist%', $re_tag_names, $pd['re_bbtag']); - -unset($all_tags_re); unset($re_tag_names); - -foreach ($pd['bbcd'] as $tagname => $tagdata) { // pass 2: initialize allowed and excluded arrays - $tag =& $pd['bbcd'][$tagname]; // Alias to "tagname" member of global array - if (!isset($tag['tags_allowed']) || // if allowed_tags not specified or if - isset($tag['tags_allowed']['all'])) { // 'all' has been specified as an allowed tag - $tag['tags_allowed'] = $all_tags; // then create and set tags_allowed to allow all - } - if (isset($tag['tags_excluded'])) { // if tags_excluded specified - foreach ($tag['tags_allowed'] as $iname => $value) { - // remove them from tags_allow array - if (isset($tag['tags_excluded'][$iname])) { - unset($tag['tags_allowed'][$iname]); - } // remove tags_excluded tags from tags_allowed array - } - } - if ($tag['html_type'] === 'inline') { // tag type is inline. - foreach ($tag['tags_allowed'] as $iname => $value) { - // remove them from tags_allow array - if (in_array($iname, $all_block_tags)) { // if this is a block type tag then remove - unset($tag['tags_allowed'][$iname]); - } // remove tags_excluded tags from tags_allowed array - } - } - // Build the (shorter/faster) excluded list to be used in the code. (discard tags_allowed[]). - $tag['tags_excluded'] = array(); - foreach ($all_tags as $iname => $value) { - if (!isset($tag['tags_allowed'][$iname])) { - $tag['tags_excluded'][$iname] = true; - } - } - // Hidden tags have no use for these arrays so set them to minimum. - if ($tag['tag_type'] === 'hidden') { - $tag['tags_excluded'] = array(); - $tag['tags_allowed'] = array(); - } - unset($iname); - unset($value); - unset($tag['tags_allowed']); - unset($tag['html_name']); - ksort($tag); -} -unset($i); unset($iname); unset($n); unset($re_name); unset($tagname); unset($tagdata); unset($tag); - - -// -// SUPPORT FUNCTIONS -// - -function esc_sq($str) -{ // Escape single quotes and escapes. - // Note: When sprintf is used to write a string into another string, it is - // interpreted and thus loses its escapes in front of single quotes - // and escapes. This function puts the necessary extras in so that - // when it is written, it looks the same as when it started. - $str = preg_replace('/ # Regex to reliably escape non-escaped single quotes. - ( [^\'\\\\]++(?:\\\\.[^\'\\\\]*+)*+ # One or more non-quotes and escaped anything. - | (?:\\\\.[^\'\\\\]*+)++ # or (same thing but start on an escape). - ) \'/sx', "$1\\'", $str); // Replace all non-escaped quotes with an escaped one. - $str = preg_replace('/ # Regex to reliably escape non-escaped escapes. - ( [^\\\\]++(?:\\\\[^\\\\][^\\\\]*+)*+ # One or more non-escapes and escaped anything-but-escape. - | (?:\\\\[^\\\\][^\\\\]*+)++ # or (same thing but start on an escape). - ) \\\\\\\\/x', '$1\\\\\\\\\\\\\\\\', $str); // Match an escaped escape, then double it. - // Note: The above may look pretty "slashy", but this is precisely what it takes! - // There may be a built-in PHP function that this, but couldnt find it. - return $str; -} - -// Make a nice title out of a file name. -function file2title($file) -{ - // Strip off file extention. - $title = preg_replace('/\.[^.]*$/', '', $file); - // Convert underscores and dashes to spaces. - $title = str_replace(array('_', '-'), ' ', $title); - // Make first letter of each word uppercase. - $title = ucwords($title); - // Space out camelcase words. - $title = preg_replace('/(?<=[a-z])(?=[A-Z])/', ' ', $title); - // Make first letter of insignificant words lowercase. - $title = preg_replace_callback('/(?!^)\b(And|At|A|In|Is|Of|The|To)\b/i', function ($m) { return strtolower($m); }, $title); - // Ensure this is HTML-safe (No [&<>""]). - $title = htmlspecialchars($title); - return $title; -} - -function print_array($a) -{ // Pretty-print an array to string $s. - global $s; - static $depth = 0; // Keep track of nesting depth to allow tidy indentation. - ++$depth; - foreach ($a as $key => $value) { - for ($i = 0; $i < $depth; $i++) { - $s .= "\t"; - } - if (is_string($key)) { - $s .= sprintf("'%s'\t=> ", esc_sq($key)); - } elseif (is_int($key)) { - $s .= sprintf("%d\t=> ", $key); - } - if (is_array($value)) { - $s .= sprintf("array( // count == %d\n", count($value)); - print_array($value); - for ($i = 0; $i < $depth; $i++) { - $s .= "\t"; - } - $s .= sprintf("),\n"); - } elseif (is_int($value)) { - $s .= sprintf("%d,\n", $value); - } elseif (is_bool($value)) { - if ($value) { - $s .= sprintf("TRUE,\n"); - } else { - $s .= sprintf("FALSE,\n"); - } - } elseif (is_string($value)) { - $s .= sprintf("'%s',\n", esc_sq($value)); - } - } - $s = preg_replace('/,$/', '', $s); - --$depth; -} - -// Output the $pd global data array to the cache file. Convert to string first. -$s = " $value) { - for ($i = 0; $i < $depth; $i++) { - $s .= "\t"; - } - if (is_string($key)) { - $s .= sprintf("'%s'\t=> ", esc_sq($key)); - } elseif (is_int($key)) { - $s .= sprintf("%d\t=> ", $key); - } - if (is_array($value)) { - $s .= sprintf("array( // count == %d\n", count($value)); - print_array($value); - for ($i = 0; $i < $depth; $i++) { - $s .= "\t"; - } - $s .= sprintf("),\n"); - } elseif (is_int($value)) { - $s .= sprintf("%d,\n", $value); - } elseif (is_bool($value)) { - if ($value) { - $s .= sprintf("TRUE,\n"); - } else { - $s .= sprintf("FALSE,\n"); - } - } elseif (is_string($value)) { - $s .= sprintf("'%s',\n", esc_sq($value)); - } -} -$s = preg_replace('/,$/', '', $s); ---$depth; -$s .= ");\n"; - -$s .= "?>"; -file_put_contents(FEATHER_ROOT.'cache/cache_parser_data.php', $s); - -// Clean up our global variables. -unset($all_tags); unset($all_block_tags); -unset($bbcd); unset($format_str); unset($handler); unset($key); unset($s); From 710aec756049bc4fc0eaf31472aba1d81fe0d2e1 Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 16:06:26 +0200 Subject: [PATCH 050/353] Tidy up code --- extern.php | 2 +- include/cache.php | 2 +- model/index.php | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/extern.php b/extern.php index 50f9bb09..a8ad9d86 100644 --- a/extern.php +++ b/extern.php @@ -703,7 +703,7 @@ function output_html($feed) include FORUM_CACHE_DIR.'cache_users_info.php'; } - if (!defined('feather_userS_INFO_LOADED')) { + if (!defined('FEATHER_USERS_INFO_LOADED')) { if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { require FEATHER_ROOT.'include/cache.php'; } diff --git a/include/cache.php b/include/cache.php index 77dc13dd..44fbce40 100644 --- a/include/cache.php +++ b/include/cache.php @@ -202,7 +202,7 @@ function generate_users_info_cache() $stats['last_user'] = $last_user[0]; // Output users info as PHP code - $content = ''; + $content = ''; featherbb_write_cache_file('cache_users_info.php', $content); } diff --git a/model/index.php b/model/index.php index 228ea44c..986a3715 100644 --- a/model/index.php +++ b/model/index.php @@ -26,8 +26,6 @@ public function __construct() // Returns page head public function get_page_head() { - - if ($this->config['o_feed_type'] == '1') { $page_head = array('feed' => ''); } elseif ($this->config['o_feed_type'] == '2') { @@ -133,8 +131,6 @@ public function print_categories_forums() $cur_forum->cur_category = 0; $cur_forum->forum_count_formatted = 0; } - - $moderators = ''; if (isset($cur_forum->cur_category)) { $cur_cat = $cur_forum->cur_category; @@ -219,7 +215,7 @@ public function collect_stats() include FORUM_CACHE_DIR.'cache_users_info.php'; } - if (!defined('feather_userS_INFO_LOADED')) { + if (!defined('FEATHER_USERS_INFO_LOADED')) { if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { require FEATHER_ROOT.'include/cache.php'; } From 9bde9c780631082abdace4e6facf073dd2ad9d9e Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 16:32:27 +0200 Subject: [PATCH 051/353] Move and refactor maintenance --- Slim/Extras/Middleware/FeatherBB.php | 32 ++++++++++++++++++- include/functions.php | 48 +--------------------------- 2 files changed, 32 insertions(+), 48 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index e6b9a26d..400e8554 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -351,6 +351,36 @@ public function update_users_online() } } + public function maintenance_message() + { + // Deal with newlines, tabs and multiple spaces + $pattern = array("\t", ' ', ' '); + $replace = array('    ', '  ', '  '); + $message = str_replace($pattern, $replace, $this->data['forum_settings']['o_maintenance_message']); + + $page_title = array(feather_escape($this->data['forum_settings']['o_board_title']), __('Maintenance')); + + define('FEATHER_ACTIVE_PAGE', 'index'); + + $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); + + $header = new \controller\header(); + + $header->setTitle($page_title)->display(); + + $this->app->render('message.php', array( + 'message' => $message, + 'no_back_link' => '', + ) + ); + + $footer = new \controller\footer(); + + $footer->dontStop(); + + $footer->display(); + } + public function check_bans() { global $feather_bans; @@ -475,7 +505,7 @@ public function call() // Check if we are to display a maintenance message if ($this->data['forum_settings']['o_maintenance'] && $this->app->user->g_id > $this->data['forum_env']['FEATHER_ADMIN'] && !defined('FEATHER_TURN_OFF_MAINT')) { - maintenance_message(); + $this->maintenance_message(); } // Load cached bans diff --git a/include/functions.php b/include/functions.php index 7c3cf2a9..4e9ff41a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -908,52 +908,6 @@ function is_all_uppercase($string) } -// -// Display a message when board is in maintenance mode -// -function maintenance_message() -{ - global $feather_config; - - // Deal with newlines, tabs and multiple spaces - $pattern = array("\t", ' ', ' '); - $replace = array('    ', '  ', '  '); - $message = str_replace($pattern, $replace, $feather_config['o_maintenance_message']); - - // Get Slim current session - $feather = \Slim\Slim::getInstance(); - - $page_title = array(feather_escape($feather_config['o_board_title']), __('Maintenance')); - - if (!defined('FEATHER_ACTIVE_PAGE')) { - define('FEATHER_ACTIVE_PAGE', 'index'); - } - - require_once FEATHER_ROOT.'controller/header.php'; - require_once FEATHER_ROOT.'controller/footer.php'; - - $feather->config('templates.path', get_path_view()); - - $header = new \controller\header(); - - $header->setTitle($page_title)->display(); - - $feather->render('message.php', array( - 'message' => $message, - 'no_back_link' => '', - ) - ); - - require_once FEATHER_ROOT.'controller/footer.php'; - - $footer = new \controller\footer(); - - $footer->dontStop(); - - $footer->display(); -} - - // // Display $message and redirect user to $destination_url // @@ -1128,7 +1082,7 @@ function forum_list_langs() continue; } - if (is_dir(FEATHER_ROOT.'lang/'.$entry) && file_exists(FEATHER_ROOT.'lang/'.$entry.'/common.php')) { + if (is_dir(FEATHER_ROOT.'lang/'.$entry) && file_exists(FEATHER_ROOT.'lang/'.$entry.'/common.po')) { $languages[] = $entry; } } From 9aa814292d8bda9314c07b045387d8835361fa27 Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 15 Aug 2015 16:45:12 +0200 Subject: [PATCH 052/353] Refactor functions.php --- extern.php | 18 ++ include/cache.php | 20 ++ include/functions.php | 279 +++++-------------------- install/dblayer/sqlite.php | 26 ++- install/dblayer/sqlite3.php | 26 ++- install/index.php | 126 ++++++++++- style/FeatherBB/view/admin/reports.php | 4 +- view/admin/reports.php | 4 +- 8 files changed, 266 insertions(+), 237 deletions(-) diff --git a/extern.php b/extern.php index a8ad9d86..3bbc6d4a 100644 --- a/extern.php +++ b/extern.php @@ -94,6 +94,24 @@ function escape_cdata($str) return str_replace(']]>', ']]>', $str); } +// +// Try to determine the current URL +// +function get_current_url($max_length = 0) +{ + $protocol = get_current_protocol(); + $port = (isset($_SERVER['SERVER_PORT']) && (($_SERVER['SERVER_PORT'] != '80' && $protocol == 'http') || ($_SERVER['SERVER_PORT'] != '443' && $protocol == 'https')) && strpos($_SERVER['HTTP_HOST'], ':') === false) ? ':'.$_SERVER['SERVER_PORT'] : ''; + + $url = urldecode($protocol.'://'.$_SERVER['HTTP_HOST'].$port.$_SERVER['REQUEST_URI']); + + if (strlen($url) <= $max_length || $max_length == 0) { + return $url; + } + + // We can't find a short enough url + return null; +} + // // Fill $feather->user with default values (for guests) // diff --git a/include/cache.php b/include/cache.php index 44fbce40..f9a56b8a 100644 --- a/include/cache.php +++ b/include/cache.php @@ -153,6 +153,26 @@ function generate_censoring_cache() featherbb_write_cache_file('cache_censoring.php', $content); } +// +// Generate a cache ID based on the last modification time for all stopwords files +// +function generate_stopwords_cache_id() +{ + $files = glob(FEATHER_ROOT.'lang/*/stopwords.txt'); + if ($files === false) { + return 'cache_id_error'; + } + + $hash = array(); + + foreach ($files as $file) { + $hash[] = $file; + $hash[] = filemtime($file); + } + + return sha1(implode('|', $hash)); +} + // // Generate the stopwords cache PHP script diff --git a/include/functions.php b/include/functions.php index 4e9ff41a..3408f44e 100644 --- a/include/functions.php +++ b/include/functions.php @@ -19,25 +19,6 @@ function get_microtime() } -// -// Try to determine the current URL -// -function get_current_url($max_length = 0) -{ - $protocol = get_current_protocol(); - $port = (isset($_SERVER['SERVER_PORT']) && (($_SERVER['SERVER_PORT'] != '80' && $protocol == 'http') || ($_SERVER['SERVER_PORT'] != '443' && $protocol == 'https')) && strpos($_SERVER['HTTP_HOST'], ':') === false) ? ':'.$_SERVER['SERVER_PORT'] : ''; - - $url = urldecode($protocol.'://'.$_SERVER['HTTP_HOST'].$port.$_SERVER['REQUEST_URI']); - - if (strlen($url) <= $max_length || $max_length == 0) { - return $url; - } - - // We can't find a short enough url - return null; -} - - // // Fetch the current protocol in use - http or https // @@ -635,7 +616,6 @@ function paginate_old($num_pages, $cur_page, $link) // // Display a message // - function message($msg, $http_status = null, $no_back_link = false, $dontStop = false) { // Did we receive a custom header? @@ -922,113 +902,6 @@ function redirect($destination_url, $message = null) } -// -// Unset any variables instantiated as a result of register_globals being enabled -// -function forum_unregister_globals() -{ - $register_globals = ini_get('register_globals'); - if ($register_globals === '' || $register_globals === '0' || strtolower($register_globals) === 'off') { - return; - } - - // Prevent script.php?GLOBALS[foo]=bar - if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) { - exit('I\'ll have a steak sandwich and... a steak sandwich.'); - } - - // Variables that shouldn't be unset - $no_unset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES'); - - // Remove elements in $GLOBALS that are present in any of the superglobals - $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array()); - foreach ($input as $k => $v) { - if (!in_array($k, $no_unset) && isset($GLOBALS[$k])) { - unset($GLOBALS[$k]); - unset($GLOBALS[$k]); // Double unset to circumvent the zend_hash_del_key_or_index hole in PHP <4.4.3 and <5.1.4 - } - } -} - - -// -// Removes any "bad" characters (characters which mess with the display of a page, are invisible, etc) from user input -// -function forum_remove_bad_characters() -{ - $_GET = remove_bad_characters($_GET); - $_POST = remove_bad_characters($_POST); - $_COOKIE = remove_bad_characters($_COOKIE); - $_REQUEST = remove_bad_characters($_REQUEST); -} - -// -// Removes any "bad" characters (characters which mess with the display of a page, are invisible, etc) from the given string -// See: http://kb.mozillazine.org/Network.IDN.blacklist_chars -// -function remove_bad_characters($array) -{ - static $bad_utf8_chars; - - if (!isset($bad_utf8_chars)) { - $bad_utf8_chars = array( - "\xcc\xb7" => '', // COMBINING SHORT SOLIDUS OVERLAY 0337 * - "\xcc\xb8" => '', // COMBINING LONG SOLIDUS OVERLAY 0338 * - "\xe1\x85\x9F" => '', // HANGUL CHOSEONG FILLER 115F * - "\xe1\x85\xA0" => '', // HANGUL JUNGSEONG FILLER 1160 * - "\xe2\x80\x8b" => '', // ZERO WIDTH SPACE 200B * - "\xe2\x80\x8c" => '', // ZERO WIDTH NON-JOINER 200C - "\xe2\x80\x8d" => '', // ZERO WIDTH JOINER 200D - "\xe2\x80\x8e" => '', // LEFT-TO-RIGHT MARK 200E - "\xe2\x80\x8f" => '', // RIGHT-TO-LEFT MARK 200F - "\xe2\x80\xaa" => '', // LEFT-TO-RIGHT EMBEDDING 202A - "\xe2\x80\xab" => '', // RIGHT-TO-LEFT EMBEDDING 202B - "\xe2\x80\xac" => '', // POP DIRECTIONAL FORMATTING 202C - "\xe2\x80\xad" => '', // LEFT-TO-RIGHT OVERRIDE 202D - "\xe2\x80\xae" => '', // RIGHT-TO-LEFT OVERRIDE 202E - "\xe2\x80\xaf" => '', // NARROW NO-BREAK SPACE 202F * - "\xe2\x81\x9f" => '', // MEDIUM MATHEMATICAL SPACE 205F * - "\xe2\x81\xa0" => '', // WORD JOINER 2060 - "\xe3\x85\xa4" => '', // HANGUL FILLER 3164 * - "\xef\xbb\xbf" => '', // ZERO WIDTH NO-BREAK SPACE FEFF - "\xef\xbe\xa0" => '', // HALFWIDTH HANGUL FILLER FFA0 * - "\xef\xbf\xb9" => '', // INTERLINEAR ANNOTATION ANCHOR FFF9 * - "\xef\xbf\xba" => '', // INTERLINEAR ANNOTATION SEPARATOR FFFA * - "\xef\xbf\xbb" => '', // INTERLINEAR ANNOTATION TERMINATOR FFFB * - "\xef\xbf\xbc" => '', // OBJECT REPLACEMENT CHARACTER FFFC * - "\xef\xbf\xbd" => '', // REPLACEMENT CHARACTER FFFD * - "\xe2\x80\x80" => ' ', // EN QUAD 2000 * - "\xe2\x80\x81" => ' ', // EM QUAD 2001 * - "\xe2\x80\x82" => ' ', // EN SPACE 2002 * - "\xe2\x80\x83" => ' ', // EM SPACE 2003 * - "\xe2\x80\x84" => ' ', // THREE-PER-EM SPACE 2004 * - "\xe2\x80\x85" => ' ', // FOUR-PER-EM SPACE 2005 * - "\xe2\x80\x86" => ' ', // SIX-PER-EM SPACE 2006 * - "\xe2\x80\x87" => ' ', // FIGURE SPACE 2007 * - "\xe2\x80\x88" => ' ', // FEATHERCTUATION SPACE 2008 * - "\xe2\x80\x89" => ' ', // THIN SPACE 2009 * - "\xe2\x80\x8a" => ' ', // HAIR SPACE 200A * - "\xE3\x80\x80" => ' ', // IDEOGRAPHIC SPACE 3000 * - ); - } - - if (is_array($array)) { - return array_map('remove_bad_characters', $array); - } - - // Strip out any invalid characters - $array = utf8_bad_strip($array); - - // Remove control characters - $array = preg_replace('%[\x00-\x08\x0b-\x0c\x0e-\x1f]%', '', $array); - - // Replace some "bad" characters - $array = str_replace(array_keys($bad_utf8_chars), array_values($bad_utf8_chars), $array); - - return $array; -} - - // // Converts the file size in bytes to a human readable file size // @@ -1094,27 +967,6 @@ function forum_list_langs() } -// -// Generate a cache ID based on the last modification time for all stopwords files -// -function generate_stopwords_cache_id() -{ - $files = glob(FEATHER_ROOT.'lang/*/stopwords.txt'); - if ($files === false) { - return 'cache_id_error'; - } - - $hash = array(); - - foreach ($files as $file) { - $hash[] = $file; - $hash[] = filemtime($file); - } - - return sha1(implode('|', $hash)); -} - - // // function url_valid($url) { // @@ -1291,85 +1143,6 @@ function strip_bad_multibyte_chars($str) return $result; } -// -// Check whether a file/folder is writable. -// -// This function also works on Windows Server where ACLs seem to be ignored. -// -function forum_is_writable($path) -{ - if (is_dir($path)) { - $path = rtrim($path, '/').'/'; - return forum_is_writable($path.uniqid(mt_rand()).'.tmp'); - } - - // Check temporary file for read/write capabilities - $rm = file_exists($path); - $f = @fopen($path, 'a'); - - if ($f === false) { - return false; - } - - fclose($f); - - if (!$rm) { - @unlink($path); - } - - return true; -} - - -// DEBUG FUNCTIONS BELOW - -// -// Display executed queries (if enabled) -// -function display_saved_queries() -{ - - - ?> - -

          -

          -
          -
          - - - - - - - - - - - - - - - - - - -
          -
          -
          -
          - @@ -1444,7 +1217,8 @@ function get_sublink($link, $sublink, $subarg, $args = null) } // Generate breadcrumbs from an array of name and URLs -function breadcrumbs(array $links) { +function breadcrumbs_admin(array $links) +{ foreach ($links as $name => $url) { if ($name != '' && $url != '') { $tmp[] = ''.feather_escape($name).''; @@ -1455,3 +1229,52 @@ function breadcrumbs(array $links) { } return implode(' » ', $tmp); } + + + +// DEBUG FUNCTIONS BELOW + +// +// Display executed queries (if enabled) +// +function display_saved_queries() +{ + ?> + +
          +

          +
          +
          + + + + + + + + + + + + + + + + + + +
          +
          +
          +
          + 'TEXT' ); + public function forum_is_writable($path) + { + if (is_dir($path)) { + $path = rtrim($path, '/').'/'; + return forum_is_writable($path.uniqid(mt_rand()).'.tmp'); + } + + // Check temporary file for read/write capabilities + $rm = file_exists($path); + $f = @fopen($path, 'a'); + + if ($f === false) { + return false; + } + + fclose($f); + + if (!$rm) { + @unlink($path); + } + + return true; + } + public function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) { @@ -52,7 +76,7 @@ public function __construct($db_host, $db_username, $db_password, $db_name, $db_ error('Unable to open database \''.$db_name.'\' for reading. Permission denied', __FILE__, __LINE__); } - if (!forum_is_writable($db_name)) { + if (!$this->forum_is_writable($db_name)) { error('Unable to open database \''.$db_name.'\' for writing. Permission denied', __FILE__, __LINE__); } diff --git a/install/dblayer/sqlite3.php b/install/dblayer/sqlite3.php index f81ec862..9b6438c6 100644 --- a/install/dblayer/sqlite3.php +++ b/install/dblayer/sqlite3.php @@ -34,6 +34,30 @@ class DBLayer '%^(TINY|MEDIUM|LONG)?TEXT$%i' => 'TEXT' ); + public function forum_is_writable($path) + { + if (is_dir($path)) { + $path = rtrim($path, '/').'/'; + return forum_is_writable($path.uniqid(mt_rand()).'.tmp'); + } + + // Check temporary file for read/write capabilities + $rm = file_exists($path); + $f = @fopen($path, 'a'); + + if ($f === false) { + return false; + } + + fclose($f); + + if (!$rm) { + @unlink($path); + } + + return true; + } + public function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) { @@ -54,7 +78,7 @@ public function __construct($db_host, $db_username, $db_password, $db_name, $db_ error('Unable to open database \''.$db_name.'\' for reading. Permission denied', __FILE__, __LINE__); } - if (!forum_is_writable($db_name)) { + if (!$this->forum_is_writable($db_name)) { error('Unable to open database \''.$db_name.'\' for writing. Permission denied', __FILE__, __LINE__); } diff --git a/install/index.php b/install/index.php index f069b5d8..6c481fa4 100644 --- a/install/index.php +++ b/install/index.php @@ -38,11 +38,131 @@ // Load UTF-8 functions require FEATHER_ROOT.'include/utf8/utf8.php'; +// +// Check whether a file/folder is writable. +// +// This function also works on Windows Server where ACLs seem to be ignored. +// +function forum_is_writable($path) +{ + if (is_dir($path)) { + $path = rtrim($path, '/').'/'; + return forum_is_writable($path.uniqid(mt_rand()).'.tmp'); + } + + // Check temporary file for read/write capabilities + $rm = file_exists($path); + $f = @fopen($path, 'a'); + + if ($f === false) { + return false; + } + + fclose($f); + + if (!$rm) { + @unlink($path); + } + + return true; +} + +// +// Removes any "bad" characters (characters which mess with the display of a page, are invisible, etc) from the given string +// See: http://kb.mozillazine.org/Network.IDN.blacklist_chars +// +function remove_bad_characters($array) +{ + static $bad_utf8_chars; + + if (!isset($bad_utf8_chars)) { + $bad_utf8_chars = array( + "\xcc\xb7" => '', // COMBINING SHORT SOLIDUS OVERLAY 0337 * + "\xcc\xb8" => '', // COMBINING LONG SOLIDUS OVERLAY 0338 * + "\xe1\x85\x9F" => '', // HANGUL CHOSEONG FILLER 115F * + "\xe1\x85\xA0" => '', // HANGUL JUNGSEONG FILLER 1160 * + "\xe2\x80\x8b" => '', // ZERO WIDTH SPACE 200B * + "\xe2\x80\x8c" => '', // ZERO WIDTH NON-JOINER 200C + "\xe2\x80\x8d" => '', // ZERO WIDTH JOINER 200D + "\xe2\x80\x8e" => '', // LEFT-TO-RIGHT MARK 200E + "\xe2\x80\x8f" => '', // RIGHT-TO-LEFT MARK 200F + "\xe2\x80\xaa" => '', // LEFT-TO-RIGHT EMBEDDING 202A + "\xe2\x80\xab" => '', // RIGHT-TO-LEFT EMBEDDING 202B + "\xe2\x80\xac" => '', // POP DIRECTIONAL FORMATTING 202C + "\xe2\x80\xad" => '', // LEFT-TO-RIGHT OVERRIDE 202D + "\xe2\x80\xae" => '', // RIGHT-TO-LEFT OVERRIDE 202E + "\xe2\x80\xaf" => '', // NARROW NO-BREAK SPACE 202F * + "\xe2\x81\x9f" => '', // MEDIUM MATHEMATICAL SPACE 205F * + "\xe2\x81\xa0" => '', // WORD JOINER 2060 + "\xe3\x85\xa4" => '', // HANGUL FILLER 3164 * + "\xef\xbb\xbf" => '', // ZERO WIDTH NO-BREAK SPACE FEFF + "\xef\xbe\xa0" => '', // HALFWIDTH HANGUL FILLER FFA0 * + "\xef\xbf\xb9" => '', // INTERLINEAR ANNOTATION ANCHOR FFF9 * + "\xef\xbf\xba" => '', // INTERLINEAR ANNOTATION SEPARATOR FFFA * + "\xef\xbf\xbb" => '', // INTERLINEAR ANNOTATION TERMINATOR FFFB * + "\xef\xbf\xbc" => '', // OBJECT REPLACEMENT CHARACTER FFFC * + "\xef\xbf\xbd" => '', // REPLACEMENT CHARACTER FFFD * + "\xe2\x80\x80" => ' ', // EN QUAD 2000 * + "\xe2\x80\x81" => ' ', // EM QUAD 2001 * + "\xe2\x80\x82" => ' ', // EN SPACE 2002 * + "\xe2\x80\x83" => ' ', // EM SPACE 2003 * + "\xe2\x80\x84" => ' ', // THREE-PER-EM SPACE 2004 * + "\xe2\x80\x85" => ' ', // FOUR-PER-EM SPACE 2005 * + "\xe2\x80\x86" => ' ', // SIX-PER-EM SPACE 2006 * + "\xe2\x80\x87" => ' ', // FIGURE SPACE 2007 * + "\xe2\x80\x88" => ' ', // FEATHERCTUATION SPACE 2008 * + "\xe2\x80\x89" => ' ', // THIN SPACE 2009 * + "\xe2\x80\x8a" => ' ', // HAIR SPACE 200A * + "\xE3\x80\x80" => ' ', // IDEOGRAPHIC SPACE 3000 * + ); + } + + if (is_array($array)) { + return array_map('remove_bad_characters', $array); + } + + // Strip out any invalid characters + $array = utf8_bad_strip($array); + + // Remove control characters + $array = preg_replace('%[\x00-\x08\x0b-\x0c\x0e-\x1f]%', '', $array); + + // Replace some "bad" characters + $array = str_replace(array_keys($bad_utf8_chars), array_values($bad_utf8_chars), $array); + + return $array; +} + // Strip out "bad" UTF-8 characters -forum_remove_bad_characters(); +$_GET = remove_bad_characters($_GET); +$_POST = remove_bad_characters($_POST); +$_COOKIE = remove_bad_characters($_COOKIE); +$_REQUEST = remove_bad_characters($_REQUEST); -// Reverse the effect of register_globals -forum_unregister_globals(); +// +// Unset any variables instantiated as a result of register_globals being enabled +// +$register_globals = ini_get('register_globals'); +if ($register_globals === '' || $register_globals === '0' || strtolower($register_globals) === 'off') { + return; +} + +// Prevent script.php?GLOBALS[foo]=bar +if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) { + exit('I\'ll have a steak sandwich and... a steak sandwich.'); +} + +// Variables that shouldn't be unset +$no_unset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES'); + +// Remove elements in $GLOBALS that are present in any of the superglobals +$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array()); +foreach ($input as $k => $v) { + if (!in_array($k, $no_unset) && isset($GLOBALS[$k])) { + unset($GLOBALS[$k]); + unset($GLOBALS[$k]); // Double unset to circumvent the zend_hash_del_key_or_index hole in PHP <4.4.3 and <5.1.4 + } +} // Disable error reporting for uninitialized variables error_reporting(E_ALL); diff --git a/style/FeatherBB/view/admin/reports.php b/style/FeatherBB/view/admin/reports.php index 0baeaaf1..63251681 100644 --- a/style/FeatherBB/view/admin/reports.php +++ b/style/FeatherBB/view/admin/reports.php @@ -29,7 +29,7 @@ - @@ -79,7 +79,7 @@
          '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), + get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
          - diff --git a/view/admin/reports.php b/view/admin/reports.php index d9a027e3..7b9b1e3d 100644 --- a/view/admin/reports.php +++ b/view/admin/reports.php @@ -29,7 +29,7 @@
          '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), + get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
          - @@ -79,7 +79,7 @@
          '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), + get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
          - From 3f8e7411f32a00607446156dc8b48c12814338d5 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 12:38:53 +0200 Subject: [PATCH 053/353] New FeatherBB middleware architecture --- Slim/Extras/Middleware/FeatherBB.php | 536 --------------------- Slim/Extras/Middleware/FeatherBBAuth.php | 316 ++++++++++++ Slim/Extras/Middleware/FeatherBBLoader.php | 258 ++++++++++ index.php | 9 +- 4 files changed, 579 insertions(+), 540 deletions(-) delete mode 100644 Slim/Extras/Middleware/FeatherBB.php create mode 100644 Slim/Extras/Middleware/FeatherBBAuth.php create mode 100644 Slim/Extras/Middleware/FeatherBBLoader.php diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php deleted file mode 100644 index 400e8554..00000000 --- a/Slim/Extras/Middleware/FeatherBB.php +++ /dev/null @@ -1,536 +0,0 @@ -add(new \Slim\Extras\Middleware\FeatherBB($params)); - * - */ - -namespace Slim\Extras\Middleware; -use DB; - -class FeatherBB extends \Slim\Middleware -{ - protected $data = array(); - - public function __construct(array $user_forum_settings = array()) - { - // Define forum env constants - $this->data['forum_env'] = array( - 'FEATHER' => true, - 'FEATHER_ROOT' => dirname(__FILE__).'/../../../', - 'FORUM_VERSION' => '1.0.0', - 'FORUM_NAME' => 'FeatherBB', - 'FORUM_DB_REVISION' => 21, - 'FORUM_SI_REVISION' => 2, - 'FORUM_PARSER_REVISION' => 2, - 'FORUM_CACHE_DIR' => dirname(__FILE__).'/../../../cache/', // TODO : Move in user settings - 'FEATHER_UNVERIFIED' => 0, - 'FEATHER_ADMIN' => 1, - 'FEATHER_MOD' => 2, - 'FEATHER_GUEST' => 3, - 'FEATHER_MEMBER' => 4, - 'FEATHER_MAX_POSTSIZE' => 32768, - 'FEATHER_SEARCH_MIN_WORD' => 3, - 'FEATHER_SEARCH_MAX_WORD' => 20, - 'FORUM_MAX_COOKIE_SIZE' => 4048, - 'FEATHER_DEBUG' => 1, - 'FEATHER_SHOW_QUERIES' => 1, - 'FEATHER_CACHE_QUERIES' => 0, - ); - - // Define forum settings / TODO : handle settings with a class / User input overrides all previous settings - $this->data['forum_settings'] = array_merge(self::load_default_settings(), $user_forum_settings); - - // Load DB settings - $this->init_db(); - } - - public static function load_default_settings() - { - return array( - // Database - 'db_type' => 'mysqli', - 'db_host' => '', - 'db_name' => '', - 'db_user' => '', - 'db_pass' => '', - 'db_prefix' => '', - // Cookies - 'cookie_name' => 'feather_cookie', - 'cookie_seed' => 'changeme', // MUST BE CHANGED !!! - // Debug - 'debug' => false, - ); - } - - public function init_db() - { - require $this->data['forum_env']['FEATHER_ROOT'].'include/idiorm.php'; - switch ($this->data['forum_settings']['db_type']) { - case 'mysql': - case 'mysqli': - case 'mysql_innodb': - case 'mysqli_innodb': - DB::configure('mysql:host='.$this->data['forum_settings']['db_host'].';dbname='.$this->data['forum_settings']['db_name']); - DB::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); - break; - case 'sqlite'; - case 'sqlite3'; - DB::configure('sqlite:./'.$this->data['forum_settings']['db_name']); - break; - case 'pgsql': - \DB::configure('pgsql:host='.$this->data['forum_settings']['db_host'].'dbname='.$this->data['forum_settings']['db_name']); - break; - } - DB::configure('username', $this->data['forum_settings']['db_user']); - DB::configure('password', $this->data['forum_settings']['db_pass']); - if ($this->data['forum_env']['FEATHER_SHOW_QUERIES'] == 1) { - DB::configure('logging', true); - } - if ($this->data['forum_env']['FEATHER_CACHE_QUERIES'] == 1) { - DB::configure('caching', true); - } - DB::configure('id_column_overrides', array( - $this->data['forum_settings']['db_prefix'].'groups' => 'g_id', - )); - } - - // Getters / setters for Slim container (avoid magic get error) - - public function set_forum_env($key, $value = null) - { - $tmp = (!is_array($key) && !is_null($value)) ? array($key, $value) : $key; - foreach ($tmp as $key => $value) { - $this->app->container->get('forum_env')[$key] = $value; - } - - } - - public function set_forum_settings($key, $value = null) - { - $tmp = (!is_array($key) && !is_null($value)) ? array($key, $value) : $key; - foreach ($tmp as $key => $value) { - $this->app->container->get('forum_settings')[$key] = $value; - } - } - - public function hydrate($data) - { - foreach ($data as $key => $value) { - $this->app->container[$key] = $value; - } - } - - // Legacy function, to ensure backward compatibility with globals - public function env_to_globals(array $vars) - { - foreach ($vars as $key => $value) { - define($key, $value); - } - } - - // Headers - - public function set_headers() - { - // No cache headers - $this->app->response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate'); - $this->app->response->headers->set('Pragma', 'no-cache'); - $this->app->expires(0); - - // For servers which might be configured to send something else - $this->app->response->headers->set('Content-type', 'text/html'); - // Prevent the site to be embedded in iFrame - $this->app->response->headers->set('X-Frame-Options', 'deny'); - // Yeah ! - $this->app->response->headers->set('X-Powered-By', $this->app->forum_env['FORUM_NAME']); - } - - // Auth - - public function authenticate() - { - $now = time(); - - // Get FeatherBB cookie - $cookie_raw = $this->app->getCookie($this->data['forum_settings']['cookie_name']); - // Check if cookie exists and is valid (getCookie method returns false if the data has been tampered locally so it can't decrypt the cookie); - if (isset($cookie_raw)) { - $cookie = json_decode($cookie_raw, true); - $checksum = hash_hmac('sha1', $cookie['user_id'].$cookie['expires'], $this->data['forum_settings']['cookie_seed'].'_checksum'); - // If cookie has a non-guest user, hasn't expired and is legit - if ($cookie['user_id'] > 1 && $cookie['expires'] > $now && $checksum == $cookie['checksum']) { - // Get user info from db - $select_check_cookie = array('u.*', 'g.*', 'o.logged', 'o.idle'); - $where_check_cookie = array('u.id' => intval($cookie['user_id'])); - - $result = DB::for_table('users') - ->table_alias('u') - ->select_many($select_check_cookie) - ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join('online', array('o.user_id', '=', 'u.id'), 'o') - ->where($where_check_cookie) - ->find_result_set(); - - foreach ($result as $this->app->user); - - // Another security check, to prevent identity fraud by changing the user id in the cookie) (might be useless considering the strength of encryption) - if (isset($this->app->user->id) && hash_hmac('sha1', $this->app->user->password, $this->data['forum_settings']['cookie_seed'].'_password_hash') === $cookie['password_hash']) { - $expires = ($cookie['expires'] > $now + $this->data['forum_settings']['o_timeout_visit']) ? $now + 1209600 : $now + $this->data['forum_settings']['o_timeout_visit']; - $this->app->user->is_guest = false; - $this->app->user->is_admmod = $this->app->user->g_id == $this->data['forum_env']['FEATHER_ADMIN'] || $this->app->g_moderator == '1'; - if (!$this->app->user->disp_topics) { - $this->app->user->disp_topics = $this->data['forum_settings']['o_disp_topics_default']; - } - if (!$this->app->user->disp_posts) { - $this->app->user->disp_posts = $this->data['forum_settings']['o_disp_posts_default']; - } - if (!file_exists($this->data['forum_env']['FEATHER_ROOT'].'lang/'.$this->app->user->language)) { - $this->app->user->language = $this->data['forum_settings']['o_default_lang']; - } - if (!file_exists($this->data['forum_env']['FEATHER_ROOT'].'style/'.$this->app->user->style.'.css')) { - $this->app->user->style = $this->data['forum_settings']['o_default_style']; - } - feather_setcookie($this->app->user->id, $this->app->user->password, $expires); - $this->update_online(); - return true; - } - } - } - - // If there is no cookie, or cookie is guest or expired, let's reconnect. - $expires = $now + 31536000; // The cookie expires after a year - - // Fetch guest user - $select_set_default_user = array('u.*', 'g.*', 'o.logged', 'o.last_post', 'o.last_search'); - $where_set_default_user = array('u.id' => '1'); - - $result = DB::for_table('users') - ->table_alias('u') - ->select_many($select_set_default_user) - ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join('online', array('o.ident', '=', $this->app->request->getIp()), 'o', true) - ->where($where_set_default_user) - ->find_result_set(); - - if (!$result) { - exit('Unable to fetch guest information. Your database must contain both a guest user and a guest user group.'); - } - - foreach ($result as $this->app->user); - - $this->app->user->disp_topics = $this->data['forum_settings']['o_disp_topics_default']; - $this->app->user->disp_posts = $this->data['forum_settings']['o_disp_posts_default']; - $this->app->user->timezone = $this->data['forum_settings']['o_default_timezone']; - $this->app->user->dst = $this->data['forum_settings']['o_default_dst']; - $this->app->user->language = $this->data['forum_settings']['o_default_lang']; - $this->app->user->style = $this->data['forum_settings']['o_default_style']; - $this->app->user->is_guest = true; - $this->app->user->is_admmod = false; - - // Update online list - if (!$this->app->user->logged) { - $this->app->user->logged = time(); - - // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table - switch ($this->data['forum_settings']['db_type']) { - case 'mysql': - case 'mysqli': - case 'mysql_innodb': - case 'mysqli_innodb': - case 'sqlite': - case 'sqlite3': - DB::for_table('online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); - break; - - default: - DB::for_table('online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); - break; - } - } else { - DB::for_table('online')->where('ident', $this->app->request->getIp()) - ->update_many('logged', time()); - } - - feather_setcookie(1, feather_hash(uniqid(rand(), true)), $expires); - return true; - } - - public function update_online() - { - $now = time(); - - // Define this if you want this visit to affect the online list and the users last visit data - if (!defined('FEATHER_QUIET_VISIT')) { - // Update the online list - if (!$this->app->user->logged) { - $this->app->user->logged = $now; - - // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table - switch ($this->data['forum_settings']['db_type']) { - case 'mysql': - case 'mysqli': - case 'mysql_innodb': - case 'mysqli_innodb': - case 'sqlite': - case 'sqlite3': - DB::for_table('online')->raw_execute('REPLACE INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) VALUES(:user_id, :ident, :logged)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); - break; - - default: - DB::for_table('online')->raw_execute('INSERT INTO '.$this->data['forum_settings']['db_prefix'].'online (user_id, ident, logged) SELECT :user_id, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE user_id=:user_id)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); - break; - } - - // Reset tracked topics - set_tracked_topics(null); - - } else { - // Special case: We've timed out, but no other user has browsed the forums since we timed out - if ($this->app->user->logged < ($now-$this->data['forum_settings']['o_timeout_visit'])) { - DB::for_table('users')->where('id', $this->app->user->id) - ->find_one() - ->set('last_visit', $this->app->user->logged) - ->save(); - $this->app->user->last_visit = $this->app->user->logged; - } - - $idle_sql = ($this->app->user->idle == '1') ? ', idle=0' : ''; - - DB::for_table('online')->raw_execute('UPDATE '.$this->data['forum_settings']['db_prefix'].'online SET logged='.$now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $this->app->user->id)); - - // Update tracked topics with the current expire time - $cookie_tracked_topics = $this->app->getCookie($this->data['forum_settings']['cookie_name'].'_track'); - if (isset($cookie_tracked_topics)) { - set_tracked_topics(json_decode($cookie_tracked_topics, true)); - } - } - } else { - if (!$this->app->user->logged) { - $this->app->user->logged = $this->app->user->last_visit; - } - } - } - - public function update_users_online() - { - $now = time(); - - // Fetch all online list entries that are older than "o_timeout_online" - $select_update_users_online = array('user_id', 'ident', 'logged', 'idle'); - - $result = \DB::for_table('online')->select_many($select_update_users_online) - ->where_lt('logged', $now-$this->data['forum_settings']['o_timeout_online']) - ->find_many(); - - foreach ($result as $cur_user) { - // If the entry is a guest, delete it - if ($cur_user['user_id'] == '1') { - \DB::for_table('online')->where('ident', $cur_user['ident']) - ->delete_many(); - } else { - // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list - if ($cur_user['logged'] < ($now-$this->data['forum_settings']['o_timeout_visit'])) { - \DB::for_table('users')->where('id', $cur_user['user_id']) - ->find_one() - ->set('last_visit', $cur_user['logged']) - ->save(); - \DB::for_table('online')->where('user_id', $cur_user['user_id']) - ->delete_many(); - } elseif ($cur_user['idle'] == '0') { - \DB::for_table('online')->where('user_id', $cur_user['user_id']) - ->update_many('idle', 1); - } - } - } - } - - public function maintenance_message() - { - // Deal with newlines, tabs and multiple spaces - $pattern = array("\t", ' ', ' '); - $replace = array('    ', '  ', '  '); - $message = str_replace($pattern, $replace, $this->data['forum_settings']['o_maintenance_message']); - - $page_title = array(feather_escape($this->data['forum_settings']['o_board_title']), __('Maintenance')); - - define('FEATHER_ACTIVE_PAGE', 'index'); - - $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); - - $header = new \controller\header(); - - $header->setTitle($page_title)->display(); - - $this->app->render('message.php', array( - 'message' => $message, - 'no_back_link' => '', - ) - ); - - $footer = new \controller\footer(); - - $footer->dontStop(); - - $footer->display(); - } - - public function check_bans() - { - global $feather_bans; - - // Admins and moderators aren't affected - if ($this->app->user->is_admmod || !$feather_bans) { - return; - } - - // Add a dot or a colon (depending on IPv4/IPv6) at the end of the IP address to prevent banned address - // 192.168.0.5 from matching e.g. 192.168.0.50 - $user_ip = get_remote_address(); - $user_ip .= (strpos($user_ip, '.') !== false) ? '.' : ':'; - - $bans_altered = false; - $is_banned = false; - - foreach ($feather_bans as $cur_ban) { - // Has this ban expired? - if ($cur_ban['expire'] != '' && $cur_ban['expire'] <= time()) { - \DB::for_table('bans')->where('id', $cur_ban['id']) - ->delete_many(); - $bans_altered = true; - continue; - } - - if ($cur_ban['username'] != '' && utf8_strtolower($this->app->user->username) == utf8_strtolower($cur_ban['username'])) { - $is_banned = true; - } - - if ($cur_ban['ip'] != '') { - $cur_ban_ips = explode(' ', $cur_ban['ip']); - - $num_ips = count($cur_ban_ips); - for ($i = 0; $i < $num_ips; ++$i) { - // Add the proper ending to the ban - if (strpos($user_ip, '.') !== false) { - $cur_ban_ips[$i] = $cur_ban_ips[$i].'.'; - } else { - $cur_ban_ips[$i] = $cur_ban_ips[$i].':'; - } - - if (substr($user_ip, 0, strlen($cur_ban_ips[$i])) == $cur_ban_ips[$i]) { - $is_banned = true; - break; - } - } - } - - if ($is_banned) { - \DB::for_table('online')->where('ident', $this->app->user->username) - ->delete_many(); - message(__('Ban message').' '.(($cur_ban['expire'] != '') ? __('Ban message 2').' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? __('Ban message 3').'

          '.feather_escape($cur_ban['message']).'

          ' : '

          ').__('Ban message 4').' '.feather_escape($this->data['forum_settings']['o_admin_email']).'.', true, true, true); - } - } - - // If we removed any expired bans during our run-through, we need to regenerate the bans cache - if ($bans_altered) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_bans_cache(); - } - } - - // - - public function call() - { - global $feather_bans, $cookie_name, $cookie_seed, $forum_time_formats, $forum_date_formats, $feather_config; // Legacy - - if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { // Block prefetch requests - $this->set_headers(); - $this->app->response->setStatus(403); - } else { - $this->env_to_globals($this->data['forum_env']); // Legacy : define globals from forum_env - - - require $this->data['forum_env']['FEATHER_ROOT'].'include/utf8/utf8.php'; - require $this->data['forum_env']['FEATHER_ROOT'].'include/functions.php'; - - // Record the start time (will be used to calculate the generation time for the page) - $this->app->start = get_microtime(); - - // Get forum config and load it into forum_settings array - if (file_exists($this->data['forum_env']['FORUM_CACHE_DIR'].'cache_config.php')) { - include $this->data['forum_env']['FORUM_CACHE_DIR'].'cache_config.php'; - } else { - require $this->data['forum_env']['FEATHER_ROOT'].'include/cache.php'; - generate_config_cache(); - require $this->data['forum_env']['FORUM_CACHE_DIR'].'cache_config.php'; - } - $this->data['forum_settings'] = array_merge($feather_config, $this->data['forum_settings']); - // Define time formats - $forum_time_formats = array($this->data['forum_settings']['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); - $forum_date_formats = array($this->data['forum_settings']['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); - // Populate Feather object (Slim instance) - $this->hydrate($this->data); - - $this->app->config = $this->data['forum_settings']; // Legacy - extract($this->data['forum_settings']); // Legacy - - $this->set_headers(); - - // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) - setlocale(LC_CTYPE, 'C'); - - $this->authenticate(); - - // Load l10n - require $this->data['forum_env']['FEATHER_ROOT'].'include/pomo/MO.php'; - require $this->data['forum_env']['FEATHER_ROOT'].'include/l10n.php'; - - // Attempt to load the language file - if (file_exists($this->data['forum_env']['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.mo')) { - load_textdomain('featherbb', $this->data['forum_env']['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.mo'); - } - else { - die('There is no valid language pack \''.feather_escape($this->app->user->language).'\' installed. Please reinstall a language of that name'); - } - - // Check if we are to display a maintenance message - if ($this->data['forum_settings']['o_maintenance'] && $this->app->user->g_id > $this->data['forum_env']['FEATHER_ADMIN'] && !defined('FEATHER_TURN_OFF_MAINT')) { - $this->maintenance_message(); - } - - // Load cached bans - if (file_exists($this->data['forum_env']['FORUM_CACHE_DIR'].'cache_bans.php')) { - include $this->data['forum_env']['FORUM_CACHE_DIR'].'cache_bans.php'; - } - - if (!defined('FEATHER_BANS_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require $this->data['forum_env']['FEATHER_ROOT'].'include/cache.php'; - } - - generate_bans_cache(); - require $this->data['forum_env']['FORUM_CACHE_DIR'].'cache_bans.php'; - } - - // Check if current user is banned - $this->check_bans(); - - // Update online list - $this->update_users_online(); - - // Configure Slim - $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); - $this->next->call(); - } - } -} diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php new file mode 100644 index 00000000..c75ad413 --- /dev/null +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -0,0 +1,316 @@ +add(new \Slim\Extras\Middleware\FeatherBBAuth()); + * + */ + +namespace Slim\Extras\Middleware; +use DB; + +class FeatherBBAuth extends \Slim\Middleware +{ + public function __construct() + { + } + + public function authenticate() + { + $now = time(); + + // Get FeatherBB cookie + $cookie_raw = $this->app->getCookie($this->app->forum_settings['cookie_name']); + // Check if cookie exists and is valid (getCookie method returns false if the data has been tampered locally so it can't decrypt the cookie); + if (isset($cookie_raw)) { + $cookie = json_decode($cookie_raw, true); + $checksum = hash_hmac('sha1', $cookie['user_id'].$cookie['expires'], $this->app->forum_settings['cookie_seed'].'_checksum'); + // If cookie has a non-guest user, hasn't expired and is legit + if ($cookie['user_id'] > 1 && $cookie['expires'] > $now && $checksum == $cookie['checksum']) { + // Get user info from db + $select_check_cookie = array('u.*', 'g.*', 'o.logged', 'o.idle'); + $where_check_cookie = array('u.id' => intval($cookie['user_id'])); + + $result = DB::for_table('users') + ->table_alias('u') + ->select_many($select_check_cookie) + ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') + ->left_outer_join('online', array('o.user_id', '=', 'u.id'), 'o') + ->where($where_check_cookie) + ->find_result_set(); + + foreach ($result as $this->app->user); + + // Another security check, to prevent identity fraud by changing the user id in the cookie) (might be useless considering the strength of encryption) + if (isset($this->app->user->id) && hash_hmac('sha1', $this->app->user->password, $this->app->forum_settings['cookie_seed'].'_password_hash') === $cookie['password_hash']) { + $expires = ($cookie['expires'] > $now + $this->app->forum_settings['o_timeout_visit']) ? $now + 1209600 : $now + $this->app->forum_settings['o_timeout_visit']; + $this->app->user->is_guest = false; + $this->app->user->is_admmod = $this->app->user->g_id == $this->app->forum_env['FEATHER_ADMIN'] || $this->app->g_moderator == '1'; + if (!$this->app->user->disp_topics) { + $this->app->user->disp_topics = $this->app->forum_settings['o_disp_topics_default']; + } + if (!$this->app->user->disp_posts) { + $this->app->user->disp_posts = $this->app->forum_settings['o_disp_posts_default']; + } + if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language)) { + $this->app->user->language = $this->app->forum_settings['o_default_lang']; + } + if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'style/'.$this->app->user->style.'.css')) { + $this->app->user->style = $this->app->forum_settings['o_default_style']; + } + feather_setcookie($this->app->user->id, $this->app->user->password, $expires); + $this->update_online(); + return true; + } + } + } + + // If there is no cookie, or cookie is guest or expired, let's reconnect. + $expires = $now + 31536000; // The cookie expires after a year + + // Fetch guest user + $select_set_default_user = array('u.*', 'g.*', 'o.logged', 'o.last_post', 'o.last_search'); + $where_set_default_user = array('u.id' => '1'); + + $result = DB::for_table('users') + ->table_alias('u') + ->select_many($select_set_default_user) + ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') + ->left_outer_join('online', array('o.ident', '=', $this->app->request->getIp()), 'o', true) + ->where($where_set_default_user) + ->find_result_set(); + + if (!$result) { + exit('Unable to fetch guest information. Your database must contain both a guest user and a guest user group.'); + } + + foreach ($result as $this->app->user); + + $this->app->user->disp_topics = $this->app->forum_settings['o_disp_topics_default']; + $this->app->user->disp_posts = $this->app->forum_settings['o_disp_posts_default']; + $this->app->user->timezone = $this->app->forum_settings['o_default_timezone']; + $this->app->user->dst = $this->app->forum_settings['o_default_dst']; + $this->app->user->language = $this->app->forum_settings['o_default_lang']; + $this->app->user->style = $this->app->forum_settings['o_default_style']; + $this->app->user->is_guest = true; + $this->app->user->is_admmod = false; + + // Update online list + if (!$this->app->user->logged) { + $this->app->user->logged = time(); + + // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table + switch ($this->app->forum_settings['db_type']) { + case 'mysql': + case 'mysqli': + case 'mysql_innodb': + case 'mysqli_innodb': + case 'sqlite': + case 'sqlite3': + DB::for_table('online')->raw_execute('REPLACE INTO '.$this->app->forum_settings['db_prefix'].'online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); + break; + + default: + DB::for_table('online')->raw_execute('INSERT INTO '.$this->app->forum_settings['db_prefix'].'online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); + break; + } + } else { + DB::for_table('online')->where('ident', $this->app->request->getIp()) + ->update_many('logged', time()); + } + + feather_setcookie(1, feather_hash(uniqid(rand(), true)), $expires); + return true; + } + + public function update_online() + { + $now = time(); + + // Define this if you want this visit to affect the online list and the users last visit data + if (!defined('FEATHER_QUIET_VISIT')) { + // Update the online list + if (!$this->app->user->logged) { + $this->app->user->logged = $now; + + // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table + switch ($this->app->forum_settings['db_type']) { + case 'mysql': + case 'mysqli': + case 'mysql_innodb': + case 'mysqli_innodb': + case 'sqlite': + case 'sqlite3': + DB::for_table('online')->raw_execute('REPLACE INTO '.$this->app->forum_settings['db_prefix'].'online (user_id, ident, logged) VALUES(:user_id, :ident, :logged)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); + break; + + default: + DB::for_table('online')->raw_execute('INSERT INTO '.$this->app->forum_settings['db_prefix'].'online (user_id, ident, logged) SELECT :user_id, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE user_id=:user_id)', array(':user_id' => $this->app->user->id, ':ident' => $this->app->user->username, ':logged' => $this->app->user->logged)); + break; + } + + // Reset tracked topics + set_tracked_topics(null); + + } else { + // Special case: We've timed out, but no other user has browsed the forums since we timed out + if ($this->app->user->logged < ($now-$this->app->forum_settings['o_timeout_visit'])) { + DB::for_table('users')->where('id', $this->app->user->id) + ->find_one() + ->set('last_visit', $this->app->user->logged) + ->save(); + $this->app->user->last_visit = $this->app->user->logged; + } + + $idle_sql = ($this->app->user->idle == '1') ? ', idle=0' : ''; + + DB::for_table('online')->raw_execute('UPDATE '.$this->app->forum_settings['db_prefix'].'online SET logged='.$now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $this->app->user->id)); + + // Update tracked topics with the current expire time + $cookie_tracked_topics = $this->app->getCookie($this->app->forum_settings['cookie_name'].'_track'); + if (isset($cookie_tracked_topics)) { + set_tracked_topics(json_decode($cookie_tracked_topics, true)); + } + } + } else { + if (!$this->app->user->logged) { + $this->app->user->logged = $this->app->user->last_visit; + } + } + } + + public function update_users_online() + { + $now = time(); + + // Fetch all online list entries that are older than "o_timeout_online" + $select_update_users_online = array('user_id', 'ident', 'logged', 'idle'); + + $result = \DB::for_table('online')->select_many($select_update_users_online) + ->where_lt('logged', $now-$this->app->forum_settings['o_timeout_online']) + ->find_many(); + + foreach ($result as $cur_user) { + // If the entry is a guest, delete it + if ($cur_user['user_id'] == '1') { + \DB::for_table('online')->where('ident', $cur_user['ident']) + ->delete_many(); + } else { + // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list + if ($cur_user['logged'] < ($now-$this->app->forum_settings['o_timeout_visit'])) { + \DB::for_table('users')->where('id', $cur_user['user_id']) + ->find_one() + ->set('last_visit', $cur_user['logged']) + ->save(); + \DB::for_table('online')->where('user_id', $cur_user['user_id']) + ->delete_many(); + } elseif ($cur_user['idle'] == '0') { + \DB::for_table('online')->where('user_id', $cur_user['user_id']) + ->update_many('idle', 1); + } + } + } + } + + public function check_bans() + { + global $feather_bans; + + // Admins and moderators aren't affected + if ($this->app->user->is_admmod || !$feather_bans) { + return; + } + + // Add a dot or a colon (depending on IPv4/IPv6) at the end of the IP address to prevent banned address + // 192.168.0.5 from matching e.g. 192.168.0.50 + $user_ip = get_remote_address(); + $user_ip .= (strpos($user_ip, '.') !== false) ? '.' : ':'; + + $bans_altered = false; + $is_banned = false; + + foreach ($feather_bans as $cur_ban) { + // Has this ban expired? + if ($cur_ban['expire'] != '' && $cur_ban['expire'] <= time()) { + \DB::for_table('bans')->where('id', $cur_ban['id']) + ->delete_many(); + $bans_altered = true; + continue; + } + + if ($cur_ban['username'] != '' && utf8_strtolower($this->app->user->username) == utf8_strtolower($cur_ban['username'])) { + $is_banned = true; + } + + if ($cur_ban['ip'] != '') { + $cur_ban_ips = explode(' ', $cur_ban['ip']); + + $num_ips = count($cur_ban_ips); + for ($i = 0; $i < $num_ips; ++$i) { + // Add the proper ending to the ban + if (strpos($user_ip, '.') !== false) { + $cur_ban_ips[$i] = $cur_ban_ips[$i].'.'; + } else { + $cur_ban_ips[$i] = $cur_ban_ips[$i].':'; + } + + if (substr($user_ip, 0, strlen($cur_ban_ips[$i])) == $cur_ban_ips[$i]) { + $is_banned = true; + break; + } + } + } + + if ($is_banned) { + \DB::for_table('online')->where('ident', $this->app->user->username) + ->delete_many(); + message(__('Ban message').' '.(($cur_ban['expire'] != '') ? __('Ban message 2').' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? __('Ban message 3').'

          '.feather_escape($cur_ban['message']).'

          ' : '

          ').__('Ban message 4').' '.feather_escape($this->app->forum_settings['o_admin_email']).'.', true, true, true); + } + } + + // If we removed any expired bans during our run-through, we need to regenerate the bans cache + if ($bans_altered) { + if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { + require FEATHER_ROOT.'include/cache.php'; + } + + generate_bans_cache(); + } + } + + public function call() + { + global $feather_bans, $cookie_name, $cookie_seed; + + $this->authenticate(); + + // Load cached bans + if (file_exists($this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php')) { + include $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; + } + + if (!defined('FEATHER_BANS_LOADED')) { + if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { + require $this->app->forum_env['FEATHER_ROOT'].'include/cache.php'; + } + + generate_bans_cache(); + require $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; + } + + // Check if current user is banned + $this->check_bans(); + + // Update online list + $this->update_users_online(); + + // Configure Slim + $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); + $this->next->call(); + } +} diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php new file mode 100644 index 00000000..16f585a3 --- /dev/null +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -0,0 +1,258 @@ +add(new \Slim\Extras\Middleware\FeatherBBLoader(array $config)); + * + */ + +namespace Slim\Extras\Middleware; +use DB; + +class FeatherBBLoader extends \Slim\Middleware +{ + protected $forum_env, + $forum_settings; + protected $headers = array( + 'Cache-Control' => 'no-cache, no-store, must-revalidate', + 'Pragma' => 'no-cache', + 'Content-type' => 'text/html', + 'X-Frame-Options' => 'deny'); + + public function __construct(array $data) + { + // Define some core variables + $this->forum_env['FEATHER_ROOT'] = realpath(dirname(__FILE__). '../../../'); + $this->forum_env['FORUM_CACHE_DIR'] = is_writable($this->forum_env['FEATHER_ROOT'].$data['cache_dir']) ? realpath($this->forum_env['FEATHER_ROOT'].$data['cache_dir']).'/' : null; + $this->forum_env['FORUM_CONFIG_FILE'] = is_file($this->forum_env['FEATHER_ROOT'].$data['config_file']) ? realpath($this->forum_env['FEATHER_ROOT'].$data['config_file']) : null; + // Populate forum_env + $this->forum_env = array_merge(self::load_default_forum_env(), $this->forum_env); + $this->env_to_globals($this->forum_env); // Legacy + + // Load files + require $this->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; // ? + require $this->forum_env['FEATHER_ROOT'].'include/functions.php'; + require $this->forum_env['FEATHER_ROOT'].'include/pomo/MO.php'; + require $this->forum_env['FEATHER_ROOT'].'include/l10n.php'; + require $this->forum_env['FEATHER_ROOT'].'include/idiorm.php'; + + // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) + setlocale(LC_CTYPE, 'C'); + // Reset opcache while debugging + opcache_reset(); + } + + public static function load_default_forum_env() + { + return array( + 'FEATHER' => true, // Legacy + 'FEATHER_ROOT' => '', + 'FORUM_CONFIG_FILE' => 'include/config.php', + 'FORUM_CACHE_DIR' => 'cache/', + 'FORUM_VERSION' => '1.0.0', + 'FORUM_NAME' => 'FeatherBB', + 'FORUM_DB_REVISION' => 21, + 'FORUM_SI_REVISION' => 2, + 'FORUM_PARSER_REVISION' => 2, + 'FEATHER_UNVERIFIED' => 0, + 'FEATHER_ADMIN' => 1, + 'FEATHER_MOD' => 2, + 'FEATHER_GUEST' => 3, + 'FEATHER_MEMBER' => 4, + 'FEATHER_MAX_POSTSIZE' => 32768, + 'FEATHER_SEARCH_MIN_WORD' => 3, + 'FEATHER_SEARCH_MAX_WORD' => 20, + 'FORUM_MAX_COOKIE_SIZE' => 4048, + 'FEATHER_DEBUG' => 1, + 'FEATHER_SHOW_QUERIES' => 1, + 'FEATHER_CACHE_QUERIES' => 0, + ); + } + + public static function load_default_forum_settings() + { + return array( + // Database + 'db_type' => 'mysqli', + 'db_host' => '', + 'db_name' => '', + 'db_user' => '', + 'db_pass' => '', + 'db_prefix' => '', + // Cookies + 'cookie_name' => 'feather_cookie', + 'cookie_seed' => 'changeme', // MUST BE CHANGED !!! + // Debug + 'debug' => false, + ); + } + + public function init_db() + { + switch ($this->forum_settings['db_type']) { + case 'mysql': + case 'mysqli': + case 'mysql_innodb': + case 'mysqli_innodb': + DB::configure('mysql:host='.$this->forum_settings['db_host'].';dbname='.$this->forum_settings['db_name']); + DB::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); + break; + case 'sqlite'; + case 'sqlite3'; + DB::configure('sqlite:./'.$this->forum_settings['db_name']); + break; + case 'pgsql': + \DB::configure('pgsql:host='.$this->forum_settings['db_host'].'dbname='.$this->forum_settings['db_name']); + break; + } + DB::configure('username', $this->forum_settings['db_user']); + DB::configure('password', $this->forum_settings['db_pass']); + if ($this->forum_env['FEATHER_SHOW_QUERIES'] == 1) { + DB::configure('logging', true); + } + if ($this->forum_env['FEATHER_CACHE_QUERIES'] == 1) { + DB::configure('caching', true); + } + DB::configure('id_column_overrides', array( + $this->forum_settings['db_prefix'].'groups' => 'g_id', + )); + } + + // Getters / setters for Slim container (avoid magic get error) + + public function set_forum_env($key, $value = null) + { + $tmp = (!is_array($key) && !is_null($value)) ? array($key, $value) : $key; + foreach ($tmp as $key => $value) { + $this->app->container->get('forum_env')[$key] = $value; + } + + } + + public function set_forum_settings($key, $value = null) + { + $tmp = (!is_array($key) && !is_null($value)) ? array($key, $value) : $key; + foreach ($tmp as $key => $value) { + $this->app->container->get('forum_settings')[$key] = $value; + } + } + + // Legacy function, to ensure backward compatibility with globals + public function env_to_globals(array $vars) + { + foreach ($vars as $key => $value) { + define($key, $value); + } + } + + public function hydrate($name, array $data) + { + $this->app->container[$name] = $data; + } + + // Headers + + public function set_headers() + { + foreach ($this->headers as $label => $value) { + $this->app->response->headers->set($label, $value); + } + $this->app->response()->headers()->set('X-Powered-By', $this->forum_env['FORUM_NAME']); + $this->app->expires(0); + } + + public function maintenance_message() + { + // Deal with newlines, tabs and multiple spaces + $pattern = array("\t", ' ', ' '); + $replace = array('    ', '  ', '  '); + $message = str_replace($pattern, $replace, $this->forum_settings['o_maintenance_message']); + + $page_title = array(feather_escape($this->forum_settings['o_board_title']), __('Maintenance')); + + define('FEATHER_ACTIVE_PAGE', 'index'); + + $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); + + $header = new \controller\header(); + + $header->setTitle($page_title)->display(); + + $this->app->render('message.php', array( + 'message' => $message, + 'no_back_link' => '', + ) + ); + + $footer = new \controller\footer(); + + $footer->dontStop(); + + $footer->display(); + } + + public function call() + { + global $forum_time_formats, $forum_date_formats, $feather_config; // Legacy + + // Set headers + $this->set_headers(); + + // Record start time + $this->app->start = get_microtime(); + + // Populate FeatherBB Slim object with forum_env vars + $this->hydrate('forum_env', $this->forum_env); + + if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { // Block prefetch requests + $this->set_headers(); + return $this->app->response->setStatus(403); // Send forbidden header + } + + if (is_null($this->forum_env['FORUM_CONFIG_FILE'])) { + echo 'install !!!!'; + return; + } + + $config_file = json_decode(file_get_contents($this->forum_env['FORUM_CONFIG_FILE']), true); + if (!is_null($config_file)) { + $this->forum_settings = array_merge(self::load_default_forum_settings(), $config_file); + } else { + // Erreur + echo 'Wrong config format'; + } + + // Init DB + $this->init_db(); + + // Get forum settings from DB/cache and load it into forum_settings array + if (file_exists($this->forum_env['FORUM_CACHE_DIR'].'cache_config.php')) { + include $this->forum_env['FORUM_CACHE_DIR'].'cache_config.php'; + } else { + require $this->forum_env['FEATHER_ROOT'].'include/cache.php'; + generate_config_cache(); + require $this->forum_env['FORUM_CACHE_DIR'].'cache_config.php'; + } + + // Finalize forum_settings array + $this->forum_settings = array_merge($feather_config, $this->forum_settings); + + // Populate FeatherBB Slim object with forum_settings vars + $this->hydrate('forum_settings', $this->forum_settings); + $this->app->config = $this->forum_settings; // Legacy + var_dump($this->app->config); + extract($this->forum_settings); // Legacy + + // Define time formats + $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); + $forum_date_formats = array($this->forum_settings['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); + + // Call FeatherBBAuth middleware + $this->next->call(); + } +} diff --git a/index.php b/index.php index cc432991..f5aa57f8 100644 --- a/index.php +++ b/index.php @@ -19,13 +19,14 @@ // Instantiate Slim $feather = new \Slim\Slim(); - -// Load the config -require 'include/config.php'; +$feather_settings = array('config_file' => 'include/config.php', + 'cache_dir' => 'cache/'); // Load middlewares $feather->add(new \Slim\Extras\Middleware\CsrfGuard('featherbb_csrf')); // CSRF -$feather->add(new \Slim\Extras\Middleware\FeatherBB($feather_user_settings)); // FeatherBB +$feather->add(new \Slim\Extras\Middleware\FeatherBBAuth()); +$feather->add(new \Slim\Extras\Middleware\FeatherBBLoader($feather_settings)); // FeatherBB + // FeatherBB // Load the routes require 'include/routes.php'; From 430af94408d043b7228530efe5aa536f455cb037 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 12:55:11 +0200 Subject: [PATCH 054/353] Start implementing installer --- Slim/Extras/Middleware/FeatherBBLoader.php | 4 +- controller/install.php | 272 +++++++++++++++ model/install.php | 370 +++++++++++++++++++++ style/FeatherBB/view/install.php | 221 ++++++++++++ 4 files changed, 865 insertions(+), 2 deletions(-) create mode 100644 controller/install.php create mode 100644 model/install.php create mode 100644 style/FeatherBB/view/install.php diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 16f585a3..4d2ebf59 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -215,7 +215,8 @@ public function call() } if (is_null($this->forum_env['FORUM_CONFIG_FILE'])) { - echo 'install !!!!'; + $installer = new \controller\install; + $installer->run(); return; } @@ -245,7 +246,6 @@ public function call() // Populate FeatherBB Slim object with forum_settings vars $this->hydrate('forum_settings', $this->forum_settings); $this->app->config = $this->forum_settings; // Legacy - var_dump($this->app->config); extract($this->forum_settings); // Legacy // Define time formats diff --git a/controller/install.php b/controller/install.php new file mode 100644 index 00000000..de23eae8 --- /dev/null +++ b/controller/install.php @@ -0,0 +1,272 @@ + 'MySQL', + 'pgsql' => 'PostgreSQL', + 'sqlite' => 'SQLite', + 'sqlite3' => 'SQLite3', + ); + protected $optional_fields = array('db_user', 'db_pass', 'db_prefix'); + protected $default_style = 'FeatherBB'; + protected $config_keys = array('db_type', 'db_host', 'db_name', 'db_user', 'db_pass', 'db_prefix'); + protected $default_config_path = 'include/config.php'; + protected $errors = array(); + + public function __construct() + { + $this->feather = \Slim\Slim::getInstance(); + $this->model = new \model\install(); + + // // Check to see whether FeatherBB is already installed + // if (!is_null($this->feather->forum_env['CONFIG_PATH'])) { + // $config = @json_decode(file_get_contents($this->feather->forum_env['FEATHER_ROOT'].$this->feather->forum_env['CONFIG_PATH']), true); + // if (is_array($config)) { + // redirect(get_link(''), __('Already installed')); + // } + // } + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/English/install.mo'); + } + + public function run() + { + if ($this->feather->request->isPost()) { + $missing_fields = array(); + $data = array_map(function ($item) { + return feather_escape(feather_trim($item)); + }, $this->feather->request->post('install')); + + foreach ($data as $field => $value) { + // Handle empty fields + if (empty($value)) { + // If the field is required, or if user and pass are missing even though mysql or pgsql are selected as DB + if (!in_array($field, $this->optional_fields) || (in_array($field, array('db_user', 'db_pass')) && in_array($data['db_type'], array('mysql', 'pgsql')))) { + $missing_fields[] = $field; + } + } + } + + if (!empty($missing_fields)) { + $this->errors = 'The following fields are required but are missing : '.implode(', ', $missing_fields); + } else { // Missing fields, so we don't need to validate the others + // VALIDATION + // Make sure base_url doesn't end with a slash + if (substr($data['base_url'], -1) == '/') { + $data['base_url'] = substr($data['base_url'], 0, -1); + } + + // Validate username and passwords + if (feather_strlen($data['username']) < 2) { + $this->errors[] = __('Username 1'); + } elseif (feather_strlen($data['username']) > 25) { // This usually doesn't happen since the form element only accepts 25 characters + $this->errors[] = __('Username 2'); + } elseif (!strcasecmp($data['username'], 'Guest')) { + $this->errors[] = __('Username 3'); + } elseif (preg_match('%[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}%', $data['username']) || preg_match('%((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))%', $data['username'])) { + $this->errors[] = __('Username 4'); + } elseif ((strpos($data['username'], '[') !== false || strpos($data['username'], ']') !== false) && strpos($data['username'], '\'') !== false && strpos($data['username'], '"') !== false) { + $this->errors[] = __('Username 5'); + } elseif (preg_match('%(?:\[/?(?:b|u|i|h|colou?r|quote|code|img|url|email|list)\]|\[(?:code|quote|list)=)%i', $data['username'])) { + $this->errors[] = __('Username 6'); + } + + if (feather_strlen($data['password']) < 6) { + $this->errors[] = __('Short password'); + } elseif ($data['password'] != $data['password_conf']) { + $this->errors[] = __('Passwords not match'); + } + + // Validate email + if (!filter_var($data['email'], FILTER_VALIDATE_EMAIL)) { + $this->errors[] = __('Wrong email'); + } + + // Validate language + if (!in_array($data['default_lang'], forum_list_langs())) { + $this->errors[] = __('Error default language'); + } + + // Check if the cache directory is writable + if (!is_writable($this->feather->forum_env['FORUM_CACHE_DIR'])) { + $this->errors[] = sprintf(__('Alert cache'), $this->feather->forum_env['FORUM_CACHE_DIR']); + } + + // Check if default avatar directory is writable + if (!is_writable($this->feather->forum_env['FEATHER_ROOT'].'img/avatars/')) { + $this->errors[] = sprintf(__('Alert avatar'), $this->feather->forum_env['FEATHER_ROOT'].'img/avatars/'); + } + + // Validate db_prefix if existing + if (!empty($data['db_prefix']) && ((strlen($data['db_prefix']) > 0 && (!preg_match('%^[a-zA-Z_][a-zA-Z0-9_]*$%', $data['db_prefix']) || strlen($data['db_prefix']) > 40)))) { + $this->errors[] = sprintf(__('Table prefix error'), $data['db_prefix']); + } + } + + // End validation and check errors + if (!empty($this->errors)) { + $this->feather->flashNow('error', $this->errors); + $this->feather->view->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); + $this->feather->view->setData('flash', $this->feather->environment['slim.flash']); + $this->feather->view->display('install.php', array( + 'feather' => $this->feather, + 'languages' => forum_list_langs(), + 'supported_dbs' => $this->supported_dbs, + 'data' => $data, + 'alerts' => array(), + )); + } else { + $data['default_style'] = $this->default_style; + $data['avatars'] = in_array(strtolower(@ini_get('file_uploads')), array('on', 'true', '1')) ? 1 : 0; + $this->create_config($data); + } + } else { + $data = array('title' => __('My FeatherBB Forum'), + 'description' => '

          '.__('Description').'

          ', + 'base_url' => $this->feather->request->getUrl().$this->feather->request->getRootUri(), + 'default_lang' => 'English'); + $this->feather->view->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); + $this->feather->view->setData('flash', $this->feather->environment['slim.flash']); + $this->feather->view->display('install.php', array( + 'feather' => $this->feather, + 'languages' => forum_list_langs(), + 'supported_dbs' => $this->supported_dbs, + 'data' => $data, + 'alerts' => array())); + } + } + + public function create_config(array $data) + { + // Generate config ... + $config = array(); + foreach ($data as $key => $value) { + if (in_array($key, $this->config_keys)) { + $config[$key] = $value; + } + } + + $config = array_merge($config, array('cookie_name' => mb_strtolower($this->feather->forum_env['FORUM_NAME']).'_cookie_'.random_key(7, false, true), + 'cookie_seed' => random_key(16, false, true))); + + // ... And write it on disk + if ($this->write_config(json_encode($config, JSON_PRETTY_PRINT))) { + //$this->create_db($data); + echo 'Config created'; + } + } + + public function create_db(array $data) + { + // Check if FeatherBB DB isn't installed already + if ($this->model->is_installed()) { + //redirect(get_link(''), 'DB already installed'); + } + + // Create tables + foreach ($this->model->get_database_scheme() as $table => $sql) { + if (!$this->model->create_table($table, $sql)) { + // Error handling + $this->errors[] = 'A problem was encountered while creating table '.$table; + } + } + echo 'ok'; + } + + public function write_config($json) + { + return file_put_contents($this->feather->forum_env['FEATHER_ROOT'].$this->default_config_path, $json); + } + + public function load_default_config(array $data) + { + $config = array( + 'o_cur_version' => $this->feather->forum_env['FORUM_VERSION'], + 'o_database_revision' => $this->feather->forum_env['FORUM_DB_REVISION'], + 'o_searchindex_revision' => $this->feather->forum_env['FORUM_SI_REVISION'], + 'o_parser_revision' => $this->feather->forum_env['FORUM_PARSER_REVISION'], + 'o_board_title' => $data['title'], + 'o_board_desc' => $data['description'], + 'o_default_timezone' => 0, + 'o_time_format' => 'H:i:s', + 'o_date_format' => 'Y-m-d', + 'o_timeout_visit' => 1800, + 'o_timeout_online' => 300, + 'o_redirect_delay' => 1, + 'o_show_version' => 0, + 'o_show_user_info' => 1, + 'o_show_post_count' => 1, + 'o_signatures' => 1, + 'o_smilies' => 1, + 'o_smilies_sig' => 1, + 'o_make_links' => 1, + 'o_default_lang' => $data['default_lang'], + 'o_default_style' => $data['default_style'], + 'o_default_user_group' => 4, + 'o_topic_review' => 15, + 'o_disp_topics_default' => 30, + 'o_disp_posts_default' => 25, + 'o_indent_num_spaces' => 4, + 'o_quote_depth' => 3, + 'o_quickpost' => 1, + 'o_users_online' => 1, + 'o_censoring' => 0, + 'o_show_dot' => 0, + 'o_topic_views' => 1, + 'o_quickjump' => 1, + 'o_gzip' => 0, + 'o_additional_navlinks' => '', + 'o_report_method' => 0, + 'o_regs_report' => 0, + 'o_default_email_setting' => 1, + 'o_mailing_list' => $data['email'], + 'o_avatars' => $data['avatars'], + 'o_avatars_dir' => 'img/avatars', + 'o_avatars_width' => 60, + 'o_avatars_height' => 60, + 'o_avatars_size' => 10240, + 'o_search_all_forums' => 1, + 'o_base_url' => $data['base_url'], + 'o_admin_email' => $data['email'], + 'o_webmaster_email' => $data['email'], + 'o_forum_subscriptions' => 1, + 'o_topic_subscriptions' => 1, + 'o_smtp_host' => null, + 'o_smtp_user' => null, + 'o_smtp_pass' => null, + 'o_smtp_ssl' => 0, + 'o_regs_allow' => 1, + 'o_regs_verify' => 0, + 'o_announcement' => 0, + 'o_announcement_message' => __('Announcement'), + 'o_rules' => 0, + 'o_rules_message' => __('Rules'), + 'o_maintenance' => 0, + 'o_maintenance_message' => __('Maintenance message'), + 'o_default_dst' => 0, + 'o_feed_type' => 2, + 'o_feed_ttl' => 0, + 'p_message_bbcode' => 1, + 'p_message_img_tag' => 1, + 'p_message_all_caps' => 1, + 'p_subject_all_caps' => 1, + 'p_sig_all_caps' => 1, + 'p_sig_bbcode' => 1, + 'p_sig_img_tag' => 0, + 'p_sig_length' => 400, + 'p_sig_lines' => 4, + 'p_allow_banned_email' => 1, + 'p_allow_dupe_email' => 0, + 'p_force_guest_email' => 1 + ); + return $config; + } +} diff --git a/model/install.php b/model/install.php new file mode 100644 index 00000000..d7e6d05f --- /dev/null +++ b/model/install.php @@ -0,0 +1,370 @@ + "CREATE TABLE `bans` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `username` varchar(200) DEFAULT NULL, + `ip` varchar(255) DEFAULT NULL, + `email` varchar(80) DEFAULT NULL, + `message` varchar(255) DEFAULT NULL, + `expire` int(10) unsigned DEFAULT NULL, + `ban_creator` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `bans_username_idx` (`username`(25)) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'categories' => "CREATE TABLE `categories` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `cat_name` varchar(80) NOT NULL DEFAULT 'New Category', + `disp_position` int(10) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) + ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;", + 'censoring' => "CREATE TABLE `censoring` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `search_for` varchar(60) NOT NULL DEFAULT '', + `replace_with` varchar(60) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'config' => "CREATE TABLE `config` ( + `conf_name` varchar(255) NOT NULL DEFAULT '', + `conf_value` text, + PRIMARY KEY (`conf_name`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'forum_perms' => "CREATE TABLE `forum_perms` ( + `group_id` int(10) NOT NULL DEFAULT '0', + `forum_id` int(10) NOT NULL DEFAULT '0', + `read_forum` tinyint(1) NOT NULL DEFAULT '1', + `post_replies` tinyint(1) NOT NULL DEFAULT '1', + `post_topics` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`group_id`,`forum_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'forum_subscriptions' => "CREATE TABLE `forum_subscriptions` ( + `user_id` int(10) unsigned NOT NULL DEFAULT '0', + `forum_id` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`user_id`,`forum_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'forums' => "CREATE TABLE `forums` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `forum_name` varchar(80) NOT NULL DEFAULT 'New forum', + `forum_desc` text, + `redirect_url` varchar(100) DEFAULT NULL, + `moderators` text, + `num_topics` mediumint(8) unsigned NOT NULL DEFAULT '0', + `num_posts` mediumint(8) unsigned NOT NULL DEFAULT '0', + `last_post` int(10) unsigned DEFAULT NULL, + `last_post_id` int(10) unsigned DEFAULT NULL, + `last_poster` varchar(200) DEFAULT NULL, + `sort_by` tinyint(1) NOT NULL DEFAULT '0', + `disp_position` int(10) NOT NULL DEFAULT '0', + `cat_id` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'groups' => "CREATE TABLE `groups` ( + `g_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `g_title` varchar(50) NOT NULL DEFAULT '', + `g_user_title` varchar(50) DEFAULT NULL, + `g_promote_min_posts` int(10) unsigned NOT NULL DEFAULT '0', + `g_promote_next_group` int(10) unsigned NOT NULL DEFAULT '0', + `g_moderator` tinyint(1) NOT NULL DEFAULT '0', + `g_mod_edit_users` tinyint(1) NOT NULL DEFAULT '0', + `g_mod_rename_users` tinyint(1) NOT NULL DEFAULT '0', + `g_mod_change_passwords` tinyint(1) NOT NULL DEFAULT '0', + `g_mod_ban_users` tinyint(1) NOT NULL DEFAULT '0', + `g_mod_promote_users` tinyint(1) NOT NULL DEFAULT '0', + `g_read_board` tinyint(1) NOT NULL DEFAULT '1', + `g_view_users` tinyint(1) NOT NULL DEFAULT '1', + `g_post_replies` tinyint(1) NOT NULL DEFAULT '1', + `g_post_topics` tinyint(1) NOT NULL DEFAULT '1', + `g_edit_posts` tinyint(1) NOT NULL DEFAULT '1', + `g_delete_posts` tinyint(1) NOT NULL DEFAULT '1', + `g_delete_topics` tinyint(1) NOT NULL DEFAULT '1', + `g_post_links` tinyint(1) NOT NULL DEFAULT '1', + `g_set_title` tinyint(1) NOT NULL DEFAULT '1', + `g_search` tinyint(1) NOT NULL DEFAULT '1', + `g_search_users` tinyint(1) NOT NULL DEFAULT '1', + `g_send_email` tinyint(1) NOT NULL DEFAULT '1', + `g_post_flood` smallint(6) NOT NULL DEFAULT '30', + `g_search_flood` smallint(6) NOT NULL DEFAULT '30', + `g_email_flood` smallint(6) NOT NULL DEFAULT '60', + `g_report_flood` smallint(6) NOT NULL DEFAULT '60', + PRIMARY KEY (`g_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'online' => "CREATE TABLE `online` ( + `user_id` int(10) unsigned NOT NULL DEFAULT '1', + `ident` varchar(200) NOT NULL DEFAULT '', + `logged` int(10) unsigned NOT NULL DEFAULT '0', + `idle` tinyint(1) NOT NULL DEFAULT '0', + `last_post` int(10) unsigned DEFAULT NULL, + `last_search` int(10) unsigned DEFAULT NULL, + UNIQUE KEY `online_user_id_ident_idx` (`user_id`,`ident`(25)), + KEY `online_ident_idx` (`ident`(25)), + KEY `online_logged_idx` (`logged`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'posts' => "CREATE TABLE `posts` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `poster` varchar(200) NOT NULL DEFAULT '', + `poster_id` int(10) unsigned NOT NULL DEFAULT '1', + `poster_ip` varchar(39) DEFAULT NULL, + `poster_email` varchar(80) DEFAULT NULL, + `message` mediumtext, + `hide_smilies` tinyint(1) NOT NULL DEFAULT '0', + `posted` int(10) unsigned NOT NULL DEFAULT '0', + `edited` int(10) unsigned DEFAULT NULL, + `edited_by` varchar(200) DEFAULT NULL, + `topic_id` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `posts_topic_id_idx` (`topic_id`), + KEY `posts_multi_idx` (`poster_id`,`topic_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'reports' => "CREATE TABLE `reports` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `post_id` int(10) unsigned NOT NULL DEFAULT '0', + `topic_id` int(10) unsigned NOT NULL DEFAULT '0', + `forum_id` int(10) unsigned NOT NULL DEFAULT '0', + `reported_by` int(10) unsigned NOT NULL DEFAULT '0', + `created` int(10) unsigned NOT NULL DEFAULT '0', + `message` text, + `zapped` int(10) unsigned DEFAULT NULL, + `zapped_by` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `reports_zapped_idx` (`zapped`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'search_cache' => "CREATE TABLE `search_cache` ( + `id` int(10) unsigned NOT NULL DEFAULT '0', + `ident` varchar(200) NOT NULL DEFAULT '', + `search_data` mediumtext, + PRIMARY KEY (`id`), + KEY `search_cache_ident_idx` (`ident`(8)) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'search_matches' => "CREATE TABLE `search_matches` ( + `post_id` int(10) unsigned NOT NULL DEFAULT '0', + `word_id` int(10) unsigned NOT NULL DEFAULT '0', + `subject_match` tinyint(1) NOT NULL DEFAULT '0', + KEY `search_matches_word_id_idx` (`word_id`), + KEY `search_matches_post_id_idx` (`post_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'search_words' => "CREATE TABLE `search_words` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `word` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`word`), + KEY `search_words_id_idx` (`id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'topic_subscriptions' => "CREATE TABLE `topic_subscriptions` ( + `user_id` int(10) unsigned NOT NULL DEFAULT '0', + `topic_id` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`user_id`,`topic_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'topics' => "CREATE TABLE `topics` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `poster` varchar(200) NOT NULL DEFAULT '', + `subject` varchar(255) NOT NULL DEFAULT '', + `posted` int(10) unsigned NOT NULL DEFAULT '0', + `first_post_id` int(10) unsigned NOT NULL DEFAULT '0', + `last_post` int(10) unsigned NOT NULL DEFAULT '0', + `last_post_id` int(10) unsigned NOT NULL DEFAULT '0', + `last_poster` varchar(200) DEFAULT NULL, + `num_views` mediumint(8) unsigned NOT NULL DEFAULT '0', + `num_replies` mediumint(8) unsigned NOT NULL DEFAULT '0', + `closed` tinyint(1) NOT NULL DEFAULT '0', + `sticky` tinyint(1) NOT NULL DEFAULT '0', + `moved_to` int(10) unsigned DEFAULT NULL, + `forum_id` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `topics_forum_id_idx` (`forum_id`), + KEY `topics_moved_to_idx` (`moved_to`), + KEY `topics_last_post_idx` (`last_post`), + KEY `topics_first_post_id_idx` (`first_post_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", + 'users' => "CREATE TABLE `users` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `group_id` int(10) unsigned NOT NULL DEFAULT '3', + `username` varchar(200) NOT NULL DEFAULT '', + `password` varchar(40) NOT NULL DEFAULT '', + `email` varchar(80) NOT NULL DEFAULT '', + `title` varchar(50) DEFAULT NULL, + `realname` varchar(40) DEFAULT NULL, + `url` varchar(100) DEFAULT NULL, + `jabber` varchar(80) DEFAULT NULL, + `icq` varchar(12) DEFAULT NULL, + `msn` varchar(80) DEFAULT NULL, + `aim` varchar(30) DEFAULT NULL, + `yahoo` varchar(30) DEFAULT NULL, + `location` varchar(30) DEFAULT NULL, + `signature` text, + `disp_topics` tinyint(3) unsigned DEFAULT NULL, + `disp_posts` tinyint(3) unsigned DEFAULT NULL, + `email_setting` tinyint(1) NOT NULL DEFAULT '1', + `notify_with_post` tinyint(1) NOT NULL DEFAULT '0', + `auto_notify` tinyint(1) NOT NULL DEFAULT '0', + `show_smilies` tinyint(1) NOT NULL DEFAULT '1', + `show_img` tinyint(1) NOT NULL DEFAULT '1', + `show_img_sig` tinyint(1) NOT NULL DEFAULT '1', + `show_avatars` tinyint(1) NOT NULL DEFAULT '1', + `show_sig` tinyint(1) NOT NULL DEFAULT '1', + `timezone` float NOT NULL DEFAULT '0', + `dst` tinyint(1) NOT NULL DEFAULT '0', + `time_format` tinyint(1) NOT NULL DEFAULT '0', + `date_format` tinyint(1) NOT NULL DEFAULT '0', + `language` varchar(25) NOT NULL DEFAULT 'English', + `style` varchar(25) NOT NULL DEFAULT 'FeatherBB', + `num_posts` int(10) unsigned NOT NULL DEFAULT '0', + `last_post` int(10) unsigned DEFAULT NULL, + `last_search` int(10) unsigned DEFAULT NULL, + `last_email_sent` int(10) unsigned DEFAULT NULL, + `last_report_sent` int(10) unsigned DEFAULT NULL, + `registered` int(10) unsigned NOT NULL DEFAULT '0', + `registration_ip` varchar(39) NOT NULL DEFAULT '0.0.0.0', + `last_visit` int(10) unsigned NOT NULL DEFAULT '0', + `admin_note` varchar(30) DEFAULT NULL, + `activate_string` varchar(80) DEFAULT NULL, + `activate_key` varchar(8) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `users_username_idx` (`username`(25)), + KEY `users_registered_idx` (`registered`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;",); + + public function __construct() + { + $this->feather = \Slim\Slim::getInstance(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/English/install.mo'); + } + + public function is_installed() + { + return false; + } + + public function create_table($table_name, $sql) + { + $db = DB::get_db(); + return $db->exec($sql); + } + + public function get_database_scheme() + { + return $this->database_scheme; + } + + public static function load_default_groups() + { + $data['Administrators'] = array( + 'g_id' => 1, + 'g_title' => __('Administrators'), + 'g_user_title' => __('Administrator'), + 'g_moderator' => 0, + 'g_mod_edit_users' => 0, + 'g_mod_rename_users' => 0, + 'g_mod_change_passwords' => 0, + 'g_mod_ban_users' => 0, + 'g_read_board' => 1, + 'g_view_users' => 1, + 'g_post_replies' => 1, + 'g_post_topics' => 1, + 'g_edit_posts' => 1, + 'g_delete_posts' => 1, + 'g_delete_topics' => 1, + 'g_set_title' => 1, + 'g_search' => 1, + 'g_search_users' => 1, + 'g_send_email' => 1, + 'g_post_flood' => 0, + 'g_search_flood' => 0, + 'g_email_flood' => 0, + 'g_report_flood' => 0); + $data['Moderators'] = array( + 'g_id' => 2, + 'g_title' => __('Moderators'), + 'g_user_title' => __('Moderator'), + 'g_moderator' => 1, + 'g_mod_edit_users' => 1, + 'g_mod_rename_users' => 1, + 'g_mod_change_passwords' => 1, + 'g_mod_ban_users' => 1, + 'g_read_board' => 1, + 'g_view_users' => 1, + 'g_post_replies' => 1, + 'g_post_topics' => 1, + 'g_edit_posts' => 1, + 'g_delete_posts' => 1, + 'g_delete_topics' => 1, + 'g_set_title' => 1, + 'g_search' => 1, + 'g_search_users' => 1, + 'g_send_email' => 1, + 'g_post_flood' => 0, + 'g_search_flood' => 0, + 'g_email_flood' => 0, + 'g_report_flood' => 0); + $data['Guests'] = array( + 'g_id' => 3, + 'g_title' => __('Guests'), + 'g_user_title' => __('Guest'), + 'g_moderator' => 0, + 'g_mod_edit_users' => 0, + 'g_mod_rename_users' => 0, + 'g_mod_change_passwords' => 0, + 'g_mod_ban_users' => 0, + 'g_read_board' => 1, + 'g_view_users' => 1, + 'g_post_replies' => 0, + 'g_post_topics' => 0, + 'g_edit_posts' => 0, + 'g_delete_posts' => 0, + 'g_delete_topics' => 0, + 'g_set_title' => 0, + 'g_search' => 1, + 'g_search_users' => 1, + 'g_send_email' => 0, + 'g_post_flood' => 60, + 'g_search_flood' => 30, + 'g_email_flood' => 0, + 'g_report_flood' => 0); + $data['Members'] = array( + 'g_id' => 4, + 'g_title' => __('Members'), + 'g_user_title' => __('Member'), + 'g_moderator' => 0, + 'g_mod_edit_users' => 0, + 'g_mod_rename_users' => 0, + 'g_mod_change_passwords' => 0, + 'g_mod_ban_users' => 0, + 'g_read_board' => 1, + 'g_view_users' => 1, + 'g_post_replies' => 1, + 'g_post_topics' => 1, + 'g_edit_posts' => 1, + 'g_delete_posts' => 1, + 'g_delete_topics' => 1, + 'g_set_title' => 0, + 'g_search' => 1, + 'g_search_users' => 1, + 'g_send_email' => 1, + 'g_post_flood' => 60, + 'g_search_flood' => 30, + 'g_email_flood' => 60, + 'g_report_flood' => 60); + + return $data; + } + + public static function load_default_user() + { + return $data['Guest'] = array( + 'group_id' => 3, + 'username' => __('Guest'), + 'password' => __('Guest'), + 'email' => __('Guest')); + } +} diff --git a/style/FeatherBB/view/install.php b/style/FeatherBB/view/install.php new file mode 100644 index 00000000..d39b6247 --- /dev/null +++ b/style/FeatherBB/view/install.php @@ -0,0 +1,221 @@ + + + + + + <?php _e('FeatherBB Installation') ?> + + + + +
          +
          +
          + +
          +
          +
          +
          +

          +

          +
          +
          +
          +
          + +
          +
          + 1): ?> +
          +

          +
          +
          +
          +
          + +
          +

          + +
          +
          +
          +

          + +
          +
          + + +
          +

          +
          +
          +
          + +
          +

          +
            + '.$error.''."\n"; + } + ?> +
          +
          +
          + +
          +
          +

          +

          +
          +
          + +
          +

          + + +
          +
          +
          + +
          +
          + +
          +

          + + +
          +
          +
          + +
          +
          + +
          +

          + + +
          +
          +
          + +
          +
          + +
          +

          + + + + +
          +
          +
          +
          + +
          +
          + +
          +

          + + +
          +
          +
          + +
          +
          +

          +

          +
          +
          + +
          +

          + + + + + + + + + +
          +
          +
          + +
          +
          +

          +

          +
          +
          + +
          + + + + + + + + +
          +
          +
          + +

          + +
          +
          +
          +
          +
          +
          +
          + + From 1174239490c743a5bce5c3432b49b6580f50709d Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 12:56:19 +0200 Subject: [PATCH 055/353] Fix CSS input property only working when nested in label --- style/FeatherBB.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/style/FeatherBB.css b/style/FeatherBB.css index f8fae2a9..b2646697 100644 --- a/style/FeatherBB.css +++ b/style/FeatherBB.css @@ -1152,7 +1152,7 @@ footer .footer-link a { display: inline-block; padding-right: 12px; } -.blockform .box .inform fieldset label input { +.blockform .box .inform fieldset input { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .075); border: 1px solid #ccc; border-radius: 3px; @@ -1160,7 +1160,7 @@ footer .footer-link a { padding: 7px 8px; margin: 7px 0 } -.blockform .box .inform fieldset label input:focus { +.blockform .box .inform fieldset input:focus { border: 1px solid #51a7e8; background-color: #fff; box-shadow: 0 0 5px rgba(81, 167, 232, .5); From c4beef8a955933f06f122eaea8cb1ab61a86bacb Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 13:14:00 +0200 Subject: [PATCH 056/353] Patch errors display --- controller/install.php | 16 ++++++++-------- style/FeatherBB/view/install.php | 5 ++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/controller/install.php b/controller/install.php index de23eae8..f58aada0 100644 --- a/controller/install.php +++ b/controller/install.php @@ -113,15 +113,13 @@ public function run() // End validation and check errors if (!empty($this->errors)) { - $this->feather->flashNow('error', $this->errors); - $this->feather->view->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); - $this->feather->view->setData('flash', $this->feather->environment['slim.flash']); - $this->feather->view->display('install.php', array( + $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); + $this->feather->view()->display('install.php', array( 'feather' => $this->feather, 'languages' => forum_list_langs(), 'supported_dbs' => $this->supported_dbs, 'data' => $data, - 'alerts' => array(), + 'errors' => $this->errors, )); } else { $data['default_style'] = $this->default_style; @@ -133,9 +131,11 @@ public function run() 'description' => '

          '.__('Description').'

          ', 'base_url' => $this->feather->request->getUrl().$this->feather->request->getRootUri(), 'default_lang' => 'English'); - $this->feather->view->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); - $this->feather->view->setData('flash', $this->feather->environment['slim.flash']); - $this->feather->view->display('install.php', array( + if (isset($this->environment['slim.flash'])) { + $this->feather->view()->set('flash', $this->environment['slim.flash']); + } + $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); + $this->feather->view()->display('install.php', array( 'feather' => $this->feather, 'languages' => forum_list_langs(), 'supported_dbs' => $this->supported_dbs, diff --git a/style/FeatherBB/view/install.php b/style/FeatherBB/view/install.php index d39b6247..993cf291 100644 --- a/style/FeatherBB/view/install.php +++ b/style/FeatherBB/view/install.php @@ -73,14 +73,13 @@

          -
          - +

            '.$error.''."\n"; } From cc26b88db6e48460360f1aa0518b5dfd142aa12e Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 13:25:26 +0200 Subject: [PATCH 057/353] Fix design issues in views --- style/FeatherBB/view/install.php | 367 ++++++++++++++++--------------- 1 file changed, 184 insertions(+), 183 deletions(-) diff --git a/style/FeatherBB/view/install.php b/style/FeatherBB/view/install.php index 993cf291..223e42b6 100644 --- a/style/FeatherBB/view/install.php +++ b/style/FeatherBB/view/install.php @@ -23,195 +23,196 @@
            -
            +
            -
            -
            -
            -

            -

            -
            -
            -
            +
            +
            +
            +

            +

            +
            +
            +
            -
            - 1): ?> -
            -

            -
            - -
            -
            - -
            -

            - -
            -
            -
            -

            - -
            -
            - - -
            -

            -
            -
            - -
            -

            -
              - '.$error.''."\n"; - } - ?> -
            -
            -
            - -
            -
            -

            -

            -
            -
            - -
            -

            - - -
            -
            -
            - -
            -
            - -
            -

            - - -
            -
            -
            - -
            -
            - -
            -

            - - -
            -
            -
            - -
            -
            - -
            -

            - - - - -
            -
            -
            -
            - -
            -
            - -
            -

            - - -
            -
            -
            - -
            -
            -

            -

            -
            -
            - -
            -

            - - - - - - - - - -
            -
            -
            - -
            -
            -

            -

            -
            -
            - -
            - - - - - - - - -
            -
            -
            - -

            - -
            -
            -
            +
            + 1): ?> +
            +

            +
            +
            +
            +
            + +
            +

            + +
            +
            +
            +

            + +
            +
            + + +
            +

            +
            +
            + +
            +
            +

            +
              + '.$error.''."\n"; + } + ?> +
            +
            +
            + + +
            +
            +

            +

            +
            +
            + +
            +

            + + +
            +
            +
            + +
            +
            + +
            +

            + + +
            +
            +
            + +
            +
            + +
            +

            + + +
            +
            +
            + +
            +
            + +
            +

            + + + + +
            +
            +
            +
            + +
            +
            + +
            +

            + + +
            +
            +
            + +
            +
            +

            +

            +
            +
            + +
            +

            + + + + + + + + + +
            +
            +
            + +
            +
            +

            +

            +
            +
            + +
            + + + + + + + + +
            +
            +
            + +

            + +
            +
            +
            From 222e1460caf4f8cb1543d1475d4c30c3a15d5cf8 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 13:47:44 +0200 Subject: [PATCH 058/353] Turn init_db into static function --- Slim/Extras/Middleware/FeatherBBLoader.php | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 4d2ebf59..e1152aac 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -92,34 +92,29 @@ public static function load_default_forum_settings() ); } - public function init_db() + public static function init_db(array $config) { - switch ($this->forum_settings['db_type']) { + switch ($config['db_type']) { case 'mysql': case 'mysqli': case 'mysql_innodb': case 'mysqli_innodb': - DB::configure('mysql:host='.$this->forum_settings['db_host'].';dbname='.$this->forum_settings['db_name']); + DB::configure('mysql:host='.$config['db_host'].';dbname='.$config['db_name']); DB::configure('driver_options', array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); break; case 'sqlite'; case 'sqlite3'; - DB::configure('sqlite:./'.$this->forum_settings['db_name']); + DB::configure('sqlite:./'.$config['db_name']); break; case 'pgsql': - \DB::configure('pgsql:host='.$this->forum_settings['db_host'].'dbname='.$this->forum_settings['db_name']); + DB::configure('pgsql:host='.$config['db_host'].'dbname='.$config['db_name']); break; } - DB::configure('username', $this->forum_settings['db_user']); - DB::configure('password', $this->forum_settings['db_pass']); - if ($this->forum_env['FEATHER_SHOW_QUERIES'] == 1) { - DB::configure('logging', true); - } - if ($this->forum_env['FEATHER_CACHE_QUERIES'] == 1) { - DB::configure('caching', true); - } + DB::configure('username', $config['db_user']); + DB::configure('password', $config['db_pass']); + DB::configure('logging', true); DB::configure('id_column_overrides', array( - $this->forum_settings['db_prefix'].'groups' => 'g_id', + $config['db_prefix'].'groups' => 'g_id', )); } @@ -229,7 +224,7 @@ public function call() } // Init DB - $this->init_db(); + self::init_db($this->forum_settings); // Get forum settings from DB/cache and load it into forum_settings array if (file_exists($this->forum_env['FORUM_CACHE_DIR'].'cache_config.php')) { From e848bf390605ce6b9bb1c581f853f10acfc7b51f Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 13:58:39 +0200 Subject: [PATCH 059/353] Implement create table feature --- Slim/Extras/Middleware/FeatherBBLoader.php | 1 + controller/install.php | 8 +++-- model/install.php | 40 ++++++++++++---------- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index e1152aac..dd318efc 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -94,6 +94,7 @@ public static function load_default_forum_settings() public static function init_db(array $config) { + $config['db_prefix'] = (!empty($config['db_prefix'])) ? $config['db_prefix'] : ''; switch ($config['db_type']) { case 'mysql': case 'mysqli': diff --git a/controller/install.php b/controller/install.php index f58aada0..17c440ab 100644 --- a/controller/install.php +++ b/controller/install.php @@ -159,8 +159,7 @@ public function create_config(array $data) // ... And write it on disk if ($this->write_config(json_encode($config, JSON_PRETTY_PRINT))) { - //$this->create_db($data); - echo 'Config created'; + $this->create_db($data); } } @@ -171,14 +170,17 @@ public function create_db(array $data) //redirect(get_link(''), 'DB already installed'); } + // + \Slim\Extras\Middleware\FeatherBBLoader::init_db($data); + // Create tables foreach ($this->model->get_database_scheme() as $table => $sql) { + $table = (!empty($data['db_prefix'])) ? $data['db_prefix'].$table : $table; if (!$this->model->create_table($table, $sql)) { // Error handling $this->errors[] = 'A problem was encountered while creating table '.$table; } } - echo 'ok'; } public function write_config($json) diff --git a/model/install.php b/model/install.php index d7e6d05f..a4698265 100644 --- a/model/install.php +++ b/model/install.php @@ -14,7 +14,7 @@ class install { protected $database_scheme = array( - 'bans' => "CREATE TABLE `bans` ( + 'bans' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(200) DEFAULT NULL, `ip` varchar(255) DEFAULT NULL, @@ -25,24 +25,24 @@ class install PRIMARY KEY (`id`), KEY `bans_username_idx` (`username`(25)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'categories' => "CREATE TABLE `categories` ( + 'categories' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `cat_name` varchar(80) NOT NULL DEFAULT 'New Category', `disp_position` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;", - 'censoring' => "CREATE TABLE `censoring` ( + 'censoring' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `search_for` varchar(60) NOT NULL DEFAULT '', `replace_with` varchar(60) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'config' => "CREATE TABLE `config` ( + 'config' => "CREATE TABLE %t% ( `conf_name` varchar(255) NOT NULL DEFAULT '', `conf_value` text, PRIMARY KEY (`conf_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'forum_perms' => "CREATE TABLE `forum_perms` ( + 'forum_perms' => "CREATE TABLE %t% ( `group_id` int(10) NOT NULL DEFAULT '0', `forum_id` int(10) NOT NULL DEFAULT '0', `read_forum` tinyint(1) NOT NULL DEFAULT '1', @@ -50,12 +50,12 @@ class install `post_topics` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`group_id`,`forum_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'forum_subscriptions' => "CREATE TABLE `forum_subscriptions` ( + 'forum_subscriptions' => "CREATE TABLE %t% ( `user_id` int(10) unsigned NOT NULL DEFAULT '0', `forum_id` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`user_id`,`forum_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'forums' => "CREATE TABLE `forums` ( + 'forums' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `forum_name` varchar(80) NOT NULL DEFAULT 'New forum', `forum_desc` text, @@ -71,7 +71,7 @@ class install `cat_id` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'groups' => "CREATE TABLE `groups` ( + 'groups' => "CREATE TABLE %t% ( `g_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `g_title` varchar(50) NOT NULL DEFAULT '', `g_user_title` varchar(50) DEFAULT NULL, @@ -101,7 +101,7 @@ class install `g_report_flood` smallint(6) NOT NULL DEFAULT '60', PRIMARY KEY (`g_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'online' => "CREATE TABLE `online` ( + 'online' => "CREATE TABLE %t% ( `user_id` int(10) unsigned NOT NULL DEFAULT '1', `ident` varchar(200) NOT NULL DEFAULT '', `logged` int(10) unsigned NOT NULL DEFAULT '0', @@ -112,7 +112,7 @@ class install KEY `online_ident_idx` (`ident`(25)), KEY `online_logged_idx` (`logged`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'posts' => "CREATE TABLE `posts` ( + 'posts' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `poster` varchar(200) NOT NULL DEFAULT '', `poster_id` int(10) unsigned NOT NULL DEFAULT '1', @@ -128,7 +128,7 @@ class install KEY `posts_topic_id_idx` (`topic_id`), KEY `posts_multi_idx` (`poster_id`,`topic_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'reports' => "CREATE TABLE `reports` ( + 'reports' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `post_id` int(10) unsigned NOT NULL DEFAULT '0', `topic_id` int(10) unsigned NOT NULL DEFAULT '0', @@ -141,32 +141,32 @@ class install PRIMARY KEY (`id`), KEY `reports_zapped_idx` (`zapped`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'search_cache' => "CREATE TABLE `search_cache` ( + 'search_cache' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL DEFAULT '0', `ident` varchar(200) NOT NULL DEFAULT '', `search_data` mediumtext, PRIMARY KEY (`id`), KEY `search_cache_ident_idx` (`ident`(8)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'search_matches' => "CREATE TABLE `search_matches` ( + 'search_matches' => "CREATE TABLE %t% ( `post_id` int(10) unsigned NOT NULL DEFAULT '0', `word_id` int(10) unsigned NOT NULL DEFAULT '0', `subject_match` tinyint(1) NOT NULL DEFAULT '0', KEY `search_matches_word_id_idx` (`word_id`), KEY `search_matches_post_id_idx` (`post_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'search_words' => "CREATE TABLE `search_words` ( + 'search_words' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `word` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', PRIMARY KEY (`word`), KEY `search_words_id_idx` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'topic_subscriptions' => "CREATE TABLE `topic_subscriptions` ( + 'topic_subscriptions' => "CREATE TABLE %t% ( `user_id` int(10) unsigned NOT NULL DEFAULT '0', `topic_id` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`user_id`,`topic_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'topics' => "CREATE TABLE `topics` ( + 'topics' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `poster` varchar(200) NOT NULL DEFAULT '', `subject` varchar(255) NOT NULL DEFAULT '', @@ -187,7 +187,7 @@ class install KEY `topics_last_post_idx` (`last_post`), KEY `topics_first_post_id_idx` (`first_post_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'users' => "CREATE TABLE `users` ( + 'users' => "CREATE TABLE %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `group_id` int(10) unsigned NOT NULL DEFAULT '3', `username` varchar(200) NOT NULL DEFAULT '', @@ -238,7 +238,6 @@ class install public function __construct() { $this->feather = \Slim\Slim::getInstance(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/English/install.mo'); } public function is_installed() @@ -249,7 +248,10 @@ public function is_installed() public function create_table($table_name, $sql) { $db = DB::get_db(); - return $db->exec($sql); + $req = preg_replace('/%t%/', '`'.$table_name.'`', $sql); + $db->exec($req); + echo DB::get_last_query(); + return true; } public function get_database_scheme() From 29bf3c7ca1a16c0be5574eb773327d134a725aa7 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 14:06:07 +0200 Subject: [PATCH 060/353] Fix is_installed check --- controller/install.php | 7 +++---- model/install.php | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/controller/install.php b/controller/install.php index 17c440ab..23df1319 100644 --- a/controller/install.php +++ b/controller/install.php @@ -165,14 +165,13 @@ public function create_config(array $data) public function create_db(array $data) { + \Slim\Extras\Middleware\FeatherBBLoader::init_db($data); + // Check if FeatherBB DB isn't installed already if ($this->model->is_installed()) { - //redirect(get_link(''), 'DB already installed'); + redirect(get_link(''), 'DB already installed'); } - // - \Slim\Extras\Middleware\FeatherBBLoader::init_db($data); - // Create tables foreach ($this->model->get_database_scheme() as $table => $sql) { $table = (!empty($data['db_prefix'])) ? $data['db_prefix'].$table : $table; diff --git a/model/install.php b/model/install.php index a4698265..c1a42cb8 100644 --- a/model/install.php +++ b/model/install.php @@ -242,7 +242,9 @@ public function __construct() public function is_installed() { - return false; + $db = DB::get_db(); + $db->exec('SHOW TABLES like `users`'); + return (bool) $db; } public function create_table($table_name, $sql) From ebe18287f854670d30ceab6faeeeab6c4a1f2ac7 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 14:24:40 +0200 Subject: [PATCH 061/353] Add default and admin users --- controller/install.php | 4 ++++ model/install.php | 41 +++++++++++++++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/controller/install.php b/controller/install.php index 23df1319..b07d8258 100644 --- a/controller/install.php +++ b/controller/install.php @@ -180,6 +180,10 @@ public function create_db(array $data) $this->errors[] = 'A problem was encountered while creating table '.$table; } } + + // Populate tables with default values + $this->model->add_user($this->model->load_default_user()); + $this->model->add_user($this->model->load_admin_user($data)); } public function write_config($json) diff --git a/model/install.php b/model/install.php index c1a42cb8..426f961b 100644 --- a/model/install.php +++ b/model/install.php @@ -243,8 +243,8 @@ public function __construct() public function is_installed() { $db = DB::get_db(); - $db->exec('SHOW TABLES like `users`'); - return (bool) $db; + //$db->exec('SHOW TABLES like users'); + return false; } public function create_table($table_name, $sql) @@ -256,6 +256,14 @@ public function create_table($table_name, $sql) return true; } + public function add_user(array $data) + { + return (bool) DB::for_table('users') + ->create() + ->set($data) + ->save(); + } + public function get_database_scheme() { return $this->database_scheme; @@ -263,7 +271,7 @@ public function get_database_scheme() public static function load_default_groups() { - $data['Administrators'] = array( + $groups['Administrators'] = array( 'g_id' => 1, 'g_title' => __('Administrators'), 'g_user_title' => __('Administrator'), @@ -287,7 +295,7 @@ public static function load_default_groups() 'g_search_flood' => 0, 'g_email_flood' => 0, 'g_report_flood' => 0); - $data['Moderators'] = array( + $groups['Moderators'] = array( 'g_id' => 2, 'g_title' => __('Moderators'), 'g_user_title' => __('Moderator'), @@ -311,7 +319,7 @@ public static function load_default_groups() 'g_search_flood' => 0, 'g_email_flood' => 0, 'g_report_flood' => 0); - $data['Guests'] = array( + $groups['Guests'] = array( 'g_id' => 3, 'g_title' => __('Guests'), 'g_user_title' => __('Guest'), @@ -335,7 +343,7 @@ public static function load_default_groups() 'g_search_flood' => 30, 'g_email_flood' => 0, 'g_report_flood' => 0); - $data['Members'] = array( + $groups['Members'] = array( 'g_id' => 4, 'g_title' => __('Members'), 'g_user_title' => __('Member'), @@ -360,15 +368,32 @@ public static function load_default_groups() 'g_email_flood' => 60, 'g_report_flood' => 60); - return $data; + return $groups; } public static function load_default_user() { - return $data['Guest'] = array( + return $user = array( 'group_id' => 3, 'username' => __('Guest'), 'password' => __('Guest'), 'email' => __('Guest')); } + + public static function load_admin_user(array $data) + { + $now = time(); + return $user = array( + 'group_id' => 1, + 'username' => $data['username'], + 'password' => feather_hash($data['password']), + 'email' => $data['email'], + 'language' => $data['default_lang'], + 'style' => $data['default_style'], + 'num_posts' => 1, + 'last_post' => $now, + 'registered' => $now, + 'registration_ip' => get_remote_address(), + 'last_visit' => $now); + } } From 7a6a606797abe95105cfa46f2e80fe35e7b23474 Mon Sep 17 00:00:00 2001 From: adaur Date: Mon, 17 Aug 2015 15:21:41 +0200 Subject: [PATCH 062/353] First attempt to do a hook system --- Slim/Extras/Middleware/FeatherBB.php | 5 +++++ Slim/Middleware/PrettyExceptions.php | 6 +++--- Slim/Slim.php | 10 ++++++---- model/index.php | 2 ++ plugins/test/plugintest.php | 28 ++++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 plugins/test/plugintest.php diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 400e8554..321d3f08 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -13,6 +13,7 @@ namespace Slim\Extras\Middleware; use DB; +use model\plugintest; class FeatherBB extends \Slim\Middleware { @@ -528,6 +529,10 @@ public function call() // Update online list $this->update_users_online(); + // Load the test plugin + require $this->data['forum_env']['FEATHER_ROOT'].'plugins/test/plugintest.php'; + new \plugin\plugintest(); + // Configure Slim $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); $this->next->call(); diff --git a/Slim/Middleware/PrettyExceptions.php b/Slim/Middleware/PrettyExceptions.php index aafda0f9..8bed30d7 100644 --- a/Slim/Middleware/PrettyExceptions.php +++ b/Slim/Middleware/PrettyExceptions.php @@ -6,7 +6,7 @@ * @copyright 2011 Josh Lockhart * @link http://www.slimframework.com * @license http://www.slimframework.com/license - * @version 2.6.1 + * @version 2.6.3 * @package Slim * * MIT LICENSE @@ -86,10 +86,10 @@ protected function renderBody(&$env, $exception) { $title = 'Slim Application Error'; $code = $exception->getCode(); - $message = $exception->getMessage(); + $message = htmlspecialchars($exception->getMessage()); $file = $exception->getFile(); $line = $exception->getLine(); - $trace = str_replace(array('#', "\n"), array('
            #', '
            '), $exception->getTraceAsString()); + $trace = str_replace(array('#', "\n"), array('
            #', '
            '), htmlspecialchars($exception->getTraceAsString())); $html = sprintf('

            %s

            ', $title); $html .= '

            The application could not run because of the following error:

            '; $html .= '

            Details

            '; diff --git a/Slim/Slim.php b/Slim/Slim.php index c7ae85d4..33ecc482 100644 --- a/Slim/Slim.php +++ b/Slim/Slim.php @@ -1193,8 +1193,12 @@ public function hook($name, $callable, $priority = 10) */ public function applyHook($name) { + $args = func_get_args(); + array_shift($args); + if (!isset($this->hooks[$name])) { $this->hooks[$name] = array(array()); + return $args[0]; } if (!empty($this->hooks[$name])) { // Sort by priority, low to high, if there's more than one priority @@ -1202,13 +1206,11 @@ public function applyHook($name) ksort($this->hooks[$name]); } - $args = func_get_args(); - array_shift($args); - foreach ($this->hooks[$name] as $priority) { if (!empty($priority)) { foreach ($priority as $callable) { - call_user_func_array($callable, $args); + $output = call_user_func_array($callable, $args); + return $output; } } } diff --git a/model/index.php b/model/index.php index 986a3715..da8e296e 100644 --- a/model/index.php +++ b/model/index.php @@ -45,6 +45,8 @@ public function get_forum_actions() $forum_actions[] = ''.__('Mark all as read').''; } + $forum_actions = $this->feather->applyHook('get_forum_actions', $forum_actions); + return $forum_actions; } diff --git a/plugins/test/plugintest.php b/plugins/test/plugintest.php new file mode 100644 index 00000000..b277a8ea --- /dev/null +++ b/plugins/test/plugintest.php @@ -0,0 +1,28 @@ +feather = \Slim\Slim::getInstance(); + $this->start = $this->feather->start; + $this->config = $this->feather->config; + $this->user = $this->feather->user; + $this->request = $this->feather->request; + + $this->feather->hook('get_forum_actions', function ($forum_actions) { + $forum_actions[] = 'Test'; + return $forum_actions; + }); + } +} \ No newline at end of file From 193ea8787c8fd8a694eea3f2a62836d63e82b425 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 15:31:54 +0200 Subject: [PATCH 063/353] Add groups and lorem ipsum features --- controller/install.php | 8 +++++- model/install.php | 56 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/controller/install.php b/controller/install.php index b07d8258..98405a46 100644 --- a/controller/install.php +++ b/controller/install.php @@ -181,9 +181,15 @@ public function create_db(array $data) } } - // Populate tables with default values + // Populate group table with default values + foreach ($this->model->load_default_groups() as $group_name => $group_data) { + $this->model->add_group($group_data); + } + // Populate user table with default values $this->model->add_user($this->model->load_default_user()); $this->model->add_user($this->model->load_admin_user($data)); + // Populate categories, forums, topics, posts + $this->model->add_mock_forum($this->model->load_mock_forum_data($data)); } public function write_config($json) diff --git a/model/install.php b/model/install.php index 426f961b..559a618b 100644 --- a/model/install.php +++ b/model/install.php @@ -264,6 +264,24 @@ public function add_user(array $data) ->save(); } + public function add_mock_forum(array $arch) + { + foreach ($arch as $forum => $data) { + DB::for_table($forum) + ->create() + ->set($data) + ->save(); + } + } + + public function add_group(array $data) + { + return (bool) DB::for_table('groups') + ->create() + ->set($data) + ->save(); + } + public function get_database_scheme() { return $this->database_scheme; @@ -396,4 +414,42 @@ public static function load_admin_user(array $data) 'registration_ip' => get_remote_address(), 'last_visit' => $now); } + + public static function load_mock_forum_data(array $data) + { + $cat_name = __('Test category'); + $subject = __('Test post'); + $message = __('Message'); + $forum_name = __('Test forum'); + $forum_desc = __('This is just a test forum'); + $now = time(); + $ip = get_remote_address(); + + return $mock_data = array( + 'categories' => array('cat_name' => $cat_name, + 'disp_position' => 1), + 'forums' => array('forum_name' => $forum_name, + 'forum_desc' => $forum_desc, + 'num_topics' => 1, + 'num_posts' => 1, + 'last_post' => $now, + 'last_post_id' => 1, + 'last_poster' => $data['username'], + 'disp_position' => 1, + 'cat_id' => 1), + 'topics' => array('poster' => $data['username'], + 'subject' => $subject, + 'posted' => $now, + 'first_post_id' => 1, + 'last_post' => $now, + 'last_post_id' => 1, + 'last_poster' => $data['username'], + 'forum_id' => 1), + 'posts' => array('poster' => $data['username'], + 'poster_id' => 2, + 'poster_ip' => $ip, + 'message' => $message, + 'posted' => $now, + 'topic_id' => 1)); + } } From 25ded94c045e726dbac6ae0fbfa89b59c8a1b2a7 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 15:55:54 +0200 Subject: [PATCH 064/353] Prefer use of a generic add_data method in model --- .htaccess.dist | 3 --- cache/index.html | 1 - controller/install.php | 11 ++++++----- model/install.php | 21 +++++++++------------ 4 files changed, 15 insertions(+), 21 deletions(-) delete mode 100644 .htaccess.dist delete mode 100644 cache/index.html diff --git a/.htaccess.dist b/.htaccess.dist deleted file mode 100644 index a7b90e2c..00000000 --- a/.htaccess.dist +++ /dev/null @@ -1,3 +0,0 @@ -RewriteEngine On -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^ index.php [QSA,L] \ No newline at end of file diff --git a/cache/index.html b/cache/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/cache/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/controller/install.php b/controller/install.php index 98405a46..b5bce496 100644 --- a/controller/install.php +++ b/controller/install.php @@ -183,13 +183,15 @@ public function create_db(array $data) // Populate group table with default values foreach ($this->model->load_default_groups() as $group_name => $group_data) { - $this->model->add_group($group_data); + $this->model->add_data('groups', $group_data); } // Populate user table with default values - $this->model->add_user($this->model->load_default_user()); - $this->model->add_user($this->model->load_admin_user($data)); + $this->model->add_data('users', $this->model->load_default_user()); + $this->model->add_data('users', $this->model->load_admin_user($data)); // Populate categories, forums, topics, posts $this->model->add_mock_forum($this->model->load_mock_forum_data($data)); + // Store config in DB + $this->model->save_config($this->load_default_config($data)); } public function write_config($json) @@ -199,7 +201,7 @@ public function write_config($json) public function load_default_config(array $data) { - $config = array( + return array( 'o_cur_version' => $this->feather->forum_env['FORUM_VERSION'], 'o_database_revision' => $this->feather->forum_env['FORUM_DB_REVISION'], 'o_searchindex_revision' => $this->feather->forum_env['FORUM_SI_REVISION'], @@ -278,6 +280,5 @@ public function load_default_config(array $data) 'p_allow_dupe_email' => 0, 'p_force_guest_email' => 1 ); - return $config; } } diff --git a/model/install.php b/model/install.php index 559a618b..0e4bbd6d 100644 --- a/model/install.php +++ b/model/install.php @@ -256,9 +256,9 @@ public function create_table($table_name, $sql) return true; } - public function add_user(array $data) + public function add_data($table_name, array $data) { - return (bool) DB::for_table('users') + return (bool) DB::for_table($table_name) ->create() ->set($data) ->save(); @@ -266,20 +266,17 @@ public function add_user(array $data) public function add_mock_forum(array $arch) { - foreach ($arch as $forum => $data) { - DB::for_table($forum) - ->create() - ->set($data) - ->save(); + foreach ($arch as $table_name => $data) { + $this->add_data($table_name, $data); } } - public function add_group(array $data) + public function save_config(array $data) { - return (bool) DB::for_table('groups') - ->create() - ->set($data) - ->save(); + foreach ($data as $key => $value) { + $this->add_data('config', array('conf_name' => $key, + 'conf_value' => $value)); + } } public function get_database_scheme() From 60ed705d6b91656ddfe6905c337bf69f431e3e51 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 16:59:12 +0200 Subject: [PATCH 065/353] Fix multilingual installation --- controller/install.php | 22 +++++++++++++++++----- style/FeatherBB/view/install.php | 3 ++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/controller/install.php b/controller/install.php index b5bce496..26bf115f 100644 --- a/controller/install.php +++ b/controller/install.php @@ -16,7 +16,9 @@ class install 'sqlite' => 'SQLite', 'sqlite3' => 'SQLite3', ); + protected $available_langs; protected $optional_fields = array('db_user', 'db_pass', 'db_prefix'); + protected $install_lang = 'English'; protected $default_style = 'FeatherBB'; protected $config_keys = array('db_type', 'db_host', 'db_name', 'db_user', 'db_pass', 'db_prefix'); protected $default_config_path = 'include/config.php'; @@ -26,6 +28,7 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\install(); + $this->available_langs = forum_list_langs(); // // Check to see whether FeatherBB is already installed // if (!is_null($this->feather->forum_env['CONFIG_PATH'])) { @@ -34,12 +37,18 @@ public function __construct() // redirect(get_link(''), __('Already installed')); // } // } - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/English/install.mo'); } public function run() { - if ($this->feather->request->isPost()) { + if (!empty($this->feather->request->post('choose_lang'))) { + if (in_array(feather_trim($this->feather->request->post('install_lang')), $this->available_langs)) { + $this->install_lang = $this->feather->request->post('install_lang'); + } + } + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->install_lang.'/install.mo'); + + if ($this->feather->request->isPost() && empty($this->feather->request->post('choose_lang'))) { $missing_fields = array(); $data = array_map(function ($item) { return feather_escape(feather_trim($item)); @@ -116,7 +125,7 @@ public function run() $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); $this->feather->view()->display('install.php', array( 'feather' => $this->feather, - 'languages' => forum_list_langs(), + 'languages' => $this->available_langs, 'supported_dbs' => $this->supported_dbs, 'data' => $data, 'errors' => $this->errors, @@ -130,14 +139,14 @@ public function run() $data = array('title' => __('My FeatherBB Forum'), 'description' => '

            '.__('Description').'

            ', 'base_url' => $this->feather->request->getUrl().$this->feather->request->getRootUri(), - 'default_lang' => 'English'); + 'default_lang' => $this->install_lang); if (isset($this->environment['slim.flash'])) { $this->feather->view()->set('flash', $this->environment['slim.flash']); } $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); $this->feather->view()->display('install.php', array( 'feather' => $this->feather, - 'languages' => forum_list_langs(), + 'languages' => $this->available_langs, 'supported_dbs' => $this->supported_dbs, 'data' => $data, 'alerts' => array())); @@ -172,6 +181,9 @@ public function create_db(array $data) redirect(get_link(''), 'DB already installed'); } + // Load appropriate language + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$data['default_lang'].'/install.mo'); + // Create tables foreach ($this->model->get_database_scheme() as $table => $sql) { $table = (!empty($data['db_prefix'])) ? $data['db_prefix'].$table : $table; diff --git a/style/FeatherBB/view/install.php b/style/FeatherBB/view/install.php index 223e42b6..3338baaf 100644 --- a/style/FeatherBB/view/install.php +++ b/style/FeatherBB/view/install.php @@ -44,6 +44,7 @@

            +
            @@ -54,7 +55,7 @@ '.$lang.''."\n"; + echo "\t\t\t\t\t".''."\n"; } ?> From f82ba12e45c0d32a4836bb5221ebeefe302e496a Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 17:02:52 +0200 Subject: [PATCH 066/353] Drop 'already installed' check as the installer can't be called by a route --- controller/install.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/controller/install.php b/controller/install.php index 26bf115f..b08eec78 100644 --- a/controller/install.php +++ b/controller/install.php @@ -29,14 +29,6 @@ public function __construct() $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\install(); $this->available_langs = forum_list_langs(); - - // // Check to see whether FeatherBB is already installed - // if (!is_null($this->feather->forum_env['CONFIG_PATH'])) { - // $config = @json_decode(file_get_contents($this->feather->forum_env['FEATHER_ROOT'].$this->feather->forum_env['CONFIG_PATH']), true); - // if (is_array($config)) { - // redirect(get_link(''), __('Already installed')); - // } - // } } public function run() From f5bc0ab324db1166bdd800672419eb99d1bc5fc7 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 17:05:39 +0200 Subject: [PATCH 067/353] Rename var --- controller/install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/install.php b/controller/install.php index b08eec78..806151b8 100644 --- a/controller/install.php +++ b/controller/install.php @@ -21,7 +21,7 @@ class install protected $install_lang = 'English'; protected $default_style = 'FeatherBB'; protected $config_keys = array('db_type', 'db_host', 'db_name', 'db_user', 'db_pass', 'db_prefix'); - protected $default_config_path = 'include/config.php'; + protected $config_file = 'include/config.php'; protected $errors = array(); public function __construct() @@ -200,7 +200,7 @@ public function create_db(array $data) public function write_config($json) { - return file_put_contents($this->feather->forum_env['FEATHER_ROOT'].$this->default_config_path, $json); + return file_put_contents($this->feather->forum_env['FEATHER_ROOT'].$this->config_file, $json); } public function load_default_config(array $data) From 1e8cbfb58e83ef16693382fa2c43541e5dbfbe83 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 17:08:57 +0200 Subject: [PATCH 068/353] Get rid of is_installed check by using 'IF NOT EXISTS' sql syntax --- controller/install.php | 5 ----- model/install.php | 45 +++++++++++++++++------------------------- 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/controller/install.php b/controller/install.php index 806151b8..cf5bc8b5 100644 --- a/controller/install.php +++ b/controller/install.php @@ -168,11 +168,6 @@ public function create_db(array $data) { \Slim\Extras\Middleware\FeatherBBLoader::init_db($data); - // Check if FeatherBB DB isn't installed already - if ($this->model->is_installed()) { - redirect(get_link(''), 'DB already installed'); - } - // Load appropriate language load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$data['default_lang'].'/install.mo'); diff --git a/model/install.php b/model/install.php index 0e4bbd6d..56427462 100644 --- a/model/install.php +++ b/model/install.php @@ -14,7 +14,7 @@ class install { protected $database_scheme = array( - 'bans' => "CREATE TABLE %t% ( + 'bans' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(200) DEFAULT NULL, `ip` varchar(255) DEFAULT NULL, @@ -25,24 +25,24 @@ class install PRIMARY KEY (`id`), KEY `bans_username_idx` (`username`(25)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'categories' => "CREATE TABLE %t% ( + 'categories' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `cat_name` varchar(80) NOT NULL DEFAULT 'New Category', `disp_position` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;", - 'censoring' => "CREATE TABLE %t% ( + 'censoring' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `search_for` varchar(60) NOT NULL DEFAULT '', `replace_with` varchar(60) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'config' => "CREATE TABLE %t% ( + 'config' => "CREATE TABLE IF NOT EXISTS %t% ( `conf_name` varchar(255) NOT NULL DEFAULT '', `conf_value` text, PRIMARY KEY (`conf_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'forum_perms' => "CREATE TABLE %t% ( + 'forum_perms' => "CREATE TABLE IF NOT EXISTS %t% ( `group_id` int(10) NOT NULL DEFAULT '0', `forum_id` int(10) NOT NULL DEFAULT '0', `read_forum` tinyint(1) NOT NULL DEFAULT '1', @@ -50,12 +50,12 @@ class install `post_topics` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`group_id`,`forum_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'forum_subscriptions' => "CREATE TABLE %t% ( + 'forum_subscriptions' => "CREATE TABLE IF NOT EXISTS %t% ( `user_id` int(10) unsigned NOT NULL DEFAULT '0', `forum_id` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`user_id`,`forum_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'forums' => "CREATE TABLE %t% ( + 'forums' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `forum_name` varchar(80) NOT NULL DEFAULT 'New forum', `forum_desc` text, @@ -71,7 +71,7 @@ class install `cat_id` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'groups' => "CREATE TABLE %t% ( + 'groups' => "CREATE TABLE IF NOT EXISTS %t% ( `g_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `g_title` varchar(50) NOT NULL DEFAULT '', `g_user_title` varchar(50) DEFAULT NULL, @@ -101,7 +101,7 @@ class install `g_report_flood` smallint(6) NOT NULL DEFAULT '60', PRIMARY KEY (`g_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'online' => "CREATE TABLE %t% ( + 'online' => "CREATE TABLE IF NOT EXISTS %t% ( `user_id` int(10) unsigned NOT NULL DEFAULT '1', `ident` varchar(200) NOT NULL DEFAULT '', `logged` int(10) unsigned NOT NULL DEFAULT '0', @@ -112,7 +112,7 @@ class install KEY `online_ident_idx` (`ident`(25)), KEY `online_logged_idx` (`logged`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'posts' => "CREATE TABLE %t% ( + 'posts' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `poster` varchar(200) NOT NULL DEFAULT '', `poster_id` int(10) unsigned NOT NULL DEFAULT '1', @@ -128,7 +128,7 @@ class install KEY `posts_topic_id_idx` (`topic_id`), KEY `posts_multi_idx` (`poster_id`,`topic_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'reports' => "CREATE TABLE %t% ( + 'reports' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `post_id` int(10) unsigned NOT NULL DEFAULT '0', `topic_id` int(10) unsigned NOT NULL DEFAULT '0', @@ -141,32 +141,32 @@ class install PRIMARY KEY (`id`), KEY `reports_zapped_idx` (`zapped`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'search_cache' => "CREATE TABLE %t% ( + 'search_cache' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL DEFAULT '0', `ident` varchar(200) NOT NULL DEFAULT '', `search_data` mediumtext, PRIMARY KEY (`id`), KEY `search_cache_ident_idx` (`ident`(8)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'search_matches' => "CREATE TABLE %t% ( + 'search_matches' => "CREATE TABLE IF NOT EXISTS %t% ( `post_id` int(10) unsigned NOT NULL DEFAULT '0', `word_id` int(10) unsigned NOT NULL DEFAULT '0', `subject_match` tinyint(1) NOT NULL DEFAULT '0', KEY `search_matches_word_id_idx` (`word_id`), KEY `search_matches_post_id_idx` (`post_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'search_words' => "CREATE TABLE %t% ( + 'search_words' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `word` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', PRIMARY KEY (`word`), KEY `search_words_id_idx` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'topic_subscriptions' => "CREATE TABLE %t% ( + 'topic_subscriptions' => "CREATE TABLE IF NOT EXISTS %t% ( `user_id` int(10) unsigned NOT NULL DEFAULT '0', `topic_id` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`user_id`,`topic_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'topics' => "CREATE TABLE %t% ( + 'topics' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `poster` varchar(200) NOT NULL DEFAULT '', `subject` varchar(255) NOT NULL DEFAULT '', @@ -187,7 +187,7 @@ class install KEY `topics_last_post_idx` (`last_post`), KEY `topics_first_post_id_idx` (`first_post_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", - 'users' => "CREATE TABLE %t% ( + 'users' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `group_id` int(10) unsigned NOT NULL DEFAULT '3', `username` varchar(200) NOT NULL DEFAULT '', @@ -240,20 +240,11 @@ public function __construct() $this->feather = \Slim\Slim::getInstance(); } - public function is_installed() - { - $db = DB::get_db(); - //$db->exec('SHOW TABLES like users'); - return false; - } - public function create_table($table_name, $sql) { $db = DB::get_db(); $req = preg_replace('/%t%/', '`'.$table_name.'`', $sql); - $db->exec($req); - echo DB::get_last_query(); - return true; + return $db->exec($req); } public function add_data($table_name, array $data) From b8c2e522e8d7c354c9e462c405ed155308e4d719 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 17:18:11 +0200 Subject: [PATCH 069/353] Fix common language loading --- Slim/Extras/Middleware/FeatherBBAuth.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php index c75ad413..8cf86d5e 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -289,6 +289,7 @@ public function call() $this->authenticate(); + load_textdomain('featherbb', $this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.mo'); // Load cached bans if (file_exists($this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php')) { include $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; From 9007c0461d5d867e082f5b815a26f52adb58c261 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Mon, 17 Aug 2015 17:23:04 +0200 Subject: [PATCH 070/353] Patch weird auto_increment --- model/install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/install.php b/model/install.php index 56427462..30d1c2ad 100644 --- a/model/install.php +++ b/model/install.php @@ -30,7 +30,7 @@ class install `cat_name` varchar(80) NOT NULL DEFAULT 'New Category', `disp_position` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) - ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;", + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;", 'censoring' => "CREATE TABLE IF NOT EXISTS %t% ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `search_for` varchar(60) NOT NULL DEFAULT '', From a698a7cc309a0651cd45210fc81e9066dbe9ca83 Mon Sep 17 00:00:00 2001 From: adaur Date: Mon, 17 Aug 2015 22:32:23 +0200 Subject: [PATCH 071/353] Support multiple hooks and DB hooks --- Slim/Slim.php | 58 +++++++++++++++++++++++++++++++++++-- model/index.php | 44 ++++++++++++++++------------ plugins/test/plugintest.php | 17 ++++++++++- 3 files changed, 97 insertions(+), 22 deletions(-) diff --git a/Slim/Slim.php b/Slim/Slim.php index 33ecc482..fa142a57 100644 --- a/Slim/Slim.php +++ b/Slim/Slim.php @@ -1206,14 +1206,68 @@ public function applyHook($name) ksort($this->hooks[$name]); } + $output = array(); + $count = 0; + + foreach ($this->hooks[$name] as $priority) { + if (!empty($priority)) { + foreach ($priority as $callable) { + $output[] = call_user_func_array($callable, $args); + ++$count; + } + } + } + + if ($count == 1) { + return $output[0]; + } + else { + $data = array(); + // Move all the keys to the same level + array_walk_recursive($output, function ($v, $k) use (&$data) { + $data[] = $v; + }); + array_merge_recursive($output); + // Remove any duplicate key + if (!is_object($data)) { + $data = array_unique($data); + } + return $data; + } + } + } + + /** + * Invoke hook for DB + * @param string $name The hook name + * @param mixed ... (Optional) Argument(s) for hooked functions, can specify multiple arguments + */ + public function applyHookDB($name) + { + $args = func_get_args(); + array_shift($args); + + if (!isset($this->hooks[$name])) { + $this->hooks[$name] = array(array()); + return $args[0]; + } + if (!empty($this->hooks[$name])) { + // Sort by priority, low to high, if there's more than one priority + if (count($this->hooks[$name]) > 1) { + ksort($this->hooks[$name]); + } + + $output = array(); + foreach ($this->hooks[$name] as $priority) { if (!empty($priority)) { foreach ($priority as $callable) { - $output = call_user_func_array($callable, $args); - return $output; + $output[] = call_user_func_array($callable, $args); } } } + + return $output[0]; } } diff --git a/model/index.php b/model/index.php index da8e296e..439f9722 100644 --- a/model/index.php +++ b/model/index.php @@ -32,6 +32,8 @@ public function get_page_head() $page_head = array('feed' => ''); } + $page_head = $this->feather->applyHook('get_page_head', $page_head); + return $page_head; } @@ -67,7 +69,7 @@ public function get_new_posts() ->where_any_is($where_get_new_posts_any) ->where_gt('f.last_post', $this->user->last_visit) ->find_result_set(); - + $forums = $new_topics = array(); $tracked_topics = get_tracked_topics(); @@ -80,7 +82,7 @@ public function get_new_posts() if (!empty($forums)) { if (empty($tracked_topics['topics'])) { $new_topics = $forums; - } else { + } else { $select_get_new_posts_tracked_topics = array('forum_id', 'id', 'last_post'); $result = DB::for_table('topics') @@ -108,14 +110,14 @@ public function print_categories_forums() if (!$this->user->is_guest) { $new_topics = $this->get_new_posts(); } - + $select_print_categories_forums = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.forum_desc', 'f.redirect_url', 'f.moderators', 'f.num_topics', 'f.num_posts', 'f.last_post', 'f.last_post_id', 'f.last_poster'); $where_print_categories_forums = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); $order_by_print_categories_forums = array('c.disp_position', 'c.id', 'f.disp_position'); - + $result = DB::for_table('categories') ->table_alias('c') ->select_many($select_print_categories_forums) @@ -225,12 +227,12 @@ public function collect_stats() generate_users_info_cache(); require FORUM_CACHE_DIR.'cache_users_info.php'; } - + $stats_query = DB::for_table('forums') ->select_expr('SUM(num_topics)', 'total_topics') ->select_expr('SUM(num_posts)', 'total_posts') ->find_one(); - + $stats['total_topics'] = intval($stats_query['total_topics']); $stats['total_posts'] = intval($stats_query['total_posts']); @@ -247,20 +249,23 @@ public function collect_stats() public function fetch_users_online() { // Fetch users online info and generate strings for output - $num_guests = 0; + $online['num_guests'] = 0; $online = array(); - $select_fetch_users_online = array('user_id', 'ident'); - $where_fetch_users_online = array('idle' => '0'); - $order_by_fetch_users_online = array('ident'); - - $result = DB::for_table('online') - ->select_many($select_fetch_users_online) - ->where($where_fetch_users_online) - ->order_by_many($order_by_fetch_users_online) - ->find_result_set(); + $query['select'] = array('user_id', 'ident'); + $query['where'] = array('idle' => '0'); + $query['order_by'] = array('ident'); + + $query = DB::for_table('online') + ->select_many($query['select']) + ->where($query['where']) + ->order_by_many($query['order_by']); - foreach($result as $user_online) { + $query = $this->feather->applyHook('query_fetch_users_online', $query); + + $query = $query->find_result_set(); + + foreach($query as $user_online) { if ($user_online->user_id > 1) { if ($this->user->g_view_users == '1') { $online['users'][] = "\n\t\t\t\t".'
            '.feather_escape($user_online->ident).''; @@ -268,7 +273,7 @@ public function fetch_users_online() $online['users'][] = "\n\t\t\t\t".'
            '.feather_escape($user_online->ident); } } else { - ++$num_guests; + ++$online['num_guests']; } } @@ -277,7 +282,8 @@ public function fetch_users_online() } else { $online['num_users'] = 0; } - $online['num_guests'] = $num_guests; + + $online = $this->feather->applyHook('fetch_users_online', $online); return $online; } diff --git a/plugins/test/plugintest.php b/plugins/test/plugintest.php index b277a8ea..f78024b2 100644 --- a/plugins/test/plugintest.php +++ b/plugins/test/plugintest.php @@ -21,8 +21,23 @@ public function __construct() $this->request = $this->feather->request; $this->feather->hook('get_forum_actions', function ($forum_actions) { - $forum_actions[] = 'Test'; + $forum_actions[] = 'Test1'; return $forum_actions; }); + + $this->feather->hook('get_forum_actions', function ($forum_actions) { + $forum_actions[] = 'Test2'; + return $forum_actions; + }); + + $this->feather->hook('query_fetch_users_online', function ($query) { + $query = $query->limit(50); + return $query; + }); + + $this->feather->hook('query_fetch_users_online', function ($query) { + $query = $query->offset(50); + return $query; + }); } } \ No newline at end of file From a614c1a495fd55785a2b0fd41fdc633a19f8849d Mon Sep 17 00:00:00 2001 From: adaur Date: Mon, 17 Aug 2015 22:41:36 +0200 Subject: [PATCH 072/353] Fix applyHookDB --- model/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/index.php b/model/index.php index 439f9722..5758421d 100644 --- a/model/index.php +++ b/model/index.php @@ -249,8 +249,8 @@ public function collect_stats() public function fetch_users_online() { // Fetch users online info and generate strings for output - $online['num_guests'] = 0; $online = array(); + $online['num_guests'] = 0; $query['select'] = array('user_id', 'ident'); $query['where'] = array('idle' => '0'); @@ -261,7 +261,7 @@ public function fetch_users_online() ->where($query['where']) ->order_by_many($query['order_by']); - $query = $this->feather->applyHook('query_fetch_users_online', $query); + $query = $this->feather->applyHookDB('query_fetch_users_online', $query); $query = $query->find_result_set(); From cdec3fa13908d4e0679baa95b06db6dd8568d00a Mon Sep 17 00:00:00 2001 From: beaver Date: Tue, 18 Aug 2015 10:54:23 +0200 Subject: [PATCH 073/353] Restaure "focus element" feature Add javascript to focus form elements + clean a bit Header controller --- controller/header.php | 91 ++++++++++++++++----------------- controller/post.php | 17 +++--- include/cache.php | 2 +- style/FeatherBB/view/header.php | 4 +- view/header.php | 2 +- 5 files changed, 58 insertions(+), 58 deletions(-) diff --git a/controller/header.php b/controller/header.php index c49878a1..edcbcb50 100644 --- a/controller/header.php +++ b/controller/header.php @@ -77,14 +77,45 @@ public function setPageHead($page_head) public function display() { - // START SUBST - TODO - /*if (isset($focus_element)) { - $tpl_main = str_replace('', '', $tpl_main); - }*/ - // END SUBST - - - // START SUBST - + if (!defined('FEATHER_HEADER')) { + define('FEATHER_HEADER', 1); + } + + // Render the header + $this->title = isset($this->title) ? $this->title : feather_escape($this->config['o_board_title']); + + // Define $p if it's not set to avoid a PHP notice + $this->page = isset($this->page) ? $this->page : null; + + // Set default safe values + $this->page_head = isset($this->page_head) ? $this->page_head : null; + $this->paging_links = isset($this->paging_links) ? $this->paging_links : null; + $this->required_fields = isset($this->required_fields) ? $this->required_fields : null; + + $navlinks = $this->getNavlinks(); + $page_info = $this->getStatus(); + + $focus_element = isset($this->focus_element) ? ' onload="document.getElementById(\''.$this->focus_element[0].'\').elements[\''.$this->focus_element[1].'\'].focus();"' : ''; + + $this->feather->render('header.php', array( + 'page_title' => $this->title, + 'p' => $this->page, + 'feather_user' => $this->user, + 'feather_config' => $this->config, + '_SERVER' => $_SERVER, + 'page_head' => $this->page_head, + 'paging_links' => $this->paging_links, + 'required_fields' => $this->required_fields, + 'feather' => $this->feather, + 'focus_element' => $focus_element, + 'navlinks' => $navlinks, + 'page_info' => $page_info, + ) + ); + } + + private function getNavlinks() + { $links = array(); // Index should always be displayed @@ -127,10 +158,12 @@ public function display() } $navlinks = '
            '."\n\t\t\t".'
              '."\n\t\t\t\t".implode("\n\t\t\t\t", $links)."\n\t\t\t".'
            '."\n\t\t".'
            '; - // END SUBST - + return $navlinks; + } - // START SUBST - + private function getStatus() + { $page_statusinfo = $page_topicsearches = array(); if ($this->user->is_guest) { @@ -163,7 +196,6 @@ public function display() $page_topicsearches[] = ''.__('Unanswered topics').''; } - // Generate all that jazz $page_info = '
            '; @@ -184,40 +216,7 @@ public function display() } $page_info .= "\n\t\t\t".'
            '."\n\t\t".'
            '; - // END SUBST - - - - // START SUBST - - - if (!defined('FEATHER_HEADER')) { - define('FEATHER_HEADER', 1); - } - - // Render the header - $this->title = isset($this->title) ? $this->title : feather_escape($this->config['o_board_title']); - - // Define $p if it's not set to avoid a PHP notice - $this->page = isset($this->page) ? $this->page : null; - $this->page_head = isset($this->page_head) ? $this->page_head : null; - $this->focus_element = isset($this->focus_element) ? $this->focus_element : null; - $this->paging_links = isset($this->paging_links) ? $this->paging_links : null; - $this->required_fields = isset($this->required_fields) ? $this->required_fields : null; - - $this->feather->render('header.php', array( - 'page_title' => $this->title, - 'focus_element' => $this->focus_element, - 'p' => $this->page, - 'feather_user' => $this->user, - 'feather_config' => $this->config, - '_SERVER' => $_SERVER, - 'page_head' => $this->page_head, - 'navlinks' => $navlinks, - 'page_info' => $page_info, - 'paging_links' => $this->paging_links, - 'required_fields' => $this->required_fields, - 'feather' => $this->feather, - ) - ); + return $page_info; } -} \ No newline at end of file +} diff --git a/controller/post.php b/controller/post.php index 2dcb6498..b5318867 100644 --- a/controller/post.php +++ b/controller/post.php @@ -78,13 +78,6 @@ public function newpost($fid = null, $tid = null, $qid = null) $post = ''; - if (!$this->user->is_guest) { - $focus_element[] = ($fid) ? 'req_subject' : 'req_message'; - } else { - $required_fields['req_username'] = __('Guest name'); - $focus_element[] = 'req_username'; - } - // Did someone just hit "Submit" or "Preview"? if ($this->feather->request()->isPost()) { @@ -182,7 +175,15 @@ public function newpost($fid = null, $tid = null, $qid = null) if ($this->user->is_guest) { $required_fields['captcha'] = __('Robot title'); } - $focus_element = array('post'); + + // Set focus element (new post or new reply to an existing post ?) + $focus_element[] = 'post'; + if (!$this->user->is_guest) { + $focus_element[] = ($fid) ? 'req_subject' : 'req_message'; + } else { + $required_fields['req_username'] = __('Guest name'); + $focus_element[] = 'req_username'; + } define('FEATHER_ACTIVE_PAGE', 'post'); diff --git a/include/cache.php b/include/cache.php index f9a56b8a..17312bd9 100644 --- a/include/cache.php +++ b/include/cache.php @@ -122,7 +122,7 @@ function generate_quickjump_cache($group_id = false) $output .= "\t\t\t\t\t\t\t".''."\n"; } - $output .= "\t\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t\t".'
            '."\n\t\t\t\t".''."\n"; + $output .= "\t\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t\t".'
            '."\n\t\t\t\t".''."\n"; } } diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php index d045592b..352081e1 100644 --- a/style/FeatherBB/view/header.php +++ b/style/FeatherBB/view/header.php @@ -75,7 +75,7 @@ function process_form(the_form) ?> - +>
            @@ -87,7 +87,7 @@ function process_form(the_form)
            Date: Tue, 18 Aug 2015 12:33:49 +0200 Subject: [PATCH 080/353] Add now() feature --- Slim/Extras/Middleware/FeatherBBLoader.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 8c0acc88..8e870102 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -199,6 +199,10 @@ public function call() // Record start time $this->app->start = get_microtime(); + // Define now var + $this->app->now = function () { + return time(); + }; // Populate FeatherBB Slim object with forum_env vars $this->hydrate('forum_env', $this->forum_env); From 8332ed443b61cf67617d0f72464f6c6dd650ede4 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 18 Aug 2015 12:39:04 +0200 Subject: [PATCH 081/353] Start to refactor FeatherBBAuth middleware --- Slim/Extras/Middleware/FeatherBBAuth.php | 184 +++++++++-------------- model/auth.php | 40 +++++ 2 files changed, 113 insertions(+), 111 deletions(-) create mode 100644 model/auth.php diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php index 8cf86d5e..2ce16203 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -16,127 +16,35 @@ class FeatherBBAuth extends \Slim\Middleware { + protected $model; + public function __construct() { + $this->model = new \model\auth(); } - public function authenticate() + public function get_cookie_data($cookie_name, $cookie_seed) { - $now = time(); - // Get FeatherBB cookie - $cookie_raw = $this->app->getCookie($this->app->forum_settings['cookie_name']); + $cookie_raw = $this->app->getCookie($cookie_name); // Check if cookie exists and is valid (getCookie method returns false if the data has been tampered locally so it can't decrypt the cookie); if (isset($cookie_raw)) { $cookie = json_decode($cookie_raw, true); - $checksum = hash_hmac('sha1', $cookie['user_id'].$cookie['expires'], $this->app->forum_settings['cookie_seed'].'_checksum'); - // If cookie has a non-guest user, hasn't expired and is legit - if ($cookie['user_id'] > 1 && $cookie['expires'] > $now && $checksum == $cookie['checksum']) { - // Get user info from db - $select_check_cookie = array('u.*', 'g.*', 'o.logged', 'o.idle'); - $where_check_cookie = array('u.id' => intval($cookie['user_id'])); - - $result = DB::for_table('users') - ->table_alias('u') - ->select_many($select_check_cookie) - ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join('online', array('o.user_id', '=', 'u.id'), 'o') - ->where($where_check_cookie) - ->find_result_set(); - - foreach ($result as $this->app->user); - - // Another security check, to prevent identity fraud by changing the user id in the cookie) (might be useless considering the strength of encryption) - if (isset($this->app->user->id) && hash_hmac('sha1', $this->app->user->password, $this->app->forum_settings['cookie_seed'].'_password_hash') === $cookie['password_hash']) { - $expires = ($cookie['expires'] > $now + $this->app->forum_settings['o_timeout_visit']) ? $now + 1209600 : $now + $this->app->forum_settings['o_timeout_visit']; - $this->app->user->is_guest = false; - $this->app->user->is_admmod = $this->app->user->g_id == $this->app->forum_env['FEATHER_ADMIN'] || $this->app->g_moderator == '1'; - if (!$this->app->user->disp_topics) { - $this->app->user->disp_topics = $this->app->forum_settings['o_disp_topics_default']; - } - if (!$this->app->user->disp_posts) { - $this->app->user->disp_posts = $this->app->forum_settings['o_disp_posts_default']; - } - if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language)) { - $this->app->user->language = $this->app->forum_settings['o_default_lang']; - } - if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'style/'.$this->app->user->style.'.css')) { - $this->app->user->style = $this->app->forum_settings['o_default_style']; - } - feather_setcookie($this->app->user->id, $this->app->user->password, $expires); - $this->update_online(); - return true; - } - } - } - - // If there is no cookie, or cookie is guest or expired, let's reconnect. - $expires = $now + 31536000; // The cookie expires after a year - - // Fetch guest user - $select_set_default_user = array('u.*', 'g.*', 'o.logged', 'o.last_post', 'o.last_search'); - $where_set_default_user = array('u.id' => '1'); - - $result = DB::for_table('users') - ->table_alias('u') - ->select_many($select_set_default_user) - ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join('online', array('o.ident', '=', $this->app->request->getIp()), 'o', true) - ->where($where_set_default_user) - ->find_result_set(); - - if (!$result) { - exit('Unable to fetch guest information. Your database must contain both a guest user and a guest user group.'); - } - - foreach ($result as $this->app->user); - - $this->app->user->disp_topics = $this->app->forum_settings['o_disp_topics_default']; - $this->app->user->disp_posts = $this->app->forum_settings['o_disp_posts_default']; - $this->app->user->timezone = $this->app->forum_settings['o_default_timezone']; - $this->app->user->dst = $this->app->forum_settings['o_default_dst']; - $this->app->user->language = $this->app->forum_settings['o_default_lang']; - $this->app->user->style = $this->app->forum_settings['o_default_style']; - $this->app->user->is_guest = true; - $this->app->user->is_admmod = false; - - // Update online list - if (!$this->app->user->logged) { - $this->app->user->logged = time(); - - // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table - switch ($this->app->forum_settings['db_type']) { - case 'mysql': - case 'mysqli': - case 'mysql_innodb': - case 'mysqli_innodb': - case 'sqlite': - case 'sqlite3': - DB::for_table('online')->raw_execute('REPLACE INTO '.$this->app->forum_settings['db_prefix'].'online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); - break; - - default: - DB::for_table('online')->raw_execute('INSERT INTO '.$this->app->forum_settings['db_prefix'].'online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); - break; + $checksum = hash_hmac('sha1', $cookie['user_id'].$cookie['expires'], $cookie_seed.'_checksum'); + if ($cookie['user_id'] > 1 && $cookie['expires'] > $this->app->now && $checksum == $cookie['checksum']) { + return $cookie; } - } else { - DB::for_table('online')->where('ident', $this->app->request->getIp()) - ->update_many('logged', time()); } - - feather_setcookie(1, feather_hash(uniqid(rand(), true)), $expires); - return true; + return false; } public function update_online() { - $now = time(); - // Define this if you want this visit to affect the online list and the users last visit data if (!defined('FEATHER_QUIET_VISIT')) { // Update the online list if (!$this->app->user->logged) { - $this->app->user->logged = $now; + $this->app->user->logged = $this->app->now; // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table switch ($this->app->forum_settings['db_type']) { @@ -159,7 +67,7 @@ public function update_online() } else { // Special case: We've timed out, but no other user has browsed the forums since we timed out - if ($this->app->user->logged < ($now-$this->app->forum_settings['o_timeout_visit'])) { + if ($this->app->user->logged < ($this->app->now-$this->app->forum_settings['o_timeout_visit'])) { DB::for_table('users')->where('id', $this->app->user->id) ->find_one() ->set('last_visit', $this->app->user->logged) @@ -169,7 +77,7 @@ public function update_online() $idle_sql = ($this->app->user->idle == '1') ? ', idle=0' : ''; - DB::for_table('online')->raw_execute('UPDATE '.$this->app->forum_settings['db_prefix'].'online SET logged='.$now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $this->app->user->id)); + DB::for_table('online')->raw_execute('UPDATE '.$this->app->forum_settings['db_prefix'].'online SET logged='.$this->app->now.$idle_sql.' WHERE user_id=:user_id', array(':user_id' => $this->app->user->id)); // Update tracked topics with the current expire time $cookie_tracked_topics = $this->app->getCookie($this->app->forum_settings['cookie_name'].'_track'); @@ -186,13 +94,11 @@ public function update_online() public function update_users_online() { - $now = time(); - // Fetch all online list entries that are older than "o_timeout_online" $select_update_users_online = array('user_id', 'ident', 'logged', 'idle'); $result = \DB::for_table('online')->select_many($select_update_users_online) - ->where_lt('logged', $now-$this->app->forum_settings['o_timeout_online']) + ->where_lt('logged', $this->app->now-$this->app->forum_settings['o_timeout_online']) ->find_many(); foreach ($result as $cur_user) { @@ -202,7 +108,7 @@ public function update_users_online() ->delete_many(); } else { // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list - if ($cur_user['logged'] < ($now-$this->app->forum_settings['o_timeout_visit'])) { + if ($cur_user['logged'] < ($this->app->now-$this->app->forum_settings['o_timeout_visit'])) { \DB::for_table('users')->where('id', $cur_user['user_id']) ->find_one() ->set('last_visit', $cur_user['logged']) @@ -285,9 +191,65 @@ public function check_bans() public function call() { - global $feather_bans, $cookie_name, $cookie_seed; + global $feather_bans; - $this->authenticate(); + if ($cookie = $this->get_cookie_data($this->app->forum_settings['cookie_name'], $this->app->forum_settings['cookie_seed'])) { + $this->app->user = $this->model->load_user($cookie['user_id']); + $expires = ($cookie['expires'] > $this->app->now + $this->app->forum_settings['o_timeout_visit']) ? $this->app->now + 1209600 : $this->app->now + $this->app->forum_settings['o_timeout_visit']; + $this->app->user->is_guest = false; + $this->app->user->is_admmod = $this->app->user->g_id == $this->app->forum_env['FEATHER_ADMIN'] || $this->app->g_moderator == '1'; + if (!$this->app->user->disp_topics) { + $this->app->user->disp_topics = $this->app->forum_settings['o_disp_topics_default']; + } + if (!$this->app->user->disp_posts) { + $this->app->user->disp_posts = $this->app->forum_settings['o_disp_posts_default']; + } + if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language)) { + $this->app->user->language = $this->app->forum_settings['o_default_lang']; + } + if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'style/'.$this->app->user->style.'.css')) { + $this->app->user->style = $this->app->forum_settings['o_default_style']; + } + feather_setcookie($this->app->user->id, $this->app->user->password, $expires); + $this->update_online(); + } else { + $this->app->user = $this->model->load_user(1); + + $this->app->user->disp_topics = $this->app->forum_settings['o_disp_topics_default']; + $this->app->user->disp_posts = $this->app->forum_settings['o_disp_posts_default']; + $this->app->user->timezone = $this->app->forum_settings['o_default_timezone']; + $this->app->user->dst = $this->app->forum_settings['o_default_dst']; + $this->app->user->language = $this->app->forum_settings['o_default_lang']; + $this->app->user->style = $this->app->forum_settings['o_default_style']; + $this->app->user->is_guest = true; + $this->app->user->is_admmod = false; + + // Update online list + if (!$this->app->user->logged) { + $this->app->user->logged = time(); + + // With MySQL/MySQLi/SQLite, REPLACE INTO avoids a user having two rows in the online table + switch ($this->app->forum_settings['db_type']) { + case 'mysql': + case 'mysqli': + case 'mysql_innodb': + case 'mysqli_innodb': + case 'sqlite': + case 'sqlite3': + DB::for_table('online')->raw_execute('REPLACE INTO '.$this->app->forum_settings['db_prefix'].'online (user_id, ident, logged) VALUES(1, :ident, :logged)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); + break; + + default: + DB::for_table('online')->raw_execute('INSERT INTO '.$this->app->forum_settings['db_prefix'].'online (user_id, ident, logged) SELECT 1, :ident, :logged WHERE NOT EXISTS (SELECT 1 FROM '.$this->app->db->prefix.'online WHERE ident=:ident)', array(':ident' => $this->app->request->getIp(), ':logged' => $this->app->user->logged)); + break; + } + } else { + DB::for_table('online')->where('ident', $this->app->request->getIp()) + ->update_many('logged', time()); + } + + feather_setcookie(1, feather_hash(uniqid(rand(), true)), $this->app->now + 31536000); + } load_textdomain('featherbb', $this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.mo'); // Load cached bans @@ -311,7 +273,7 @@ public function call() $this->update_users_online(); // Configure Slim - $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); + $this->app->config('templates.path', $this->app->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); $this->next->call(); } } diff --git a/model/auth.php b/model/auth.php new file mode 100644 index 00000000..15b896a2 --- /dev/null +++ b/model/auth.php @@ -0,0 +1,40 @@ +feather = \Slim\Slim::getInstance(); + } + + public function load_user($user_id) + { + $user_id = (int) $user_id; + $select_load_user = array('u.*', 'g.*', 'o.logged', 'o.idle'); + $where_load_user = array('u.id' => $user_id); + $left_outer_join_load_user = ($user_id == 1) ? $this->feather->request->getIp() : 'u.id'; + $escape = ($user_id == 1) ? true : false; + + $result = DB::for_table('users') + ->table_alias('u') + ->select_many($select_load_user) + ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') + ->left_outer_join('online', array('o.user_id', '=', $left_outer_join_load_user), 'o', $escape) + ->where($where_load_user) + ->find_result_set(); + + foreach ($result as $user) { + return $user; + } + } +} From dcb8812f366d41cf2034f843a5bf836831b7f5f9 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 18 Aug 2015 12:58:07 +0200 Subject: [PATCH 082/353] Patch FEATHER_ROOT init --- Slim/Extras/Middleware/FeatherBBLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 8e870102..660f9825 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -27,7 +27,7 @@ class FeatherBBLoader extends \Slim\Middleware public function __construct(array $data) { // Define some core variables - $this->forum_env['FEATHER_ROOT'] = realpath(dirname(__FILE__). '../../../'); + $this->forum_env['FEATHER_ROOT'] = realpath(dirname(__FILE__).'/../../../').'/'; $this->forum_env['FORUM_CACHE_DIR'] = is_writable($this->forum_env['FEATHER_ROOT'].$data['cache_dir']) ? realpath($this->forum_env['FEATHER_ROOT'].$data['cache_dir']).'/' : null; $this->forum_env['FORUM_CONFIG_FILE'] = is_file($this->forum_env['FEATHER_ROOT'].$data['config_file']) ? realpath($this->forum_env['FEATHER_ROOT'].$data['config_file']) : null; // Populate forum_env From a5c586660d5f55a428a8927470490d525779ee51 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 18 Aug 2015 13:31:36 +0200 Subject: [PATCH 083/353] Various fixes --- .gitignore | 1 - .htaccess | 3 +++ controller/install.php | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .htaccess diff --git a/.gitignore b/.gitignore index 57908133..daf8a988 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,3 @@ include/config.php .idea/ nbproject/ lang/French -.htaccess \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100644 index 00000000..a7b90e2c --- /dev/null +++ b/.htaccess @@ -0,0 +1,3 @@ +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^ index.php [QSA,L] \ No newline at end of file diff --git a/controller/install.php b/controller/install.php index 4a14d3e4..2eab5c81 100644 --- a/controller/install.php +++ b/controller/install.php @@ -128,9 +128,10 @@ public function run() $this->create_config($data); } } else { + $base_url = str_replace('index.php', '', $this->feather->request->getUrl().$this->feather->request->getRootUri()); $data = array('title' => __('My FeatherBB Forum'), 'description' => __('Description'), - 'base_url' => $this->feather->request->getUrl().$this->feather->request->getRootUri(), + 'base_url' => $base_url, 'default_lang' => $this->install_lang); if (isset($this->environment['slim.flash'])) { $this->feather->view()->set('flash', $this->environment['slim.flash']); @@ -193,6 +194,9 @@ public function create_db(array $data) $this->model->add_mock_forum($this->model->load_mock_forum_data($data)); // Store config in DB $this->model->save_config($this->load_default_config($data)); + + // Redirect to homepage + redirect(get_link('/')); } public function write_config($json) From 803a982e1d223d775ed36164ce9dea4c4485a733 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 18 Aug 2015 15:19:08 +0200 Subject: [PATCH 084/353] Restore .htaccess feature --- .gitignore | 1 + .htaccess | 2 +- .htaccess.dist | 3 +++ controller/install.php | 11 +++++++++++ style/FeatherBB/view/header.php | 2 +- 5 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .htaccess.dist diff --git a/.gitignore b/.gitignore index daf8a988..b1fc652e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ include/config.php .idea/ nbproject/ lang/French +.htaccess diff --git a/.htaccess b/.htaccess index a7b90e2c..51c6beec 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,3 @@ RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^ index.php [QSA,L] \ No newline at end of file +RewriteRule ^ index.php [QSA,L] diff --git a/.htaccess.dist b/.htaccess.dist new file mode 100644 index 00000000..51c6beec --- /dev/null +++ b/.htaccess.dist @@ -0,0 +1,3 @@ +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^ index.php [QSA,L] diff --git a/controller/install.php b/controller/install.php index 2eab5c81..67256fd8 100644 --- a/controller/install.php +++ b/controller/install.php @@ -195,6 +195,11 @@ public function create_db(array $data) // Store config in DB $this->model->save_config($this->load_default_config($data)); + // Handle .htaccess + if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) { + $this->write_htaccess(); + } + // Redirect to homepage redirect(get_link('/')); } @@ -204,6 +209,12 @@ public function write_config($json) return file_put_contents($this->feather->forum_env['FEATHER_ROOT'].$this->config_file, $json); } + public function write_htaccess() + { + $data = file_get_contents($this->feather->forum_env['FEATHER_ROOT'].'.htaccess.dist'); + return file_put_contents($this->feather->forum_env['FEATHER_ROOT'].'.htaccess', $data); + } + public function load_default_config(array $data) { return array( diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php index 352081e1..15bad5d7 100644 --- a/style/FeatherBB/view/header.php +++ b/style/FeatherBB/view/header.php @@ -102,7 +102,7 @@ function process_form(the_form)

            -
            +
            From ff2f9e5486e98b00458809ca8af36d734e980405 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 18 Aug 2015 15:33:49 +0200 Subject: [PATCH 085/353] Patch add forum feature in empty category --- controller/admin/forums.php | 12 +++++++----- model/admin/forums.php | 6 +++--- style/FeatherBB/view/admin/forums/admin_forums.php | 12 ++++++------ 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/controller/admin/forums.php b/controller/admin/forums.php index e71517f5..38577a3f 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -100,8 +100,8 @@ public function edit_forum($forum_id) $permissions_data['post_replies'] = (isset($this->request->post('post_replies_new')[$perm_group['g_id']])) ? '1' : '0'; $permissions_data['post_topics'] = (isset($this->request->post('post_topics_new')[$perm_group['g_id']])) ? '1' : '0'; // Check if the new settings differ from the old - if ($permissions_data['read_forum'] != $this->request->post('read_forum_old')[$perm_group['g_id']] || - $permissions_data['post_replies'] != $this->request->post('post_replies_old')[$perm_group['g_id']] || + if ($permissions_data['read_forum'] != $this->request->post('read_forum_old')[$perm_group['g_id']] || + $permissions_data['post_replies'] != $this->request->post('post_replies_old')[$perm_group['g_id']] || $permissions_data['post_topics'] != $this->request->post('post_topics_old')[$perm_group['g_id']]) { // If there is no group permissions override for this forum if ($permissions_data['read_forum'] == '1' && $permissions_data['post_replies'] == $perm_group['g_post_replies'] && $permissions_data['post_topics'] == $perm_group['g_post_topics']) { @@ -120,7 +120,7 @@ public function edit_forum($forum_id) generate_quickjump_cache(); redirect(get_link('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); - + } elseif ($this->request->post('revert_perms')) { $this->model->delete_permissions($forum_id); @@ -195,7 +195,7 @@ public function delete_forum($forum_id) $this->footer->display(); } } - + // -- // public function edit_positions() @@ -214,7 +214,7 @@ public function edit_positions() redirect(get_link('admin/forums/'), __('Forums updated redirect')); } - + public function display() { if ($this->user->g_id != FEATHER_ADMIN) { @@ -235,8 +235,10 @@ public function display() generate_admin_menu('forums'); + $categories_model = new \model\admin\categories(); $this->feather->render('admin/forums/admin_forums.php', array( 'feather_config' => $this->config, + 'cat_list' => $categories_model->get_cat_list(), 'forum_data' => $this->model->get_forums(), 'cur_index' => 4, ) diff --git a/model/admin/forums.php b/model/admin/forums.php index e5c62007..eb332bbe 100644 --- a/model/admin/forums.php +++ b/model/admin/forums.php @@ -21,9 +21,9 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + // - // Forum + // Forum // public function add_forum($cat_id, $forum_name) @@ -192,7 +192,7 @@ public function update_permissions(array $permissions_data) } - public function delete_permissions($forum_id, $group_id = null) + public function delete_permissions($forum_id, $group_id = null) { $result = DB::for_table('forum_perms') ->where('forum_id', $forum_id); diff --git a/style/FeatherBB/view/admin/forums/admin_forums.php b/style/FeatherBB/view/admin/forums/admin_forums.php index 027ebd88..e966e6f5 100644 --- a/style/FeatherBB/view/admin/forums/admin_forums.php +++ b/style/FeatherBB/view/admin/forums/admin_forums.php @@ -6,20 +6,20 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; } ?> - +

            @@ -30,8 +30,8 @@
          -
          '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), + get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
          @@ -111,4 +111,4 @@ \ No newline at end of file +?> From a03c5bc35c8a755d4fd86777671932b11f77d4e5 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 18 Aug 2015 16:27:51 +0200 Subject: [PATCH 086/353] Tweak debug mode --- Slim/Extras/Middleware/FeatherBBLoader.php | 31 +++++++++++++--------- index.php | 6 ++--- style/FeatherBB/view/footer.php | 4 +-- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 660f9825..07345f12 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -26,10 +26,16 @@ class FeatherBBLoader extends \Slim\Middleware public function __construct(array $data) { + // Handle empty values in data + $data = array_merge(array('config_file' => 'include/config.php', + 'cache_dir' => 'cache/', + 'debug' => false), $data); // Define some core variables $this->forum_env['FEATHER_ROOT'] = realpath(dirname(__FILE__).'/../../../').'/'; $this->forum_env['FORUM_CACHE_DIR'] = is_writable($this->forum_env['FEATHER_ROOT'].$data['cache_dir']) ? realpath($this->forum_env['FEATHER_ROOT'].$data['cache_dir']).'/' : null; $this->forum_env['FORUM_CONFIG_FILE'] = is_file($this->forum_env['FEATHER_ROOT'].$data['config_file']) ? realpath($this->forum_env['FEATHER_ROOT'].$data['config_file']) : null; + $this->forum_env['FEATHER_DEBUG'] = $this->forum_env['FEATHER_SHOW_QUERIES'] = ($data['debug'] == 'all'); + $this->forum_env['FEATHER_SHOW_INFO'] = ($data['debug'] == 'info' || $data['debug'] == 'all'); // Populate forum_env $this->forum_env = array_merge(self::load_default_forum_env(), $this->forum_env); $this->env_to_globals($this->forum_env); // Legacy @@ -43,8 +49,6 @@ public function __construct(array $data) // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); - // Reset opcache while debugging - opcache_reset(); } public static function load_default_forum_env() @@ -68,9 +72,9 @@ public static function load_default_forum_env() 'FEATHER_SEARCH_MIN_WORD' => 3, 'FEATHER_SEARCH_MAX_WORD' => 20, 'FORUM_MAX_COOKIE_SIZE' => 4048, - 'FEATHER_DEBUG' => 1, - 'FEATHER_SHOW_QUERIES' => 1, - 'FEATHER_CACHE_QUERIES' => 0, + 'FEATHER_DEBUG' => false, + 'FEATHER_SHOW_QUERIES' => false, + 'FEATHER_SHOW_INFO' => false ); } @@ -87,12 +91,10 @@ public static function load_default_forum_settings() // Cookies 'cookie_name' => 'feather_cookie', 'cookie_seed' => 'changeme', // MUST BE CHANGED !!! - // Debug - 'debug' => false, ); } - public static function init_db(array $config) + public static function init_db(array $config, $log_queries = false) { $config['db_prefix'] = (!empty($config['db_prefix'])) ? $config['db_prefix'] : ''; switch ($config['db_type']) { @@ -110,11 +112,13 @@ public static function init_db(array $config) } DB::configure('username', $config['db_user']); DB::configure('password', $config['db_pass']); - DB::configure('logging', true); + DB::configure('prefix', $config['db_prefix']); + if ($log_queries) { + DB::configure('logging', true); + } DB::configure('id_column_overrides', array( $config['db_prefix'].'groups' => 'g_id', )); - DB::configure('prefix', $config['db_prefix']); } // Getters / setters for Slim container (avoid magic get error) @@ -225,8 +229,11 @@ public function call() return $this->app->response->setBody('Wrong config file format'); } - // Init DB - self::init_db($this->forum_settings); + // Init DB and configure Slim + self::init_db($this->forum_settings, $this->forum_env['FEATHER_SHOW_INFO']); + $this->app->config(array('debug' => $this->forum_env['FEATHER_DEBUG'], + 'cookies.encrypt' => true, + 'cookies.secret_key' => $this->forum_settings['cookie_seed'])); // Get forum settings from DB/cache and load it into forum_settings array if (file_exists($this->forum_env['FORUM_CACHE_DIR'].'cache_config.php')) { diff --git a/index.php b/index.php index f5aa57f8..5b22fd16 100644 --- a/index.php +++ b/index.php @@ -20,7 +20,8 @@ // Instantiate Slim $feather = new \Slim\Slim(); $feather_settings = array('config_file' => 'include/config.php', - 'cache_dir' => 'cache/'); + 'cache_dir' => 'cache/', + 'debug' => 'all'); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) // Load middlewares $feather->add(new \Slim\Extras\Middleware\CsrfGuard('featherbb_csrf')); // CSRF @@ -31,8 +32,5 @@ // Load the routes require 'include/routes.php'; -$feather->config('cookies.encrypt', true); -$feather->config('debug', true); // As long as we're developing FeatherBB - // Run it, baby! $feather->run(); diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index 5231f252..10922aab 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -117,7 +117,7 @@ forum_env['FEATHER_SHOW_INFO']) { echo '

          [ '; // Calculate script generation time @@ -135,7 +135,7 @@ echo ' ]

          '."\n"; } // Display executed queries (if enabled) -if (defined('FEATHER_SHOW_QUERIES')) { +if ($feather->forum_env['FEATHER_SHOW_QUERIES']) { display_saved_queries(); } ?> From 2132a897bcbc4facafeb5a726f7e2983d6626171 Mon Sep 17 00:00:00 2001 From: adaur Date: Tue, 18 Aug 2015 21:26:31 +0200 Subject: [PATCH 087/353] Don't edit Slim's core --- Slim/Extras/Middleware/FeatherBB.php | 3 + Slim/Slim.php | 139 ++++++++----------------- include/hooks.php | 149 +++++++++++++++++++++++++++ model/index.php | 23 +++-- plugins/test/plugintest.php | 13 +-- 5 files changed, 214 insertions(+), 113 deletions(-) create mode 100644 include/hooks.php diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index 321d3f08..f9e1b6b5 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -460,6 +460,9 @@ public function call() } else { $this->env_to_globals($this->data['forum_env']); // Legacy : define globals from forum_env + // Load hooks + require $this->data['forum_env']['FEATHER_ROOT'].'include/hooks.php'; + $this->app->hooks = new \hooks; require $this->data['forum_env']['FEATHER_ROOT'].'include/utf8/utf8.php'; require $this->data['forum_env']['FEATHER_ROOT'].'include/functions.php'; diff --git a/Slim/Slim.php b/Slim/Slim.php index e6829d56..d0918792 100644 --- a/Slim/Slim.php +++ b/Slim/Slim.php @@ -6,7 +6,7 @@ * @copyright 2011 Josh Lockhart * @link http://www.slimframework.com * @license http://www.slimframework.com/license - * @version 2.6.1 + * @version 2.6.3 * @package Slim * * MIT LICENSE @@ -54,7 +54,7 @@ class Slim /** * @const string */ - const VERSION = '2.6.1'; + const VERSION = '2.6.3'; /** * @var \Slim\Helper\Set @@ -99,10 +99,10 @@ class Slim ); /******************************************************************************** - * PSR-0 Autoloader - * - * Do not use if you are using Composer to autoload dependencies. - *******************************************************************************/ + * PSR-0 Autoloader + * + * Do not use if you are using Composer to autoload dependencies. + *******************************************************************************/ /** * Slim PSR-0 autoloader @@ -141,8 +141,8 @@ public static function registerAutoloader() } /******************************************************************************** - * Instantiation and Configuration - *******************************************************************************/ + * Instantiation and Configuration + *******************************************************************************/ /** * Constructor @@ -179,7 +179,7 @@ public function __construct(array $userSettings = array()) $viewClass = $c['settings']['view']; $templatesPath = $c['settings']['templates.path']; - $view = ($viewClass instanceof \Slim\View) ? $viewClass : new $viewClass; + $view = ($viewClass instanceOf \Slim\View) ? $viewClass : new $viewClass; $view->setTemplatesDirectory($templatesPath); return $view; }); @@ -353,8 +353,8 @@ public function config($name, $value = null) } /******************************************************************************** - * Application Modes - *******************************************************************************/ + * Application Modes + *******************************************************************************/ /** * Get application mode @@ -390,8 +390,8 @@ public function configureMode($mode, $callable) } /******************************************************************************** - * Logging - *******************************************************************************/ + * Logging + *******************************************************************************/ /** * Get application log @@ -403,8 +403,8 @@ public function getLog() } /******************************************************************************** - * Routing - *******************************************************************************/ + * Routing + *******************************************************************************/ /** * Add GET|POST|PUT|PATCH|DELETE route @@ -588,7 +588,7 @@ public function any() * * @param mixed $callable Anything that returns true for is_callable() */ - public function notFound($callable = null) + public function notFound ($callable = null) { if (is_callable($callable)) { $this->notFound = $callable; @@ -662,8 +662,8 @@ protected function callErrorHandler($argument = null) } /******************************************************************************** - * Application Accessors - *******************************************************************************/ + * Application Accessors + *******************************************************************************/ /** * Get a reference to the Environment object @@ -720,7 +720,7 @@ public function view($viewClass = null) { if (!is_null($viewClass)) { $existingData = is_null($this->view) ? array() : $this->view->getData(); - if ($viewClass instanceof \Slim\View) { + if ($viewClass instanceOf \Slim\View) { $this->view = $viewClass; } else { $this->view = new $viewClass(); @@ -733,8 +733,8 @@ public function view($viewClass = null) } /******************************************************************************** - * Rendering - *******************************************************************************/ + * Rendering + *******************************************************************************/ /** * Render a template @@ -758,8 +758,8 @@ public function render($template, $data = array(), $status = null) } /******************************************************************************** - * HTTP Caching - *******************************************************************************/ + * HTTP Caching + *******************************************************************************/ /** * Set Last-Modified HTTP Response Header @@ -847,8 +847,8 @@ public function expires($time) } /******************************************************************************** - * HTTP Cookies - *******************************************************************************/ + * HTTP Cookies + *******************************************************************************/ /** * Set HTTP cookie to be sent with the HTTP response @@ -981,8 +981,8 @@ public function deleteCookie($name, $path = null, $domain = null, $secure = null } /******************************************************************************** - * Helper Methods - *******************************************************************************/ + * Helper Methods + *******************************************************************************/ /** * Get the absolute path to this Slim application's root directory @@ -1113,14 +1113,13 @@ public function redirect($url, $status = 302) * @param string $route The route name * @param array $params Associative array of URL parameters and replacement values */ - public function redirectTo($route, $params = array(), $status = 302) - { + public function redirectTo($route, $params = array(), $status = 302){ $this->redirect($this->urlFor($route, $params), $status); } /******************************************************************************** - * Flash Messages - *******************************************************************************/ + * Flash Messages + *******************************************************************************/ /** * Set flash message for subsequent request @@ -1167,8 +1166,8 @@ public function flashData() } /******************************************************************************** - * Hooks - *******************************************************************************/ + * Hooks + *******************************************************************************/ /** * Assign hook @@ -1193,60 +1192,8 @@ public function hook($name, $callable, $priority = 10) */ public function applyHook($name) { - $args = func_get_args(); - array_shift($args); - - if (!isset($this->hooks[$name])) { - $this->hooks[$name] = array(array()); - return $args[0]; - } - if (!empty($this->hooks[$name])) { - // Sort by priority, low to high, if there's more than one priority - if (count($this->hooks[$name]) > 1) { - ksort($this->hooks[$name]); - } - - $output = array(); - $count = 0; - - foreach ($this->hooks[$name] as $priority) { - if (!empty($priority)) { - foreach ($priority as $callable) { - $output[] = call_user_func_array($callable, $args); - ++$count; - } - } - } - - if ($count == 1) { - return $output[0]; - } - else { - $data = array(); - // Move all the keys to the same level - array_walk_recursive($output, function ($v, $k) use (&$data) { - $data[] = $v; - }); - // Remove any duplicate key - $data = array_unique($data); - return $data; - } - } - } - - /** - * Invoke hook for DB - * @param string $name The hook name - * @param mixed ... (Optional) Argument(s) for hooked functions, can specify multiple arguments - */ - public function applyHookDB($name) - { - $args = func_get_args(); - array_shift($args); - if (!isset($this->hooks[$name])) { $this->hooks[$name] = array(array()); - return $args[0]; } if (!empty($this->hooks[$name])) { // Sort by priority, low to high, if there's more than one priority @@ -1254,17 +1201,16 @@ public function applyHookDB($name) ksort($this->hooks[$name]); } - $output = array(); + $args = func_get_args(); + array_shift($args); foreach ($this->hooks[$name] as $priority) { if (!empty($priority)) { foreach ($priority as $callable) { - $output[] = call_user_func_array($callable, $args); + call_user_func_array($callable, $args); } } } - - return $output[0]; } } @@ -1309,8 +1255,8 @@ public function clearHooks($name = null) } /******************************************************************************** - * Middleware - *******************************************************************************/ + * Middleware + *******************************************************************************/ /** * Add middleware @@ -1322,7 +1268,7 @@ public function clearHooks($name = null) */ public function add(\Slim\Middleware $newMiddleware) { - if (in_array($newMiddleware, $this->middleware)) { + if(in_array($newMiddleware, $this->middleware)) { $middleware_class = get_class($newMiddleware); throw new \RuntimeException("Circular Middleware setup detected. Tried to queue the same Middleware instance ({$middleware_class}) twice."); } @@ -1332,8 +1278,8 @@ public function add(\Slim\Middleware $newMiddleware) } /******************************************************************************** - * Runner - *******************************************************************************/ + * Runner + *******************************************************************************/ /** * Run @@ -1426,6 +1372,7 @@ public function call() $this->response()->write(ob_get_clean()); } catch (\Exception $e) { if ($this->config('debug')) { + ob_end_clean(); throw $e; } else { try { @@ -1439,8 +1386,8 @@ public function call() } /******************************************************************************** - * Error Handling and Debugging - *******************************************************************************/ + * Error Handling and Debugging + *******************************************************************************/ /** * Convert errors into ErrorException objects diff --git a/include/hooks.php b/include/hooks.php new file mode 100644 index 00000000..77875fe2 --- /dev/null +++ b/include/hooks.php @@ -0,0 +1,149 @@ +hooks[$name])) { + $this->hooks[$name] = array(array()); + } + if (is_callable($callable)) { + $this->hooks[$name][(int) $priority][] = $callable; + } + } + + /** + * Invoke hook + * @param string $name The hook name + * @param mixed ... (Optional) Argument(s) for hooked functions, can specify multiple arguments + */ + public function fire($name) + { + $args = func_get_args(); + array_shift($args); + + if (!isset($this->hooks[$name])) { + $this->hooks[$name] = array(array()); + return $args[0]; + } + if (!empty($this->hooks[$name])) { + // Sort by priority, low to high, if there's more than one priority + if (count($this->hooks[$name]) > 1) { + ksort($this->hooks[$name]); + } + + $output = array(); + $count = 0; + + foreach ($this->hooks[$name] as $priority) { + if (!empty($priority)) { + foreach ($priority as $callable) { + $output[] = call_user_func_array($callable, $args); + ++$count; + } + } + } + + if ($count == 1) { + return $output[0]; + } + else { + $data = array(); + // Move all the keys to the same level + array_walk_recursive($output, function ($v, $k) use (&$data) { + $data[] = $v; + }); + // Remove any duplicate key + $data = array_unique($data); + return $data; + } + } + } + + /** + * Invoke hook for DB + * @param string $name The hook name + * @param mixed ... (Optional) Argument(s) for hooked functions, can specify multiple arguments + */ + public function fireDB($name) + { + $args = func_get_args(); + array_shift($args); + + if (!isset($this->hooks[$name])) { + $this->hooks[$name] = array(array()); + return $args[0]; + } + if (!empty($this->hooks[$name])) { + // Sort by priority, low to high, if there's more than one priority + if (count($this->hooks[$name]) > 1) { + ksort($this->hooks[$name]); + } + + $output = array(); + + foreach ($this->hooks[$name] as $priority) { + if (!empty($priority)) { + foreach ($priority as $callable) { + $output[] = call_user_func_array($callable, $args); + } + } + } + + return $output[0]; + } + } + + /** + * Get hook listeners + * + * Return an array of registered hooks. If `$name` is a valid + * hook name, only the listeners attached to that hook are returned. + * Else, all listeners are returned as an associative array whose + * keys are hook names and whose values are arrays of listeners. + * + * @param string $name A hook name (Optional) + * @return array|null + */ + public function getHooks($name = null) + { + if (!is_null($name)) { + return isset($this->hooks[(string) $name]) ? $this->hooks[(string) $name] : null; + } else { + return $this->hooks; + } + } + + /** + * Clear hook listeners + * + * Clear all listeners for all hooks. If `$name` is + * a valid hook name, only the listeners attached + * to that hook will be cleared. + * + * @param string $name A hook name (Optional) + */ + public function clearHooks($name = null) + { + if (!is_null($name) && isset($this->hooks[(string) $name])) { + $this->hooks[(string) $name] = array(array()); + } else { + foreach ($this->hooks as $key => $value) { + $this->hooks[$key] = array(array()); + } + } + } +} \ No newline at end of file diff --git a/model/index.php b/model/index.php index 23491abd..0f17a69a 100644 --- a/model/index.php +++ b/model/index.php @@ -21,6 +21,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } // Returns page head @@ -32,7 +33,7 @@ public function get_page_head() $page_head = array('feed' => ''); } - $page_head = $this->feather->applyHook('get_page_head', $page_head); + $page_head = $this->hook->fire('get_page_head', $page_head); return $page_head; } @@ -47,7 +48,7 @@ public function get_forum_actions() $forum_actions[] = ''.__('Mark all as read').''; } - $forum_actions = $this->feather->applyHook('get_forum_actions', $forum_actions); + $forum_actions = $this->hook->fire('get_forum_actions', $forum_actions); return $forum_actions; } @@ -69,7 +70,7 @@ public function get_new_posts() ->where_any_is($query['where']) ->where_gt('f.last_post', $this->user->last_visit); - $query = $this->feather->applyHookDB('query_get_new_posts', $query); + $query = $this->hook->fireDB('query_get_new_posts', $query); $query = $query->find_result_set(); @@ -94,7 +95,7 @@ public function get_new_posts() ->where_gt('last_post', $this->user->last_visit) ->where_null('moved_to'); - $query = $this->feather->applyHookDB('query_get_new_posts', $query); + $query = $this->hook->fireDB('query_get_new_posts', $query); $query = $query->find_result_set(); @@ -106,7 +107,7 @@ public function get_new_posts() } } - $new_topics = $this->feather->applyHook('get_new_posts', $new_topics); + $new_topics = $this->hook->fire('get_new_posts', $new_topics); return $new_topics; } @@ -135,7 +136,7 @@ public function print_categories_forums() ->where_any_is($query['where']) ->order_by_many($query['order_by']); - $query = $this->feather->applyHookDB('query_print_categories_forums', $query); + $query = $this->hook->fireDB('query_print_categories_forums', $query); $query = $query->find_result_set(); @@ -218,7 +219,7 @@ public function print_categories_forums() ++$i; } - $index_data = $this->feather->applyHook('print_categories_forums', $index_data); + $index_data = $this->hook->fire('print_categories_forums', $index_data); return $index_data; } @@ -244,7 +245,7 @@ public function collect_stats() ->select_expr('SUM(num_topics)', 'total_topics') ->select_expr('SUM(num_posts)', 'total_posts'); - $query = $this->feather->applyHookDB('collect_stats_query', $query); + $query = $this->hook->fireDB('collect_stats_query', $query); $query = $query->find_one(); @@ -257,7 +258,7 @@ public function collect_stats() $stats['newest_user'] = feather_escape($stats['last_user']['username']); } - $stats = $this->feather->applyHook('collect_stats', $stats); + $stats = $this->hook->fire('collect_stats', $stats); return $stats; } @@ -278,7 +279,7 @@ public function fetch_users_online() ->where($query['where']) ->order_by_many($query['order_by']); - $query = $this->feather->applyHookDB('query_fetch_users_online', $query); + $query = $this->hook->fireDB('query_fetch_users_online', $query); $query = $query->find_result_set(); @@ -300,7 +301,7 @@ public function fetch_users_online() $online['num_users'] = 0; } - $online = $this->feather->applyHook('fetch_users_online', $online); + $online = $this->hook->fire('fetch_users_online', $online); return $online; } diff --git a/plugins/test/plugintest.php b/plugins/test/plugintest.php index f78024b2..b3f3ad9d 100644 --- a/plugins/test/plugintest.php +++ b/plugins/test/plugintest.php @@ -19,23 +19,24 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; - $this->feather->hook('get_forum_actions', function ($forum_actions) { - $forum_actions[] = 'Test1'; + $this->hook->bind('get_forum_actions', function ($forum_actions) { + $forum_actions[] = 'Test1'; return $forum_actions; }); - $this->feather->hook('get_forum_actions', function ($forum_actions) { - $forum_actions[] = 'Test2'; + $this->hook->bind('get_forum_actions', function ($forum_actions) { + $forum_actions[] = 'Test2'; return $forum_actions; }); - $this->feather->hook('query_fetch_users_online', function ($query) { + $this->hook->bind('query_fetch_users_online', function ($query) { $query = $query->limit(50); return $query; }); - $this->feather->hook('query_fetch_users_online', function ($query) { + $this->hook->bind('query_fetch_users_online', function ($query) { $query = $query->offset(50); return $query; }); From 6371e8c4b0aed6e8145996abbf9704ec6b63ee14 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Tue, 18 Aug 2015 23:47:40 +0200 Subject: [PATCH 088/353] Fix admin_forums default view --- view/admin/forums/admin_forums.php | 51 ++++++++++++------------------ 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/view/admin/forums/admin_forums.php b/view/admin/forums/admin_forums.php index fb4b716e..e966e6f5 100644 --- a/view/admin/forums/admin_forums.php +++ b/view/admin/forums/admin_forums.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -16,10 +16,10 @@

          - +
          @@ -27,10 +27,12 @@
          - + @@ -61,24 +63,17 @@ -

          +

          '."\n\t\t\t\t\t\t\t".'
          - + '.feather_escape($cat['cat_name']).''."\n"; + } ?>
          '."\n\t\t\t\t\t\t".'
          '."\n\t\t\t\t\t".'
          '."\n\t\t\t\t".'
          '."\n"; - } - + foreach ($forum_data as $cat_id => $cat_data) { ?>
          - +
          @@ -90,34 +85,30 @@ - - + +
          | |
          +

          -
          - \ No newline at end of file + + From 46457f61f2581cf87db6b5ac61ff4c8eafd716d2 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 15:23:33 +0200 Subject: [PATCH 089/353] Move maintenance message in auth middleware --- Slim/Extras/Middleware/FeatherBBAuth.php | 30 ++++++++++++++++++++++ Slim/Extras/Middleware/FeatherBBLoader.php | 30 ---------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php index 2ce16203..017ef619 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -189,6 +189,36 @@ public function check_bans() } } + public function maintenance_message() + { + // Deal with newlines, tabs and multiple spaces + $pattern = array("\t", ' ', ' '); + $replace = array('    ', '  ', '  '); + $message = str_replace($pattern, $replace, $this->app->forum_settings['o_maintenance_message']); + + $page_title = array(feather_escape($this->app->forum_settings['o_board_title']), __('Maintenance')); + + define('FEATHER_ACTIVE_PAGE', 'index'); + + $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? $this->app->forum_env['FEATHER_ROOT'].'style/'.$this->app->user->style.'/view' : $this->app->forum_env['FEATHER_ROOT'].'view'); + + $header = new \controller\header(); + + $header->setTitle($page_title)->display(); + + $this->app->render('message.php', array( + 'message' => $message, + 'no_back_link' => '', + ) + ); + + $footer = new \controller\footer(); + + $footer->dontStop(); + + $footer->display(); + } + public function call() { global $feather_bans; diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 07345f12..1c7368bc 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -164,36 +164,6 @@ public function set_headers() $this->app->expires(0); } - public function maintenance_message() - { - // Deal with newlines, tabs and multiple spaces - $pattern = array("\t", ' ', ' '); - $replace = array('    ', '  ', '  '); - $message = str_replace($pattern, $replace, $this->forum_settings['o_maintenance_message']); - - $page_title = array(feather_escape($this->forum_settings['o_board_title']), __('Maintenance')); - - define('FEATHER_ACTIVE_PAGE', 'index'); - - $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? FEATHER_ROOT.'style/'.$this->app->user->style.'/view' : FEATHER_ROOT.'view'); - - $header = new \controller\header(); - - $header->setTitle($page_title)->display(); - - $this->app->render('message.php', array( - 'message' => $message, - 'no_back_link' => '', - ) - ); - - $footer = new \controller\footer(); - - $footer->dontStop(); - - $footer->display(); - } - public function call() { global $forum_time_formats, $forum_date_formats, $feather_config; // Legacy From 4872de9be27c3f24edd6d3f5f04c04ace47052cd Mon Sep 17 00:00:00 2001 From: adaur Date: Wed, 19 Aug 2015 15:25:01 +0200 Subject: [PATCH 090/353] Fix delete link --- model/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/viewtopic.php b/model/viewtopic.php index c84d7105..c0729034 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -360,7 +360,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) if ($cur_topic['closed'] == '0') { if ($cur_post['poster_id'] == $this->user->id) { if ((($start_from + $post_count) == 1 && $this->user->g_delete_topics == '1') || (($start_from + $post_count) > 1 && $this->user->g_delete_posts == '1')) { - $cur_post['post_actions'][] = '
        • '.__('Delete').'
        • '; + $cur_post['post_actions'][] = '
        • '.__('Delete').'
        • '; } if ($this->user->g_edit_posts == '1') { $cur_post['post_actions'][] = '
        • '.__('Edit').'
        • '; From 9a8b868df62e9dbc09ccc5a52b9b8158e9993e41 Mon Sep 17 00:00:00 2001 From: adaur Date: Wed, 19 Aug 2015 15:25:22 +0200 Subject: [PATCH 091/353] Fix cache function --- include/cache.php | 20 -------------------- include/functions.php | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/cache.php b/include/cache.php index 17312bd9..b92c5ded 100644 --- a/include/cache.php +++ b/include/cache.php @@ -153,26 +153,6 @@ function generate_censoring_cache() featherbb_write_cache_file('cache_censoring.php', $content); } -// -// Generate a cache ID based on the last modification time for all stopwords files -// -function generate_stopwords_cache_id() -{ - $files = glob(FEATHER_ROOT.'lang/*/stopwords.txt'); - if ($files === false) { - return 'cache_id_error'; - } - - $hash = array(); - - foreach ($files as $file) { - $hash[] = $file; - $hash[] = filemtime($file); - } - - return sha1(implode('|', $hash)); -} - // // Generate the stopwords cache PHP script diff --git a/include/functions.php b/include/functions.php index 3408f44e..c50c714b 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1143,6 +1143,26 @@ function strip_bad_multibyte_chars($str) return $result; } +// +// Generate a cache ID based on the last modification time for all stopwords files +// +function generate_stopwords_cache_id() +{ + $files = glob(FEATHER_ROOT.'lang/*/stopwords.txt'); + if ($files === false) { + return 'cache_id_error'; + } + + $hash = array(); + + foreach ($files as $file) { + $hash[] = $file; + $hash[] = filemtime($file); + } + + return sha1(implode('|', $hash)); +} + // // Make a string safe to use in a URL // Inspired by (c) Panther From 5fceabe4897cafdd468bd48f99a194f6078cd333 Mon Sep 17 00:00:00 2001 From: adaur Date: Wed, 19 Aug 2015 15:25:38 +0200 Subject: [PATCH 092/353] Add hooks --- controller/edit.php | 2 +- model/delete.php | 33 +++++++++++++++++--------- model/edit.php | 57 ++++++++++++++++++++++++++++----------------- 3 files changed, 58 insertions(+), 34 deletions(-) diff --git a/controller/edit.php b/controller/edit.php index 2ac8b24d..c3056e19 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -66,7 +66,7 @@ public function editpost($id) if ($this->feather->request()->isPost()) { // Let's see if everything went right - $errors = $this->model->check_errors_before_edit($id, $can_edit_subject, $errors); + $errors = $this->model->check_errors_before_edit($can_edit_subject, $errors); // Setup some variables before post $post = $this->model->setup_variables($cur_post, $is_admmod, $can_edit_subject, $errors); diff --git a/model/delete.php b/model/delete.php index f2b4f523..82db289e 100644 --- a/model/delete.php +++ b/model/delete.php @@ -20,32 +20,36 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function get_info_delete($id) { - $select_get_info_delete = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.first_post_id', 't.closed', 'p.poster', 'p.posted', 'p.poster_id', 'p.message', 'p.hide_smilies'); - $where_get_info_delete = array( + $query['select'] = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.first_post_id', 't.closed', 'p.poster', 'p.posted', 'p.poster_id', 'p.message', 'p.hide_smilies'); + $query['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); - $cur_post = DB::for_table('posts') + $query = DB::for_table('posts') ->table_alias('p') - ->select_many($select_get_info_delete) + ->select_many($query['select']) ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_info_delete) - ->where('p.id', $id) - ->find_one(); + ->where_any_is($query['where']) + ->where('p.id', $id); + + $query = $this->hook->fireDB('get_info_delete_query', $query); + + $query = $query->find_one(); - if (!$cur_post) { + if (!$query) { message(__('Bad request'), '404'); } - return $cur_post; + return $query; } public function handle_deletion($is_topic_post, $id, $tid, $fid) @@ -53,12 +57,16 @@ public function handle_deletion($is_topic_post, $id, $tid, $fid) require FEATHER_ROOT.'include/search_idx.php'; if ($is_topic_post) { + $this->hook->fire('handle_deletion_topic_post', $tid, $fid); + // Delete the topic and all of its posts delete_topic($tid); update_forum($fid); redirect(get_link('forum/'.$fid.'/'), __('Topic del redirect')); } else { + $this->hook->fire('handle_deletion', $tid, $fid, $id); + // Delete just this one post delete_post($id, $tid); update_forum($fid); @@ -68,8 +76,11 @@ public function handle_deletion($is_topic_post, $id, $tid, $fid) ->select('id') ->where('topic_id', $tid) ->where_lt('id', $id) - ->order_by_desc('id') - ->find_one(); + ->order_by_desc('id'); + + $post = $this->hook->fireDB('handle_deletion_query', $post); + + $post = $post->find_one(); redirect(get_link('post/'.$post['id'].'/#p'.$post['id']), __('Post del redirect')); } diff --git a/model/edit.php b/model/edit.php index b14e870b..eb95c75b 100644 --- a/model/edit.php +++ b/model/edit.php @@ -20,29 +20,31 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } // Fetch some info about the post, the topic and the forum public function get_info_edit($id) { - - - $select_get_info_edit = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.posted', 't.first_post_id', 't.sticky', 't.closed', 'p.poster', 'p.poster_id', 'p.message', 'p.hide_smilies'); - $where_get_info_edit = array( + $cur_post['select'] = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.posted', 't.first_post_id', 't.sticky', 't.closed', 'p.poster', 'p.poster_id', 'p.message', 'p.hide_smilies'); + $cur_post['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); $cur_post = DB::for_table('posts') ->table_alias('p') - ->select_many($select_get_info_edit) + ->select_many($cur_post['select']) ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_info_edit) - ->where('p.id', $id) - ->find_one(); + ->where_any_is($cur_post['where']) + ->where('p.id', $id); + + $cur_post = $this->hook->fireDB('get_info_edit_query', $cur_post); + + $cur_post = $cur_post->find_one(); if (!$cur_post) { message(__('Bad request'), '404'); @@ -51,7 +53,7 @@ public function get_info_edit($id) return $cur_post; } - public function check_errors_before_edit($id, $can_edit_subject, $errors) + public function check_errors_before_edit($can_edit_subject, $errors) { global $pd; @@ -103,6 +105,8 @@ public function check_errors_before_edit($id, $can_edit_subject, $errors) } } + $errors = $this->hook->fire('check_errors_before_edit', $errors); + return $errors; } @@ -136,6 +140,8 @@ public function setup_variables($cur_post, $is_admmod, $can_edit_subject, $error $post['subject'] = feather_trim($this->request->post('req_subject')); } + $post = $this->hook->fire('setup_variables_edit', $post); + return $post; } @@ -150,15 +156,18 @@ public function edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod) array('moved_to' => $cur_post['tid']) ); - $update_topic = array( + $query['update_topic'] = array( 'subject' => $post['subject'], 'sticky' => $post['stick_topic'] ); - DB::for_table('topics')->where_any_is($where_topic) - ->find_one() - ->set($update_topic) - ->save(); + $query = DB::for_table('topics')->where_any_is($where_topic) + ->find_one() + ->set($query['update_topic']); + + $query = $this->hook->fireDB('edit_post_can_edit_subject', $query); + + $query = $query->save(); // We changed the subject, so we need to take that into account when we update the search words update_search_index('edit', $id, $post['message'], $post['subject']); @@ -167,21 +176,23 @@ public function edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod) } // Update the post - $update_post = array( + $query['update_post'] = array( 'message' => $post['message'], 'hide_smilies' => $post['hide_smilies'] ); if (!$this->request->post('silent') || !$is_admmod) { - $update_post['edited'] = time(); - $update_post['edited_by'] = $this->user->username; + $query['update_post']['edited'] = time(); + $query['update_post']['edited_by'] = $this->user->username; } - DB::for_table('posts')->where('id', $id) - ->find_one() - ->set($update_post) - ->save(); - + $query = DB::for_table('posts')->where('id', $id) + ->find_one() + ->set($query['update_post']); + + $query = $this->hook->fireDB('edit_post_can_edit_subject', $query); + + $query = $query->save(); } public function get_checkboxes($can_edit_subject, $is_admmod, $cur_post, $cur_index) @@ -212,6 +223,8 @@ public function get_checkboxes($can_edit_subject, $is_admmod, $cur_post, $cur_in } } + $checkboxes = $this->hook->fire('get_checkboxes', $checkboxes); + return $checkboxes; } } From 3efb9b11368cca988ac09e828e3dd07e300cf5b3 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 15:38:06 +0200 Subject: [PATCH 093/353] Add install success flash message --- controller/install.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/controller/install.php b/controller/install.php index 67256fd8..97ba73c1 100644 --- a/controller/install.php +++ b/controller/install.php @@ -199,7 +199,12 @@ public function create_db(array $data) if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) { $this->write_htaccess(); } - + + // Install success flash message + $flash = new \Slim\Middleware\Flash(); + $flash->set('message', __('Message')); + $flash->save(); + // Redirect to homepage redirect(get_link('/')); } From cb3b44b049a2eb7022f6a1e104a688da5f33a723 Mon Sep 17 00:00:00 2001 From: adaur Date: Wed, 19 Aug 2015 15:39:53 +0200 Subject: [PATCH 094/353] Add hooks --- model/header.php | 7 ++++++- model/index.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/model/header.php b/model/header.php index be2b853a..ea9a2ac6 100644 --- a/model/header.php +++ b/model/header.php @@ -20,11 +20,16 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function get_reports() { - $result_header = DB::for_table('reports')->where_null('zapped')->find_one(); + $result_header = DB::for_table('reports')->where_null('zapped'); + + $result_header = $this->hook->fireDB('get_reports_query', $result_header); + + $result_header = $result_header->find_one(); if ($result_header) { return true; diff --git a/model/index.php b/model/index.php index 0f17a69a..a4852a19 100644 --- a/model/index.php +++ b/model/index.php @@ -95,7 +95,7 @@ public function get_new_posts() ->where_gt('last_post', $this->user->last_visit) ->where_null('moved_to'); - $query = $this->hook->fireDB('query_get_new_posts', $query); + $query = $this->hook->fireDB('get_new_posts_query', $query); $query = $query->find_result_set(); From 4a160ce99437a2f0060e452b3706e717fa68e04a Mon Sep 17 00:00:00 2001 From: adaur Date: Wed, 19 Aug 2015 15:40:17 +0200 Subject: [PATCH 095/353] Rebrand pun_mail --- include/email.php | 2 +- model/login.php | 2 +- model/misc.php | 4 ++-- model/post.php | 10 +++++----- model/profile.php | 6 +++--- model/register.php | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/email.php b/include/email.php index 619d9736..3281d9eb 100644 --- a/include/email.php +++ b/include/email.php @@ -259,7 +259,7 @@ function bbcode2email($text, $wrap_length = 72) // // Wrapper for PHP's mail() // -function pun_mail($to, $subject, $message, $reply_to_email = '', $reply_to_name = '') +function feather_mail($to, $subject, $message, $reply_to_email = '', $reply_to_name = '') { global $feather_config; diff --git a/model/login.php b/model/login.php index 5c5ac99d..14c3fd32 100644 --- a/model/login.php +++ b/model/login.php @@ -178,7 +178,7 @@ public function password_forgotten() $cur_mail_message = str_replace('', get_link('user/'.$cur_hit->id.'/action/change_pass/?key='.$new_password_key), $cur_mail_message); $cur_mail_message = str_replace('', $new_password, $cur_mail_message); - pun_mail($email, $mail_subject, $cur_mail_message); + feather_mail($email, $mail_subject, $cur_mail_message); } message(__('Forget mail').' '.feather_escape($this->config['o_admin_email']).'.', true); diff --git a/model/misc.php b/model/misc.php index e836c72d..23ac015a 100644 --- a/model/misc.php +++ b/model/misc.php @@ -85,7 +85,7 @@ public function send_email($mail, $id) require_once FEATHER_ROOT.'include/email.php'; - pun_mail($mail['recipient_email'], $mail_subject, $mail_message, $this->user->email, $this->user->username); + feather_mail($mail['recipient_email'], $mail_subject, $mail_message, $this->user->email, $this->user->username); DB::for_table('users')->where('id', $this->user->id) ->find_one() @@ -188,7 +188,7 @@ public function insert_report($post_id) require FEATHER_ROOT.'include/email.php'; - pun_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } diff --git a/model/post.php b/model/post.php index 52756e50..eab496f4 100644 --- a/model/post.php +++ b/model/post.php @@ -410,9 +410,9 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) // We have to double check here because the templates could be missing if (isset($notification_emails[$cur_subscriber['language']])) { if ($cur_subscriber['notify_with_post'] == '0') { - pun_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]); + feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]); } else { - pun_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][2], $notification_emails[$cur_subscriber['language']][3]); + feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][2], $notification_emails[$cur_subscriber['language']][3]); } } } @@ -597,9 +597,9 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) // We have to double check here because the templates could be missing if (isset($notification_emails[$cur_subscriber['language']])) { if ($cur_subscriber['notify_with_post'] == '0') { - pun_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]); + feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]); } else { - pun_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][2], $notification_emails[$cur_subscriber['language']][3]); + feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][2], $notification_emails[$cur_subscriber['language']][3]); } } } @@ -624,7 +624,7 @@ public function warn_banned_user($post, $new_pid) $mail_message = str_replace('', get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); - pun_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } // Increment post count, change group if needed diff --git a/model/profile.php b/model/profile.php index 7fee36e6..6720eee3 100644 --- a/model/profile.php +++ b/model/profile.php @@ -202,7 +202,7 @@ public function change_email($id) $mail_message = str_replace('', get_link('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); - pun_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } @@ -235,7 +235,7 @@ public function change_email($id) $mail_message = str_replace('', get_link('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); - pun_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } @@ -266,7 +266,7 @@ public function change_email($id) $mail_message = str_replace('', get_link('user/'.$id.'/action/change_email/?key='.$new_email_key), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); - pun_mail($new_email, $mail_subject, $mail_message); + feather_mail($new_email, $mail_subject, $mail_message); message(__('Activate email sent').' '.feather_escape($this->config['o_admin_email']).'.', true); } diff --git a/model/register.php b/model/register.php index 8152bc20..53dd5e8d 100644 --- a/model/register.php +++ b/model/register.php @@ -179,7 +179,7 @@ public function insert_user($user) $mail_message = str_replace('', get_link('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); - pun_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } // If we previously found out that the email was a dupe @@ -197,7 +197,7 @@ public function insert_user($user) $mail_message = str_replace('', get_link('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); - pun_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } // Should we alert people on the admin mailing list that a new user has registered? @@ -216,7 +216,7 @@ public function insert_user($user) $mail_message = str_replace('', get_link('user/'.$new_uid.'/section/admin/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); - pun_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } @@ -237,7 +237,7 @@ public function insert_user($user) $mail_message = str_replace('', get_link('login/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); - pun_mail($user['email1'], $mail_subject, $mail_message); + feather_mail($user['email1'], $mail_subject, $mail_message); message(__('Reg email').' '.feather_escape($this->config['o_admin_email']).'.', true); } From 7c24de7d041147cc77d22dc97b6d332cfedb1060 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 16:06:06 +0200 Subject: [PATCH 096/353] Fix installer when config file isn't default --- Slim/Extras/Middleware/FeatherBBLoader.php | 4 ++-- controller/install.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 1c7368bc..c1ebe232 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -33,7 +33,7 @@ public function __construct(array $data) // Define some core variables $this->forum_env['FEATHER_ROOT'] = realpath(dirname(__FILE__).'/../../../').'/'; $this->forum_env['FORUM_CACHE_DIR'] = is_writable($this->forum_env['FEATHER_ROOT'].$data['cache_dir']) ? realpath($this->forum_env['FEATHER_ROOT'].$data['cache_dir']).'/' : null; - $this->forum_env['FORUM_CONFIG_FILE'] = is_file($this->forum_env['FEATHER_ROOT'].$data['config_file']) ? realpath($this->forum_env['FEATHER_ROOT'].$data['config_file']) : null; + $this->forum_env['FORUM_CONFIG_FILE'] = $this->forum_env['FEATHER_ROOT'].$data['config_file']; $this->forum_env['FEATHER_DEBUG'] = $this->forum_env['FEATHER_SHOW_QUERIES'] = ($data['debug'] == 'all'); $this->forum_env['FEATHER_SHOW_INFO'] = ($data['debug'] == 'info' || $data['debug'] == 'all'); // Populate forum_env @@ -185,7 +185,7 @@ public function call() return $this->app->response->setStatus(403); // Send forbidden header } - if (is_null($this->forum_env['FORUM_CONFIG_FILE'])) { + if (!is_file($this->forum_env['FORUM_CONFIG_FILE'])) { $installer = new \controller\install; $installer->run(); return; diff --git a/controller/install.php b/controller/install.php index 97ba73c1..9f26b624 100644 --- a/controller/install.php +++ b/controller/install.php @@ -21,7 +21,6 @@ class install protected $install_lang = 'English'; protected $default_style = 'FeatherBB'; protected $config_keys = array('db_type', 'db_host', 'db_name', 'db_user', 'db_pass', 'db_prefix'); - protected $config_file = 'include/config.php'; protected $errors = array(); public function __construct() @@ -211,7 +210,7 @@ public function create_db(array $data) public function write_config($json) { - return file_put_contents($this->feather->forum_env['FEATHER_ROOT'].$this->config_file, $json); + return file_put_contents($this->feather->forum_env['FORUM_CONFIG_FILE'], $json); } public function write_htaccess() From 77c090262325cfa524c11bc9c9267b7ae7b8b446 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 16:45:15 +0200 Subject: [PATCH 097/353] Initial commit of the cache class --- include/classes/cache.class.php | 360 ++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100755 include/classes/cache.class.php diff --git a/include/classes/cache.class.php b/include/classes/cache.class.php new file mode 100755 index 00000000..2bcfaa6a --- /dev/null +++ b/include/classes/cache.class.php @@ -0,0 +1,360 @@ +setCache($config); + } else if (is_array($config)) { + $this->setCache($config['name']); + $this->setCachePath($config['path']); + $this->setExtension($config['extension']); + } + } + } + + /** + * Check whether data accociated with a key + * + * @param string $key + * @return boolean + */ + public function isCached($key) + { + if (false != $this->_loadCache()) { + $cachedData = $this->_loadCache(); + $entry = $cachedData[$key]; + if ($entry && true === $this->_checkExpired($entry['time'], $entry['expire'])) { + return false; + } else { + return isset($cachedData[$key]['data']); + } + } + } + + /** + * Store data in the cache + * + * @param string $key + * @param mixed $data + * @param integer [optional] $expiration Seconds to expire the cache + * @return object + */ + public function store($key, $data, $expiration = 0) + { + $storeData = array( + 'time' => time(), + 'expire' => $expiration, + 'data' => serialize($data) + ); + $dataArray = $this->_loadCache(); + if (true === is_array($dataArray)) { + $dataArray[$key] = $storeData; + } else { + $dataArray = array($key => $storeData); + } + $this->_saveCache($dataArray); + return $this; + } + + /** + * Retrieve cached data by its key + * + * @param string $key + * @param boolean [optional] $timestamp + * @return string + */ + public function retrieve($key, $timestamp = false) + { + $cachedData = $this->_loadCache(); + (false === $timestamp) ? $type = 'data' : $type = 'time'; + if (!isset($cachedData[$key][$type])) return null; + if (false === $timestamp) { + $entry = $cachedData[$key]; + if ($entry && true === $this->_checkExpired($entry['time'], $entry['expire'])) + return null; + } + return unserialize($cachedData[$key][$type]); + } + + /** + * Retrieve all cached data + * + * @param boolean [optional] $meta + * @return array + */ + public function retrieveAll($meta = false) + { + if ($meta === false) { + $results = array(); + $cachedData = $this->_loadCache(); + if ($cachedData) { + foreach ($cachedData as $k => $v) { + $results[$k] = unserialize($v['data']); + } + } + return $results; + } else { + return $this->_loadCache(); + } + } + + /** + * Erase cached entry by its key + * + * @param string $key + * @return object + */ + public function erase($key) + { + $cacheData = $this->_loadCache(); + if (true === is_array($cacheData)) { + if (true === isset($cacheData[$key])) { + unset($cacheData[$key]); + $cacheData = json_encode($cacheData); + $this->_saveCache($cacheData); + } else { + throw new Exception("Error: erase() - Key '{$key}' not found."); + } + } + return $this; + } + + /** + * Erase all expired entries + * + * @return integer + */ + public function eraseExpired() + { + $cacheData = $this->_loadCache(); + if (true === is_array($cacheData)) { + $counter = 0; + foreach ($cacheData as $key => $entry) { + if (true === $this->_checkExpired($entry['time'], $entry['expire'])) { + unset($cacheData[$key]); + $counter++; + } + } + if ($counter > 0) { + $cacheData = json_encode($cacheData); + $this->_saveCache($cacheData); + } + return $counter; + } + } + + /** + * Erase all cached entries + * @return object + */ + public function eraseAll() + { + $cacheDir = $this->getCacheDir(); + if (true === file_exists($cacheDir)) { + $cacheFile = fopen($cacheDir, 'w'); + fclose($cacheFile); + } + return $this; + } + + /** + * Load appointed cache + * @return mixed + */ + private function _loadCache() + { + if ($this->cache!=null) + return $this->cache; + + if (true === file_exists($this->getCacheDir())) { + $file = file_get_contents($this->getCacheDir()); + $this->cache=json_decode($file, true); + return $this->cache; + } else { + return false; + } + } + + /** + * Save cache file + * @param $dataArray + */ + private function _saveCache($dataArray) + { + $this->cache = $dataArray; + $cacheData = json_encode($dataArray); + file_put_contents($this->getCacheDir(), $cacheData); + } + + /** + * Get the cache directory path + * + * @return string + */ + public function getCacheDir() + { + if (true === $this->_checkCacheDir()) { + $filename = $this->getCache(); + $filename = preg_replace('/[^0-9a-z\.\_\-]/i', '', strtolower($filename)); + return $this->getCachePath() . $this->_getHash($filename) . $this->getExtension(); + } + } + + /** + * Get the filename hash + * + * @return string + */ + private function _getHash($filename) + { + return sha1($filename); + } + + /** + * Check whether a timestamp is still in the duration + * + * @param integer $timestamp + * @param integer $expiration + * @return boolean + */ + private function _checkExpired($timestamp, $expiration) + { + $result = false; + if ($expiration !== 0) { + $timeDiff = time() - $timestamp; + ($timeDiff > $expiration) ? $result = true : $result = false; + } + return $result; + } + + /** + * Check if a writable cache directory exists and if not create a new one + * + * @return boolean + */ + private function _checkCacheDir() + { + if (!is_dir($this->getCachePath()) && !mkdir($this->getCachePath(), 0775, true)) { + throw new Exception('Unable to create cache directory ' . $this->getCachePath()); + } elseif (!is_readable($this->getCachePath()) || !is_writable($this->getCachePath())) { + if (!chmod($this->getCachePath(), 0775)) { + throw new Exception($this->getCachePath() . ' must be readable and writeable'); + } + } + return true; + } + + /** + * Cache path Setter + * + * @param string $path + * @return object + */ + public function setCachePath($path) + { + $this->_cachepath = $path; + return $this; + } + + /** + * Cache path Getter + * + * @return string + */ + public function getCachePath() + { + return $this->_cachepath; + } + + /** + * Cache name Setter + * + * @param string $name + * @return object + */ + public function setCache($name) + { + $this->_cachename = $name; + return $this; + } + + /** + * Cache name Getter + * + * @return void + */ + public function getCache() + { + return $this->_cachename; + } + + /** + * Cache file extension Setter + * + * @param string $ext + * @return object + */ + public function setExtension($ext) + { + $this->_extension = $ext; + return $this; + } + + /** + * Cache file extension Getter + * + * @return string + */ + public function getExtension() + { + return $this->_extension; + } + + + +} From 6f1a8548bad162eab6d54708dea6e02be9d3c943 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 16:46:35 +0200 Subject: [PATCH 098/353] Change object var scope --- include/classes/cache.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/classes/cache.class.php b/include/classes/cache.class.php index 2bcfaa6a..92a117eb 100755 --- a/include/classes/cache.class.php +++ b/include/classes/cache.class.php @@ -20,23 +20,23 @@ class Cache * * @var string */ - private $_cachepath = 'cache/'; + protected $_cachepath = 'cache/'; /** * The name of the default cache file * * @var string */ - private $_cachename = 'default'; + protected $_cachename = 'default'; /** * The cache file extension * * @var string */ - private $_extension = '.cache'; + protected $_extension = '.cache'; - private $cache; + protected $cache; /** * Default constructor From c0721d373489fd305a0d75fd8c7663fc7489cac1 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 17:00:22 +0200 Subject: [PATCH 099/353] Load cache in Slim --- Slim/Extras/Middleware/FeatherBBLoader.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 1c7368bc..5a36bc48 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -46,6 +46,7 @@ public function __construct(array $data) require $this->forum_env['FEATHER_ROOT'].'include/pomo/MO.php'; require $this->forum_env['FEATHER_ROOT'].'include/l10n.php'; require $this->forum_env['FEATHER_ROOT'].'include/idiorm.php'; + require $this->forum_env['FEATHER_ROOT'].'include/classes/cache.class.php'; // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); @@ -171,15 +172,20 @@ public function call() // Set headers $this->set_headers(); + // Populate FeatherBB Slim object with forum_env vars + $this->hydrate('forum_env', $this->forum_env); // Record start time $this->app->start = get_microtime(); // Define now var $this->app->now = function () { return time(); }; - - // Populate FeatherBB Slim object with forum_env vars - $this->hydrate('forum_env', $this->forum_env); + $this->app->container->singleton('cache', function ($container) { + $path = $container->forum_env['FORUM_CACHE_DIR']; + return new \FeatherBB\Cache(array('name' => 'feather', + 'path' => $path, + 'extension' => '.cache')); + }); if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { // Block prefetch requests return $this->app->response->setStatus(403); // Send forbidden header From cfbea4c8fde7b1f68192a01d7d3055d8b0a32214 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 17:21:50 +0200 Subject: [PATCH 100/353] First attempt to cache config (static data) --- Slim/Extras/Middleware/FeatherBBLoader.php | 10 +++----- model/cache.php | 30 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 model/cache.php diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 5a36bc48..9eeab160 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -211,15 +211,11 @@ public function call() 'cookies.encrypt' => true, 'cookies.secret_key' => $this->forum_settings['cookie_seed'])); - // Get forum settings from DB/cache and load it into forum_settings array - if (file_exists($this->forum_env['FORUM_CACHE_DIR'].'cache_config.php')) { - include $this->forum_env['FORUM_CACHE_DIR'].'cache_config.php'; - } else { - require $this->forum_env['FEATHER_ROOT'].'include/cache.php'; - generate_config_cache(); - require $this->forum_env['FORUM_CACHE_DIR'].'cache_config.php'; + if (!$this->app->cache->isCached('config')) { + $this->app->cache->store('config', \model\cache::get_config()); } + $feather_config = $this->app->cache->retrieve('config'); // Finalize forum_settings array $this->forum_settings = array_merge($feather_config, $this->forum_settings); diff --git a/model/cache.php b/model/cache.php new file mode 100644 index 00000000..d47f2c88 --- /dev/null +++ b/model/cache.php @@ -0,0 +1,30 @@ +feather = \Slim\Slim::getInstance(); + } + + public static function get_config() + { + $result = DB::for_table('config') + ->find_array(); + $config = array(); + foreach ($result as $item) { + $config[$item['conf_name']] = $item['conf_value']; + } + return $config; + } +} From 0a8323b778810e11b71673af4d59fa26b26e8431 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 17:22:04 +0200 Subject: [PATCH 101/353] Tweaking cache class --- include/classes/cache.class.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/classes/cache.class.php b/include/classes/cache.class.php index 92a117eb..c8f08c4e 100755 --- a/include/classes/cache.class.php +++ b/include/classes/cache.class.php @@ -58,14 +58,14 @@ public function __construct($config = null) } /** - * Check whether data accociated with a key + * Check whether data is associated with a key * * @param string $key * @return boolean */ public function isCached($key) { - if (false != $this->_loadCache()) { + if ($this->_loadCache()) { $cachedData = $this->_loadCache(); $entry = $cachedData[$key]; if ($entry && true === $this->_checkExpired($entry['time'], $entry['expire'])) { @@ -73,6 +73,8 @@ public function isCached($key) } else { return isset($cachedData[$key]['data']); } + } else { + return false; // If cache file doesn't exist or cache is empty, nothing is cached } } @@ -208,12 +210,12 @@ public function eraseAll() */ private function _loadCache() { - if ($this->cache!=null) + if ($this->cache != null) return $this->cache; if (true === file_exists($this->getCacheDir())) { $file = file_get_contents($this->getCacheDir()); - $this->cache=json_decode($file, true); + $this->cache = json_decode($file, true); return $this->cache; } else { return false; @@ -264,12 +266,11 @@ private function _getHash($filename) */ private function _checkExpired($timestamp, $expiration) { - $result = false; if ($expiration !== 0) { $timeDiff = time() - $timestamp; - ($timeDiff > $expiration) ? $result = true : $result = false; + return ($timeDiff > $expiration); } - return $result; + return false; } /** From d8d4045ce3cf108221583693e6299d16876de25a Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 17:48:36 +0200 Subject: [PATCH 102/353] Refactor cache constructor and settings --- include/classes/cache.class.php | 42 ++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/include/classes/cache.class.php b/include/classes/cache.class.php index c8f08c4e..ceefd06a 100755 --- a/include/classes/cache.class.php +++ b/include/classes/cache.class.php @@ -7,14 +7,17 @@ * License: BSD http://www.opensource.org/licenses/bsd-license.php * * FeatherBB Cache class - * - * @version 1.6 + * Usage : $cache = new \FeatherBB\Cache(array('name' => , 'path' =>, 'extension' =>)); */ namespace FeatherBB; class Cache { + /** + * @var array + */ + protected $settings; /** * The path to the cache file folder * @@ -44,17 +47,22 @@ class Cache * @param string|array [optional] $config * @return void */ - public function __construct($config = null) + public function __construct($config = array()) { - if (true === isset($config)) { - if (is_string($config)) { - $this->setCache($config); - } else if (is_array($config)) { - $this->setCache($config['name']); - $this->setCachePath($config['path']); - $this->setExtension($config['extension']); - } + if (!is_array($config)) { + $config = array('name' => (string) $config); } + $this->settings = array_merge(self::getDefaultSettings(), $config); + $this->setCache($this->settings['name']); + $this->setCachePath($this->settings['path']); + $this->setExtension($this->settings['extension']); + } + + protected static function getDefaultSettings() + { + return array('name' => 'default', + 'path' => 'cache/', + 'extension' => '.cache'); } /** @@ -298,7 +306,7 @@ private function _checkCacheDir() */ public function setCachePath($path) { - $this->_cachepath = $path; + $this->settings['path'] = $path; return $this; } @@ -309,7 +317,7 @@ public function setCachePath($path) */ public function getCachePath() { - return $this->_cachepath; + return $this->settings['path']; } /** @@ -320,7 +328,7 @@ public function getCachePath() */ public function setCache($name) { - $this->_cachename = $name; + $this->settings['name'] = $name; return $this; } @@ -331,7 +339,7 @@ public function setCache($name) */ public function getCache() { - return $this->_cachename; + return $this->settings['path']; } /** @@ -342,7 +350,7 @@ public function getCache() */ public function setExtension($ext) { - $this->_extension = $ext; + $this->settings['extension']= $ext; return $this; } @@ -353,7 +361,7 @@ public function setExtension($ext) */ public function getExtension() { - return $this->_extension; + return $this->settings['extension']; } From e15a0dc5f972db1547d0d6751167a7c925ad1c2f Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 17:50:38 +0200 Subject: [PATCH 103/353] Cosmetics in cache class --- include/classes/cache.class.php | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/include/classes/cache.class.php b/include/classes/cache.class.php index ceefd06a..916c5c7b 100755 --- a/include/classes/cache.class.php +++ b/include/classes/cache.class.php @@ -18,27 +18,10 @@ class Cache * @var array */ protected $settings; - /** - * The path to the cache file folder - * - * @var string - */ - protected $_cachepath = 'cache/'; - - /** - * The name of the default cache file - * - * @var string - */ - protected $_cachename = 'default'; /** - * The cache file extension - * - * @var string + * @var array */ - protected $_extension = '.cache'; - protected $cache; /** @@ -58,6 +41,11 @@ public function __construct($config = array()) $this->setExtension($this->settings['extension']); } + /** + * Return default settings + * + * @return array + */ protected static function getDefaultSettings() { return array('name' => 'default', From 621dbf428b58acf0454fc1726a8a1a4d7cd25a8f Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 18:01:58 +0200 Subject: [PATCH 104/353] Add ban cache --- Slim/Extras/Middleware/FeatherBBAuth.php | 6 +---- Slim/Extras/Middleware/FeatherBBLoader.php | 1 + model/admin/bans.php | 14 +++-------- model/admin/users.php | 10 +++----- model/cache.php | 7 ++++++ model/profile.php | 28 +++++++++++----------- 6 files changed, 29 insertions(+), 37 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php index 017ef619..1026f1ff 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -181,11 +181,7 @@ public function check_bans() // If we removed any expired bans during our run-through, we need to regenerate the bans cache if ($bans_altered) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_bans_cache(); + $this->app->cache->store('bans', \model\cache::get_bans()); } } diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/Slim/Extras/Middleware/FeatherBBLoader.php index 9eeab160..42e2ac7d 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/Slim/Extras/Middleware/FeatherBBLoader.php @@ -180,6 +180,7 @@ public function call() $this->app->now = function () { return time(); }; + // Load cache feature $this->app->container->singleton('cache', function ($container) { $path = $container->forum_env['FORUM_CACHE_DIR']; return new \FeatherBB\Cache(array('name' => 'feather', diff --git a/model/admin/bans.php b/model/admin/bans.php index c0a85f60..dad24d44 100644 --- a/model/admin/bans.php +++ b/model/admin/bans.php @@ -21,7 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + public function add_ban_info($id = null) { $ban = array(); @@ -255,11 +255,7 @@ public function insert_ban() } // Regenerate the bans cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_bans_cache(); + $this->feather->cache->store('bans', \model\cache::get_bans()); redirect(get_link('admin/bans/'), __('Ban edited redirect')); } @@ -271,11 +267,7 @@ public function remove_ban($ban_id) ->delete(); // Regenerate the bans cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_bans_cache(); + $this->feather->cache->store('bans', \model\cache::get_bans()); redirect(get_link('admin/bans/'), __('Ban removed redirect')); } diff --git a/model/admin/users.php b/model/admin/users.php index d7c80e0c..5463d4e6 100644 --- a/model/admin/users.php +++ b/model/admin/users.php @@ -21,7 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + public function get_num_ip($ip_stats) { $num_ips = DB::for_table('posts')->where('poster_id', $ip_stats) @@ -479,11 +479,7 @@ public function ban_users() } // Regenerate the bans cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT . 'include/cache.php'; - } - - generate_bans_cache(); + $this->feather->cache->store('bans', \model\cache::get_bans()); redirect(get_link('admin/users/'), __('Users banned redirect')); } @@ -653,4 +649,4 @@ public function get_group_list() return $output; } -} \ No newline at end of file +} diff --git a/model/cache.php b/model/cache.php index d47f2c88..25050e50 100644 --- a/model/cache.php +++ b/model/cache.php @@ -27,4 +27,11 @@ public static function get_config() } return $config; } + + public static function get_bans() + { + return DB::for_table('bans') + ->find_array(); + } + } diff --git a/model/profile.php b/model/profile.php index 7fee36e6..8ddbb74d 100644 --- a/model/profile.php +++ b/model/profile.php @@ -21,7 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + public function change_pass($id) { if ($this->request->get('key')) { @@ -505,7 +505,7 @@ public function promote_user($id) ->inner_join('users', array('u.group_id', '=', 'g.g_id'), 'u') ->where('u.id', $id) ->find_one_col('g.g_promote_next_group'); - + if (!$next_group_id) { message(__('Bad request'), '404'); } @@ -515,7 +515,7 @@ public function promote_user($id) ->find_one() ->set('group_id', $next_group_id) ->save(); - + redirect(get_link('post/'.$pid.'/#p'.$pid), __('User promote redirect')); } @@ -527,10 +527,10 @@ public function delete_user($id) $result = DB::for_table('users')->where('id', $id) ->select_many($select_info_delete_user) ->find_one(); - + $group_id = $result['group_id']; $username = $result['username']; - + if ($group_id == FEATHER_ADMIN) { message(__('No delete admin message')); } @@ -547,13 +547,13 @@ public function delete_user($id) $result = DB::for_table('forums') ->select_many($select_info_delete_moderators) ->find_many(); - + foreach($result as $cur_forum) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); if (in_array($id, $cur_moderators)) { unset($cur_moderators[$username]); - + if (!empty($cur_moderators)) { DB::for_table('forums')->where('id', $cur_forum['id']) ->find_one() @@ -590,7 +590,7 @@ public function delete_user($id) // Find all posts made by this user $select_user_posts = array('p.id', 'p.topic_id', 't.forum_id'); - + $result = DB::for_table('posts') ->table_alias('p') ->select_many($select_user_posts) @@ -598,7 +598,7 @@ public function delete_user($id) ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') ->where('p.poster_id', $id) ->find_many(); - + if ($result) { foreach($result as $cur_post) { // Determine whether this post is the "topic post" or not @@ -606,7 +606,7 @@ public function delete_user($id) ->where('topic_id', $cur_post['topic_id']) ->order_by('posted') ->find_one_col('id'); - + if ($this->db->result($result2) == $cur_post['id']) { delete_topic($cur_post['topic_id']); } else { @@ -651,7 +651,7 @@ public function fetch_user_group($id) $info = array(); - + $select_fetch_user_group = array('old_username' => 'u.username', 'group_id' => 'u.group_id', 'is_moderator' => 'g.g_moderator'); $info = DB::for_table('users') @@ -976,7 +976,7 @@ public function update_profile($id, $info, $section) // Check if the bans table was updated and regenerate the bans cache when needed if ($bans_updated) { - generate_bans_cache(); + $this->feather->cache->store('bans', \model\cache::get_bans()); } } @@ -1179,7 +1179,7 @@ public function get_group_list($user) $output .= "\t\t\t\t\t\t\t\t".''."\n"; } } - + return $output; } @@ -1219,7 +1219,7 @@ public function get_forum_list($id) $output .= "\n\t\t\t\t\t\t\t\t\t".''."\n"; } - + return $output; } From 5611d858c447e09d1aa526af93ccf1f86910aadf Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 18:17:43 +0200 Subject: [PATCH 105/353] Add bans read cache --- Slim/Extras/Middleware/FeatherBBAuth.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php index 1026f1ff..c30cb4af 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -278,19 +278,12 @@ public function call() } load_textdomain('featherbb', $this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.mo'); - // Load cached bans - if (file_exists($this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php')) { - include $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; - } - - if (!defined('FEATHER_BANS_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require $this->app->forum_env['FEATHER_ROOT'].'include/cache.php'; - } - generate_bans_cache(); - require $this->app->forum_env['FORUM_CACHE_DIR'].'cache_bans.php'; + // Load bans from cache + if (!$this->app->cache->isCached('bans')) { + $this->app->cache->store('bans', \model\cache::get_config()); } + $feather_bans = $this->app->cache->retrieve('bans'); // Check if current user is banned $this->check_bans(); From 969993f860d3a467bdd0e3bc848b93e6e056c882 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 18:28:09 +0200 Subject: [PATCH 106/353] Fix typo --- Slim/Extras/Middleware/FeatherBBAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php index c30cb4af..1bc0e4b9 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -281,7 +281,7 @@ public function call() // Load bans from cache if (!$this->app->cache->isCached('bans')) { - $this->app->cache->store('bans', \model\cache::get_config()); + $this->app->cache->store('bans', \model\cache::get_bans()); } $feather_bans = $this->app->cache->retrieve('bans'); From 30216bc1dfb747435a8fdf74eaa17842631dbae6 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 18:28:24 +0200 Subject: [PATCH 107/353] Refactor isCached cache method --- include/classes/cache.class.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/include/classes/cache.class.php b/include/classes/cache.class.php index 916c5c7b..c1f7c701 100755 --- a/include/classes/cache.class.php +++ b/include/classes/cache.class.php @@ -61,17 +61,14 @@ protected static function getDefaultSettings() */ public function isCached($key) { - if ($this->_loadCache()) { - $cachedData = $this->_loadCache(); - $entry = $cachedData[$key]; - if ($entry && true === $this->_checkExpired($entry['time'], $entry['expire'])) { - return false; - } else { - return isset($cachedData[$key]['data']); + if ($cachedData = $this->_loadCache()) { + if (isset($cachedData[$key])) { + if (!$this->_checkExpired($cachedData[$key]['time'], $cachedData[$key]['expire'])) { + return true; + } } - } else { - return false; // If cache file doesn't exist or cache is empty, nothing is cached } + return false; // If cache file doesn't exist or cache is empty or key doesn't exist in array, key isn't cached } /** From 8e2d711a4d591fd13c8ca97ba4a60ce1d84363d5 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 18:58:37 +0200 Subject: [PATCH 108/353] Refactor censor_words function --- include/functions.php | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/include/functions.php b/include/functions.php index 97b8f951..81bc70e9 100644 --- a/include/functions.php +++ b/include/functions.php @@ -426,27 +426,23 @@ function censor_words($text) { static $search_for, $replace_with; - // If not already built in a previous call, build an array of censor words and their replacement text - if (!isset($search_for)) { - if (file_exists(FORUM_CACHE_DIR.'cache_censoring.php')) { - include FORUM_CACHE_DIR.'cache_censoring.php'; - } - - if (!defined('FEATHER_CENSOR_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } + $feather = \Slim\Slim::getInstance(); - generate_censoring_cache(); - require FORUM_CACHE_DIR.'cache_censoring.php'; - } + if (!$this->feather->cache->isCached('search_for')) { + $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); + $search_for = $this->feather->cache->retrieve('search_for'); } - if (!empty($search_for)) { - $text = substr(ucp_preg_replace($search_for, $replace_with, ' '.$text.' '), 1, -1); + if (!$this->feather->cache->isCached('replace_with')) { + $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); + $replace_with = $this->feather->cache->retrieve('replace_with'); } - return $text; + if (!empty($search_for) && !empty($replace_with)) { + return substr(ucp_preg_replace($search_for, $replace_with, ' '.$text.' '), 1, -1); + } else { + return $text; + } } @@ -462,7 +458,6 @@ function get_title($user) // If not already built in a previous call, build an array of lowercase banned usernames if (empty($ban_list)) { $ban_list = array(); - foreach ($feather_bans as $cur_ban) { $ban_list[] = utf8_strtolower($cur_ban['username']); } From ccc8478e91ef655b2920268eb8973f98f5db99eb Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 18:58:53 +0200 Subject: [PATCH 109/353] Add censoring cache --- model/admin/censoring.php | 23 +++++++---------------- model/cache.php | 13 +++++++++++++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/model/admin/censoring.php b/model/admin/censoring.php index 473769ca..7434840b 100644 --- a/model/admin/censoring.php +++ b/model/admin/censoring.php @@ -40,11 +40,8 @@ public function add_word() ->save(); // Regenerate the censoring cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_censoring_cache(); + $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); + $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); redirect(get_link('admin/censoring/'), __('Word added redirect')); } @@ -69,11 +66,8 @@ public function update_word() ->save(); // Regenerate the censoring cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_censoring_cache(); + $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); + $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); redirect(get_link('admin/censoring/'), __('Word updated redirect')); } @@ -87,11 +81,8 @@ public function remove_word() ->delete(); // Regenerate the censoring cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_censoring_cache(); + $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); + $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); redirect(get_link('admin/censoring/'), __('Word removed redirect')); } @@ -106,4 +97,4 @@ public function get_words() return $word_data; } -} \ No newline at end of file +} diff --git a/model/cache.php b/model/cache.php index 25050e50..7e1e9475 100644 --- a/model/cache.php +++ b/model/cache.php @@ -34,4 +34,17 @@ public static function get_bans() ->find_array(); } + public static function get_censoring($select_censoring = 'search_for') + { + $result = DB::for_table('censoring') + ->select_many($select_censoring) + ->find_array(); + $output = array(); + + foreach ($result as $item) { + $output[] = ($select_censoring == 'search_for') ? '%(?<=[^\p{L}\p{N}])('.str_replace('\*', '[\p{L}\p{N}]*?', preg_quote($item['search_for'], '%')).')(?=[^\p{L}\p{N}])%iu' : $item['replace_with']; + } + return $output; + } + } From 8450694f8544d73da9cfaf0ee633aef636452524 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 19 Aug 2015 19:33:10 +0200 Subject: [PATCH 110/353] Add users info and admin ids cache --- extern.php | 14 ++------- include/cache.php | 66 ------------------------------------------- include/functions.php | 17 ++++------- model/admin/users.php | 6 ++-- model/cache.php | 24 ++++++++++++++++ model/index.php | 32 ++++++++------------- model/login.php | 14 ++++----- model/profile.php | 22 +++++++-------- model/register.php | 8 +++--- 9 files changed, 69 insertions(+), 134 deletions(-) diff --git a/extern.php b/extern.php index 3bbc6d4a..327693d0 100644 --- a/extern.php +++ b/extern.php @@ -716,19 +716,11 @@ function output_html($feed) // Show board statistics elseif ($action == 'stats') { - // Collect some statistics from the database - if (file_exists(FORUM_CACHE_DIR.'cache_users_info.php')) { - include FORUM_CACHE_DIR.'cache_users_info.php'; + if (!$this->feather->cache->isCached('users_info')) { + $this->feather->cache->store('users_info', \model\cache::get_users_info()); } - if (!defined('FEATHER_USERS_INFO_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_users_info_cache(); - require FORUM_CACHE_DIR.'cache_users_info.php'; - } + $stats = $this->feather->cache->retrieve('users_info'); $stats_query = \DB::for_table('forums') ->select_expr('SUM(num_topics)', 'total_topics') diff --git a/include/cache.php b/include/cache.php index 17312bd9..258ffd6d 100644 --- a/include/cache.php +++ b/include/cache.php @@ -7,49 +7,6 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -// Make sure no one attempts to run this script "directly" -if (!defined('FEATHER')) { - exit; -} - - -// -// Generate the config cache PHP script -// -function generate_config_cache() -{ - // Get the forum config from the DB - $result = \DB::for_table('config')->find_array(); - - $output = array(); - foreach ($result as $cur_config_item) { - $output[$cur_config_item['conf_name']] = $cur_config_item['conf_value']; - } - - // Output config as PHP code - $content = ''; - featherbb_write_cache_file('cache_config.php', $content); -} - - -// -// Generate the bans cache PHP script -// -function generate_bans_cache() -{ - // Get the ban list from the DB - $result = \DB::for_table('bans')->find_array(); - - $output = array(); - foreach ($result as $cur_ban) { - $output[] = $cur_ban; - } - - // Output ban list as PHP code - $content = ''; - featherbb_write_cache_file('cache_bans.php', $content); -} - // // Generate quick jump cache PHP scripts @@ -130,29 +87,6 @@ function generate_quickjump_cache($group_id = false) } } - -// -// Generate the censoring cache PHP script -// -function generate_censoring_cache() -{ - $select_generate_censoring_cache = array('search_for', 'replace_with'); - $result = \DB::for_table('censoring')->select_many($select_generate_censoring_cache) - ->find_many(); - - $search_for = $replace_with = array(); - $i = 0; - foreach ($result as $row) { - $replace_with[$i] = $row['replace_with']; - $search_for[$i] = '%(?<=[^\p{L}\p{N}])('.str_replace('\*', '[\p{L}\p{N}]*?', preg_quote($row['search_for'], '%')).')(?=[^\p{L}\p{N}])%iu'; - ++$i; - } - - // Output censored words as PHP code - $content = ''; - featherbb_write_cache_file('cache_censoring.php', $content); -} - // // Generate a cache ID based on the last modification time for all stopwords files // diff --git a/include/functions.php b/include/functions.php index 81bc70e9..c4363a9f 100644 --- a/include/functions.php +++ b/include/functions.php @@ -74,20 +74,13 @@ function get_base_url($support_https = false) // function get_admin_ids() { - if (file_exists(FORUM_CACHE_DIR.'cache_admins.php')) { - include FORUM_CACHE_DIR.'cache_admins.php'; - } - - if (!defined('FEATHER_ADMINS_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_admins_cache(); - require FORUM_CACHE_DIR.'cache_admins.php'; + // Get Slim current session + $feather = \Slim\Slim::getInstance(); + if (!$this->feather->cache->isCached('admin_ids')) { + $this->feather->cache->store('admin_ids', \model\cache::get_admin_ids()); } - return $feather_admins; + return $this->feather->cache->retrieve('admin_ids'); } diff --git a/model/admin/users.php b/model/admin/users.php index 5463d4e6..58ccea8a 100644 --- a/model/admin/users.php +++ b/model/admin/users.php @@ -366,11 +366,11 @@ public function delete_users() } // Regenerate the users info cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; + if (!$this->feather->cache->isCached('users_info')) { + $this->feather->cache->store('users_info', \model\cache::get_users_info()); } - generate_users_info_cache(); + $stats = $this->feather->cache->retrieve('users_info'); redirect(get_link('admin/users/'), __('Users delete redirect')); } diff --git a/model/cache.php b/model/cache.php index 7e1e9475..d5867536 100644 --- a/model/cache.php +++ b/model/cache.php @@ -47,4 +47,28 @@ public static function get_censoring($select_censoring = 'search_for') return $output; } + public static function get_users_info() + { + $stats = array(); + $select_get_users_info = array('id', 'username'); + $stats['total_users'] = DB::for_table('users') + ->where_not_equal('group_id', FEATHER_UNVERIFIED) + ->where_not_equal('id', 1) + ->count(); + $stats['last_user'] = DB::for_table('users')->select_many($select_get_users_info) + ->where_not_equal('group_id', FEATHER_UNVERIFIED) + ->order_by_desc('registered') + ->limit(1) + ->find_array()[0]; + return $stats; + } + + public static function get_admin_ids() + { + return DB::for_table('users') + ->select('id') + ->where('group_id', FEATHER_ADMIN) + ->find_array(); + } + } diff --git a/model/index.php b/model/index.php index 986a3715..0a7ac667 100644 --- a/model/index.php +++ b/model/index.php @@ -22,7 +22,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + // Returns page head public function get_page_head() { @@ -50,7 +50,7 @@ public function get_forum_actions() // Detects if a "new" icon has to be displayed public function get_new_posts() - { + { $select_get_new_posts = array('f.id', 'f.last_post'); $where_get_new_posts_any = array( array('fp.read_forum' => 'IS NULL'), @@ -65,7 +65,7 @@ public function get_new_posts() ->where_any_is($where_get_new_posts_any) ->where_gt('f.last_post', $this->user->last_visit) ->find_result_set(); - + $forums = $new_topics = array(); $tracked_topics = get_tracked_topics(); @@ -78,7 +78,7 @@ public function get_new_posts() if (!empty($forums)) { if (empty($tracked_topics['topics'])) { $new_topics = $forums; - } else { + } else { $select_get_new_posts_tracked_topics = array('forum_id', 'id', 'last_post'); $result = DB::for_table('topics') @@ -106,14 +106,14 @@ public function print_categories_forums() if (!$this->user->is_guest) { $new_topics = $this->get_new_posts(); } - + $select_print_categories_forums = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.forum_desc', 'f.redirect_url', 'f.moderators', 'f.num_topics', 'f.num_posts', 'f.last_post', 'f.last_post_id', 'f.last_poster'); $where_print_categories_forums = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); $order_by_print_categories_forums = array('c.disp_position', 'c.id', 'f.disp_position'); - + $result = DB::for_table('categories') ->table_alias('c') ->select_many($select_print_categories_forums) @@ -210,25 +210,17 @@ public function print_categories_forums() // Returns the elements needed to display stats public function collect_stats() { - // Collect some statistics from the database - if (file_exists(FORUM_CACHE_DIR.'cache_users_info.php')) { - include FORUM_CACHE_DIR.'cache_users_info.php'; + if (!$this->feather->cache->isCached('users_info')) { + $this->feather->cache->store('users_info', \model\cache::get_users_info()); } - if (!defined('FEATHER_USERS_INFO_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } + $stats = $this->feather->cache->retrieve('users_info'); - generate_users_info_cache(); - require FORUM_CACHE_DIR.'cache_users_info.php'; - } - $stats_query = DB::for_table('forums') ->select_expr('SUM(num_topics)', 'total_topics') ->select_expr('SUM(num_posts)', 'total_posts') ->find_one(); - + $stats['total_topics'] = intval($stats_query['total_topics']); $stats['total_posts'] = intval($stats_query['total_posts']); @@ -251,7 +243,7 @@ public function fetch_users_online() $select_fetch_users_online = array('user_id', 'ident'); $where_fetch_users_online = array('idle' => '0'); $order_by_fetch_users_online = array('ident'); - + $result = DB::for_table('online') ->select_many($select_fetch_users_online) ->where($where_fetch_users_online) @@ -279,4 +271,4 @@ public function fetch_users_online() return $online; } -} \ No newline at end of file +} diff --git a/model/login.php b/model/login.php index 5c5ac99d..f3234e59 100644 --- a/model/login.php +++ b/model/login.php @@ -21,7 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + public function login() { $form_username = feather_trim($this->request->post('req_username')); @@ -65,11 +65,11 @@ public function login() ->save(); // Regenerate the users info cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; + if (!$this->feather->cache->isCached('users_info')) { + $this->feather->cache->store('users_info', \model\cache::get_users_info()); } - generate_users_info_cache(); + $stats = $this->feather->cache->retrieve('users_info'); } // Remove this user's guest entry from the online list @@ -161,13 +161,13 @@ public function password_forgotten() // Generate a new password and a new password activation code $new_password = random_pass(12); $new_password_key = random_pass(8); - + $update_password = array( 'activate_string' => feather_hash($new_password), 'activate_key' => $new_password_key, 'last_email_sent' => time() ); - + DB::for_table('users')->where('id', $cur_hit->id) ->find_one() ->set($update_password) @@ -205,4 +205,4 @@ public function get_redirect_url($server_data) return $redirect_url; } -} \ No newline at end of file +} diff --git a/model/profile.php b/model/profile.php index 8ddbb74d..71c06b8c 100644 --- a/model/profile.php +++ b/model/profile.php @@ -372,14 +372,14 @@ public function update_group_membership($id) ->save(); // Regenerate the users info cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; + if (!$this->feather->cache->isCached('users_info')) { + $this->feather->cache->store('users_info', \model\cache::get_users_info()); } - generate_users_info_cache(); + $stats = $this->feather->cache->retrieve('users_info'); if ($old_group_id == FEATHER_ADMIN || $new_group_id == FEATHER_ADMIN) { - generate_admins_cache(); + $this->feather->cache->store('admin_ids', \model\cache::get_admin_ids()); } $new_group_mod = DB::for_table('groups') @@ -632,14 +632,14 @@ public function delete_user($id) delete_avatar($id); // Regenerate the users info cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; + if (!$this->feather->cache->isCached('users_info')) { + $this->feather->cache->store('users_info', \model\cache::get_users_info()); } - generate_users_info_cache(); + $stats = $this->feather->cache->retrieve('users_info'); if ($group_id == FEATHER_ADMIN) { - generate_admins_cache(); + $this->feather->cache->store('admin_ids', \model\cache::get_admin_ids()); } redirect(get_base_url(), __('User delete redirect')); @@ -968,11 +968,11 @@ public function update_profile($id, $info, $section) } // Regenerate the users info cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; + if (!$this->feather->cache->isCached('users_info')) { + $this->feather->cache->store('users_info', \model\cache::get_users_info()); } - generate_users_info_cache(); + $stats = $this->feather->cache->retrieve('users_info'); // Check if the bans table was updated and regenerate the bans cache when needed if ($bans_updated) { diff --git a/model/register.php b/model/register.php index 8152bc20..3f04bb64 100644 --- a/model/register.php +++ b/model/register.php @@ -21,7 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + public function check_for_errors() { global $lang_register, $lang_antispam, $lang_antispam_questions; @@ -155,11 +155,11 @@ public function insert_user($user) if ($this->config['o_regs_verify'] == '0') { // Regenerate the users info cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; + if (!$this->feather->cache->isCached('users_info')) { + $this->feather->cache->store('users_info', \model\cache::get_users_info()); } - generate_users_info_cache(); + $stats = $this->feather->cache->retrieve('users_info'); } // If the mailing list isn't empty, we may need to send out some alerts From ef0aa55cf5b3775f3240d7a4302ffe099904428b Mon Sep 17 00:00:00 2001 From: adaur Date: Wed, 19 Aug 2015 22:11:38 +0200 Subject: [PATCH 111/353] Add more hooks --- controller/login.php | 2 +- include/hooks.php | 9 +++- model/delete.php | 4 ++ model/edit.php | 10 ++++ model/header.php | 2 + model/index.php | 14 ++++- model/login.php | 101 +++++++++++++++++++++--------------- plugins/test/plugintest.php | 4 +- 8 files changed, 98 insertions(+), 48 deletions(-) diff --git a/controller/login.php b/controller/login.php index 277e6378..a84d8ea9 100644 --- a/controller/login.php +++ b/controller/login.php @@ -37,7 +37,7 @@ public function display() } // TODO?: Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login) - $redirect_url = $this->model->get_redirect_url($_SERVER); + $redirect_url = $this->model->get_redirect_url(); $page_title = array(feather_escape($this->config['o_board_title']), __('Login')); $required_fields = array('req_username' => __('Username'), 'req_password' => __('Password')); diff --git a/include/hooks.php b/include/hooks.php index 77875fe2..c8ed4387 100644 --- a/include/hooks.php +++ b/include/hooks.php @@ -37,7 +37,12 @@ public function fire($name) if (!isset($this->hooks[$name])) { $this->hooks[$name] = array(array()); - return $args[0]; + if (isset ($args[0])) { + return $args[0]; + } + else { + return; + } } if (!empty($this->hooks[$name])) { // Sort by priority, low to high, if there's more than one priority @@ -76,7 +81,7 @@ public function fire($name) /** * Invoke hook for DB * @param string $name The hook name - * @param mixed ... (Optional) Argument(s) for hooked functions, can specify multiple arguments + * @param mixed ... Argument(s) for hooked functions, can specify multiple arguments */ public function fireDB($name) { diff --git a/model/delete.php b/model/delete.php index 82db289e..18df47c0 100644 --- a/model/delete.php +++ b/model/delete.php @@ -25,6 +25,8 @@ public function __construct() public function get_info_delete($id) { + $this->hook->fire('get_info_delete_start'); + $query['select'] = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.first_post_id', 't.closed', 'p.poster', 'p.posted', 'p.poster_id', 'p.message', 'p.hide_smilies'); $query['where'] = array( array('fp.read_forum' => 'IS NULL'), @@ -54,6 +56,8 @@ public function get_info_delete($id) public function handle_deletion($is_topic_post, $id, $tid, $fid) { + $this->hook->fire('handle_deletion_start'); + require FEATHER_ROOT.'include/search_idx.php'; if ($is_topic_post) { diff --git a/model/edit.php b/model/edit.php index eb95c75b..790a1672 100644 --- a/model/edit.php +++ b/model/edit.php @@ -26,6 +26,8 @@ public function __construct() // Fetch some info about the post, the topic and the forum public function get_info_edit($id) { + $this->hook->fire('get_info_edit_start'); + $cur_post['select'] = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.posted', 't.first_post_id', 't.sticky', 't.closed', 'p.poster', 'p.poster_id', 'p.message', 'p.hide_smilies'); $cur_post['where'] = array( array('fp.read_forum' => 'IS NULL'), @@ -57,6 +59,8 @@ public function check_errors_before_edit($can_edit_subject, $errors) { global $pd; + $this->hook->fire('check_errors_before_edit_start'); + // If it's a topic it must contain a subject if ($can_edit_subject) { $subject = feather_trim($this->request->post('req_subject')); @@ -115,6 +119,8 @@ public function setup_variables($cur_post, $is_admmod, $can_edit_subject, $error { global $pd; + $this->hook->fire('setup_variables_start'); + $post = array(); $post['hide_smilies'] = $this->request->post('hide_smilies') ? '1' : '0'; @@ -147,6 +153,8 @@ public function setup_variables($cur_post, $is_admmod, $can_edit_subject, $error public function edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod) { + $this->hook->fire('edit_post_start'); + require FEATHER_ROOT.'include/search_idx.php'; if ($can_edit_subject) { @@ -197,6 +205,8 @@ public function edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod) public function get_checkboxes($can_edit_subject, $is_admmod, $cur_post, $cur_index) { + $this->hook->fire('get_checkboxes_start'); + $checkboxes = array(); if ($can_edit_subject && $is_admmod) { diff --git a/model/header.php b/model/header.php index ea9a2ac6..8a254fa5 100644 --- a/model/header.php +++ b/model/header.php @@ -25,6 +25,8 @@ public function __construct() public function get_reports() { + $this->hook->fire('get_reports_start'); + $result_header = DB::for_table('reports')->where_null('zapped'); $result_header = $this->hook->fireDB('get_reports_query', $result_header); diff --git a/model/index.php b/model/index.php index a4852a19..42455186 100644 --- a/model/index.php +++ b/model/index.php @@ -27,6 +27,8 @@ public function __construct() // Returns page head public function get_page_head() { + $this->hook->fire('get_page_head_start'); + if ($this->config['o_feed_type'] == '1') { $page_head = array('feed' => ''); } elseif ($this->config['o_feed_type'] == '2') { @@ -41,6 +43,8 @@ public function get_page_head() // Returns forum action public function get_forum_actions() { + $this->hook->fire('get_forum_actions_start'); + $forum_actions = array(); // Display a "mark all as read" link @@ -55,7 +59,9 @@ public function get_forum_actions() // Detects if a "new" icon has to be displayed public function get_new_posts() - { + { + $this->hook->fire('get_new_posts_start'); + $query['select'] = array('f.id', 'f.last_post'); $query['where'] = array( array('fp.read_forum' => 'IS NULL'), @@ -115,6 +121,8 @@ public function get_new_posts() // Returns the elements needed to display categories and their forums public function print_categories_forums() { + $this->hook->fire('print_categories_forums_start'); + // Get list of forums and topics with new posts since last visit if (!$this->user->is_guest) { $new_topics = $this->get_new_posts(); @@ -227,6 +235,8 @@ public function print_categories_forums() // Returns the elements needed to display stats public function collect_stats() { + $this->hook->fire('collect_stats_start'); + // Collect some statistics from the database if (file_exists(FORUM_CACHE_DIR.'cache_users_info.php')) { include FORUM_CACHE_DIR.'cache_users_info.php'; @@ -266,6 +276,8 @@ public function collect_stats() // Returns the elements needed to display users online public function fetch_users_online() { + $this->hook->fire('fetch_users_online_start'); + // Fetch users online info and generate strings for output $online = array(); $online['num_guests'] = 0; diff --git a/model/login.php b/model/login.php index 14c3fd32..223466f7 100644 --- a/model/login.php +++ b/model/login.php @@ -20,49 +20,43 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function login() { + $this->hook->fire('login_start'); + $form_username = feather_trim($this->request->post('req_username')); $form_password = feather_trim($this->request->post('req_password')); $save_pass = $this->request->post('save_pass'); - $user = DB::for_table('users')->where('username', $form_username)->find_one(); + $user = DB::for_table('users')->where('username', $form_username); + + $user = $this->hook->fireDB('find_user_login', $user); + + $user = $user->find_one(); $authorized = false; if (!empty($user->password)) { $form_password_hash = feather_hash($form_password); // Will result in a SHA-1 hash - - // If the length isn't 40 then the password isn't using sha1, so it must be md5 from 1.2 - // Maybe this should be removed - if (strlen($user->password) != 40) { - if (md5($form_password) == $user->password) { - $authorized = true; - - DB::for_table('users')->where('id', $user->id) - ->find_one() - ->set('password', $form_password_hash) - ->save(); - } - } - // Otherwise we should have a normal sha1 password - else { - $authorized = ($user->password == $form_password_hash); - } + $authorized = ($user->password == $form_password_hash); } + $authorized = $this->hook->fire('authorized_login', $authorized); + if (!$authorized) { message(__('Wrong user/pass').' '.__('Forgotten pass').''); } // Update the status if this is the first time the user logged in if ($user->group_id == FEATHER_UNVERIFIED) { - DB::for_table('users')->where('id', $user->id) + $update_usergroup = DB::for_table('users')->where('id', $user->id) ->find_one() - ->set('group_id', $this->config['o_default_user_group']) - ->save(); + ->set('group_id', $this->config['o_default_user_group']); + $update_usergroup = $this->hook->fireDB('update_usergroup_login', $update_usergroup); + $update_usergroup = $update_usergroup->save(); // Regenerate the users info cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { @@ -73,10 +67,12 @@ public function login() } // Remove this user's guest entry from the online list - DB::for_table('online')->where('ident', get_remote_address()) - ->delete_many(); + $delete_online = DB::for_table('online')->where('ident', get_remote_address()); + $delete_online = $this->hook->fireDB('delete_online_login', $delete_online); + $delete_online = $delete_online->delete_many(); $expire = ($save_pass == '1') ? time() + 1209600 : time() + $this->config['o_timeout_visit']; + $expire = $this->hook->fire('expire_login', $expire); feather_setcookie($user->id, $form_password_hash, $expire); // Reset tracked topics @@ -84,29 +80,36 @@ public function login() // Try to determine if the data in redirect_url is valid (if not, we redirect to index.php after login) $redirect_url = validate_redirect($this->request->post('redirect_url'), get_base_url()); + $redirect_url = $this->hook->fire('redirect_url_login', $redirect_url); redirect(feather_escape($redirect_url), __('Login redirect')); } public function logout($id, $token) { + $this->hook->fire('logout_start'); + if ($this->user->is_guest || !isset($id) || $id != $this->user->id || !isset($token) || $token != feather_hash($this->user->id.feather_hash(get_remote_address()))) { header('Location: '.get_base_url()); exit; } // Remove user from "users online" list - DB::for_table('online')->where('user_id', $this->user->id) - ->delete_many(); + $delete_online = DB::for_table('online')->where('user_id', $this->user->id); + $delete_online = $this->hook->fireDB('delete_online_logout', $delete_online); + $delete_online = $delete_online->delete_many(); // Update last_visit (make sure there's something to update it with) if (isset($this->user->logged)) { - DB::for_table('users')->where('id', $this->user->id) - ->find_one() - ->set('last_visit', $this->user->logged) - ->save(); + $update_last_visit = DB::for_table('users')->where('id', $this->user->id) + ->find_one() + ->set('last_visit', $this->user->logged); + $update_last_visit = $this->hook->fireDB('update_online_logout', $update_last_visit); + $update_last_visit = $update_last_visit->save(); } + $this->hook->fire('logout_end'); + feather_setcookie(1, feather_hash(uniqid(rand(), true)), time() + 31536000); redirect(get_base_url(), __('Logout redirect')); @@ -114,6 +117,8 @@ public function logout($id, $token) public function password_forgotten() { + $this->hook->fire('password_forgotten_start'); + if (!$this->user->is_guest) { header('Location: '.get_base_url()); exit; @@ -132,16 +137,18 @@ public function password_forgotten() // Did everything go according to plan? if (empty($errors)) { - $select_password_forgotten = array('id', 'username', 'last_email_sent'); + $result['select'] = array('id', 'username', 'last_email_sent'); $result = DB::for_table('users') - ->select_many($select_password_forgotten) - ->where('email', $email) - ->find_many(); + ->select_many($result['select']) + ->where('email', $email); + $result = $this->hook->fireDB('password_forgotten_query', $result); + $result = $result->find_many(); if ($result) { // Load the "activate password" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/activate_password.tpl')); + $mail_tpl = $this->hook->fire('mail_tpl_password_forgotten', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); @@ -152,6 +159,8 @@ public function password_forgotten() $mail_message = str_replace('', get_base_url().'/', $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('mail_message_password_forgotten', $mail_message); + // Loop through users we found foreach($result as $cur_hit) { if ($cur_hit->last_email_sent != '' && (time() - $cur_hit->last_email_sent) < 3600 && (time() - $cur_hit->last_email_sent) >= 0) { @@ -161,22 +170,24 @@ public function password_forgotten() // Generate a new password and a new password activation code $new_password = random_pass(12); $new_password_key = random_pass(8); - - $update_password = array( + + $query['update'] = array( 'activate_string' => feather_hash($new_password), 'activate_key' => $new_password_key, 'last_email_sent' => time() ); - DB::for_table('users')->where('id', $cur_hit->id) - ->find_one() - ->set($update_password) - ->save(); + $query = DB::for_table('users')->where('id', $cur_hit->id) + ->find_one() + ->set($query['update']); + $query = $this->hook->fireDB('password_forgotten_mail_query', $query); + $query = $query->save(); // Do the user specific replacements to the template $cur_mail_message = str_replace('', $cur_hit->username, $mail_message); $cur_mail_message = str_replace('', get_link('user/'.$cur_hit->id.'/action/change_pass/?key='.$new_password_key), $cur_mail_message); $cur_mail_message = str_replace('', $new_password, $cur_mail_message); + $cur_mail_message = $this->hook->fire('cur_mail_message_password_forgotten', $cur_mail_message); feather_mail($email, $mail_subject, $cur_mail_message); } @@ -188,13 +199,17 @@ public function password_forgotten() } } + $errors = $this->hook->fire('password_forgotten', $errors); + return $errors; } - public function get_redirect_url($server_data) + public function get_redirect_url() { - if (!empty($server_data['HTTP_REFERER'])) { - $redirect_url = validate_redirect($server_data['HTTP_REFERER'], null); + $this->hook->fire('get_redirect_url_start'); + + if (!empty($this->request->getReferrer())) { + $redirect_url = validate_redirect($this->request->getReferrer(), null); } if (!isset($redirect_url)) { @@ -203,6 +218,8 @@ public function get_redirect_url($server_data) $redirect_url .= '#p'.$matches[1]; } + $redirect_url = $this->hook->fire('get_redirect_url', $redirect_url); + return $redirect_url; } } \ No newline at end of file diff --git a/plugins/test/plugintest.php b/plugins/test/plugintest.php index b3f3ad9d..c9fe31f2 100644 --- a/plugins/test/plugintest.php +++ b/plugins/test/plugintest.php @@ -36,9 +36,9 @@ public function __construct() return $query; }); - $this->hook->bind('query_fetch_users_online', function ($query) { + /*$this->hook->bind('query_fetch_users_online', function ($query) { $query = $query->offset(50); return $query; - }); + });*/ } } \ No newline at end of file From 301281c5fd7d2d4b5428b730d9100609708f0127 Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 20 Aug 2015 14:36:33 +0200 Subject: [PATCH 112/353] Add more hooks --- controller/misc.php | 2 +- model/delete.php | 2 +- model/edit.php | 5 +- model/login.php | 6 +- model/misc.php | 215 +++++++++++++++++++++++++++----------------- 5 files changed, 141 insertions(+), 89 deletions(-) diff --git a/controller/misc.php b/controller/misc.php index be6c2e2e..f6d108a5 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -131,7 +131,7 @@ public function email($id) if ($this->feather->request()->isPost()) { - $this->model->send_email($mail, $id); + $this->model->send_email($mail); } $page_title = array(feather_escape($this->config['o_board_title']), __('Send email to').' '.feather_escape($mail['recipient'])); diff --git a/model/delete.php b/model/delete.php index 18df47c0..18e413ea 100644 --- a/model/delete.php +++ b/model/delete.php @@ -25,7 +25,7 @@ public function __construct() public function get_info_delete($id) { - $this->hook->fire('get_info_delete_start'); + $id = $this->hook->fire('get_info_delete_start', $id); $query['select'] = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.first_post_id', 't.closed', 'p.poster', 'p.posted', 'p.poster_id', 'p.message', 'p.hide_smilies'); $query['where'] = array( diff --git a/model/edit.php b/model/edit.php index 790a1672..faf9834f 100644 --- a/model/edit.php +++ b/model/edit.php @@ -184,6 +184,7 @@ public function edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod) } // Update the post + unset($query); $query['update_post'] = array( 'message' => $post['message'], 'hide_smilies' => $post['hide_smilies'] @@ -197,9 +198,7 @@ public function edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod) $query = DB::for_table('posts')->where('id', $id) ->find_one() ->set($query['update_post']); - - $query = $this->hook->fireDB('edit_post_can_edit_subject', $query); - + $query = $this->hook->fireDB('edit_post_query', $query); $query = $query->save(); } diff --git a/model/login.php b/model/login.php index 223466f7..30912a9a 100644 --- a/model/login.php +++ b/model/login.php @@ -87,7 +87,11 @@ public function login() public function logout($id, $token) { - $this->hook->fire('logout_start'); + $hook['id'] = $id; + $hook['token'] = $token; + $hook = $this->hook->fire('logout_start', $hook); + $id = $hook['id']; + $token = $hook['token']; if ($this->user->is_guest || !isset($id) || $id != $this->user->id || !isset($token) || $token != feather_hash($this->user->id.feather_hash(get_remote_address()))) { header('Location: '.get_base_url()); diff --git a/model/misc.php b/model/misc.php index 23ac015a..e24ccd93 100644 --- a/model/misc.php +++ b/model/misc.php @@ -20,24 +20,31 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function update_last_visit() { - DB::for_table('users')->where('id', $this->user->id) - ->find_one() - ->set('last_visit', $this->user->logged) - ->save(); + $this->hook->fire('update_last_visit_start'); + + $update_last_visit = DB::for_table('users')->where('id', $this->user->id) + ->find_one() + ->set('last_visit', $this->user->logged); + $update_last_visit = $this->hook->fireDB('update_last_visit', $update_last_visit); + $update_last_visit = $update_last_visit->save(); } public function get_info_mail($recipient_id) { - $select_get_info_mail = array('username', 'email', 'email_setting'); + $recipient_id = $this->hook->fire('get_info_mail_start', $recipient_id); + + $mail['select'] = array('username', 'email', 'email_setting'); $mail = DB::for_table('users') - ->select_many($select_get_info_mail) - ->where('id', $recipient_id) - ->find_one(); + ->select_many($mail['select']) + ->where('id', $recipient_id); + $mail = $this->hook->fireDB('get_info_mail_query', $mail); + $mail = $mail->find_one(); if (!$mail) { message(__('Bad request'), '404'); @@ -46,11 +53,15 @@ public function get_info_mail($recipient_id) $mail['recipient'] = $mail['username']; $mail['recipient_email'] = $mail['email']; + $mail = $this->hook->fireDB('get_info_mail', $mail); + return $mail; } - public function send_email($mail, $id) + public function send_email($mail) { + $mail = $this->hook->fire('send_email_start', $mail); + // Clean up message and subject from POST $subject = feather_trim($this->request->post('req_subject')); $message = feather_trim($this->request->post('req_message')); @@ -71,6 +82,7 @@ public function send_email($mail, $id) // Load the "form email" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/form_email.tpl')); + $mail_tpl = $this->hook->fire('send_email_mail_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); @@ -83,16 +95,19 @@ public function send_email($mail, $id) $mail_message = str_replace('', $message, $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('send_email_mail_message', $mail_message); + require_once FEATHER_ROOT.'include/email.php'; feather_mail($mail['recipient_email'], $mail_subject, $mail_message, $this->user->email, $this->user->username); - DB::for_table('users')->where('id', $this->user->id) + $update_last_mail_sent = DB::for_table('users')->where('id', $this->user->id) ->find_one() - ->set('last_email_sent', time()) - ->save(); + ->set('last_email_sent', time()); + $update_last_mail_sent = $this->hook->fireDB('send_email_update_last_mail_sent', $update_last_mail_sent); + $update_last_mail_sent = $update_last_mail_sent->save(); - // Try to determine if the data in redirect_url is valid (if not, we redirect to index.php after the email is sent) + // Try to determine if the data in redirect_url is valid (if not, we redirect to index.php after the email is sent) TODO //$redirect_url = validate_redirect($this->request->post('redirect_url'), 'index.php'); redirect(get_base_url(), __('Email sent redirect')); @@ -100,6 +115,8 @@ public function send_email($mail, $id) public function get_redirect_url($recipient_id) { + $recipient_id = $this->hook->fire('get_redirect_url_start', $recipient_id); + // Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to the user's profile after the email is sent) // TODO if ($this->request->getReferrer()) { @@ -112,11 +129,15 @@ public function get_redirect_url($recipient_id) $redirect_url .= '#p'.$matches[1]; } + $redirect_url = $this->hook->fire('get_redirect_url', $redirect_url); + return $redirect_url; } public function insert_report($post_id) { + $post_id = $this->hook->fire('insert_report_start', $post_id); + // Clean up reason from POST $reason = feather_linebreaks(feather_trim($this->request->post('req_reason'))); if ($reason == '') { @@ -131,19 +152,20 @@ public function insert_report($post_id) // Get the topic ID $topic = DB::for_table('posts')->select('topic_id') - ->where('id', $post_id) - ->find_one(); + ->where('id', $post_id); + $topic = $this->hook->fireDB('insert_report_topic_id', $topic); + $topic = $topic->find_one(); if (!$topic) { message(__('Bad request'), '404'); } - $select_report = array('subject', 'forum_id'); - // Get the subject and forum ID - $report = DB::for_table('topics')->select_many($select_report) - ->where('id', $topic['topic_id']) - ->find_one(); + $report['select'] = array('subject', 'forum_id'); + $report = DB::for_table('topics')->select_many($report['select']) + ->where('id', $topic['topic_id']); + $report = $this->hook->fireDB('insert_report_get_subject', $report); + $report = $report->find_one(); if (!$report) { message(__('Bad request'), '404'); @@ -151,7 +173,9 @@ public function insert_report($post_id) // Should we use the internal report handling? if ($this->config['o_report_method'] == '0' || $this->config['o_report_method'] == '2') { - $insert_report = array( + + // Insert the report + $query['insert'] = array( 'post_id' => $post_id, 'topic_id' => $topic['topic_id'], 'forum_id' => $report['forum_id'], @@ -159,12 +183,11 @@ public function insert_report($post_id) 'created' => time(), 'message' => $reason, ); - - // Insert the report - DB::for_table('reports') + $query = DB::for_table('reports') ->create() - ->set($insert_report) - ->save(); + ->set($query['insert']); + $query = $this->hook->fireDB('insert_report_query', $query); + $query = $query->save(); } // Should we email the report? @@ -173,6 +196,7 @@ public function insert_report($post_id) if ($this->config['o_mailing_list'] != '') { // Load the "new report" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/new_report.tpl')); + $mail_tpl = $this->hook->fire('insert_report_mail_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); @@ -186,66 +210,77 @@ public function insert_report($post_id) $mail_message = str_replace('', $reason, $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('insert_report_mail_message', $mail_message); + require FEATHER_ROOT.'include/email.php'; feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } - DB::for_table('users')->where('id', $this->user->id) + $last_report_sent = DB::for_table('users')->where('id', $this->user->id) ->find_one() - ->set('last_report_sent', time()) - ->save(); + ->set('last_report_sent', time()); + $last_report_sent = $this->hook->fireDB('insert_last_report_sent', $last_report_sent); + $last_report_sent = $last_report_sent->save(); redirect(get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['subject']).'/'), __('Report redirect')); } public function get_info_report($post_id) { - $select_get_info_report = array('fid' => 'f.id', 'f.forum_name', 'tid' => 't.id', 't.subject'); - $where_get_info_report = array( + $post_id = $this->hook->fire('get_info_report_start', $post_id); + + $cur_post['select'] = array('fid' => 'f.id', 'f.forum_name', 'tid' => 't.id', 't.subject'); + $cur_post['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); $cur_post = DB::for_table('posts') - ->table_alias('p') - ->select_many($select_get_info_report) - ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') - ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_info_report) - ->where('p.id', $post_id) - ->find_one(); + ->table_alias('p') + ->select_many($cur_post['select']) + ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') + ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($cur_post['where']) + ->where('p.id', $post_id); + $cur_post = $this->hook->fireDB('get_info_report_query', $cur_post); + $cur_post = $cur_post->find_one(); if (!$cur_post) { message(__('Bad request'), '404'); } + $cur_post = $this->hook->fire('get_info_report', $cur_post); + return $cur_post; } public function subscribe_topic($topic_id) { + $topic_id = $this->hook->fire('subscribe_topic_start', $topic_id); + if ($this->config['o_topic_subscriptions'] != '1') { message(__('No permission'), '403'); } // Make sure the user can view the topic - $where_subscribe_topic = array( + $authorized['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); $authorized = DB::for_table('topics') - ->table_alias('t') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 't.forum_id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_subscribe_topic) - ->where('t.id', $topic_id) - ->where_null('t.moved_to') - ->find_one(); + ->table_alias('t') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 't.forum_id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($authorized['where']) + ->where('t.id', $topic_id) + ->where_null('t.moved_to'); + $authorized = $this->hook->fireDB('subscribe_topic_authorized_query', $authorized); + $authorized = $authorized->find_one(); if (!$authorized) { message(__('Bad request'), '404'); @@ -253,94 +288,107 @@ public function subscribe_topic($topic_id) $is_subscribed = DB::for_table('topic_subscriptions') ->where('user_id', $this->user->id) - ->where('topic_id', $topic_id) - ->find_one(); + ->where('topic_id', $topic_id); + $is_subscribed = $this->hook->fireDB('subscribe_topic_is_subscribed_query', $is_subscribed); + $is_subscribed = $is_subscribed->find_one(); if ($is_subscribed) { message(__('Already subscribed topic')); } - $insert_subscribe_topic = array( + $subscription['insert'] = array( 'user_id' => $this->user->id, 'topic_id' => $topic_id ); // Insert the subscription - DB::for_table('topic_subscriptions') - ->create() - ->set($insert_subscribe_topic) - ->save(); + $subscription = DB::for_table('topic_subscriptions') + ->create() + ->set($subscription['insert']); + $subscription = $this->hook->fireDB('subscribe_topic_query', $subscription); + $subscription = $subscription->save(); redirect(get_link('topic/'.$topic_id.'/'), __('Subscribe redirect')); } public function unsubscribe_topic($topic_id) { + $topic_id = $this->hook->fire('unsubscribe_topic_start', $topic_id); + if ($this->config['o_topic_subscriptions'] != '1') { message(__('No permission'), '403'); } $is_subscribed = DB::for_table('topic_subscriptions') - ->where('user_id', $this->user->id) - ->where('topic_id', $topic_id) - ->find_one(); + ->where('user_id', $this->user->id) + ->where('topic_id', $topic_id); + $is_subscribed = $this->hook->fireDB('unsubscribe_topic_subscribed_query', $is_subscribed); + $is_subscribed = $is_subscribed->find_one(); if (!$is_subscribed) { message(__('Not subscribed topic')); } // Delete the subscription - DB::for_table('topic_subscriptions') - ->where('user_id', $this->user->id) - ->where('topic_id', $topic_id) - ->delete_many(); + $delete = DB::for_table('topic_subscriptions') + ->where('user_id', $this->user->id) + ->where('topic_id', $topic_id); + $delete = $this->hook->fireDB('unsubscribe_topic_query', $delete); + $delete = $delete->delete_many(); redirect(get_link('topic/'.$topic_id.'/'), __('Unsubscribe redirect')); } public function unsubscribe_forum($forum_id) { + $forum_id = $this->hook->fire('unsubscribe_forum_start', $forum_id); + if ($this->config['o_forum_subscriptions'] != '1') { message(__('No permission'), '403'); } $is_subscribed = DB::for_table('forum_subscriptions') ->where('user_id', $this->user->id) - ->where('forum_id', $forum_id) - ->find_one(); + ->where('forum_id', $forum_id); + $is_subscribed = $this->hook->fireDB('unsubscribe_forum_subscribed_query', $is_subscribed); + $is_subscribed = $is_subscribed->find_one(); if (!$is_subscribed) { message(__('Not subscribed forum')); } // Delete the subscription - DB::for_table('forum_subscriptions') + $delete = DB::for_table('forum_subscriptions') ->where('user_id', $this->user->id) - ->where('forum_id', $forum_id) - ->delete_many(); + ->where('forum_id', $forum_id); + $delete = $this->hook->fireDB('unsubscribe_forum_query', $delete); + $delete = $delete->delete_many(); redirect(get_link('forum/'.$forum_id.'/'), __('Unsubscribe redirect')); } public function subscribe_forum($forum_id) { + $forum_id = $this->hook->fire('subscribe_forum_start', $forum_id); + if ($this->config['o_forum_subscriptions'] != '1') { message(__('No permission'), '403'); } // Make sure the user can view the forum - $where_subscribe_forum = array( + $authorized['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); $authorized = DB::for_table('forums') - ->table_alias('f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_subscribe_forum) - ->where('f.id', $forum_id) - ->find_one(); + ->table_alias('f') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($authorized['where']) + ->where('f.id', $forum_id); + $authorized = $this->hook->fireDB('subscribe_forum_authorized_query', $authorized); + $authorized = $authorized->find_one(); if (!$authorized) { message(__('Bad request'), '404'); @@ -348,23 +396,24 @@ public function subscribe_forum($forum_id) $is_subscribed = DB::for_table('forum_subscriptions') ->where('user_id', $this->user->id) - ->where('forum_id', $forum_id) - ->find_one(); + ->where('forum_id', $forum_id); + $is_subscribed = $this->hook->fireDB('subscribe_forum_subscribed_query', $is_subscribed); + $is_subscribed = $is_subscribed->find_one(); if ($is_subscribed) { message(__('Already subscribed forum')); } - $insert_subscribe_forum = array( + // Insert the subscription + $subscription['insert'] = array( 'user_id' => $this->user->id, 'forum_id' => $forum_id ); - - // Insert the subscription - DB::for_table('forum_subscriptions') - ->create() - ->set($insert_subscribe_forum) - ->save(); + $subscription = DB::for_table('forum_subscriptions') + ->create() + ->set($subscription['insert']); + $subscription = $this->hook->fireDB('subscribe_forum_query', $subscription); + $subscription = $subscription->save(); redirect(get_link('forum/'.$forum_id.'/'), __('Subscribe redirect')); } From ead352f44dd7868baf1f91d94605b0a28bf91dad Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 20 Aug 2015 15:14:38 +0200 Subject: [PATCH 113/353] Fix mail link --- model/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/viewtopic.php b/model/viewtopic.php index c0729034..1f32514a 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -311,7 +311,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) if ((($cur_post['email_setting'] == '0' && !$this->user->is_guest) || $this->user->is_admmod) && $this->user->g_send_email == '1') { $cur_post['user_contacts'][] = ''; } elseif ($cur_post['email_setting'] == '1' && !$this->user->is_guest && $this->user->g_send_email == '1') { - $cur_post['user_contacts'][] = ''; + $cur_post['user_contacts'][] = ''; } if ($cur_post['url'] != '') { From a687e748e87ce4d0786a6e04379912cd30f4b14b Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 20 Aug 2015 16:14:13 +0200 Subject: [PATCH 114/353] Start to add hooks --- model/moderate.php | 237 +++++++++++++++++++++++++-------------------- 1 file changed, 133 insertions(+), 104 deletions(-) diff --git a/model/moderate.php b/model/moderate.php index 218bf78e..8bf1ec52 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -20,59 +20,64 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function display_ip_info($ip) { + $ip = $this->hook->fire('display_ip_info', $ip); message(sprintf(__('Host info 1'), $ip).'
          '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

          '.__('Show more users').''); } public function display_ip_address_post($pid) { - + $pid = $this->hook->fire('display_ip_address_post_start', $pid); $ip = DB::for_table('posts') - ->where('id', $pid) - ->find_one_col('poster_ip'); + ->where('id', $pid); + $ip = $this->hook->fireDB('display_ip_address_post_query', $pid); + $ip = $ip->find_one_col('poster_ip'); if (!$ip) { message(__('Bad request'), '404'); } + $ip = $this->hook->fire('display_ip_address_post', $ip); + message(sprintf(__('Host info 1'), $ip).'
          '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

          '.__('Show more users').''); } public function get_moderators($fid) { $moderators = DB::for_table('forums') - ->where('id', $fid) - ->find_one_col('moderators'); + ->where('id', $fid); + $moderators = $this->hook->fireDB('get_moderators', $moderators); + $moderators = $moderators->find_one_col('moderators'); return $moderators; } public function get_topic_info($fid, $tid) { - - // Fetch some info about the topic - $select_get_topic_info = array('forum_id' => 'f.id', 'f.forum_name', 't.subject', 't.num_replies', 't.first_post_id'); - $where_get_topic_info = array( + $cur_topic['select'] = array('forum_id' => 'f.id', 'f.forum_name', 't.subject', 't.num_replies', 't.first_post_id'); + $cur_topic['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); $cur_topic = DB::for_table('topics') ->table_alias('t') - ->select_many($select_get_topic_info) + ->select_many($cur_topic['select']) ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_topic_info) + ->where_any_is($cur_topic['where']) ->where('f.id', $fid) ->where('t.id', $tid) - ->where_null('t.moved_to') - ->find_one(); + ->where_null('t.moved_to'); + $cur_topic = $this->hook->fireDB('get_topic_info', $cur_topic); + $cur_topic = $cur_topic->find_one(); if (!$cur_topic) { message(__('Bad request'), '404'); @@ -83,8 +88,9 @@ public function get_topic_info($fid, $tid) public function delete_posts($tid, $fid, $p = null) { - $posts = $this->request->post('posts') ? $this->request->post('posts') : array(); + $posts = $this->hook->fire('delete_posts_start', $posts); + if (empty($posts)) { message(__('No posts selected')); } @@ -99,61 +105,68 @@ public function delete_posts($tid, $fid, $p = null) $result = DB::for_table('posts') ->where_in('id', $posts_array) - ->where('topic_id', $tid) - ->find_many(); + ->where('topic_id', $tid); if ($this->user->g_id != FEATHER_ADMIN) { $result->where_not_in('poster_id', get_admin_ids()); } + $result = $this->hook->fireDB('delete_posts_first_query', $result); + $result = $result->find_many(); + if (count($result) != substr_count($posts, ',') + 1) { message(__('Bad request'), '404'); } // Delete the posts - DB::for_table('posts') - ->where_in('id', $posts_array) - ->delete_many(); + $delete_posts = DB::for_table('posts') + ->where_in('id', $posts_array); + $delete_posts = $this->hook->fireDB('delete_posts_query', $delete_posts); + $delete_posts = $delete_posts->delete_many(); require FEATHER_ROOT.'include/search_idx.php'; strip_search_index($posts); // Get last_post, last_post_id, and last_poster for the topic after deletion - $select_last_post = array('id', 'poster', 'posted'); + $last_post['select'] = array('id', 'poster', 'posted'); $last_post = DB::for_table('posts') - ->select_many($select_last_post) - ->where('topic_id', $tid) - ->find_one(); + ->select_many($last_post['select']) + ->where('topic_id', $tid); + $last_post = $this->hook->fireDB('delete_posts_last_post_query', $last_post); + $last_post = $last_post->find_one(); // How many posts did we just delete? $num_posts_deleted = substr_count($posts, ',') + 1; // Update the topic - $update_topic = array( + $update_topic['insert'] = array( 'last_post' => $this->user->id, 'last_post_id' => $last_post['id'], 'last_poster' => $last_post['poster'], ); - DB::for_table('topics')->where('id', $tid) + $update_topic = DB::for_table('topics')->where('id', $tid) ->find_one() - ->set($update_topic) - ->set_expr('num_replies', 'num_replies-'.$num_posts_deleted) - ->save(); + ->set($update_topic['insert']) + ->set_expr('num_replies', 'num_replies-'.$num_posts_deleted); + $update_topic = $this->hook->fireDB('delete_posts_update_topic_query', $update_topic); + $update_topic = $update_topic->save(); update_forum($fid); redirect(get_link('topic/'.$tid.'/'), __('Delete posts redirect')); } + $posts = $this->hook->fire('delete_posts', $posts); + return $posts; } public function split_posts($tid, $fid, $p = null) { - $posts = $this->request->post('posts') ? $this->request->post('posts') : array(); + $posts = $this->hook->fire('split_posts_start', $posts); if (empty($posts)) { message(__('No posts selected')); } @@ -176,26 +189,30 @@ public function split_posts($tid, $fid, $p = null) $result = DB::for_table('posts') ->where_in('id', $posts_array) - ->where('topic_id', $tid) - ->find_many(); + ->where('topic_id', $tid); + $result = $this->hook->fireDB('split_posts_first_query', $result); + $result = $result->find_many(); if (count($result) != $num_posts_splitted) { message(__('Bad request'), '404'); } + unset($result); + // Verify that the move to forum ID is valid - $where_split_posts = array( + $result['where'] = array( array('fp.post_topics' => 'IS NULL'), array('fp.post_topics' => '1') ); $result = DB::for_table('forums') - ->table_alias('f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', $move_to_forum), 'fp', true) - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_split_posts) - ->where_null('f.redirect_url') - ->find_one(); + ->table_alias('f') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', $move_to_forum), 'fp', true) + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($result['where']) + ->where_null('f.redirect_url'); + $result = $this->hook->fireDB('split_posts_second_query', $result); + $result = $result->find_one(); if (!$result) { message(__('Bad request'), '404'); @@ -220,7 +237,7 @@ public function split_posts($tid, $fid, $p = null) ->find_one(); // Create the new topic - $insert_topic = array( + $topic['insert'] = array( 'poster' => $first_post_data['poster'], 'subject' => $new_subject, 'posted' => $first_post_data['posted'], @@ -228,67 +245,73 @@ public function split_posts($tid, $fid, $p = null) 'forum_id' => $move_to_forum, ); - DB::for_table('topics') + $topic = DB::for_table('topics') ->create() - ->set($insert_topic) - ->save(); + ->set($topic['insert']); + $topic = $this->hook->fireDB('split_posts_topic_query', $topic); + $topic = $topic->save(); $new_tid = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'topics'); // Move the posts to the new topic - DB::for_table('posts')->where_in('id', $posts_array) + $move_posts = DB::for_table('posts')->where_in('id', $posts_array) ->find_one() - ->set('topic_id', $new_tid) - ->save(); + ->set('topic_id', $new_tid); + $move_posts = $this->hook->fireDB('split_posts_move_query', $move_posts); + $move_posts = $move_posts->save(); // Apply every subscription to both topics DB::for_table('topic_subscriptions')->raw_query('INSERT INTO '.$this->feather->forum_settings['db_prefix'].'topic_subscriptions (user_id, topic_id) SELECT user_id, '.$new_tid.' FROM '.$this->feather->forum_settings['db_prefix'].'topic_subscriptions WHERE topic_id=:tid', array('tid' => $tid)); // Get last_post, last_post_id, and last_poster from the topic and update it - $select_last_post = array('id', 'poster', 'posted'); + $last_old_post_data['select'] = array('id', 'poster', 'posted'); $last_old_post_data = DB::for_table('posts') - ->select_many($select_last_post) + ->select_many($last_old_post_data['select']) ->where('topic_id', $tid) - ->order_by_desc('id') - ->find_one(); + ->order_by_desc('id'); + $last_old_post_data = $this->hook->fireDB('split_posts_last_old_post_data_query', $last_old_post_data); + $last_old_post_data = $last_old_post_data->find_one(); // Update the old topic - $update_old_topic = array( + $update_old_topic['insert'] = array( 'last_post' => $last_old_post_data['posted'], 'last_post_id' => $last_old_post_data['id'], 'last_poster' => $last_old_post_data['poster'], ); - DB::for_table('topics') - ->where('id', $tid) - ->find_one() - ->set($update_old_topic) - ->set_expr('num_replies', 'num_replies-'.$num_posts_splitted) - ->save(); + $update_old_topic = DB::for_table('topics') + ->where('id', $tid) + ->find_one() + ->set($update_old_topic['insert']) + ->set_expr('num_replies', 'num_replies-'.$num_posts_splitted); + $update_old_topic = $this->hook->fireDB('split_posts_update_old_topic_query', $update_old_topic); + $update_old_topic = $update_old_topic->save(); // Get last_post, last_post_id, and last_poster from the new topic and update it - $select_new_post = array('id', 'poster', 'posted'); + $last_new_post_data['select'] = array('id', 'poster', 'posted'); $last_new_post_data = DB::for_table('posts') - ->select_many($select_new_post) - ->where('topic_id', $new_tid) - ->order_by_desc('id') - ->find_one(); + ->select_many($last_new_post_data['select']) + ->where('topic_id', $new_tid) + ->order_by_desc('id'); + $last_new_post_data = $this->hook->fireDB('split_posts_last_new_post_query', $last_new_post_data); + $last_new_post_data = $last_new_post_data->find_one(); // Update the new topic - $update_new_topic = array( + $update_new_topic['insert'] = array( 'last_post' => $last_new_post_data['posted'], 'last_post_id' => $last_new_post_data['id'], 'last_poster' => $last_new_post_data['poster'], ); - DB::for_table('topics') + $update_new_topic = DB::for_table('topics') ->where('id', $new_tid) ->find_one() - ->set($update_new_topic) - ->set_expr('num_replies', 'num_replies-'.$num_posts_splitted-1) - ->save(); + ->set($update_new_topic['insert']) + ->set_expr('num_replies', 'num_replies-'.$num_posts_splitted-1); + $update_new_topic = $this->hook->fireDB('split_posts_update_new_topic_query', $update_new_topic); + $update_new_topic = $update_new_topic->save(); update_forum($fid); update_forum($move_to_forum); @@ -296,6 +319,8 @@ public function split_posts($tid, $fid, $p = null) redirect(get_link('topic/'.$new_tid.'/'), __('Split posts redirect')); } + $posts = $this->hook->fire('split_posts', $posts); + return $posts; } @@ -303,23 +328,24 @@ public function get_forum_list_split($id) { $output = ''; - $select_get_forum_list_split = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name'); - $where_get_forum_list_split = array( + $result['select'] = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name'); + $result['where'] = array( array('fp.post_topics' => 'IS NULL'), array('fp.post_topics' => '1') ); $order_by_get_forum_list_split = array('c.disp_position', 'c.id', 'f.disp_position'); $result = DB::for_table('categories') - ->table_alias('c') - ->select_many($select_get_forum_list_split) - ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_forum_list_split) - ->where_null('f.redirect_url') - ->order_by_many($order_by_get_forum_list_split) - ->find_result_set(); + ->table_alias('c') + ->select_many($result['select']) + ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($result['where']) + ->where_null('f.redirect_url') + ->order_by_many($order_by_get_forum_list_split); + $result = $this->hook->fireDB('get_forum_list_split_query', $result); + $result = $result->find_result_set(); $cur_category = 0; @@ -338,6 +364,8 @@ public function get_forum_list_split($id) $output .= "\t\t\t\t\t\t\t\t".''."\n"; } + $output = $this->hook->fire('get_forum_list_split', $output); + return $output; } @@ -353,15 +381,16 @@ public function get_forum_list_move($id) $order_by_get_forum_list_move = array('c.disp_position', 'c.id', 'f.disp_position'); $result = DB::for_table('categories') - ->table_alias('c') - ->select_many($select_get_forum_list_move) - ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_forum_list_move) - ->where_null('f.redirect_url') - ->order_by_many($order_by_get_forum_list_move) - ->find_result_set(); + ->table_alias('c') + ->select_many($select_get_forum_list_move) + ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($where_get_forum_list_move) + ->where_null('f.redirect_url') + ->order_by_many($order_by_get_forum_list_move); + $result = $this->hook->fireDB('get_forum_list_move_query', $result); + $result = $result->find_result_set(); $cur_category = 0; @@ -382,6 +411,8 @@ public function get_forum_list_move($id) } } + $output = $this->hook->fire('get_forum_list_move', $output); + return $output; } @@ -389,6 +420,8 @@ public function display_posts_view($tid, $start_from) { global $pd; + $this->hook->fire('display_posts_view_start'); + $post_data = array(); require FEATHER_ROOT.'include/parser.php'; @@ -400,24 +433,26 @@ public function display_posts_view($tid, $start_from) ->where('topic_id', $tid) ->order_by('id') ->limit($this->user->disp_posts) - ->offset($start_from) - ->find_many(); + ->offset($start_from); + $find_ids = $this->hook->fireDB('display_posts_view_find_ids', $find_ids); + $find_ids = $find_ids->find_many(); foreach ($find_ids as $id) { $post_ids[] = $id['id']; } // Retrieve the posts (and their respective poster) - $select_display_posts_view = array('u.title', 'u.num_posts', 'g.g_id', 'g.g_user_title', 'p.id', 'p.poster', 'p.poster_id', 'p.message', 'p.hide_smilies', 'p.posted', 'p.edited', 'p.edited_by'); + $result['select'] = array('u.title', 'u.num_posts', 'g.g_id', 'g.g_user_title', 'p.id', 'p.poster', 'p.poster_id', 'p.message', 'p.hide_smilies', 'p.posted', 'p.edited', 'p.edited_by'); $result = DB::for_table('posts') - ->table_alias('p') - ->select_many($select_display_posts_view) - ->inner_join('users', array('u.id', '=', 'p.poster_id'), 'u') - ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where_in('p.id', $post_ids) - ->order_by('p.id') - ->find_many(); + ->table_alias('p') + ->select_many($result['select']) + ->inner_join('users', array('u.id', '=', 'p.poster_id'), 'u') + ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') + ->where_in('p.id', $post_ids) + ->order_by('p.id'); + $result = $this->hook->fireDB('display_posts_view_query', $result); + $result = $result->find_many(); foreach($result as $cur_post) { $post_count++; @@ -450,6 +485,8 @@ public function display_posts_view($tid, $start_from) $post_data[] = $cur_post; } + $post_data = $this->hook->fire('display_posts_view', $post_data); + return $post_data; } @@ -545,7 +582,6 @@ public function move_topics_to($fid, $tfid = null, $param = null) public function check_move_possible() { - $select_check_move_possible = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name'); $where_check_move_possible = array( array('fp.post_topics' => 'IS NULL'), @@ -571,7 +607,6 @@ public function check_move_possible() public function merge_topics($fid) { - if (@preg_match('%[^0-9,]%', $this->request->post('topics'))) { message(__('Bad request'), '404'); } @@ -681,8 +716,6 @@ public function merge_topics($fid) public function delete_topics($topics, $fid) { - - if (@preg_match('%[^0-9,]%', $topics)) { message(__('Bad request'), '404'); } @@ -755,8 +788,6 @@ public function delete_topics($topics, $fid) public function get_forum_info($fid) { - - $select_get_forum_info = array('f.forum_name', 'f.redirect_url', 'f.num_topics', 'f.sort_by'); $where_get_forum_info = array( array('fp.read_forum' => 'IS NULL'), @@ -944,8 +975,6 @@ public function close_multiple_topics($action, $topics, $fid) public function get_subject_tid($id) { - - $subject = DB::for_table('topics') ->where('id', $id) ->find_one_col('subject'); From d430b5540cb4b8a2f0c17e939c1be942cdd5198b Mon Sep 17 00:00:00 2001 From: beaver Date: Thu, 20 Aug 2015 16:25:26 +0200 Subject: [PATCH 115/353] Use private header attribute instead of 'FEATHER_ACTIVE_PAGE' constant --- Slim/Extras/Middleware/FeatherBBAuth.php | 4 +- controller/admin/bans.php | 19 ++----- controller/admin/categories.php | 4 +- controller/admin/censoring.php | 6 +- controller/admin/forums.php | 12 +--- controller/admin/groups.php | 18 ++---- controller/admin/index.php | 6 +- controller/admin/maintenance.php | 10 +--- controller/admin/options.php | 6 +- controller/admin/parser.php | 8 +-- controller/admin/permissions.php | 6 +- controller/admin/plugins.php | 6 +- controller/admin/reports.php | 6 +- controller/admin/statistics.php | 6 +- controller/admin/users.php | 28 +++------- controller/delete.php | 6 +- controller/edit.php | 6 +- controller/header.php | 26 ++++++--- controller/help.php | 6 +- controller/index.php | 10 ++-- controller/login.php | 10 +--- controller/misc.php | 14 ++--- controller/moderate.php | 40 ++++---------- controller/post.php | 6 +- controller/profile.php | 70 ++++++++---------------- controller/register.php | 14 +---- controller/search.php | 10 +--- controller/userlist.php | 6 +- controller/viewforum.php | 6 +- controller/viewtopic.php | 4 +- include/functions.php | 4 -- style/FeatherBB/view/header.php | 2 +- view/header.php | 2 +- 33 files changed, 126 insertions(+), 261 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php index 017ef619..8546c0e8 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -198,13 +198,11 @@ public function maintenance_message() $page_title = array(feather_escape($this->app->forum_settings['o_board_title']), __('Maintenance')); - define('FEATHER_ACTIVE_PAGE', 'index'); - $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? $this->app->forum_env['FEATHER_ROOT'].'style/'.$this->app->user->style.'/view' : $this->app->forum_env['FEATHER_ROOT'].'view'); $header = new \controller\header(); - $header->setTitle($page_title)->display(); + $header->setTitle($page_title)->setActivePage('index')->display(); $this->app->render('message.php', array( 'message' => $message, diff --git a/controller/admin/bans.php b/controller/admin/bans.php index 4d8af8a5..3835e13b 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { define('FEATHER_ADMIN_CONSOLE', 1); @@ -52,9 +52,8 @@ public function display() $paging_links = '' . __('Pages') . ' ' . paginate_old($num_pages, $p, '?find_ban=&' . implode('&', $ban_info['query_str'])); $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans'), __('Results head')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->display(); + + $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->display(); $ban_data = $this->model->find_ban($start_from); @@ -69,9 +68,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); $focus_element = array('bans', 'new_ban_user'); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); generate_admin_menu('bans'); @@ -95,9 +92,7 @@ public function add($id = null) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); $focus_element = array('bans2', 'ban_user'); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); generate_admin_menu('bans'); @@ -134,9 +129,7 @@ public function edit($id) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); $focus_element = array('bans2', 'ban_user'); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); generate_admin_menu('bans'); diff --git a/controller/admin/categories.php b/controller/admin/categories.php index 242843db..12f90727 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -110,9 +110,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Categories')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('categories'); diff --git a/controller/admin/censoring.php b/controller/admin/censoring.php index 3764e393..ea6c05b0 100644 --- a/controller/admin/censoring.php +++ b/controller/admin/censoring.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if ($this->user->g_id != FEATHER_ADMIN) { @@ -56,9 +56,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Censoring')); $focus_element = array('censoring', 'new_search_for'); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); generate_admin_menu('censoring'); diff --git a/controller/admin/forums.php b/controller/admin/forums.php index 38577a3f..f2fde95e 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -139,9 +139,7 @@ public function edit_forum($forum_id) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('forums'); @@ -181,9 +179,7 @@ public function delete_forum($forum_id) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('forums'); @@ -229,9 +225,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('forums'); diff --git a/controller/admin/groups.php b/controller/admin/groups.php index ec69692b..c10ed976 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if ($this->user->g_id != FEATHER_ADMIN) { @@ -47,9 +47,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('groups'); @@ -92,9 +90,7 @@ public function delete($id) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('groups'); @@ -110,9 +106,7 @@ public function delete($id) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('groups'); @@ -146,9 +140,7 @@ public function addedit($id = '') $required_fields = array('req_title' => __('Group title label')); $focus_element = array('groups2', 'req_title'); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); generate_admin_menu('groups'); diff --git a/controller/admin/index.php b/controller/admin/index.php index 5996a35f..757b520a 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -43,7 +43,7 @@ public function remove_install_folder($directory) return $deleted; } - + public function display($action = null) { if (!$this->user->is_admmod) { @@ -84,9 +84,7 @@ public function display($action = null) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Index')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('index'); diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index f18def31..5d5e178e 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if ($this->user->g_id != FEATHER_ADMIN) { @@ -66,9 +66,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Prune')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('maintenance'); @@ -88,9 +86,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Maintenance')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('maintenance'); diff --git a/controller/admin/options.php b/controller/admin/options.php index 05a06bcc..739c1507 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if ($this->user->g_id != FEATHER_ADMIN) { @@ -44,9 +44,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Options')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('options'); diff --git a/controller/admin/parser.php b/controller/admin/parser.php index 0a3eee9e..feb4cb65 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { global $lang_admin_parser; @@ -61,7 +61,7 @@ public function display() $count = count($bbcd); if ($this->request->post('form_sent')) { - + // Upload new smiley image to img/smilies if ($this->request->post('upload') && isset($_FILES['new_smiley']) && isset($_FILES['new_smiley']['error'])) { @@ -214,9 +214,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Parser')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('parser'); diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index 27cd6b63..03188c1e 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if (!$this->user->is_admmod) { @@ -45,9 +45,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('permissions'); diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index 32d2395c..7aefa1a2 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -28,7 +28,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if (!$this->user->is_admmod) { @@ -61,9 +61,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), str_replace('_', ' ', substr($plugin, strpos($plugin, '_') + 1, -4))); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); // Attempt to load the plugin. We don't use @ here to suppress error messages, // because if we did and a parse error occurred in the plugin, we would only diff --git a/controller/admin/reports.php b/controller/admin/reports.php index 80d956f1..b84271cc 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if (!$this->user->is_admmod) { @@ -45,9 +45,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Reports')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('reports'); diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 27c9d46b..5aed0c15 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if (!$this->user->is_admmod) { @@ -40,9 +40,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Server statistics')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->display(); generate_admin_menu('index'); diff --git a/controller/admin/users.php b/controller/admin/users.php index 2af46780..c0d0fba7 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -48,9 +48,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Move users')); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->display(); generate_admin_menu('users'); @@ -73,9 +71,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Delete users')); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->display(); generate_admin_menu('users'); @@ -99,9 +95,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); $focus_element = array('bans2', 'ban_message'); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->setFocusElement($focus_element)->display(); generate_admin_menu('users'); @@ -139,9 +133,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')); $page_head = array('js' => ''); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); $this->feather->render('admin/users/find_users.php', array( 'search' => $search, @@ -160,9 +152,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users')); $focus_element = array('find_user', 'form[username]'); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); generate_admin_menu('users'); @@ -197,9 +187,7 @@ public function ipstats($id) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->display(); $this->feather->render('admin/users/search_ip.php', array( 'start_from' => $start_from, @@ -237,9 +225,7 @@ public function showusers($ip) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')); - define('FEATHER_ACTIVE_PAGE', 'admin'); - - $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->display(); $this->feather->render('admin/users/show_users.php', array( 'start_from' => $start_from, diff --git a/controller/delete.php b/controller/delete.php index 1c0848b4..e6dc453d 100644 --- a/controller/delete.php +++ b/controller/delete.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function deletepost($id) { global $pd; @@ -72,9 +72,7 @@ public function deletepost($id) $page_title = array(feather_escape($this->config['o_board_title']), __('Delete post')); - define('FEATHER_ACTIVE_PAGE', 'delete'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('delete')->display(); require FEATHER_ROOT.'include/parser.php'; $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); diff --git a/controller/edit.php b/controller/edit.php index 2ac8b24d..ee318576 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -31,7 +31,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function editpost($id) { if ($this->user->g_read_board == '0') { @@ -87,9 +87,7 @@ public function editpost($id) $required_fields = array('req_subject' => __('Subject'), 'req_message' => __('Message')); $focus_element = array('edit', 'req_message'); - define('FEATHER_ACTIVE_PAGE', 'edit'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('edit')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); if ($this->request->post('preview')) { require_once FEATHER_ROOT.'include/parser.php'; diff --git a/controller/header.php b/controller/header.php index edcbcb50..2016280e 100644 --- a/controller/header.php +++ b/controller/header.php @@ -33,6 +33,8 @@ public function __construct() private $page_head; + private $active_page; + public function setTitle($title) { $this->title = $title; @@ -75,6 +77,13 @@ public function setPageHead($page_head) return $this; } + public function setActivePage($active_page) + { + $this->active_page = $active_page; + + return $this; + } + public function display() { if (!defined('FEATHER_HEADER')) { @@ -104,6 +113,7 @@ public function display() 'feather_config' => $this->config, '_SERVER' => $_SERVER, 'page_head' => $this->page_head, + 'active_page' => $this->active_page, 'paging_links' => $this->paging_links, 'required_fields' => $this->required_fields, 'feather' => $this->feather, @@ -119,28 +129,28 @@ private function getNavlinks() $links = array(); // Index should always be displayed - $links[] = ''; + $links[] = ''; if ($this->user->g_read_board == '1' && $this->user->g_view_users == '1') { - $links[] = ''; + $links[] = ''; } if ($this->config['o_rules'] == '1' && (!$this->user->is_guest || $this->user->g_read_board == '1' || $this->config['o_regs_allow'] == '1')) { - $links[] = ''; + $links[] = ''; } if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $links[] = ''; + $links[] = ''; } if ($this->user->is_guest) { - $links[] = ''; - $links[] = ''; + $links[] = ''; + $links[] = ''; } else { - $links[] = ''; + $links[] = ''; if ($this->user->is_admmod) { - $links[] = ''; + $links[] = ''; } $links[] = ''; diff --git a/controller/help.php b/controller/help.php index 3add1eb0..36f44c4e 100644 --- a/controller/help.php +++ b/controller/help.php @@ -27,7 +27,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if ($this->user->g_read_board == '0') { @@ -36,9 +36,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Help')); - define('FEATHER_ACTIVE_PAGE', 'help'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('help')->display(); $this->feather->render('help.php'); diff --git a/controller/index.php b/controller/index.php index b94aed63..f4cb80c5 100644 --- a/controller/index.php +++ b/controller/index.php @@ -23,12 +23,12 @@ public function __construct() $this->model = new \model\index(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/index.mo'); } - + public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if ($this->user->g_read_board == '0') { @@ -38,9 +38,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title'])); define('FEATHER_ALLOW_INDEX', 1); - define('FEATHER_ACTIVE_PAGE', 'index'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('index')->display(); $this->feather->render('index.php', array( 'index_data' => $this->model->print_categories_forums(), @@ -51,7 +49,7 @@ public function display() 'cur_cat' => 0, ) ); - + $this->footer->display(); } } diff --git a/controller/login.php b/controller/login.php index 277e6378..102b7b29 100644 --- a/controller/login.php +++ b/controller/login.php @@ -28,7 +28,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if (!$this->user->is_guest) { @@ -43,9 +43,7 @@ public function display() $required_fields = array('req_username' => __('Username'), 'req_password' => __('Password')); $focus_element = array('login', 'req_username'); - define('FEATHER_ACTIVE_PAGE', 'login'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('login')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('login/form.php', array( 'redirect_url' => $redirect_url, @@ -89,9 +87,7 @@ public function forget() $required_fields = array('req_email' => __('Email')); $focus_element = array('request_pass', 'req_email'); - define('FEATHER_ACTIVE_PAGE', 'login'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('login')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('login/password_forgotten.php', array( 'errors' => $errors, diff --git a/controller/misc.php b/controller/misc.php index be6c2e2e..afea0d11 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function rules() { if ($this->config['o_rules'] == '0' || ($this->user->is_guest && $this->user->g_read_board == '0' && $this->config['o_regs_allow'] == '0')) { @@ -38,9 +38,7 @@ public function rules() $page_title = array(feather_escape($this->config['o_board_title']), __('Forum rules')); - $this->header->setTitle($page_title)->display(); - - define('FEATHER_ACTIVE_PAGE', 'rules'); + $this->header->setTitle($page_title)->setActivePage('rules')->display(); $this->feather->render('misc/rules.php', array( 'feather_config' => $this->config, @@ -138,9 +136,7 @@ public function email($id) $required_fields = array('req_subject' => __('Email subject'), 'req_message' => __('Email message')); $focus_element = array('email', 'req_subject'); - define('FEATHER_ACTIVE_PAGE', 'email'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('email')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('misc/email.php', array( 'id' => $id, @@ -172,9 +168,7 @@ public function report($id) $required_fields = array('req_reason' => __('Reason')); $focus_element = array('report', 'req_reason'); - define('FEATHER_ACTIVE_PAGE', 'report'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('report')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('misc/report.php', array( 'id' => $id, diff --git a/controller/moderate.php b/controller/moderate.php index b1e7a889..80d907af 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -31,7 +31,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function gethostpost($pid) { if ($this->user->g_read_board == '0') { @@ -107,9 +107,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->setPage($p)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->display(); $this->feather->render('moderate/move_topics.php', array( 'action' => 'multi', @@ -125,7 +123,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // Stick a topic if ($action == 'stick') { $this->model->stick_topic($id, $fid); - + redirect(get_link('topic/'.$id.'/'), __('Stick topic redirect')); } @@ -167,9 +165,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->setPage($p)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->display(); $this->feather->render('moderate/move_topics.php', array( 'action' => 'single', @@ -191,9 +187,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->setPage($p)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->display(); $this->feather->render('moderate/delete_posts.php', array( 'id' => $id, @@ -209,9 +203,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); $focus_element = array('subject','new_subject'); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->setPage($p)->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->setFocusElement($focus_element)->display(); $this->feather->render('moderate/split_posts.php', array( 'id' => $id, @@ -241,9 +233,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_topic['forum_name']), feather_escape($cur_topic['subject'])); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->setPagingLinks($paging_links)->display(); $this->feather->render('moderate/posts_view.php', array( 'cur_topic' => $cur_topic, @@ -299,9 +289,7 @@ public function display($id, $name = null, $page = null) $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->setPagingLinks($paging_links)->display(); $this->feather->render('moderate/moderator_forum.php', array( 'id' => $id, @@ -350,9 +338,7 @@ public function dealposts($fid) $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->display(); $this->feather->render('moderate/move_topics.php', array( 'action' => 'multi', @@ -378,9 +364,7 @@ public function dealposts($fid) $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->display(); $this->feather->render('moderate/merge_topics.php', array( 'id' => $fid, @@ -404,9 +388,7 @@ public function dealposts($fid) $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - define('FEATHER_ACTIVE_PAGE', 'moderate'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('moderate')->display(); $this->feather->render('moderate/delete_topics.php', array( 'id' => $fid, diff --git a/controller/post.php b/controller/post.php index b5318867..a4778ec9 100644 --- a/controller/post.php +++ b/controller/post.php @@ -40,8 +40,6 @@ public function newreply($fid = null, $tid = null, $qid = null) public function newpost($fid = null, $tid = null, $qid = null) { - global $lang_antispam_questions, $lang_antispam; - // Antispam feature require FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); @@ -185,9 +183,7 @@ public function newpost($fid = null, $tid = null, $qid = null) $focus_element[] = 'req_username'; } - define('FEATHER_ACTIVE_PAGE', 'post'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('post')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); // Get the current state of checkboxes $checkboxes = $this->model->get_checkboxes($fid, $is_admmod, $is_subscribed); diff --git a/controller/profile.php b/controller/profile.php index 68895ab9..32ba9312 100644 --- a/controller/profile.php +++ b/controller/profile.php @@ -30,7 +30,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display($id, $section = null) { global $pd, $forum_time_formats, $forum_date_formats; @@ -67,18 +67,16 @@ public function display($id, $section = null) $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Confirm delete user')); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->display(); $this->feather->render('profile/delete_user.php', array( 'username' => $this->model->get_username($id), 'id' => $id, ) ); - + $this->footer->display(); - + } elseif ($this->request->post('form_sent')) { // Fetch the user group of the user we are editing @@ -118,9 +116,7 @@ public function display($id, $section = null) $page_title = array(feather_escape($this->config['o_board_title']), sprintf(__('Users profile'), feather_escape($user['username']))); define('FEATHER_ALLOW_INDEX', 1); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->display(); $this->feather->render('profile/view_profile.php', array( 'user_info' => $user_info, @@ -135,9 +131,7 @@ public function display($id, $section = null) $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section essentials')); $required_fields = array('req_username' => __('Username'), 'req_email' => __('Email')); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->setRequiredFields($required_fields)->display(); $this->model->generate_profile_menu('essentials', $id); @@ -157,9 +151,7 @@ public function display($id, $section = null) $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section personal')); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->display(); $this->model->generate_profile_menu('personal', $id); @@ -168,13 +160,11 @@ public function display($id, $section = null) 'feather' => $this->feather, ) ); - + } elseif ($section == 'messaging') { $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section messaging')); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->display(); $this->model->generate_profile_menu('messaging', $id); @@ -182,7 +172,7 @@ public function display($id, $section = null) 'user' => $user, ) ); - + } elseif ($section == 'personality') { if ($this->config['o_avatars'] == '0' && $this->config['o_signatures'] == '0') { message(__('Bad request'), '404'); @@ -205,9 +195,7 @@ public function display($id, $section = null) $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section personality')); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->display(); $this->model->generate_profile_menu('personality', $id); @@ -219,13 +207,11 @@ public function display($id, $section = null) 'feather' => $this->feather, ) ); - + } elseif ($section == 'display') { $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section display')); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->display(); $this->model->generate_profile_menu('display', $id); @@ -233,13 +219,11 @@ public function display($id, $section = null) 'user' => $user, ) ); - + } elseif ($section == 'privacy') { $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section privacy')); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->display(); $this->model->generate_profile_menu('privacy', $id); @@ -247,7 +231,7 @@ public function display($id, $section = null) 'user' => $user, ) ); - + } elseif ($section == 'admin') { if (!$this->user->is_admmod || ($this->user->g_moderator == '1' && $this->user->g_mod_ban_users == '0')) { message(__('Bad request'), false, '403 Forbidden'); @@ -255,9 +239,7 @@ public function display($id, $section = null) $page_title = array(feather_escape($this->config['o_board_title']), __('Profile'), __('Section admin')); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->display(); $this->model->generate_profile_menu('admin', $id); @@ -268,7 +250,7 @@ public function display($id, $section = null) 'feather' => $this->feather, ) ); - + } else { message(__('Bad request'), '404'); } @@ -299,9 +281,7 @@ public function action($id, $action) $required_fields = array('req_old_password' => __('Old pass'), 'req_new_password1' => __('New pass'), 'req_new_password2' => __('Confirm new pass')); $focus_element = array('change_pass', ((!$this->user->is_admmod) ? 'req_old_password' : 'req_new_password1')); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('profile/change_pass.php', array( 'feather' => $this->feather, @@ -317,9 +297,7 @@ public function action($id, $action) $required_fields = array('req_new_email' => __('New email'), 'req_password' => __('Password')); $focus_element = array('change_email', 'req_new_email'); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('profile/change_mail.php', array( 'id' => $id, @@ -344,9 +322,7 @@ public function action($id, $action) $required_fields = array('req_file' => __('File')); $focus_element = array('upload_avatar', 'req_file'); - define('FEATHER_ACTIVE_PAGE', 'profile'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('profile/upload_avatar.php', array( 'feather_config' => $this->config, @@ -355,13 +331,13 @@ public function action($id, $action) ); $this->footer->display(); - + } elseif ($action == 'delete_avatar') { if ($this->user->id != $id && !$this->user->is_admmod) { message(__('No permission'), '403'); } - + $this->model->delete_avatar($id); diff --git a/controller/register.php b/controller/register.php index 691635c4..6ff7e16c 100644 --- a/controller/register.php +++ b/controller/register.php @@ -30,11 +30,9 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { - global $lang_antispam_questions, $lang_antispam; - if (!$this->user->is_guest) { header('Location: '.get_base_url()); exit; @@ -54,8 +52,6 @@ public function display() $required_fields = array('req_user' => __('Username'), 'req_password1' => __('Password'), 'req_password2' => __('Confirm pass'), 'req_email1' => __('Email'), 'req_email2' => __('Email').' 2', 'captcha' => __('Robot title')); $focus_element = array('register', 'req_user'); - define('FEATHER_ACTIVE_PAGE', 'register'); - $user['timezone'] = isset($user['timezone']) ? $user['timezone'] : $this->config['o_default_timezone']; $user['dst'] = isset($user['dst']) ? $user['dst'] : $this->config['o_default_dst']; $user['email_setting'] = isset($user['email_setting']) ? $user['email_setting'] : $this->config['o_default_email_setting']; @@ -70,13 +66,11 @@ public function display() } } - $this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('register')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); $this->feather->render('register/form.php', array( 'errors' => $user['errors'], 'feather_config' => $this->config, - 'lang_antispam' => $lang_antispam, - 'lang_antispam_questions' => $lang_antispam_questions, 'index_questions' => $index_questions, 'feather' => $this->feather, 'languages' => forum_list_langs(), @@ -114,9 +108,7 @@ public function rules() $page_title = array(feather_escape($this->config['o_board_title']), __('Register'), __('Forum rules')); - define('FEATHER_ACTIVE_PAGE', 'register'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('register')->display(); $this->feather->render('register/rules.php', array( 'feather_config' => $this->config, diff --git a/controller/search.php b/controller/search.php index 24672375..186a25ec 100644 --- a/controller/search.php +++ b/controller/search.php @@ -30,7 +30,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { global $pd; @@ -51,9 +51,7 @@ public function display() if (isset($search['is_result'])) { $page_title = array(feather_escape($this->config['o_board_title']), __('Search results')); - define('FEATHER_ACTIVE_PAGE', 'search'); - - $this->header->setTitle($page_title)->display(); + $this->header->setTitle($page_title)->setActivePage('search')->display(); $this->feather->render('search/header.php', array( 'search' => $search, @@ -80,9 +78,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Search')); $focus_element = array('search', 'keywords'); - define('FEATHER_ACTIVE_PAGE', 'search'); - - $this->header->setTitle($page_title)->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('search')->setFocusElement($focus_element)->display(); $this->feather->render('search/form.php', array( 'feather_config' => $this->config, diff --git a/controller/userlist.php b/controller/userlist.php index a22d849b..649f1658 100644 --- a/controller/userlist.php +++ b/controller/userlist.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if ($this->user->g_read_board == '0') { @@ -64,9 +64,7 @@ public function display() define('FEATHER_ALLOW_INDEX', 1); - define('FEATHER_ACTIVE_PAGE', 'userlist'); - - $this->header->setTitle($page_title)->setPage($p)->setFocusElement($focus_element)->setPagingLinks($paging_links)->display(); + $this->header->setTitle($page_title)->setActivePage('userlist')->setPage($p)->setFocusElement($focus_element)->setPagingLinks($paging_links)->display(); $this->feather->render('userlist.php', array( 'feather' => $this->feather, diff --git a/controller/viewforum.php b/controller/viewforum.php index 5b9d207a..1e9bf0c1 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -28,7 +28,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display($id, $name = null, $page = null) { if ($this->user->g_read_board == '0') { @@ -77,11 +77,9 @@ public function display($id, $name = null, $page = null) $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])); define('FEATHER_ALLOW_INDEX', 1); - define('FEATHER_ACTIVE_PAGE', 'viewforum'); - $page_head = $this->model->get_page_head($id, $num_pages, $p, $url_forum); - $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); + $this->header->setTitle($page_title)->setActivePage('viewforum')->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); $this->feather->render('viewforum.php', array( 'id' => $id, diff --git a/controller/viewtopic.php b/controller/viewtopic.php index 839ccea0..292f0857 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -92,9 +92,7 @@ public function display($id = null, $name = null, $page = null, $pid = null) $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_topic['forum_name']), feather_escape($cur_topic['subject'])); define('FEATHER_ALLOW_INDEX', 1); - define('FEATHER_ACTIVE_PAGE', 'viewtopic'); - - $this->header->setTitle($page_title)->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); + $this->header->setTitle($page_title)->setActivePage('viewtopic')->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); require FEATHER_ROOT.'include/parser.php'; diff --git a/include/functions.php b/include/functions.php index 97b8f951..4cb5d874 100644 --- a/include/functions.php +++ b/include/functions.php @@ -635,10 +635,6 @@ function message($msg, $http_status = null, $no_back_link = false, $dontStop = f if (!defined('FEATHER_HEADER')) { $page_title = array(feather_escape($feather->config['o_board_title']), __('Info')); - if (!defined('FEATHER_ACTIVE_PAGE')) { - define('FEATHER_ACTIVE_PAGE', 'index'); - } - require_once FEATHER_ROOT.'controller/header.php'; $header = new \controller\header(); diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php index 15bad5d7..fa1028cb 100644 --- a/style/FeatherBB/view/header.php +++ b/style/FeatherBB/view/header.php @@ -75,7 +75,7 @@ function process_form(the_form) ?> -> +>
          diff --git a/view/header.php b/view/header.php index 41c719af..e00002ad 100644 --- a/view/header.php +++ b/view/header.php @@ -75,7 +75,7 @@ function process_form(the_form) > -
          +
          From d96aa7701805b5bda738404cae3026af7eefe6fd Mon Sep 17 00:00:00 2001 From: capkokoon Date: Thu, 20 Aug 2015 16:56:50 +0200 Subject: [PATCH 116/353] Fix typo --- include/classes/cache.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/classes/cache.class.php b/include/classes/cache.class.php index c1f7c701..321e98a7 100755 --- a/include/classes/cache.class.php +++ b/include/classes/cache.class.php @@ -76,7 +76,7 @@ public function isCached($key) * * @param string $key * @param mixed $data - * @param integer [optional] $expiration Seconds to expire the cache + * @param integer [optional] $expiration seconds to expire the cache * @return object */ public function store($key, $data, $expiration = 0) From 7278d8b84ce1d7f93e35968c8e6feba60feff249 Mon Sep 17 00:00:00 2001 From: beaver Date: Fri, 21 Aug 2015 11:30:08 +0200 Subject: [PATCH 117/353] Remove ALLOW_INDEX and ADMIN_CONSOLE constants --- controller/admin/bans.php | 14 ++--- controller/admin/categories.php | 4 +- controller/admin/censoring.php | 4 +- controller/admin/forums.php | 12 +--- controller/admin/groups.php | 12 +--- controller/admin/index.php | 4 +- controller/admin/maintenance.php | 6 +- controller/admin/options.php | 4 +- controller/admin/parser.php | 4 +- controller/admin/permissions.php | 4 +- controller/admin/plugins.php | 4 +- controller/admin/reports.php | 4 +- controller/admin/statistics.php | 4 +- controller/admin/users.php | 7 +-- controller/header.php | 37 ++++++++++++ controller/index.php | 3 +- controller/profile.php | 3 +- controller/userlist.php | 4 +- controller/viewforum.php | 3 +- controller/viewtopic.php | 3 +- style/FeatherBB/view/header.php | 98 +++++++++++++++----------------- view/header.php | 12 +--- 22 files changed, 111 insertions(+), 139 deletions(-) diff --git a/controller/admin/bans.php b/controller/admin/bans.php index 3835e13b..0a3dd9d2 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -32,8 +32,6 @@ public function __autoload($class_name) public function display() { - define('FEATHER_ADMIN_CONSOLE', 1); - if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { message(__('No permission'), '403'); } @@ -53,7 +51,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans'), __('Results head')); - $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->enableAdminConsole()->display(); $ban_data = $this->model->find_ban($start_from); @@ -68,7 +66,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); $focus_element = array('bans', 'new_ban_user'); - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); generate_admin_menu('bans'); @@ -79,8 +77,6 @@ public function display() public function add($id = null) { - define('FEATHER_ADMIN_CONSOLE', 1); - if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { message(__('No permission'), '403'); } @@ -92,7 +88,7 @@ public function add($id = null) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); $focus_element = array('bans2', 'ban_user'); - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); generate_admin_menu('bans'); @@ -116,8 +112,6 @@ public function delete($id) public function edit($id) { - define('FEATHER_ADMIN_CONSOLE', 1); - if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { message(__('No permission'), '403'); } @@ -129,7 +123,7 @@ public function edit($id) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); $focus_element = array('bans2', 'ban_user'); - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); generate_admin_menu('bans'); diff --git a/controller/admin/categories.php b/controller/admin/categories.php index 12f90727..0e724de2 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -106,11 +106,9 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Categories')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('categories'); diff --git a/controller/admin/censoring.php b/controller/admin/censoring.php index ea6c05b0..6406b9eb 100644 --- a/controller/admin/censoring.php +++ b/controller/admin/censoring.php @@ -36,8 +36,6 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - // Add a censor word if ($this->request->post('add_word')) { $this->model->add_word(); @@ -56,7 +54,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Censoring')); $focus_element = array('censoring', 'new_search_for'); - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); generate_admin_menu('censoring'); diff --git a/controller/admin/forums.php b/controller/admin/forums.php index f2fde95e..4581263e 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -135,11 +135,9 @@ public function edit_forum($forum_id) } else { - define('FEATHER_ADMIN_CONSOLE', 1); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('forums'); @@ -162,8 +160,6 @@ public function delete_forum($forum_id) message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - if($this->request->isPost()) { $this->model->delete_forum($forum_id); // Regenerate the quick jump cache @@ -179,7 +175,7 @@ public function delete_forum($forum_id) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('forums'); @@ -217,15 +213,13 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - if ($this->request->post('update_positions')) { $this->edit_positions(); } $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('forums'); diff --git a/controller/admin/groups.php b/controller/admin/groups.php index c10ed976..dc2a7826 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -36,8 +36,6 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - $groups = $this->model->fetch_groups(); // Set default group @@ -47,7 +45,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('groups'); @@ -67,8 +65,6 @@ public function delete($id) message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - if ($id < 5) { message(__('Bad request'), '404'); } @@ -106,7 +102,7 @@ public function delete($id) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('groups'); @@ -125,8 +121,6 @@ public function addedit($id = '') message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - $groups = $this->model->fetch_groups(); // Add/edit a group (stage 2) @@ -140,7 +134,7 @@ public function addedit($id = '') $required_fields = array('req_title' => __('Group title label')); $focus_element = array('groups2', 'req_title'); - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->setRequiredFields($required_fields)->enableAdminConsole()->display(); generate_admin_menu('groups'); diff --git a/controller/admin/index.php b/controller/admin/index.php index 757b520a..e48cad10 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -50,8 +50,6 @@ public function display($action = null) message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - // Check for upgrade if ($action == 'check_upgrade') { if (!ini_get('allow_url_fopen')) { @@ -84,7 +82,7 @@ public function display($action = null) $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Index')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('index'); diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index 5d5e178e..d58d7e52 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -36,8 +36,6 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - $action = ''; if ($this->request->post('action')) { $action = $this->request->post('action'); @@ -66,7 +64,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Prune')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('maintenance'); @@ -86,7 +84,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Maintenance')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('maintenance'); diff --git a/controller/admin/options.php b/controller/admin/options.php index 739c1507..230a9dbf 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -36,15 +36,13 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - if ($this->feather->request->isPost()) { $this->model->update_options(); } $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Options')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('options'); diff --git a/controller/admin/parser.php b/controller/admin/parser.php index feb4cb65..e2c42f34 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -41,8 +41,6 @@ public function display() // Legacy require FEATHER_ROOT . 'lang/' . $this->user->language . '/admin/parser.php'; - define('FEATHER_ADMIN_CONSOLE', 1); - // This is where the parser data lives and breathes. $cache_file = FEATHER_ROOT.'cache/cache_parser_data.php'; @@ -214,7 +212,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Parser')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('parser'); diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index 03188c1e..78133649 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -36,8 +36,6 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - // Update permissions if ($this->feather->request->isPost()) { $this->model->update_permissions(); @@ -45,7 +43,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('permissions'); diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index 7aefa1a2..61f72ac7 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -35,8 +35,6 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - // The plugin to load should be supplied via GET $plugin = $this->request->get('plugin') ? $this->request->get('plugin') : ''; if (!preg_match('%^AM?P_(\w*?)\.php$%i', $plugin)) { @@ -61,7 +59,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), str_replace('_', ' ', substr($plugin, strpos($plugin, '_') + 1, -4))); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); // Attempt to load the plugin. We don't use @ here to suppress error messages, // because if we did and a parse error occurred in the plugin, we would only diff --git a/controller/admin/reports.php b/controller/admin/reports.php index b84271cc..3a9ced60 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -36,8 +36,6 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - // Zap a report if ($this->feather->request->isPost()) { $this->model->zap_report(); @@ -45,7 +43,7 @@ public function display() $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Reports')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('reports'); diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 5aed0c15..65dae86d 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -36,11 +36,9 @@ public function display() message(__('No permission'), '403'); } - define('FEATHER_ADMIN_CONSOLE', 1); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Server statistics')); - $this->header->setTitle($page_title)->setActivePage('admin')->display(); + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('index'); diff --git a/controller/admin/users.php b/controller/admin/users.php index c0d0fba7..aecd2f43 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -22,6 +22,7 @@ public function __construct() $this->footer = new \controller\footer(); $this->model = new \model\admin\users(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/users.mo'); + $this->header->enableAdminConsole(); require FEATHER_ROOT . 'include/common_admin.php'; } @@ -32,8 +33,6 @@ public function __autoload($class_name) public function display() { - define('FEATHER_ADMIN_CONSOLE', 1); - if (!$this->user->is_admmod) { message(__('No permission'), '403'); } @@ -167,8 +166,6 @@ public function display() // Show IP statistics for a certain user ID public function ipstats($id) { - define('FEATHER_ADMIN_CONSOLE', 1); - if (!$this->user->is_admmod) { message(__('No permission'), '403'); } @@ -201,8 +198,6 @@ public function ipstats($id) // Show IP statistics for a certain user IP public function showusers($ip) { - define('FEATHER_ADMIN_CONSOLE', 1); - if (!$this->user->is_admmod) { message(__('No permission'), '403'); } diff --git a/controller/header.php b/controller/header.php index 2016280e..01e0d385 100644 --- a/controller/header.php +++ b/controller/header.php @@ -35,6 +35,10 @@ public function __construct() private $active_page; + private $admin_console; + + private $allow_index; + public function setTitle($title) { $this->title = $title; @@ -84,6 +88,20 @@ public function setActivePage($active_page) return $this; } + public function enableAdminConsole() + { + $this->admin_console = true; + + return $this; + } + + public function allowIndex() + { + $this->allow_index = true; + + return $this; + } + public function display() { if (!defined('FEATHER_HEADER')) { @@ -103,6 +121,10 @@ public function display() $navlinks = $this->getNavlinks(); $page_info = $this->getStatus(); + $admin_console = $this->getAdminConsole(); + + // Show the robots meta only if enabled + $allow_index = ($this->allow_index === true) ? '' : ''."\n"; $focus_element = isset($this->focus_element) ? ' onload="document.getElementById(\''.$this->focus_element[0].'\').elements[\''.$this->focus_element[1].'\'].focus();"' : ''; @@ -120,6 +142,8 @@ public function display() 'focus_element' => $focus_element, 'navlinks' => $navlinks, 'page_info' => $page_info, + 'admin_console' => $admin_console, + 'allow_index' => $allow_index, ) ); } @@ -229,4 +253,17 @@ private function getStatus() return $page_info; } + + protected function getAdminConsole() + { + if ($this->admin_console === true) { + if (file_exists(FEATHER_ROOT.'style/'.$this->user->style.'/base_admin.css')) { + return ''."\n"; + } else { + return ''."\n"; + } + } else { + return ''; + } + } } diff --git a/controller/index.php b/controller/index.php index f4cb80c5..a6e0e72e 100644 --- a/controller/index.php +++ b/controller/index.php @@ -36,9 +36,8 @@ public function display() } $page_title = array(feather_escape($this->config['o_board_title'])); - define('FEATHER_ALLOW_INDEX', 1); - $this->header->setTitle($page_title)->setActivePage('index')->display(); + $this->header->setTitle($page_title)->setActivePage('index')->allowIndex()->display(); $this->feather->render('index.php', array( 'index_data' => $this->model->print_categories_forums(), diff --git a/controller/profile.php b/controller/profile.php index 32ba9312..c1b17ee6 100644 --- a/controller/profile.php +++ b/controller/profile.php @@ -114,9 +114,8 @@ public function display($id, $section = null) $user_info = $this->model->parse_user_info($user); $page_title = array(feather_escape($this->config['o_board_title']), sprintf(__('Users profile'), feather_escape($user['username']))); - define('FEATHER_ALLOW_INDEX', 1); - $this->header->setTitle($page_title)->setActivePage('profile')->display(); + $this->header->setTitle($page_title)->setActivePage('profile')->allowIndex()->display(); $this->feather->render('profile/view_profile.php', array( 'user_info' => $user_info, diff --git a/controller/userlist.php b/controller/userlist.php index 649f1658..f03dd841 100644 --- a/controller/userlist.php +++ b/controller/userlist.php @@ -62,9 +62,7 @@ public function display() // Generate paging links $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.$sort_dir); - define('FEATHER_ALLOW_INDEX', 1); - - $this->header->setTitle($page_title)->setActivePage('userlist')->setPage($p)->setFocusElement($focus_element)->setPagingLinks($paging_links)->display(); + $this->header->setTitle($page_title)->setActivePage('userlist')->setPage($p)->setFocusElement($focus_element)->setPagingLinks($paging_links)->allowIndex()->display(); $this->feather->render('userlist.php', array( 'feather' => $this->feather, diff --git a/controller/viewforum.php b/controller/viewforum.php index 1e9bf0c1..1571b04d 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -75,11 +75,10 @@ public function display($id, $name = null, $page = null) $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])); - define('FEATHER_ALLOW_INDEX', 1); $page_head = $this->model->get_page_head($id, $num_pages, $p, $url_forum); - $this->header->setTitle($page_title)->setActivePage('viewforum')->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); + $this->header->setTitle($page_title)->setActivePage('viewforum')->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->allowIndex()->display(); $this->feather->render('viewforum.php', array( 'id' => $id, diff --git a/controller/viewtopic.php b/controller/viewtopic.php index 292f0857..bd6f0087 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -90,9 +90,8 @@ public function display($id = null, $name = null, $page = null, $pid = null) $page_head = $this->model->get_page_head($id, $num_pages, $p, $url_topic); $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_topic['forum_name']), feather_escape($cur_topic['subject'])); - define('FEATHER_ALLOW_INDEX', 1); - $this->header->setTitle($page_title)->setActivePage('viewtopic')->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); + $this->header->setTitle($page_title)->setActivePage('viewtopic')->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->allowIndex()->display(); require FEATHER_ROOT.'include/parser.php'; diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php index fa1028cb..9da121c2 100644 --- a/style/FeatherBB/view/header.php +++ b/style/FeatherBB/view/header.php @@ -11,68 +11,60 @@ - - - - <?php echo generate_page_title($page_title, $p) ?> - - '."\n"; - } + + + +<?php echo generate_page_title($page_title, $p) ?> + +user->style.'/base_admin.css')) { - echo ''."\n"; - } else { - echo ''."\n"; - } - } +echo $allow_index; +echo $admin_console; - if (isset($required_fields)) : - // Output JavaScript to validate form (make sure required fields are filled out) +if (isset($required_fields)) : + // Output JavaScript to validate form (make sure required fields are filled out) - ?> - - + return true; + } + /* ]]> */ + + > diff --git a/view/header.php b/view/header.php index e00002ad..d9fbd687 100644 --- a/view/header.php +++ b/view/header.php @@ -15,17 +15,9 @@ <?php echo generate_page_title($page_title, $p) ?> '."\n"; -} -if (defined('FEATHER_ADMIN_CONSOLE')) { - if (file_exists(FEATHER_ROOT.'style/'.$feather->user->style.'/base_admin.css')) { - echo ''."\n"; - } else { - echo ''."\n"; - } -} +echo $allow_index; +echo $admin_console; if (isset($required_fields)) : // Output JavaScript to validate form (make sure required fields are filled out) From a7ce91a0f0c3887581a4ef4e32a84e6a7f2cd337 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 21 Aug 2015 12:17:29 +0200 Subject: [PATCH 118/353] Start to add hooks --- model/moderate.php | 178 ++++++++++++++++++++++++++------------------- 1 file changed, 103 insertions(+), 75 deletions(-) diff --git a/model/moderate.php b/model/moderate.php index 8bf1ec52..8972dd54 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -492,6 +492,7 @@ public function display_posts_view($tid, $start_from) public function move_topics_to($fid, $tfid = null, $param = null) { + $fid = $this->hook->fire('move_topics_to_start', $fid); if (@preg_match('%[^0-9,]%', $this->request->post('topics'))) { message(__('Bad request'), '404'); @@ -505,9 +506,10 @@ public function move_topics_to($fid, $tfid = null, $param = null) // Verify that the topic IDs are valid $result = DB::for_table('topics') - ->where_in('id', $topics) - ->where('forum_id', $fid) - ->find_many(); + ->where_in('id', $topics) + ->where('forum_id', $fid); + $result = $this->hook->fireDB('move_topics_to_topic_valid', $result); + $result = $result->find_many(); if (count($result) != count($topics)) { message(__('Bad request'), '404'); @@ -515,47 +517,51 @@ public function move_topics_to($fid, $tfid = null, $param = null) // Verify that the move to forum ID is valid - $where_move_topics_to = array( + $authorized['where'] = array( array('fp.post_topics' => 'IS NULL'), array('fp.post_topics' => '1') ); $authorized = DB::for_table('forums') - ->table_alias('f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', $move_to_forum), 'fp', true) - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_move_topics_to) - ->where_null('f.redirect_url') - ->find_one(); + ->table_alias('f') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', $move_to_forum), 'fp', true) + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($authorized['where']) + ->where_null('f.redirect_url'); + $authorized = $this->hook->fireDB('move_topics_to_authorized', $authorized); + $authorized = $authorized->find_one(); if (!$authorized) { message(__('Bad request'), '404'); } // Delete any redirect topics if there are any (only if we moved/copied the topic back to where it was once moved from) - DB::for_table('topics') - ->where('forum_id', $move_to_forum) - ->where_in('moved_to', $topics) - ->delete_many(); + $delete_redirect = DB::for_table('topics') + ->where('forum_id', $move_to_forum) + ->where_in('moved_to', $topics); + $delete_redirect = $this->hook->fireDB('move_topics_to_delete_redirect', $delete_redirect); + $delete_redirect = $delete_redirect->delete_many(); // Move the topic(s) - DB::for_table('topics')->where_in('id', $topics) - ->find_one() - ->set('forum_id', $move_to_forum) - ->save(); + $move_topics = DB::for_table('topics')->where_in('id', $topics) + ->find_one() + ->set('forum_id', $move_to_forum); + $move_topics = $this->hook->fireDB('move_topics_to_query', $move_topics); + $move_topics = $move_topics->save(); // Should we create redirect topics? if ($this->request->post('with_redirect')) { foreach ($topics as $cur_topic) { // Fetch info for the redirect topic - $select_move_topics_to = array('poster', 'subject', 'posted', 'last_post'); + $moved_to['select'] = array('poster', 'subject', 'posted', 'last_post'); - $moved_to = DB::for_table('topics')->select_many($select_move_topics_to) - ->where('id', $cur_topic) - ->find_one(); + $moved_to = DB::for_table('topics')->select_many($moved_to['select']) + ->where('id', $cur_topic); + $moved_to = $this->hook->fireDB('move_topics_to_fetch_redirect', $moved_to); + $moved_to = $moved_to->find_one(); // Create the redirect topic - $insert_move_topics_to = array( + $move_topics_to['insert'] = array( 'poster' => $moved_to['poster'], 'subject' => $moved_to['subject'], 'posted' => $moved_to['posted'], @@ -565,10 +571,11 @@ public function move_topics_to($fid, $tfid = null, $param = null) ); // Insert the report - DB::for_table('topics') - ->create() - ->set($insert_move_topics_to) - ->save(); + $move_topics_to = DB::for_table('topics') + ->create() + ->set($move_topics_to['insert']); + $move_topics_to = $this->hook->fireDB('move_topics_to_redirect', $move_topics_to); + $move_topics_to = $move_topics_to->save(); } } @@ -577,28 +584,32 @@ public function move_topics_to($fid, $tfid = null, $param = null) update_forum($move_to_forum); // Update the forum TO which the topic was moved $redirect_msg = (count($topics) > 1) ? __('Move topics redirect') : __('Move topic redirect'); + $redirect_msg = $this->hook->fire('move_topics_to_redirect_message', $redirect_msg); redirect(get_link('forum/'.$move_to_forum.'/'), $redirect_msg); } public function check_move_possible() { - $select_check_move_possible = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name'); - $where_check_move_possible = array( + $this->hook->fire('check_move_possible_start'); + + $result['select'] = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name'); + $result['where'] = array( array('fp.post_topics' => 'IS NULL'), array('fp.post_topics' => '1') ); - $order_by_check_move_possible = array('c.disp_position', 'c.id', 'f.disp_position'); + $result['order_by'] = array('c.disp_position', 'c.id', 'f.disp_position'); $result = DB::for_table('categories') - ->table_alias('c') - ->select_many($select_check_move_possible) - ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_check_move_possible) - ->where_null('f.redirect_url') - ->order_by_many($order_by_check_move_possible) - ->find_many(); + ->table_alias('c') + ->select_many($result['select']) + ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($result['where']) + ->where_null('f.redirect_url') + ->order_by_many($result['order_by']); + $result = $this->hook->fireDB('check_move_possible'); + $result = $result->find_many(); if (count($result) < 2) { message(__('Nowhere to move')); @@ -607,6 +618,8 @@ public function check_move_possible() public function merge_topics($fid) { + $fid = $this->hook->fire('merge_topics_start', $fid); + if (@preg_match('%[^0-9,]%', $this->request->post('topics'))) { message(__('Bad request'), '404'); } @@ -618,9 +631,10 @@ public function merge_topics($fid) // Verify that the topic IDs are valid (redirect links will point to the merged topic after the merge) $result = DB::for_table('topics') - ->where_in('id', $topics) - ->where('forum_id', $fid) - ->find_many(); + ->where_in('id', $topics) + ->where('forum_id', $fid); + $result = $this->hook->fireDB('merge_topics_topic_ids', $result); + $result = $result->find_many(); if (count($result) != count($topics)) { message(__('Bad request'), '404'); @@ -628,10 +642,11 @@ public function merge_topics($fid) // The topic that we are merging into is the one with the smallest ID $merge_to_tid = DB::for_table('topics') - ->where_in('id', $topics) - ->where('forum_id', $fid) - ->order_by_asc('id') - ->find_one_col('id'); + ->where_in('id', $topics) + ->where('forum_id', $fid) + ->order_by_asc('id') + ->find_one_col('id'); + $merge_to_tid = $this->hook->fire('merge_topics_tid', $merge_to_tid); // Make any redirect topics point to our new, merged topic $query = 'UPDATE '.$this->feather->forum_settings['db_prefix'].'topics SET moved_to='.$merge_to_tid.' WHERE moved_to IN('.implode(',', $topics).')'; @@ -645,69 +660,80 @@ public function merge_topics($fid) DB::for_table('topics')->raw_execute($query); // Merge the posts into the topic - DB::for_table('posts') - ->where_in('topic_id', $topics) - ->update_many('topic_id', $merge_to_tid); + $merge_posts = DB::for_table('posts') + ->where_in('topic_id', $topics); + $merge_posts = $this->hook->fireDB('merge_topics_merge_posts', $merge_posts); + $merge_posts = $merge_posts->update_many('topic_id', $merge_to_tid); // Update any subscriptions $find_ids = DB::for_table('topic_subscriptions')->select('user_id') - ->distinct() - ->where_in('topic_id', $topics) - ->find_many(); + ->distinct() + ->where_in('topic_id', $topics); + $find_ids = $this->hook->fireDB('merge_topics_find_ids', $find_ids); + $find_ids = $find_ids->find_many(); foreach ($find_ids as $id) { $subscribed_users[] = $id['user_id']; } // Delete the subscriptions - DB::for_table('topic_subscriptions') - ->where_in('topic_id', $topics) - ->delete_many(); + $delete_subscriptions = DB::for_table('topic_subscriptions') + ->where_in('topic_id', $topics); + $delete_subscriptions = $this->hook->fireDB('merge_topics_delete_subscriptions', $delete_subscriptions); + $delete_subscriptions = $delete_subscriptions->delete_many(); foreach ($subscribed_users as $cur_user_id) { - $insert_topic_subscription = array( + $subscriptions['insert'] = array( 'topic_id' => $merge_to_tid, 'user_id' => $cur_user_id, ); // Insert the subscription - DB::for_table('topic_subscriptions') - ->create() - ->set($insert_topic_subscription) - ->save(); + $subscriptions = DB::for_table('topic_subscriptions') + ->create() + ->set($subscriptions['insert']); + $subscriptions = $this->hook->fireDB('merge_topics_insert_subscriptions', $subscriptions); + $subscriptions = $subscriptions->save(); } // Without redirection the old topics are removed if ($this->request->post('with_redirect') == 0) { - DB::for_table('topics') - ->where_in('id', $topics) - ->where_not_equal('id', $merge_to_tid) - ->delete_many(); + $delete_topics = DB::for_table('topics') + ->where_in('id', $topics) + ->where_not_equal('id', $merge_to_tid); + $delete_topics = $this->hook->fireDB('merge_topics_delete_topics', $delete_topics); + $delete_topics = $delete_topics->delete_many(); } // Count number of replies in the topic $num_replies = DB::for_table('posts')->where('topic_id', $merge_to_tid)->count('id') - 1; + $num_replies = $this->hook->fire('merge_topics_num_replies', $num_replies); // Get last_post, last_post_id and last_poster - $select_last_post = array('posted', 'id', 'poster'); + $last_post['select'] = array('posted', 'id', 'poster'); - $last_post = DB::for_table('posts')->select_many($select_last_post) - ->where('topic_id', $merge_to_tid) - ->order_by_desc('id') - ->find_one(); + $last_post = DB::for_table('posts') + ->select_many($last_post['select']) + ->where('topic_id', $merge_to_tid) + ->order_by_desc('id'); + $last_post = $this->hook->fireDB('merge_topics_last_post', $last_post); + $last_post = $last_post->find_one(); // Update topic - $insert_topic = array( + $update_topic['insert'] = array( 'num_replies' => $num_replies, 'last_post' => $last_post['posted'], 'last_post_id' => $last_post['id'], 'last_poster' => $last_post['poster'], ); - DB::for_table('topics') - ->where('id', $merge_to_tid) - ->find_one() - ->set($insert_topic) - ->save(); + $topic = DB::for_table('topics') + ->where('id', $merge_to_tid) + ->find_one() + ->set($update_topic['insert']); + $topic = $this->hook->fireDB('merge_topics_update_topic', $topic); + $topic = $topic->save(); + + $this->hook->fire('merge_topics'); // Update the forum FROM which the topic was moved and redirect update_forum($fid); @@ -716,6 +742,8 @@ public function merge_topics($fid) public function delete_topics($topics, $fid) { + $this->hook->fire('delete_topics'); + if (@preg_match('%[^0-9,]%', $topics)) { message(__('Bad request'), '404'); } From 7cad5b38d33ec6c714e83d0c8111a01f0a36b221 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 21 Aug 2015 14:54:43 +0200 Subject: [PATCH 119/353] Add more hooks --- controller/moderate.php | 4 +- model/moderate.php | 160 ++++++++++++++++++++++++---------------- 2 files changed, 100 insertions(+), 64 deletions(-) diff --git a/controller/moderate.php b/controller/moderate.php index b1e7a889..9e976018 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -141,14 +141,14 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = if ($action == 'open') { $this->model->open_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), __('Unstick topic redirect')); + redirect(get_link('topic/'.$id.'/'), __('Open topic redirect')); } // Close a topic if ($action == 'close') { $this->model->close_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), __('Unstick topic redirect')); + redirect(get_link('topic/'.$id.'/'), __('Close topic redirect')); } $cur_topic = $this->model->get_topic_info($fid, $id); diff --git a/model/moderate.php b/model/moderate.php index 8972dd54..ea487a85 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -754,9 +754,10 @@ public function delete_topics($topics, $fid) // Verify that the topic IDs are valid $result = DB::for_table('topics') - ->where_in('id', $topics_sql) - ->where('forum_id', $fid) - ->find_many(); + ->where_in('id', $topics_sql) + ->where('forum_id', $fid); + $result = $this->hook->fireDB('delete_topics_verify_id', $result); + $result = $result->find_many(); if (count($result) != substr_count($topics, ',') + 1) { message(__('Bad request'), '404'); @@ -765,33 +766,39 @@ public function delete_topics($topics, $fid) // Verify that the posts are not by admins if ($this->user->g_id != FEATHER_ADMIN) { $authorized = DB::for_table('posts') - ->where_in('topic_id', $topics_sql) - ->where('poster_id', get_admin_ids()) - ->find_many(); + ->where_in('topic_id', $topics_sql) + ->where('poster_id', get_admin_ids()); + $authorized = $this->hook->fireDB('delete_topics_authorized', $authorized); + $authorized = $authorized->find_many(); if ($authorized) { message(__('No permission'), '403'); } } // Delete the topics - DB::for_table('topics') - ->where_in('id', $topics_sql) - ->delete_many(); + $delete_topics = DB::for_table('topics') + ->where_in('id', $topics_sql); + $delete_topics = $this->hook->fireDB('delete_topics_query', $delete_topics); + $delete_topics = $delete_topics->delete_many(); // Delete any redirect topics - DB::for_table('topics') - ->where_in('moved_to', $topics_sql) - ->delete_many(); + $delete_redirect_topics = DB::for_table('topics') + ->where_in('moved_to', $topics_sql); + $delete_redirect_topics = $this->hook->fireDB('delete_topics_redirect', $delete_redirect_topics); + $delete_redirect_topics = $delete_redirect_topics->delete_many(); // Delete any subscriptions - DB::for_table('topic_subscriptions') - ->where_in('topic_id', $topics_sql) - ->delete_many(); + $delete_subscriptions = DB::for_table('topic_subscriptions') + ->where_in('topic_id', $topics_sql); + $delete_subscriptions = $this->hook->fireDB('delete_topics_subscriptions', $delete_subscriptions); + $delete_subscriptions = $delete_subscriptions->delete_many(); // Create a list of the post IDs in this topic and then strip the search index - $find_ids = DB::for_table('posts')->select('id') - ->where_in('topic_id', $topics_sql) - ->find_many(); + $find_ids = DB::for_table('posts') + ->select('id') + ->where_in('topic_id', $topics_sql); + $find_ids = $this->hook->fireDB('delete_topics_find_ids', $find_ids); + $find_ids = $find_ids->find_many(); foreach ($find_ids as $id) { $ids_post[] = $id['id']; @@ -805,31 +812,35 @@ public function delete_topics($topics, $fid) } // Delete posts - DB::for_table('posts') - ->where_in('topic_id', $topics_sql) - ->delete_many(); + $delete_posts = DB::for_table('posts') + ->where_in('topic_id', $topics_sql); + $delete_posts = $this->hook->fireDB('delete_topics_delete_posts', $delete_posts); + $delete_posts = $delete_posts->delete_many(); update_forum($fid); + $this->hook->fire('delete_topics'); + redirect(get_link('forum/'.$fid.'/'), __('Delete topics redirect')); } public function get_forum_info($fid) { - $select_get_forum_info = array('f.forum_name', 'f.redirect_url', 'f.num_topics', 'f.sort_by'); - $where_get_forum_info = array( + $cur_forum['select'] = array('f.forum_name', 'f.redirect_url', 'f.num_topics', 'f.sort_by'); + $cur_forum['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); $cur_forum = DB::for_table('forums') - ->table_alias('f') - ->select_many($select_get_forum_info) - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_forum_info) - ->where('f.id', $fid) - ->find_one(); + ->table_alias('f') + ->select_many($cur_forum['select']) + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($cur_forum['where']) + ->where('f.id', $fid); + $cur_forum = $this->hook->fireDB('get_forum_info', $cur_forum); + $cur_forum = $cur_forum->find_one(); if (!$cur_forum) { message(__('Bad request'), '404'); @@ -841,6 +852,8 @@ public function get_forum_info($fid) public function forum_sort_by($forum_sort) { + $forum_sort = $this->hook->fire('forum_sort_by_start', $forum_sort); + switch ($forum_sort) { case 0: $sort_by = 'last_post DESC'; @@ -856,11 +869,15 @@ public function forum_sort_by($forum_sort) break; } + $sort_by = $this->hook->fire('forum_sort_by', $sort_by); + return $sort_by; } public function display_topics($fid, $sort_by, $start_from) { + $this->hook->fire('display_topics_start'); + $topic_data = array(); // Get topic/forum tracking data @@ -870,11 +887,12 @@ public function display_topics($fid, $sort_by, $start_from) // Retrieve a list of topic IDs, LIMIT is (really) expensive so we only fetch the IDs here then later fetch the remaining data $result = DB::for_table('topics')->select('id') - ->where('forum_id', $fid) - ->order_by_expr('sticky DESC, '.$sort_by) - ->limit($this->user->disp_topics) - ->offset($start_from) - ->find_many(); + ->where('forum_id', $fid) + ->order_by_expr('sticky DESC, '.$sort_by) + ->limit($this->user->disp_topics) + ->offset($start_from); + $result = $this->hook->fireDB('display_topics_list_ids', $result); + $result = $result->find_many(); // If there are topics in this forum if ($result) { @@ -883,14 +901,16 @@ public function display_topics($fid, $sort_by, $start_from) $topic_ids[] = $id['id']; } + unset($result); // Select topics - $select_display_topics = array('id', 'poster', 'subject', 'posted', 'last_post', 'last_post_id', 'last_poster', 'num_views', 'num_replies', 'closed', 'sticky', 'moved_to'); - - // TODO: order_by_expr && result_set - $result = DB::for_table('topics')->select_many($select_display_topics) - ->where_in('id', $topic_ids) - ->order_by_expr('sticky DESC, '.$sort_by.', id DESC') - ->find_many(); + $result['select'] = array('id', 'poster', 'subject', 'posted', 'last_post', 'last_post_id', 'last_poster', 'num_views', 'num_replies', 'closed', 'sticky', 'moved_to'); + $result = DB::for_table('topics')->select_many($result['select']) + ->where_in('id', $topic_ids) + ->order_by_desc('sticky') + ->order_by_expr($sort_by) + ->order_by_desc('id'); + $result = $this->hook->fireDB('display_topics_query', $result); + $result = $result->find_many(); $topic_count = 0; foreach($result as $cur_topic) { @@ -959,53 +979,69 @@ public function display_topics($fid, $sort_by, $start_from) } } + $topic_data = $this->hook->fire('display_topics', $topic_data); + return $topic_data; } public function stick_topic($id, $fid) { - DB::for_table('topics')->where('id', $id)->where('forum_id', $fid) - ->find_one() - ->set('sticky', 1) - ->save(); + $stick_topic = DB::for_table('topics') + ->where('id', $id) + ->where('forum_id', $fid) + ->find_one() + ->set('sticky', 1); + $stick_topic = $this->hook->fireDB('stick_topic', $stick_topic); + $stick_topic = $stick_topic->save(); } public function unstick_topic($id, $fid) { - DB::for_table('topics')->where('id', $id)->where('forum_id', $fid) + $unstick_topic = DB::for_table('topics') + ->where('id', $id) + ->where('forum_id', $fid) ->find_one() - ->set('sticky', 0) - ->save(); + ->set('sticky', 0); + $unstick_topic = $this->hook->fireDB('unstick_topic', $unstick_topic); + $unstick_topic = $unstick_topic->save(); } public function open_topic($id, $fid) { - DB::for_table('topics')->where('id', $id)->where('forum_id', $fid) - ->find_one() - ->set('closed', 0) - ->save(); + $open_topic = DB::for_table('topics') + ->where('id', $id) + ->where('forum_id', $fid) + ->find_one() + ->set('closed', 0); + $open_topic = $this->hook->fireDB('open_topic', $open_topic); + $open_topic = $open_topic->save(); } public function close_topic($id, $fid) { - DB::for_table('topics')->where('id', $id)->where('forum_id', $fid) - ->find_one() - ->set('closed', 1) - ->save(); + $close_topic = DB::for_table('topics') + ->where('id', $id) + ->where('forum_id', $fid) + ->find_one() + ->set('closed', 1); + $close_topic = $this->hook->fireDB('close_topic', $close_topic); + $close_topic = $close_topic->save(); } public function close_multiple_topics($action, $topics, $fid) { - DB::for_table('topics') - ->where_in('id', $topics) - ->update_many('closed', $action); + $close_multiple_topics = DB::for_table('topics') + ->where_in('id', $topics); + $close_multiple_topics = $this->hook->fireDB('open_topic', $close_multiple_topics); + $close_multiple_topics = $close_multiple_topics->update_many('closed', $action); } public function get_subject_tid($id) { $subject = DB::for_table('topics') - ->where('id', $id) - ->find_one_col('subject'); + ->where('id', $id); + $subject = $this->hook->fireDB('get_subject_tid', $subject); + $subject = $subject->find_one_col('subject'); if (!$subject) { message(__('Bad request'), '404'); From d6389c386a65a3eaee949611ea044d342b27a8fb Mon Sep 17 00:00:00 2001 From: capkokoon Date: Fri, 21 Aug 2015 16:07:26 +0200 Subject: [PATCH 120/353] Add quick jump new cache --- controller/footer.php | 9 ++- include/cache.php | 125 -------------------------------- model/cache.php | 43 +++++++++++ style/FeatherBB/view/footer.php | 41 +++++------ 4 files changed, 70 insertions(+), 148 deletions(-) diff --git a/controller/footer.php b/controller/footer.php index b852a21a..a05ffdd2 100644 --- a/controller/footer.php +++ b/controller/footer.php @@ -39,6 +39,10 @@ public function display($footer_style = null, $id = null, $p = null, $pid = null $num_pages = isset($num_pages) ? $num_pages : null; + if (!$this->feather->cache->isCached('quickjump')) { + $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); + } + $this->feather->render('footer.php', array( 'id' => $id, 'p' => $p, @@ -47,12 +51,13 @@ public function display($footer_style = null, $id = null, $p = null, $pid = null 'feather_config' => $this->config, 'feather_start' => $this->start, 'footer_style' => $footer_style, + 'quickjump' => $this->feather->cache->retrieve('quickjump'), 'forum_id' => $forum_id, 'num_pages' => $num_pages, 'feather' => $this->feather, ) ); - + // Close Idiorm connection $pdo = \DB::get_db(); $pdo = null; @@ -65,4 +70,4 @@ public function display($footer_style = null, $id = null, $p = null, $pid = null // If we reached this far, we shouldn't execute more code $this->feather->stop(); } -} \ No newline at end of file +} diff --git a/include/cache.php b/include/cache.php index 258ffd6d..db7add9a 100644 --- a/include/cache.php +++ b/include/cache.php @@ -7,86 +7,6 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - -// -// Generate quick jump cache PHP scripts -// -function generate_quickjump_cache($group_id = false) -{ - - - $groups = array(); - - // If a group_id was supplied, we generate the quick jump cache for that group only - if ($group_id !== false) { - // Is this group even allowed to read forums? - $read_board = \DB::for_table('groups')->where('g_id', $group_id) - ->find_one_col('g_read_board'); - - $groups[$group_id] = $read_board; - } else { - // A group_id was not supplied, so we generate the quick jump cache for all groups - $select_quickjump_all_groups = array('g_id', 'g_read_board'); - $result = \DB::for_table('groups')->select_many($select_quickjump_all_groups) - ->find_many(); - - foreach ($result as $row) { - $groups[$row['g_id']] = $row['g_read_board']; - } - } - - // Loop through the groups in $groups and output the cache for each of them - foreach ($groups as $group_id => $read_board) { - // Output quick jump as PHP code - $output = ''; - - if ($read_board == '1') { - $select_generate_quickjump_cache = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.redirect_url'); - $where_generate_quickjump_cache = array( - array('fp.read_forum' => 'IS NULL'), - array('fp.read_forum' => '1') - ); - $order_by_generate_quickjump_cache = array('c.disp_position', 'c.id', 'f.disp_position'); - - $result = \DB::for_table('categories') - ->table_alias('c') - ->select_many($select_generate_quickjump_cache) - ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $group_id), null, true) - ->where_any_is($where_generate_quickjump_cache) - ->where_null('f.redirect_url') - ->order_by_many($order_by_generate_quickjump_cache) - ->find_many(); - - if ($result) { - $output .= "\t\t\t\t".'
          '."\n\t\t\t\t\t".'
          '."\n\t\t\t\t\t".''."\n\t\t\t\t\t".'
          '."\n\t\t\t\t".'
          '."\n"; - } - } - - featherbb_write_cache_file('cache_quickjump_'.$group_id.'.php', $output); - } -} - // // Generate a cache ID based on the last modification time for all stopwords files // @@ -137,51 +57,6 @@ function generate_stopwords_cache() } -// -// Load some information about the latest registered users -// -function generate_users_info_cache() -{ - $stats = array(); - - $stats['total_users'] = (\DB::for_table('users')->where_not_equal('group_id', FEATHER_UNVERIFIED) - ->count('id')) - 1; - - $select_generate_users_info_cache = array('id', 'username'); - $last_user = \DB::for_table('users')->select_many($select_generate_users_info_cache) - ->where_not_equal('group_id', FEATHER_UNVERIFIED) - ->order_by_desc('registered') - ->limit(1) - ->find_array(); - $stats['last_user'] = $last_user[0]; - - // Output users info as PHP code - $content = ''; - featherbb_write_cache_file('cache_users_info.php', $content); -} - - -// -// Generate the admins cache PHP script -// -function generate_admins_cache() -{ - // Get admins from the DB - $result = \DB::for_table('users')->select('id') - ->where('group_id', FEATHER_ADMIN) - ->find_array(); - - $output = array(); - foreach ($result as $row) { - $output[] = $row['id']; - } - - // Output admin list as PHP code - $content = ''; - featherbb_write_cache_file('cache_admins.php', $content); -} - - // // Safely write out a cache file. // diff --git a/model/cache.php b/model/cache.php index d5867536..33d7906d 100644 --- a/model/cache.php +++ b/model/cache.php @@ -71,4 +71,47 @@ public static function get_admin_ids() ->find_array(); } + public static function get_quickjump() + { + $select_quickjump = array('g_id', 'g_read_board'); + $read_perms = DB::for_table('groups') + ->select_many($select_quickjump) + ->where('g_read_board', 1) + ->find_array(); + + $output = array(); + foreach ($read_perms as $item) { + $select_quickjump = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.redirect_url'); + $where_quickjump = array( + array('fp.read_forum' => 'IS NULL'), + array('fp.read_forum' => '1') + ); + $order_by_quickjump = array('c.disp_position', 'c.id', 'f.disp_position'); + + $result = DB::for_table('categories') + ->table_alias('c') + ->select_many($select_quickjump) + ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $item['g_id']), null, true) + ->where_any_is($where_quickjump) + ->where_null('f.redirect_url') + ->order_by_many($order_by_quickjump) + ->find_many(); + + $forum_data = array(); + foreach ($result as $forum) { + if (!isset($forum_data[$forum['cid']])) { + $forum_data[$forum['cid']] = array('cat_name' => $forum['cat_name'], + 'cat_position' => $forum['cat_position'], + 'cat_forums' => array()); + } + $forum_data[$forum['cid']]['cat_forums'][] = array('forum_id' => $forum['fid'], + 'forum_name' => $forum['forum_name'], + 'position' => $forum['forum_position']); + } + $output[(int) $item['g_id']] = $forum_data; + } + return $output; + } } diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index 10922aab..470d5c6b 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -60,30 +60,29 @@ ?>
          -'."\n"; +user->g_id.'.php')) { - include FORUM_CACHE_DIR.'cache_quickjump_'.$feather->user->g_id.'.php'; - } - - if (!defined('FEATHER_QJ_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_quickjump_cache($feather->user->g_id); - require FORUM_CACHE_DIR.'cache_quickjump_'.$feather->user->g_id.'.php'; - } -} - -echo "\t\t\t".'
          '."\n"; +if ($feather_config['o_quickjump'] == '1' && !empty($quickjump)) { ?> +
          +
          +
          + + +
          +
          +
          + -?>
          Date: Fri, 21 Aug 2015 19:12:56 +0200 Subject: [PATCH 121/353] Finish to rewrite cache --- controller/admin/categories.php | 5 +-- controller/admin/forums.php | 29 +++-------------- model/admin/groups.php | 10 ++---- view/footer.php | 58 ++++++++++++++++----------------- 4 files changed, 37 insertions(+), 65 deletions(-) diff --git a/controller/admin/categories.php b/controller/admin/categories.php index 12f90727..4ad2f729 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -69,10 +69,7 @@ public function edit_categories() } // Regenerate the quick jump cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - generate_quickjump_cache(); + $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); redirect(get_link('admin/categories/'), __('Categories updated redirect')); } diff --git a/controller/admin/forums.php b/controller/admin/forums.php index f2fde95e..4b068d18 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -48,12 +48,7 @@ public function add_forum() if ($fid = $this->model->add_forum($cat_id, __('New forum'))) { // Regenerate the quick jump cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_quickjump_cache(); - + $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); redirect(get_link('admin/forums/edit/'.$fid.'/'), __('Forum added redirect')); } else { redirect(get_link('admin/forums/'), __('Unable to add forum')); @@ -114,10 +109,7 @@ public function edit_forum($forum_id) } // Regenerate the quick jump cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - generate_quickjump_cache(); + $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); redirect(get_link('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); @@ -125,10 +117,7 @@ public function edit_forum($forum_id) $this->model->delete_permissions($forum_id); // Regenerate the quick jump cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - generate_quickjump_cache(); + $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); redirect(get_link('admin/forums/edit/'.$forum_id.'/'), __('Perms reverted redirect')); } @@ -167,11 +156,7 @@ public function delete_forum($forum_id) if($this->request->isPost()) { $this->model->delete_forum($forum_id); // Regenerate the quick jump cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_quickjump_cache(); + $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); redirect(get_link('admin/forums/'), __('Forum deleted redirect')); @@ -202,11 +187,7 @@ public function edit_positions() } // Regenerate the quick jump cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_quickjump_cache(); + $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); redirect(get_link('admin/forums/'), __('Forums updated redirect')); } diff --git a/model/admin/groups.php b/model/admin/groups.php index bf3cd7df..40b663a3 100644 --- a/model/admin/groups.php +++ b/model/admin/groups.php @@ -21,7 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + public function fetch_groups() { $result = DB::for_table('groups')->order_by('g_id')->find_many(); @@ -225,13 +225,7 @@ public function add_edit_group($groups) } // Regenerate the quick jump cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - $group_id = $this->request->post('mode') == 'add' ? $new_group_id : $this->request->post('group_id'); - - generate_quickjump_cache($group_id); + $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); if ($this->request->post('mode') == 'edit') { redirect(get_link('admin/groups/'), __('Group edited redirect')); diff --git a/view/footer.php b/view/footer.php index f4b79085..470d5c6b 100644 --- a/view/footer.php +++ b/view/footer.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + ?>
          @@ -31,8 +31,8 @@ } else { $parameter = ''; } - - + + echo "\t\t\t".'
          '."\n"; echo "\t\t\t\t".'
          '.__('Mod controls').'
          '."\n"; // TODO: all @@ -60,30 +60,29 @@ ?>
          -'."\n"; +user->g_id.'.php')) { - include FORUM_CACHE_DIR.'cache_quickjump_'.$feather->user->g_id.'.php'; - } - - if (!defined('FEATHER_QJ_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_quickjump_cache($feather->user->g_id); - require FORUM_CACHE_DIR.'cache_quickjump_'.$feather->user->g_id.'.php'; - } -} - -echo "\t\t\t".'
          '."\n"; +if ($feather_config['o_quickjump'] == '1' && !empty($quickjump)) { ?> +
          +
          +
          + + +
          +
          +
          + -?>
          forum_env['FEATHER_SHOW_INFO']) { echo '

          [ '; // Calculate script generation time @@ -135,13 +134,14 @@ echo ' ]

          '."\n"; } // Display executed queries (if enabled) -if (defined('FEATHER_SHOW_QUERIES')) { +if ($feather->forum_env['FEATHER_SHOW_QUERIES']) { display_saved_queries(); } ?> -
          -
          -
          + + + + From 902b60cf916d6e44522a59d9a5f7675daaf10105 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Fri, 21 Aug 2015 22:32:36 +0200 Subject: [PATCH 122/353] Major rewrite of cache class --- include/classes/cache.class.php | 443 +++++++++++++++++--------------- 1 file changed, 241 insertions(+), 202 deletions(-) diff --git a/include/classes/cache.class.php b/include/classes/cache.class.php index 321e98a7..98647dc7 100755 --- a/include/classes/cache.class.php +++ b/include/classes/cache.class.php @@ -1,35 +1,40 @@ , 'path' =>, 'extension' =>)); - */ +* Copyright (C) 2015 FeatherBB +* based on code by Christian Metz - MetzWeb Networks +* API Documentation: https://github.com/cosenary/Simple-PHP-Cache +* License: BSD http://www.opensource.org/licenses/bsd-license.php +* +* FeatherBB Cache class +* Usage : $cache = new \FeatherBB\Cache(array('name' => , 'path' =>, 'extension' =>)); +*/ namespace FeatherBB; class Cache { /** - * @var array - */ + * @var array + */ protected $settings; /** - * @var array - */ + * @var array + */ protected $cache; /** - * Default constructor - * - * @param string|array [optional] $config - * @return void - */ + * @var array + */ + protected $filenames; + + /** + * Default constructor + * + * @param string|array [optional] $config + * @return void + */ public function __construct($config = array()) { if (!is_array($config)) { @@ -38,32 +43,32 @@ public function __construct($config = array()) $this->settings = array_merge(self::getDefaultSettings(), $config); $this->setCache($this->settings['name']); $this->setCachePath($this->settings['path']); - $this->setExtension($this->settings['extension']); + $this->setCacheExtension($this->settings['extension']); } /** - * Return default settings - * - * @return array - */ + * Return default settings + * + * @return array + */ protected static function getDefaultSettings() { return array('name' => 'default', - 'path' => 'cache/', - 'extension' => '.cache'); + 'path' => 'cache/', + 'extension' => '.cache'); } /** - * Check whether data is associated with a key - * - * @param string $key - * @return boolean - */ + * Check whether data is associated with a key + * + * @param string $key + * @return boolean + */ public function isCached($key) { if ($cachedData = $this->_loadCache()) { if (isset($cachedData[$key])) { - if (!$this->_checkExpired($cachedData[$key]['time'], $cachedData[$key]['expire'])) { + if (!$this->_isExpired($cachedData[$key]['time'], $cachedData[$key]['expire'])) { return true; } } @@ -72,283 +77,317 @@ public function isCached($key) } /** - * Store data in the cache - * - * @param string $key - * @param mixed $data - * @param integer [optional] $expiration seconds to expire the cache - * @return object - */ - public function store($key, $data, $expiration = 0) + * Store data in the cache + * + * @param string $key + * @param mixed $data + * @param integer [optional] $expires + * @return self + */ + public function store($key, $data, $expires = 0) { - $storeData = array( + $new_data = array( 'time' => time(), - 'expire' => $expiration, + 'expire' => (int) $expires, 'data' => serialize($data) ); - $dataArray = $this->_loadCache(); - if (true === is_array($dataArray)) { - $dataArray[$key] = $storeData; + + $cache = $this->_loadCache(); + if (is_array($cache)) { + $cache[(string) $key] = $new_data; } else { - $dataArray = array($key => $storeData); + $cache = array((string) $key => $new_data); } - $this->_saveCache($dataArray); + $this->_saveCache($cache); return $this; } /** - * Retrieve cached data by its key - * - * @param string $key - * @param boolean [optional] $timestamp - * @return string - */ - public function retrieve($key, $timestamp = false) + * Retrieve cached data by key + * + * @param string $key + * @param boolean [optional] $timestamp + * @return string + */ + public function retrieve($key) { - $cachedData = $this->_loadCache(); - (false === $timestamp) ? $type = 'data' : $type = 'time'; - if (!isset($cachedData[$key][$type])) return null; - if (false === $timestamp) { - $entry = $cachedData[$key]; - if ($entry && true === $this->_checkExpired($entry['time'], $entry['expire'])) - return null; + $key = (string) $key; + if ($cache = $this->_loadCache()) { + if (isset($cache[$key])) { + if (!$this->_isExpired($cache[$key]['time'], $cache[$key]['expire'])) { + return unserialize($cache[$key]['data']); + } + } } - return unserialize($cachedData[$key][$type]); + return null; } /** - * Retrieve all cached data - * - * @param boolean [optional] $meta - * @return array - */ - public function retrieveAll($meta = false) + * Retrieve all cached data + * + * @param boolean [optional] $meta + * @return array | null + */ + public function retrieveAll($raw = false) { - if ($meta === false) { - $results = array(); - $cachedData = $this->_loadCache(); - if ($cachedData) { - foreach ($cachedData as $k => $v) { - $results[$k] = unserialize($v['data']); + if ($cache = $this->_loadCache()) { + if (!$raw) { + $results = array(); + foreach ($cache as $key => $value) { + $results[$key] = unserialize($value['data']); } + return $results; + } else { + return $cache; } - return $results; - } else { - return $this->_loadCache(); } + return null; } /** - * Erase cached entry by its key - * - * @param string $key - * @return object - */ - public function erase($key) + * Delete cached entry by its key + * + * @param string $key + * @return object + */ + public function delete($key) { - $cacheData = $this->_loadCache(); - if (true === is_array($cacheData)) { - if (true === isset($cacheData[$key])) { - unset($cacheData[$key]); - $cacheData = json_encode($cacheData); - $this->_saveCache($cacheData); - } else { - throw new Exception("Error: erase() - Key '{$key}' not found."); + $key = (string) $key; + if ($cache = $this->_loadCache()) { + if (isset($cache[$key])) { + unset($cache[$key]); + $this->_saveCache($cache); + return $this; } } - return $this; + throw new \Exception("Error: delete() - Key '{$key}' not found."); } /** - * Erase all expired entries - * - * @return integer - */ - public function eraseExpired() + * Erase all expired entries + * + * @return object + */ + public function deleteExpired() { - $cacheData = $this->_loadCache(); - if (true === is_array($cacheData)) { - $counter = 0; - foreach ($cacheData as $key => $entry) { - if (true === $this->_checkExpired($entry['time'], $entry['expire'])) { - unset($cacheData[$key]); - $counter++; - } + $cache = $this->_loadCache(); + if (is_array($cache)) { + $i = 0; + $cache = array_map(function ($value) { + if (!$this->_isExpired($value['time'], $value['expire'])) { + ++$i; + return $value; + } + }); + if ($i > 0) { + $this->_saveCache($cache); } - if ($counter > 0) { - $cacheData = json_encode($cacheData); - $this->_saveCache($cacheData); - } - return $counter; } + return $this; } /** - * Erase all cached entries - * @return object - */ - public function eraseAll() + * Flush all cached entries + * @return object + */ + public function flush() { - $cacheDir = $this->getCacheDir(); - if (true === file_exists($cacheDir)) { - $cacheFile = fopen($cacheDir, 'w'); - fclose($cacheFile); - } + $this->cache = null; // Purge cache + $this->_saveCache(array()); return $this; } /** - * Load appointed cache - * @return mixed - */ - private function _loadCache() + * Increment key + * @return object + */ + public function increment($key) { - if ($this->cache != null) - return $this->cache; - - if (true === file_exists($this->getCacheDir())) { - $file = file_get_contents($this->getCacheDir()); - $this->cache = json_decode($file, true); - return $this->cache; - } else { - return false; + $key = (string) $key; + if ($cache = $this->_loadCache()) { + if (isset($cache[$key])) { + $tmp = unserialize($cache[$key]['data']); + if (is_numeric($tmp)) { + ++$tmp; + $cache[$key]['data'] = serialize($tmp); + $this->_saveCache($cache); + return $this; + } + } } + throw new \Exception("Error: increment() - Key '{$key}' not found."); } /** - * Save cache file - * @param $dataArray - */ - private function _saveCache($dataArray) + * Decrement key + * @return object + */ + public function decrement($key) { - $this->cache = $dataArray; - $cacheData = json_encode($dataArray); - file_put_contents($this->getCacheDir(), $cacheData); + $key = (string) $key; + if ($cache = $this->_loadCache()) { + if (isset($cache[$key])) { + $tmp = unserialize($cache[$key]['data']); + if (is_numeric($tmp)) { + --$tmp; + $cache[$key]['data'] = serialize($tmp); + $this->_saveCache($cache); + return $this; + } + } + } + throw new \Exception("Error: decrement() - Key '{$key}' not found."); } /** - * Get the cache directory path - * - * @return string - */ - public function getCacheDir() + * Load cache + * @return cache if existing or not null / null otherwise + */ + protected function _loadCache() { - if (true === $this->_checkCacheDir()) { - $filename = $this->getCache(); - $filename = preg_replace('/[^0-9a-z\.\_\-]/i', '', strtolower($filename)); - return $this->getCachePath() . $this->_getHash($filename) . $this->getExtension(); + if (!is_null($this->cache)) + return $this->cache; + + if (file_exists($this->getCacheFile())) { + $this->cache = json_decode(file_get_contents($this->getCacheFile()), true); + return $this->cache; } + return null; } /** - * Get the filename hash - * - * @return string - */ - private function _getHash($filename) + * Save cache file + * @param $dataArray + */ + protected function _saveCache(array $data) { - return sha1($filename); + $this->cache = $data; // Save new data in object to avoid useless I/O access + return file_put_contents($this->getCacheFile(), json_encode($data)); } /** - * Check whether a timestamp is still in the duration - * - * @param integer $timestamp - * @param integer $expiration - * @return boolean - */ - private function _checkExpired($timestamp, $expiration) + * Check whether a timestamp is still in the duration + * + * @param integer $timestamp + * @param integer $expiration + * @return boolean + */ + protected function _isExpired($timestamp, $expiration) { if ($expiration !== 0) { - $timeDiff = time() - $timestamp; - return ($timeDiff > $expiration); + return (time() - $timestamp > $expiration); } return false; } /** - * Check if a writable cache directory exists and if not create a new one - * - * @return boolean - */ - private function _checkCacheDir() + * Check if a writable cache directory exists and if not create a new one + * + * @return boolean + */ + protected function _checkCacheDir() { if (!is_dir($this->getCachePath()) && !mkdir($this->getCachePath(), 0775, true)) { - throw new Exception('Unable to create cache directory ' . $this->getCachePath()); + throw new \Exception('Unable to create cache directory ' . $this->getCachePath()); } elseif (!is_readable($this->getCachePath()) || !is_writable($this->getCachePath())) { if (!chmod($this->getCachePath(), 0775)) { - throw new Exception($this->getCachePath() . ' must be readable and writeable'); + throw new \Exception($this->getCachePath() . ' must be readable and writeable'); } } return true; } /** - * Cache path Setter - * - * @param string $path - * @return object - */ + * Getters and setters + */ + + /** + * Get the cache directory path + * + * @return string + */ + public function getCacheFile() + { + if (!isset($this->filenames[$this->settings['name']])) { + if ($this->_checkCacheDir()) { + $filename = preg_replace('/[^0-9a-z\.\_\-]/i', '', strtolower($this->settings['name'])); + $this->filenames[$this->settings['name']] = $this->settings['path'] . sha1($filename) . $this->settings['extension']; + } + } + return $this->filenames[$this->settings['name']]; + } + + /** + * Cache path Setter + * + * @param string $path + * @return object + */ public function setCachePath($path) { $this->settings['path'] = $path; - return $this; } /** - * Cache path Getter - * - * @return string - */ + * Cache path Getter + * + * @return string + */ public function getCachePath() { return $this->settings['path']; } /** - * Cache name Setter - * - * @param string $name - * @return object - */ + * Cache name Setter + * + * @param string $name + * @return object + */ public function setCache($name) { + $this->cache = null; // Purge cache as we change cache $this->settings['name'] = $name; - return $this; } /** - * Cache name Getter - * - * @return void - */ + * Cache name Getter + * + * @return void + */ public function getCache() { return $this->settings['path']; } /** - * Cache file extension Setter - * - * @param string $ext - * @return object - */ - public function setExtension($ext) + * Cache file extension Setter + * + * @param string $ext + * @return object + */ + public function setCacheExtension($ext) { $this->settings['extension']= $ext; - return $this; } /** - * Cache file extension Getter - * - * @return string - */ - public function getExtension() + * Cache file extension Getter + * + * @return string + */ + public function getCacheExtension() { return $this->settings['extension']; } - - + /** + * Settings Getter + * + * @return array + */ + public function getSettings() + { + return $this->settings; + } } From d540abf3c6695d60b0c82dc5bdb387903918a96e Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 21 Aug 2015 22:45:33 +0200 Subject: [PATCH 123/353] Add more hooks --- model/delete.php | 2 +- model/edit.php | 6 +- model/login.php | 6 +- model/moderate.php | 10 +- model/post.php | 380 +++++++++++++++++++++++++++------------------ 5 files changed, 239 insertions(+), 165 deletions(-) diff --git a/model/delete.php b/model/delete.php index 18e413ea..a1983700 100644 --- a/model/delete.php +++ b/model/delete.php @@ -56,7 +56,7 @@ public function get_info_delete($id) public function handle_deletion($is_topic_post, $id, $tid, $fid) { - $this->hook->fire('handle_deletion_start'); + $this->hook->fire('handle_deletion_start', $is_topic_post, $id, $tid, $fid); require FEATHER_ROOT.'include/search_idx.php'; diff --git a/model/edit.php b/model/edit.php index faf9834f..b1b54f47 100644 --- a/model/edit.php +++ b/model/edit.php @@ -26,7 +26,7 @@ public function __construct() // Fetch some info about the post, the topic and the forum public function get_info_edit($id) { - $this->hook->fire('get_info_edit_start'); + $id = $this->hook->fire('get_info_edit_start', $id); $cur_post['select'] = array('fid' => 'f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_topics', 'tid' => 't.id', 't.subject', 't.posted', 't.first_post_id', 't.sticky', 't.closed', 'p.poster', 'p.poster_id', 'p.message', 'p.hide_smilies'); $cur_post['where'] = array( @@ -59,7 +59,7 @@ public function check_errors_before_edit($can_edit_subject, $errors) { global $pd; - $this->hook->fire('check_errors_before_edit_start'); + $errors = $this->hook->fire('check_errors_before_edit_start', $errors); // If it's a topic it must contain a subject if ($can_edit_subject) { @@ -204,7 +204,7 @@ public function edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod) public function get_checkboxes($can_edit_subject, $is_admmod, $cur_post, $cur_index) { - $this->hook->fire('get_checkboxes_start'); + $this->hook->fire('get_checkboxes_start', $can_edit_subject, $is_admmod, $cur_post, $cur_index); $checkboxes = array(); diff --git a/model/login.php b/model/login.php index 30912a9a..28631803 100644 --- a/model/login.php +++ b/model/login.php @@ -87,11 +87,7 @@ public function login() public function logout($id, $token) { - $hook['id'] = $id; - $hook['token'] = $token; - $hook = $this->hook->fire('logout_start', $hook); - $id = $hook['id']; - $token = $hook['token']; + $token = $this->hook->fire('logout_start', $token, $id); if ($this->user->is_guest || !isset($id) || $id != $this->user->id || !isset($token) || $token != feather_hash($this->user->id.feather_hash(get_remote_address()))) { header('Location: '.get_base_url()); diff --git a/model/moderate.php b/model/moderate.php index ea487a85..ebb24753 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -50,7 +50,7 @@ public function display_ip_address_post($pid) public function get_moderators($fid) { $moderators = DB::for_table('forums') - ->where('id', $fid); + ->where('id', $fid); $moderators = $this->hook->fireDB('get_moderators', $moderators); $moderators = $moderators->find_one_col('moderators'); @@ -89,7 +89,7 @@ public function get_topic_info($fid, $tid) public function delete_posts($tid, $fid, $p = null) { $posts = $this->request->post('posts') ? $this->request->post('posts') : array(); - $posts = $this->hook->fire('delete_posts_start', $posts); + $posts = $this->hook->fire('delete_posts_start', $posts, $tid, $fid); if (empty($posts)) { message(__('No posts selected')); @@ -166,7 +166,7 @@ public function delete_posts($tid, $fid, $p = null) public function split_posts($tid, $fid, $p = null) { $posts = $this->request->post('posts') ? $this->request->post('posts') : array(); - $posts = $this->hook->fire('split_posts_start', $posts); + $posts = $this->hook->fire('split_posts_start', $posts, $tid, $fid); if (empty($posts)) { message(__('No posts selected')); } @@ -420,7 +420,7 @@ public function display_posts_view($tid, $start_from) { global $pd; - $this->hook->fire('display_posts_view_start'); + $this->hook->fire('display_posts_view_start', $tid, $start_from); $post_data = array(); @@ -876,7 +876,7 @@ public function forum_sort_by($forum_sort) public function display_topics($fid, $sort_by, $start_from) { - $this->hook->fire('display_topics_start'); + $this->hook->fire('display_topics_start', $fid, $sort_by, $start_from); $topic_data = array(); diff --git a/model/post.php b/model/post.php index eab496f4..49fed8d0 100644 --- a/model/post.php +++ b/model/post.php @@ -20,53 +20,54 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } // Get some info about the post public function get_info_post($tid, $fid) { + $this->hook->fire('get_info_post_start', $tid, $fid); + $cur_posting['where'] = array( + array('fp.read_forum' => 'IS NULL'), + array('fp.read_forum' => '1') + ); if ($tid) { - $select_get_info_post = array('f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics', 't.subject', 't.closed', 'is_subscribed' => 's.user_id'); - $where_get_info_post_any = array( - array('fp.read_forum' => 'IS NULL'), - array('fp.read_forum' => '1') - ); + $cur_posting['select'] = array('f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics', 't.subject', 't.closed', 'is_subscribed' => 's.user_id'); $cur_posting = DB::for_table('topics') - ->table_alias('t') - ->select_many($select_get_info_post) - ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->left_outer_join('topic_subscriptions', array('t.id', '=', 's.topic_id'), 's') - ->left_outer_join('topic_subscriptions', array('s.user_id', '=', $this->user->id), null, true) - ->where_any_is($where_get_info_post_any) - ->where('t.id', $tid) - ->find_one(); + ->table_alias('t') + ->select_many($cur_posting['select']) + ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->left_outer_join('topic_subscriptions', array('t.id', '=', 's.topic_id'), 's') + ->left_outer_join('topic_subscriptions', array('s.user_id', '=', $this->user->id), null, true) + ->where_any_is($cur_posting['where']) + ->where('t.id', $tid); } else { - $select_get_info_post = array('f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics'); - $where_get_info_post_any = array( - array('fp.read_forum' => 'IS NULL'), - array('fp.read_forum' => '1') - ); + $cur_posting['select'] = array('f.id', 'f.forum_name', 'f.moderators', 'f.redirect_url', 'fp.post_replies', 'fp.post_topics'); $cur_posting = DB::for_table('forums') - ->table_alias('f') - ->select_many($select_get_info_post) - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_info_post_any) - ->where('f.id', $fid) - ->find_one(); + ->table_alias('f') + ->select_many($cur_posting['select']) + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($cur_posting['where']) + ->where('f.id', $fid); } + $cur_posting = $this->hook->fireDB('get_info_post_query', $cur_posting); + $cur_posting = $cur_posting->find_one(); + if (!$cur_posting) { message(__('Bad request'), '404'); } + $cur_posting = $this->hook->fire('get_info_post', $cur_posting); + return $cur_posting; } @@ -75,12 +76,16 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) { global $lang_antispam, $lang_antispam_questions, $pd; + $fid = $this->hook->fire('check_errors_before_post_start', $fid); + // Antispam feature if ($this->user->is_guest) { // It's a guest, so we have to validate the username $errors = check_username(feather_trim($this->request->post('req_username')), $errors); + $errors = $this->hook->fire('check_errors_before_post_antispam', $errors); + $question = $this->request->post('captcha_q') ? trim($this->request->post('captcha_q')) : ''; $answer = $this->request->post('captcha') ? strtoupper(trim($this->request->post('captcha'))) : ''; $lang_antispam_questions_array = array(); @@ -99,25 +104,14 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) $errors[] = sprintf(__('Flood start'), $this->user->g_post_flood, $this->user->g_post_flood - (time() - $this->user->last_post)); } - if ($tid) { - $subject_tid = DB::for_table('topics') - ->where('id', $tid) - ->find_one_col('subject'); - - if (!$subject_tid) { - message(__('Bad request'), '404'); - } - $url_subject = url_friendly($subject_tid); - } else { - $url_subject = ''; - } - // If it's a new topic if ($fid) { $subject = feather_trim($this->request->post('req_subject')); + $subject = $this->hook->fire('check_errors_before_new_topic_subject', $subject); if ($this->config['o_censoring'] == '1') { $censored_subject = feather_trim(censor_words($subject)); + $censored_subject = $this->hook->fire('check_errors_before_censored', $censored_subject); } if ($subject == '') { @@ -129,6 +123,8 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) } elseif ($this->config['p_subject_all_caps'] == '0' && is_all_uppercase($subject) && !$this->user->is_admmod) { $errors[] = __('All caps subject'); } + + $errors = $this->hook->fire('check_errors_before_new_topic_errors', $errors); } if ($this->user->is_guest) { @@ -136,6 +132,9 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) if ($this->config['p_force_guest_email'] == '1' || $email != '') { require FEATHER_ROOT.'include/email.php'; + + $errors = $this->hook->fire('check_errors_before_post_email', $errors, $email); + if (!is_valid_email($email)) { $errors[] = __('Invalid email'); } @@ -154,6 +153,7 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) // Clean up message from POST $message = feather_linebreaks(feather_trim($this->request->post('req_message'))); + $message = $this->hook->fire('check_errors_before_post_message', $message); // Here we use strlen() not feather_strlen() as we want to limit the post to FEATHER_MAX_POSTSIZE bytes, not characters if (strlen($message) > FEATHER_MAX_POSTSIZE) { @@ -166,9 +166,11 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) if ($this->config['p_message_bbcode'] == '1') { require FEATHER_ROOT.'include/parser.php'; $message = preparse_bbcode($message, $errors); + $message = $this->hook->fire('check_errors_before_post_bbcode', $message); } if (empty($errors)) { + $errors = $this->hook->fire('check_errors_before_post_no_error', $errors); if ($message == '') { $errors[] = __('No message'); } elseif ($this->config['o_censoring'] == '1') { @@ -181,6 +183,8 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) } } + $errors = $this->hook->fire('check_errors_before_post', $errors); + return $errors; } @@ -189,6 +193,8 @@ public function setup_variables($errors, $is_admmod) { $post = array(); + $post = $this->hook->fire('setup_variables_start', $post, $errors, $is_admmod); + if (!$this->user->is_guest) { $post['username'] = $this->user->username; $post['email'] = $this->user->email; @@ -220,6 +226,8 @@ public function setup_variables($errors, $is_admmod) $post['time'] = time(); + $post = $this->hook->fire('setup_variables', $post); + return $post; } @@ -228,11 +236,13 @@ public function insert_reply($post, $tid, $cur_posting, $is_subscribed) { $new = array(); + $new = $this->hook->fireDB('insert_reply_start', $new, $post, $tid, $cur_posting, $is_subscribed); + if (!$this->user->is_guest) { $new['tid'] = $tid; // Insert the new post - $insert_post = array( + $query['insert'] = array( 'poster' => $post['username'], 'poster_id' => $this->user->id, 'poster_ip' => get_remote_address(), @@ -242,10 +252,11 @@ public function insert_reply($post, $tid, $cur_posting, $is_subscribed) 'topic_id' => $tid, ); - DB::for_table('posts') - ->create() - ->set($insert_post) - ->save(); + $query = DB::for_table('posts') + ->create() + ->set($query['insert']); + $query = $this->hook->fireDB('insert_reply_guest_query', $query); + $query = $query->save(); $new['pid'] = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'posts'); @@ -255,29 +266,31 @@ public function insert_reply($post, $tid, $cur_posting, $is_subscribed) // Let's do it if (isset($post['subscribe']) && $post['subscribe'] && !$is_subscribed) { - $insert_subscription = array( + $subscription['insert'] = array( 'user_id' => $this->user->id, 'topic_id' => $tid ); - DB::for_table('topic_subscriptions') - ->create() - ->set($insert_subscription) - ->save(); + $subscription = DB::for_table('topic_subscriptions') + ->create() + ->set($subscription['insert']); + $subscription = $this->hook->fireDB('insert_reply_subscription', $subscription); + $subscription = $subscription->save(); // We reply and we don't want to be subscribed anymore } elseif ($post['subscribe'] == '0' && $is_subscribed) { - DB::for_table('topic_subscriptions') - ->where('user_id', $this->user->id) - ->where('topic_id', $tid) - ->delete_many(); + $unsubscription = DB::for_table('topic_subscriptions') + ->where('user_id', $this->user->id) + ->where('topic_id', $tid); + $unsubscription = $this->hook->fireDB('insert_reply_unsubscription', $unsubscription); + $unsubscription = $unsubscription->delete_many(); } } } else { // It's a guest. Insert the new post - $insert_post = array( + $query['insert'] = array( 'poster' => $post['username'], 'poster_ip' => get_remote_address(), 'message' => $post['message'], @@ -287,68 +300,76 @@ public function insert_reply($post, $tid, $cur_posting, $is_subscribed) ); if ($this->config['p_force_guest_email'] == '1' || $post['email'] != '') { - $insert_post['poster_email'] = $post['email']; + $query['insert']['poster_email'] = $post['email']; } - DB::for_table('posts') - ->create() - ->set($insert_post) - ->save(); - + $query = DB::for_table('posts') + ->create() + ->set($query['insert']); + $query = $this->hook->fireDB('insert_reply_member_query', $query); + $query = $query->save(); $new['pid'] = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'posts'); } // Update topic - $update_topic = array( + $topic['update'] = array( 'last_post' => $post['time'], 'last_post_id' => $new['pid'], 'last_poster' => $post['username'], ); - DB::for_table('topics')->where('id', $tid) - ->find_one() - ->set($update_topic) - ->set_expr('num_replies', 'num_replies+1') - ->save(); + $topic = DB::for_table('topics') + ->where('id', $tid) + ->find_one() + ->set($topic['update']) + ->set_expr('num_replies', 'num_replies+1'); + $topic = $this->hook->fireDB('insert_reply_update_query', $topic); + $topic = $topic->save(); update_search_index('post', $new['pid'], $post['message']); update_forum($cur_posting['id']); + $new = $this->hook->fireDB('insert_reply', $new); + return $new; } // Send notifications for replies public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) { + $this->hook->fire('send_notifications_reply_start', $tid, $cur_posting, $new_pid, $post); + // Get the post time for the previous post in this topic $previous_post_time = DB::for_table('posts') - ->where('topic_id', $tid) - ->order_by_desc('id') - ->find_one_col('posted'); + ->where('topic_id', $tid) + ->order_by_desc('id'); + $previous_post_time = $this->hook->fireDB('send_notifications_reply_previous', $previous_post_time); + $previous_post_time = $previous_post_time->find_one_col('posted'); // Get any subscribed users that should be notified (banned users are excluded) - $where_send_notifications_reply = array( + $result['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); - $select_send_notifications_reply = array('u.id', 'u.email', 'u.notify_with_post', 'u.language'); + $result['select'] = array('u.id', 'u.email', 'u.notify_with_post', 'u.language'); $result = DB::for_table('users') - ->table_alias('u') - ->select_many($select_send_notifications_reply) - ->inner_join('topic_subscriptions', array('u.id', '=', 's.user_id'), 's') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', $cur_posting['id']), 'fp', true) - ->left_outer_join('forum_perms', array('fp.group_id', '=', 'u.group_id')) - ->left_outer_join('online', array('u.id', '=', 'o.user_id'), 'o') - ->left_outer_join('bans', array('u.username', '=', 'b.username'), 'b') - ->where_raw('COALESCE(o.logged, u.last_visit)>'.$previous_post_time) - ->where_null('b.username') - ->where_any_is($where_send_notifications_reply) - ->where('s.topic_id', $tid) - ->where_not_equal('u.id', $this->user->id) - ->find_many(); + ->table_alias('u') + ->select_many($result['select']) + ->inner_join('topic_subscriptions', array('u.id', '=', 's.user_id'), 's') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', $cur_posting['id']), 'fp', true) + ->left_outer_join('forum_perms', array('fp.group_id', '=', 'u.group_id')) + ->left_outer_join('online', array('u.id', '=', 'o.user_id'), 'o') + ->left_outer_join('bans', array('u.username', '=', 'b.username'), 'b') + ->where_raw('COALESCE(o.logged, u.last_visit)>'.$previous_post_time) + ->where_null('b.username') + ->where_any_is($result['where']) + ->where('s.topic_id', $tid) + ->where_not_equal('u.id', $this->user->id); + $result = $this->hook->fireDB('send_notifications_reply_query', $result); + $result = $result->find_many(); if ($result) { require_once FEATHER_ROOT.'include/email.php'; @@ -370,13 +391,16 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) if (file_exists(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')) { // Load the "new reply" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')); + $mail_tpl = $this->hook->fire('send_notifications_reply_mail_tpl', $mail_tpl); // Load the "new reply full" template (with post included) $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply_full.tpl')); + $mail_tpl_full = $this->hook->fire('send_notifications_reply_mail_tpl_full', $mail_tpl_full); // The first row contains the subject (it also starts with "Subject:") $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); + $mail_subject = $this->hook->fire('send_notifications_reply_mail_subject', $mail_subject); $mail_message = trim(substr($mail_tpl, $first_crlf)); $first_crlf = strpos($mail_tpl_full, "\n"); @@ -387,16 +411,18 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) $mail_message = str_replace('', $cur_posting['subject'], $mail_message); $mail_message = str_replace('', $post['username'], $mail_message); $mail_message = str_replace('', get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message); - $mail_message = str_replace('', get_base_url().'/misc.php?action=unsubscribe&tid='.$tid, $mail_message); + $mail_message = str_replace('', get_link('unsubscribe/topic/'.$tid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('send_notifications_reply_mail_message', $mail_message); $mail_subject_full = str_replace('', $cur_posting['subject'], $mail_subject_full); $mail_message_full = str_replace('', $cur_posting['subject'], $mail_message_full); $mail_message_full = str_replace('', $post['username'], $mail_message_full); $mail_message_full = str_replace('', $cleaned_message, $mail_message_full); $mail_message_full = str_replace('', get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message_full); - $mail_message_full = str_replace('', get_base_url().'/misc.php?action=unsubscribe&tid='.$tid, $mail_message_full); + $mail_message_full = str_replace('', get_link('unsubscribe/topic/'.$tid.'/'), $mail_message_full); $mail_message_full = str_replace('', $this->config['o_board_title'], $mail_message_full); + $mail_message_full = $this->hook->fire('send_notifications_reply_mail_message_full', $mail_message_full); $notification_emails[$cur_subscriber['language']][0] = $mail_subject; $notification_emails[$cur_subscriber['language']][1] = $mail_message; @@ -417,6 +443,8 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) } } + $this->hook->fire('send_notifications_reply'); + unset($cleaned_message); } } @@ -426,8 +454,10 @@ public function insert_topic($post, $fid) { $new = array(); + $new = $this->hook->fireDB('insert_topic_start', $new, $post, $fid); + // Create the topic - $insert_topic = array( + $topic['insert'] = array( 'poster' => $post['username'], 'subject' => $post['subject'], 'posted' => $post['time'], @@ -437,10 +467,11 @@ public function insert_topic($post, $fid) 'forum_id' => $fid, ); - DB::for_table('topics') - ->create() - ->set($insert_topic) - ->save(); + $topic = DB::for_table('topics') + ->create() + ->set($topic['insert']); + $topic = $this->hook->fireDB('insert_topic_create', $topic); + $topic = $topic->save(); $new['tid'] = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'topics'); @@ -448,20 +479,21 @@ public function insert_topic($post, $fid) // To subscribe or not to subscribe, that ... if ($this->config['o_topic_subscriptions'] == '1' && $post['subscribe']) { - $insert_subscription = array( + $subscription['insert'] = array( 'user_id' => $this->user->id, 'topic_id' => $new['tid'] ); - DB::for_table('topic_subscriptions') - ->create() - ->set($insert_subscription) - ->save(); + $subscription = DB::for_table('topic_subscriptions') + ->create() + ->set($subscription['insert']); + $subscription = $this->hook->fireDB('insert_topic_subscription_member', $subscription); + $subscription = $subscription->save(); } // Create the post ("topic post") - $insert_post = array( + $query['insert'] = array( 'poster' => $post['username'], 'poster_id' => $this->user->id, 'poster_ip' => get_remote_address(), @@ -471,14 +503,15 @@ public function insert_topic($post, $fid) 'topic_id' => $new['tid'], ); - DB::for_table('posts') - ->create() - ->set($insert_post) - ->save(); + $query = DB::for_table('posts') + ->create() + ->set($query['insert']); + $query = $this->hook->fireDB('insert_topic_post_member', $query); + $query = $query->save(); } else { // It's a guest // Create the post ("topic post") - $insert_post = array( + $query['insert'] = array( 'poster' => $post['username'], 'poster_ip' => get_remote_address(), 'message' => $post['message'], @@ -488,62 +521,73 @@ public function insert_topic($post, $fid) ); if ($this->config['p_force_guest_email'] == '1' || $post['email'] != '') { - $insert_post['poster_email'] = $post['email']; + $query['poster_email'] = $post['email']; } - DB::for_table('posts') + $query = DB::for_table('posts') ->create() - ->set($insert_post) - ->save(); + ->set($query['insert']); + $query = $this->hook->fireDB('insert_topic_post_member', $query); + $query = $query->save(); } $new['pid'] = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'topics'); // Update the topic with last_post_id - $update_topic = array( + $topic['update'] = array( 'last_post_id' => $new['pid'], 'first_post_id' => $new['pid'], ); - DB::for_table('topics')->where('id', $new['tid']) - ->find_one() - ->set($update_topic) - ->save(); + $topic = DB::for_table('topics') + ->where('id', $new['tid']) + ->find_one() + ->set($topic['update']); + $topic = $this->hook->fireDB('insert_topic_post_topic', $topic); + $topic = $topic->save(); update_search_index('post', $new['pid'], $post['message'], $post['subject']); update_forum($fid); + $new = $this->hook->fireDB('insert_topic', $new); + return $new; } // Send notifications for new topics public function send_notifications_new_topic($post, $cur_posting, $new_tid) { + $this->hook->fire('send_notifications_new_topic_start', $post, $cur_posting, $new_tid); + // Get any subscribed users that should be notified (banned users are excluded) - $where_send_notifications_reply = array( + $result['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); - $select_send_notifications_reply = array('u.id', 'u.email', 'u.notify_with_post', 'u.language'); + $result['select'] = array('u.id', 'u.email', 'u.notify_with_post', 'u.language'); $result = DB::for_table('users') - ->table_alias('u') - ->select_many($select_send_notifications_reply) - ->inner_join('forum_subscriptions', array('u.id', '=', 's.user_id'), 's') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', $cur_posting['id']), 'fp', true) - ->left_outer_join('forum_perms', array('fp.group_id', '=', 'u.group_id')) - ->left_outer_join('bans', array('u.username', '=', 'b.username'), 'b') - ->where_null('b.username') - ->where_any_is($where_send_notifications_reply) - ->where('s.forum_id', $cur_posting['id']) - ->where_not_equal('u.id', $this->user->id) - ->find_many(); + ->table_alias('u') + ->select_many($result['select']) + ->inner_join('forum_subscriptions', array('u.id', '=', 's.user_id'), 's') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', $cur_posting['id']), 'fp', true) + ->left_outer_join('forum_perms', array('fp.group_id', '=', 'u.group_id')) + ->left_outer_join('bans', array('u.username', '=', 'b.username'), 'b') + ->where_null('b.username') + ->where_any_is($result['where']) + ->where('s.forum_id', $cur_posting['id']) + ->where_not_equal('u.id', $this->user->id); + $result = $this->hook->fireDB('send_notifications_new_topic_query'); + $result = $result->find_many(); if ($result) { require_once FEATHER_ROOT.'include/email.php'; $notification_emails = array(); + $censored_message = feather_trim(censor_words($post['message'])); + $censored_subject = feather_trim(censor_words($post['subject'])); + if ($this->config['o_censoring'] == '1') { $cleaned_message = bbcode2email($censored_message, -1); } else { @@ -557,6 +601,7 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) if (file_exists(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')) { // Load the "new topic" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')); + $mail_tpl = $this->hook->fire('send_notifications_new_topic_mail_tpl', $mail_tpl); // Load the "new topic full" template (with post included) $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_topic_full.tpl')); @@ -575,8 +620,9 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) $mail_message = str_replace('', $cur_posting['forum_name'], $mail_message); $mail_message = str_replace('', $post['username'], $mail_message); $mail_message = str_replace('', get_link('topic/'.$new_tid.'/'), $mail_message); - $mail_message = str_replace('', get_base_url().'/misc.php?action=unsubscribe&fid='.$cur_posting['id'], $mail_message); + $mail_message = str_replace('', get_link('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('send_notifications_new_topic_mail_message', $mail_message); $mail_subject_full = str_replace('', $cur_posting['forum_name'], $mail_subject_full); $mail_message_full = str_replace('', $this->config['o_censoring'] == '1' ? $censored_subject : $post['subject'], $mail_message_full); @@ -584,8 +630,9 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) $mail_message_full = str_replace('', $post['username'], $mail_message_full); $mail_message_full = str_replace('', $cleaned_message, $mail_message_full); $mail_message_full = str_replace('', get_link('topic/'.$new_tid.'/'), $mail_message_full); - $mail_message_full = str_replace('', get_base_url().'/misc.php?action=unsubscribe&fid='.$cur_posting['id'], $mail_message_full); + $mail_message_full = str_replace('', get_link('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message_full); $mail_message_full = str_replace('', $this->config['o_board_title'], $mail_message_full); + $mail_message_full = $this->hook->fire('send_notifications_new_topic_mail_message_full', $mail_message_full); $notification_emails[$cur_subscriber['language']][0] = $mail_subject; $notification_emails[$cur_subscriber['language']][1] = $mail_message; @@ -604,6 +651,8 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) } } + $this->hook->fire('send_notifications_new_topic'); + unset($cleaned_message); } } @@ -611,8 +660,11 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) // Warn the admin if a banned user posts public function warn_banned_user($post, $new_pid) { + $this->hook->fire('warn_banned_user_start', $post, $new_pid); + // Load the "banned email post" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/banned_email_post.tpl')); + $mail_tpl = $this->hook->fire('warn_banned_user_mail_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); @@ -623,6 +675,7 @@ public function warn_banned_user($post, $new_pid) $mail_message = str_replace('', $post['email'], $mail_message); $mail_message = str_replace('', get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('warn_banned_user_mail_message', $mail_message); feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } @@ -630,22 +683,26 @@ public function warn_banned_user($post, $new_pid) // Increment post count, change group if needed public function increment_post_count($post, $new_tid) { + $this->hook->fire('increment_post_count_start', $post, $new_tid); + if (!$this->user->is_guest) { - DB::for_table('users') - ->where('id', $this->user->id) - ->find_one() - ->set('last_post', $post['time']) - ->set_expr('num_posts', 'num_posts+1') - ->save(); + $increment = DB::for_table('users') + ->where('id', $this->user->id) + ->find_one() + ->set('last_post', $post['time']) + ->set_expr('num_posts', 'num_posts+1'); + $increment = $this->hook->fireDB('increment_post_count_query', $increment); + $increment = $increment->save(); // Promote this user to a new group if enabled if ($this->user->g_promote_next_group != 0 && $this->user->num_posts + 1 >= $this->user->g_promote_min_posts) { $new_group_id = $this->user->g_promote_next_group; - DB::for_table('users') - ->where('id', $this->user->id) - ->find_one() - ->set('group_id', $new_group_id) - ->save(); + $promote = DB::for_table('users') + ->where('id', $this->user->id) + ->find_one() + ->set('group_id', $new_group_id); + $promote = $this->hook->fireDB('increment_post_count_query', $promote); + $promote = $promote->save(); } // Topic tracking stuff... @@ -654,12 +711,15 @@ public function increment_post_count($post, $new_tid) set_tracked_topics($tracked_topics); } else { // Update the last_post field for guests - DB::for_table('online') - ->where('ident', get_remote_address()) - ->find_one() - ->set('last_post', $post['time']) - ->save(); + $last_post = DB::for_table('online') + ->where('ident', get_remote_address()) + ->find_one() + ->set('last_post', $post['time']); + $last_post = $this->hook->fireDB('increment_post_count_last_post', $last_post); + $last_post = $last_post->save(); } + + $this->hook->fire('increment_post_count'); } // @@ -669,6 +729,8 @@ public function split_text($text, $start, $end, $retab = true) { $result = array(0 => array(), 1 => array()); // 0 = inside, 1 = outside + $result = $this->hook->fire('split_text_start', $result, $text, $start, $end, $retab); + // split the text into parts $parts = preg_split('%'.preg_quote($start, '%').'(.*)'.preg_quote($end, '%').'%Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE); $num_parts = count($parts); @@ -683,20 +745,25 @@ public function split_text($text, $start, $end, $retab = true) $result[1] = str_replace("\t", $spaces, $result[1]); } + $result = $this->hook->fire('split_text_start', $result); + return $result; } // If we are quoting a message public function get_quote_message($qid, $tid) { + $quote = array(); + $quote = $this->hook->fire('get_quote_message', $quote, $qid, $tid); - $select_get_quote_message = array('poster', 'message'); + $quote['select'] = array('poster', 'message'); - $quote = DB::for_table('posts')->select_many($select_get_quote_message) - ->where('id', $qid) - ->where('topic_id', $tid) - ->find_one(); + $quote = DB::for_table('posts')->select_many($quote['select']) + ->where('id', $qid) + ->where('topic_id', $tid); + $quote = $this->hook->fireDB('get_quote_message_query', $quote); + $quote = $quote->find_one(); if (!$quote) { message(__('Bad request'), '404'); @@ -755,12 +822,16 @@ public function get_quote_message($qid, $tid) $quote = '> '.$quote['poster'].' '.__('wrote')."\n\n".'> '.$quote['message']."\n"; } + $quote = $this->hook->fire('get_quote_message', $quote); + return $quote; } // Get the current state of checkboxes public function get_checkboxes($fid, $is_admmod, $is_subscribed) { + $this->hook->fire('get_checkboxes_start', $fid, $is_admmod, $is_subscribed); + $cur_index = 1; $checkboxes = array(); @@ -795,6 +866,8 @@ public function get_checkboxes($fid, $is_admmod, $is_subscribed) $checkboxes[] = ''; } + $checkboxes = $this->hook->fire('get_checkboxes', $checkboxes); + return $checkboxes; } @@ -805,20 +878,25 @@ public function topic_review($tid) $post_data = array(); + $post_data = $this->hook->fire('topic_review_start', $post_data, $tid); + require_once FEATHER_ROOT.'include/parser.php'; $select_topic_review = array('poster', 'message', 'hide_smilies', 'posted'); $result = DB::for_table('posts')->select_many($select_topic_review) - ->where('topic_id', $tid) - ->order_by_desc('id') - ->find_many(); + ->where('topic_id', $tid) + ->order_by_desc('id'); + $result = $this->hook->fire('topic_review_query', $result); + $result = $result->find_many(); foreach($result as $cur_post) { $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); $post_data[] = $cur_post; } + $post_data = $this->hook->fire('topic_review', $post_data); + return $post_data; } } From 961a61b16910dea17da815ea4ec2085c4cf29141 Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 22 Aug 2015 18:46:14 +0200 Subject: [PATCH 124/353] Start to add hooks --- model/profile.php | 406 ++++++++++++++++++++++++++++------------------ 1 file changed, 248 insertions(+), 158 deletions(-) diff --git a/model/profile.php b/model/profile.php index 6720eee3..c28a9c20 100644 --- a/model/profile.php +++ b/model/profile.php @@ -20,33 +20,40 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function change_pass($id) { + $id = $this->hook->fire('change_pass_start', $id); + if ($this->request->get('key')) { + + $key = $this->request->get('key'); + $key = $this->hook->fire('change_pass_key', $key); + // If the user is already logged in we shouldn't be here :) if (!$this->user->is_guest) { header('Location: '.get_base_url()); exit; } - $key = $this->request->get('key'); - $cur_user = DB::for_table('users') - ->where('id', $id) - ->find_one(); + ->where('id', $id); + $cur_user = $this->hook->fireDB('change_pass_user_query', $cur_user); + $cur_user = $cur_user->find_one(); if ($key == '' || $key != $cur_user['activate_key']) { message(__('Pass key bad').' '.feather_escape($this->config['o_admin_email']).'.'); } else { - DB::for_table('users') - ->where('id', $id) - ->find_one() - ->set('password', $cur_user['activate_string']) - ->set_expr('activate_string', 'NULL') - ->set_expr('activate_key', 'NULL') - ->save(); + $query = DB::for_table('users') + ->where('id', $id) + ->find_one() + ->set('password', $cur_user['activate_string']) + ->set_expr('activate_string', 'NULL') + ->set_expr('activate_key', 'NULL'); + $query = $this->hook->fireDB('change_pass_activate_query', $query); + $query = $query->save(); message(__('Pass updated'), true); } @@ -54,19 +61,22 @@ public function change_pass($id) // Make sure we are allowed to change this user's password if ($this->user->id != $id) { + $id = $this->hook->fire('change_pass_key_not_id', $id); + if (!$this->user->is_admmod) { // A regular user trying to change another user's password? message(__('No permission'), '403'); } elseif ($this->user->g_moderator == '1') { // A moderator trying to change a user's password? - $select_change_password = array('u.group_id', 'g.g_moderator'); + $user['select'] = array('u.group_id', 'g.g_moderator'); $user = DB::for_table('users') - ->table_alias('u') - ->select_many($select_change_password) - ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where('u.id', $id) - ->find_one(); + ->table_alias('u') + ->select_many($user['select']) + ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') + ->where('u.id', $id); + $user = $this->hook->fireDB('change_pass_user_query', $user); + $user = $user->find_one(); if (!$user) { message(__('Bad request'), '404'); @@ -91,8 +101,9 @@ public function change_pass($id) } $cur_user = DB::for_table('users') - ->where('id', $id) - ->find_one(); + ->where('id', $id); + $cur_user = $this->hook->fireDB('change_pass_find_user', $cur_user); + $cur_user = $cur_user->find_one(); $authorized = false; @@ -110,36 +121,44 @@ public function change_pass($id) $new_password_hash = feather_hash($new_password1); - DB::for_table('users')->where('id', $id) - ->find_one() - ->set('password', $new_password_hash) - ->save(); + $update_password = DB::for_table('users') + ->where('id', $id) + ->find_one() + ->set('password', $new_password_hash); + $update_password = $this->hook->fireDB('change_pass_query', $update_password); + $update_password = $update_password->save(); if ($this->user->id == $id) { feather_setcookie($this->user->id, $new_password_hash, time() + $this->config['o_timeout_visit']); } + $this->hook->fire('change_pass'); + redirect(get_link('user/'.$id.'/section/essentials/'), __('Pass updated redirect')); } } public function change_email($id) { + $id = $this->hook->fire('change_email_start', $id); + // Make sure we are allowed to change this user's email if ($this->user->id != $id) { + $id = $this->hook->fire('change_email_not_id', $id); + if (!$this->user->is_admmod) { // A regular user trying to change another user's email? message(__('No permission'), '403'); } elseif ($this->user->g_moderator == '1') { // A moderator trying to change a user's email? - - $select_change_mail = array('u.group_id', 'g.g_moderator'); + $user['select'] = array('u.group_id', 'g.g_moderator'); $user = DB::for_table('users') - ->table_alias('u') - ->select_many($select_change_mail) - ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where('u.id', $id) - ->find_one(); + ->table_alias('u') + ->select_many($user['select']) + ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') + ->where('u.id', $id); + $user = $this->hook->fireDB('change_email_not_id_query', $user); + $user = $user->find_one(); if (!$user) { message(__('Bad request'), '404'); @@ -153,25 +172,30 @@ public function change_email($id) if ($this->request->get('key')) { $key = $this->request->get('key'); + $key = $this->hook->fire('change_email_key', $key); $new_email_key = DB::for_table('users') - ->where('id', $id) - ->find_one_col('activate_key'); + ->where('id', $id); + $new_email_key = $this->hook->fireDB('change_email_key_query', $new_email_key); + $new_email_key = $new_email_key->find_one_col('activate_key'); if ($key == '' || $key != $new_email_key) { message(__('Email key bad').' '.feather_escape($this->config['o_admin_email']).'.'); } else { - DB::for_table('users') - ->where('id', $id) - ->find_one() - ->set_expr('email', 'activate_string') - ->set_expr('activate_string', 'NULL') - ->set_expr('activate_key', 'NULL') - ->save(); + $update_mail = DB::for_table('users') + ->where('id', $id) + ->find_one() + ->set_expr('email', 'activate_string') + ->set_expr('activate_string', 'NULL') + ->set_expr('activate_key', 'NULL'); + $update_mail = $this->hook->fireDB('change_email_query', $update_mail); + $update_mail = $update_mail->save(); message(__('Email updated'), true); } } elseif ($this->request->isPost()) { + $this->hook->fire('change_email_post'); + if (feather_hash($this->request->post('req_password')) !== $this->user->password) { message(__('Wrong pass')); } @@ -180,6 +204,7 @@ public function change_email($id) // Validate the email address $new_email = strtolower(feather_trim($this->request->post('req_new_email'))); + $new_email = $this->hook->fire('change_email_new_email', $new_email); if (!is_valid_email($new_email)) { message(__('Invalid email')); } @@ -191,28 +216,32 @@ public function change_email($id) } elseif ($this->config['o_mailing_list'] != '') { // Load the "banned email change" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/banned_email_change.tpl')); + $mail_tpl = $this->hook->fire('change_email_mail_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('change_email_mail_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', $new_email, $mail_message); $mail_message = str_replace('', get_link('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('change_email_mail_message', $mail_message); feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } // Check if someone else already has registered with that email address - $select_change_mail = array('id', 'username'); + $result['select'] = array('id', 'username'); $result = DB::for_table('users') - ->select_many($select_change_mail) - ->where('email', $new_email) - ->find_many(); + ->select_many($result['select']) + ->where('email', $new_email); + $result = $this->hook->fireDB('change_email_check_mail', $result); + $result = $result->find_many(); if ($result) { if ($this->config['p_allow_dupe_email'] == '0') { @@ -224,16 +253,19 @@ public function change_email($id) // Load the "dupe email change" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/dupe_email_change.tpl')); + $mail_tpl = $this->hook->fire('change_email_mail_dupe_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('change_email_mail_dupe_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', implode(', ', $dupe_list), $mail_message); $mail_message = str_replace('', get_link('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('change_email_mail_dupe_message', $mail_message); feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } @@ -241,39 +273,50 @@ public function change_email($id) $new_email_key = random_pass(8); + $new_email_key = $this->hook->fire('change_email_new_email_key', $new_email_key); // Update the user - $update_user = array( + unset($user); + $user['update'] = array( 'activate_string' => $new_email, 'activate_key' => $new_email_key, ); - - DB::for_table('users')->where('id', tid) - ->find_one() - ->set($update_user) - ->save(); + $user = DB::for_table('users') + ->where('id', tid) + ->find_one() + ->set($user['update']); + $user = $this->hook->fireDB('change_email_user_query', $user); + $user = $user->save(); // Load the "activate email" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/activate_email.tpl')); + $mail_tpl = $this->hook->fire('change_email_mail_activate_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('change_email_mail_activate_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', get_base_url(), $mail_message); $mail_message = str_replace('', get_link('user/'.$id.'/action/change_email/?key='.$new_email_key), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('change_email_mail_activate_message', $mail_message); feather_mail($new_email, $mail_subject, $mail_message); + $this->hook->fire('change_email_sent'); + message(__('Activate email sent').' '.feather_escape($this->config['o_admin_email']).'.', true); } + $this->hook->fire('change_email'); } public function upload_avatar($id, $files_data) { + $files_data = $this->hook->fire('upload_avatar_start', $files_data, $id); + if (!isset($files_data['req_file'])) { message(__('No file')); } @@ -310,6 +353,8 @@ public function upload_avatar($id, $files_data) } if (is_uploaded_file($uploaded_file['tmp_name'])) { + $uploaded_file = $this->hook->fire('upload_avatar_is_uploaded_file', $uploaded_file); + // Preliminary file check, adequate in most cases $allowed_types = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png'); if (!in_array($uploaded_file['type'], $allowed_types)) { @@ -355,21 +400,28 @@ public function upload_avatar($id, $files_data) message(__('Unknown failure')); } + $uploaded_file = $this->hook->fire('upload_avatar', $uploaded_file); + redirect(get_link('user/'.$id.'/section/personality/'), __('Avatar upload redirect')); } public function update_group_membership($id) { + $id = $this->hook->fire('update_group_membership_start', $id); + $new_group_id = intval($this->request->post('group_id')); $old_group_id = DB::for_table('users') - ->where('id', $id) - ->find_one_col('group_id'); + ->where('id', $id); + $old_group_id = $this->hook->fireDB('update_group_membership_old_group', $old_group_id); + $old_group_id = $old_group_id->find_one_col('group_id'); - DB::for_table('users')->where('id', $id) - ->find_one() - ->set('group_id', $new_group_id) - ->save(); + $update_group = DB::for_table('users') + ->where('id', $id) + ->find_one() + ->set('group_id', $new_group_id); + $update_group = $this->hook->fireDB('update_group_membership_update_group', $update_group); + $update_group = $update_group->save(); // Regenerate the users info cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { @@ -383,17 +435,15 @@ public function update_group_membership($id) } $new_group_mod = DB::for_table('groups') - ->where('g_id', $new_group_id) - ->find_one_col('g_moderator'); + ->where('g_id', $new_group_id); + $new_group_mod = $this->hook->fireDB('update_group_membership_new_mod', $new_group_mod); + $new_group_mod = $new_group_mod->find_one_col('g_moderator'); // If the user was a moderator or an administrator, we remove him/her from the moderator list in all forums as well if ($new_group_id != FEATHER_ADMIN && $new_group_mod != '1') { - $select_mods = array('id', 'moderators'); - - $result = DB::for_table('forums') - ->select_many($select_mods) - ->find_many(); + // Loop through all forums + $result = $this->loop_mod_forums(); foreach($result as $cur_forum) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); @@ -402,21 +452,23 @@ public function update_group_membership($id) $username = array_search($id, $cur_moderators); unset($cur_moderators[$username]); + $update_forums = DB::for_table('forums') + ->where('id', $cur_forum['id']) + ->find_one(); + if (!empty($cur_moderators)) { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + $update_forums = $update_forums->set('moderators', serialize($cur_moderators)); } else { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set_expr('moderators', 'NULL') - ->save(); + $update_forums = $update_forums->set_expr('moderators', 'NULL'); } + $update_forums = $this->hook->fireDB('update_group_membership_mod_forums', $update_forums); + $update_forums = $update_forums->save(); } } } + $id = $this->hook->fire('update_group_membership', $id); + redirect(get_link('user/'.$id.'/section/admin/'), __('Group membership redirect')); } @@ -424,12 +476,26 @@ public function get_username($id) { // Get the username of the user we are processing $username = DB::for_table('users') - ->where('id', $id) - ->find_one_col('username'); + ->where('id', $id) + ->find_one_col('username'); + + $username = $this->hook->fire('get_username', $username); return $username; } + public function loop_mod_forums() + { + $result['select'] = array('id', 'moderators'); + + $result = DB::for_table('forums') + ->select_many($result['select']); + $result = $this->hook->fireDB('loop_mod_forums', $result); + $result = $result->find_many(); + + return $result; + } + public function update_mod_forums($id) { $username = $this->get_username($id); @@ -437,11 +503,7 @@ public function update_mod_forums($id) $moderator_in = ($this->request->post('moderator_in')) ? array_keys($this->request->post('moderator_in')) : array(); // Loop through all forums - $select_mods = array('id', 'moderators'); - - $result = DB::for_table('forums') - ->select_many($select_mods) - ->find_many(); + $result = $this->loop_mod_forums(); foreach($result as $cur_forum) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); @@ -450,43 +512,50 @@ public function update_mod_forums($id) $cur_moderators[$username] = $id; uksort($cur_moderators, 'utf8_strcasecmp'); - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + $update_forums = DB::for_table('forums') + ->where('id', $cur_forum['id']) + ->find_one() + ->set('moderators', serialize($cur_moderators)); + $update_forums = $this->hook->fireDB('update_mod_forums_query', $update_forums); + $update_forums = $update_forums->save(); } // If the user shouldn't have moderator access (and he/she already has it) elseif (!in_array($cur_forum['id'], $moderator_in) && in_array($id, $cur_moderators)) { unset($cur_moderators[$username]); + $update_forums = DB::for_table('forums') + ->where('id', $cur_forum['id']) + ->find_one(); + if (!empty($cur_moderators)) { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + $update_forums = $update_forums->set('moderators', serialize($cur_moderators)); } else { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set_expr('moderators', 'NULL') - ->save(); + $update_forums = $update_forums->set_expr('moderators', 'NULL'); } + $update_forums = $this->hook->fireDB('update_mod_forums_query', $update_forums); + $update_forums = $update_forums->save(); } } + $id = $this->hook->fire('update_mod_forums', $id); + redirect(get_link('user/'.$id.'/section/admin/'), __('Update forums redirect')); } public function ban_user($id) { + $id = $this->hook->fire('ban_user_start', $id); + // Get the username of the user we are banning $username = $this->get_username($id); // Check whether user is already banned $ban_id = DB::for_table('bans') - ->where('username', $username) - ->order_by_expr('expire IS NULL DESC') - ->order_by_desc('expire') - ->find_one_col('id'); + ->where('username', $username) + ->order_by_expr('expire IS NULL DESC') + ->order_by_desc('expire'); + $ban_id = $this->hook->fireDB('ban_user_query', $ban_id); + $ban_id = $ban_id->find_one_col('id'); if ($ban_id) { redirect(get_link('admin/bans/edit/'.$ban_id.'/'), __('Ban redirect')); @@ -497,36 +566,47 @@ public function ban_user($id) public function promote_user($id) { + $id = $this->hook->fire('promote_user_start', $id); + $pid = $this->request->get('pid') ? intval($this->request->get('pid')) : 0; // Find the group ID to promote the user to $next_group_id = DB::for_table('groups') - ->table_alias('g') - ->inner_join('users', array('u.group_id', '=', 'g.g_id'), 'u') - ->where('u.id', $id) - ->find_one_col('g.g_promote_next_group'); + ->table_alias('g') + ->inner_join('users', array('u.group_id', '=', 'g.g_id'), 'u') + ->where('u.id', $id); + $next_group_id = $this->hook->fireDB('promote_user_group_id', $next_group_id); + $next_group_id = $next_group_id->find_one_col('g.g_promote_next_group'); if (!$next_group_id) { message(__('Bad request'), '404'); } // Update the user - DB::for_table('users')->where('id', $id) - ->find_one() - ->set('group_id', $next_group_id) - ->save(); + $update_user = DB::for_table('users') + ->where('id', $id) + ->find_one() + ->set('group_id', $next_group_id); + $update_user = $this->hook->fireDB('promote_user_query', $update_user); + $update_user = $update_user->save(); + + $pid = $this->hook->fire('promote_user', $pid); redirect(get_link('post/'.$pid.'/#p'.$pid), __('User promote redirect')); } public function delete_user($id) { + $id = $this->hook->fire('delete_user_start', $id); + // Get the username and group of the user we are deleting - $select_info_delete_user = array('group_id', 'username'); + $result['select'] = array('group_id', 'username'); - $result = DB::for_table('users')->where('id', $id) - ->select_many($select_info_delete_user) - ->find_one(); + $result = DB::for_table('users') + ->where('id', $id) + ->select_many($result['select']); + $result = $this->hook->fireDB('delete_user_username', $result); + $result = $result->find_one(); $group_id = $result['group_id']; $username = $result['username']; @@ -538,49 +618,52 @@ public function delete_user($id) if ($this->request->post('delete_user_comply')) { // If the user is a moderator or an administrator, we remove him/her from the moderator list in all forums as well $group_mod = DB::for_table('groups') - ->where('g_id', $group_id) - ->find_one_col('g_moderator'); + ->where('g_id', $group_id); + $group_mod = $this->hook->fireDB('delete_user_group_mod', $group_mod); + $group_mod = $group_mod->find_one_col('g_moderator'); if ($group_id == FEATHER_ADMIN || $group_mod == '1') { - $select_info_delete_moderators = array('id', 'moderators'); - $result = DB::for_table('forums') - ->select_many($select_info_delete_moderators) - ->find_many(); + // Loop through all forums + $result = $this->loop_mod_forums(); foreach($result as $cur_forum) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); if (in_array($id, $cur_moderators)) { unset($cur_moderators[$username]); - + + $update_forums = DB::for_table('forums') + ->where('id', $cur_forum['id']) + ->find_one(); + if (!empty($cur_moderators)) { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + $update_forums = $update_forums->set('moderators', serialize($cur_moderators)); } else { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set_expr('moderators', 'NULL') - ->save(); + $update_forums = $update_forums->set_expr('moderators', 'NULL'); } + $update_forums = $this->hook->fireDB('update_mod_forums_query', $update_forums); + $update_forums = $update_forums->save(); } } } // Delete any subscriptions - DB::for_table('topic_subscriptions') - ->where('user_id', $id) - ->delete_many(); - DB::for_table('forum_subscriptions') - ->where('user_id', $id) - ->delete_many(); + $delete_subscriptions = DB::for_table('topic_subscriptions') + ->where('user_id', $id); + $delete_subscriptions = $this->hook->fireDB('delete_user_subscriptions_topic', $delete_subscriptions); + $delete_subscriptions = $delete_subscriptions->delete_many(); + unset($delete_subscriptions); + $delete_subscriptions = DB::for_table('forum_subscriptions') + ->where('user_id', $id); + $delete_subscriptions = $this->hook->fireDB('delete_user_subscriptions_forum', $delete_subscriptions); + $delete_subscriptions = $delete_subscriptions->delete_many(); // Remove him/her from the online list (if they happen to be logged in) - DB::for_table('online') - ->where('user_id', $id) - ->delete_many(); + $delete_online = DB::for_table('online') + ->where('user_id', $id); + $delete_online = $this->hook->fireDB('delete_user_online', $delete_online); + $delete_online = $delete_online->delete_many(); // Should we delete all posts made by this user? if ($this->request->post('delete_posts')) { @@ -588,26 +671,31 @@ public function delete_user($id) // Hold on, this could take some time! @set_time_limit(0); + $this->hook->fire('delete_user_posts'); + // Find all posts made by this user - $select_user_posts = array('p.id', 'p.topic_id', 't.forum_id'); + unset($result); + $result['select'] = array('p.id', 'p.topic_id', 't.forum_id'); $result = DB::for_table('posts') - ->table_alias('p') - ->select_many($select_user_posts) - ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') - ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') - ->where('p.poster_id', $id) - ->find_many(); + ->table_alias('p') + ->select_many($result['select']) + ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') + ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') + ->where('p.poster_id', $id); + $result = $this->hook->fireDB('delete_user_posts_first_query', $result); + $result = $result->find_many(); if ($result) { foreach($result as $cur_post) { // Determine whether this post is the "topic post" or not $result2 = DB::for_table('posts') - ->where('topic_id', $cur_post['topic_id']) - ->order_by('posted') - ->find_one_col('id'); + ->where('topic_id', $cur_post['topic_id']) + ->order_by('posted'); + $result2 = $this->hook->fireDB('delete_user_posts_second_query', $result2); + $result2 = $result2->find_one_col('id'); - if ($this->db->result($result2) == $cur_post['id']) { + if ($result2 == $cur_post['id']) { delete_topic($cur_post['topic_id']); } else { delete_post($cur_post['id'], $cur_post['topic_id']); @@ -618,15 +706,16 @@ public function delete_user($id) } } else { // Set all his/her posts to guest - DB::for_table('posts') - ->where_in('poster_id', '1') - ->update_many('poster_id', $id); + $update_guest = DB::for_table('posts') + ->where_in('poster_id', '1'); + $update_guest = $this->hook->fireDB('delete_user_posts_guest_query', $update_guest); + $update_guest = $update_guest->update_many('poster_id', $id); } // Delete the user - DB::for_table('users') - ->where('id', $id) - ->delete_many(); + $delete_user = DB::for_table('users') + ->where('id', $id); + $delete_user = $delete_user->delete_many(); // Delete user avatar delete_avatar($id); @@ -642,24 +731,25 @@ public function delete_user($id) generate_admins_cache(); } + $this->hook->fire('delete_user'); + redirect(get_base_url(), __('User delete redirect')); } } public function fetch_user_group($id) { - - $info = array(); - - $select_fetch_user_group = array('old_username' => 'u.username', 'group_id' => 'u.group_id', 'is_moderator' => 'g.g_moderator'); + + $info['select'] = array('old_username' => 'u.username', 'group_id' => 'u.group_id', 'is_moderator' => 'g.g_moderator'); $info = DB::for_table('users') - ->table_alias('u') - ->select_many($select_fetch_user_group) - ->left_outer_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where('u.id', $id) - ->find_one(); + ->table_alias('u') + ->select_many($info['select']) + ->left_outer_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') + ->where('u.id', $id); + $info = $this->hook->fireDB('fetch_user_group', $info); + $info = $info->find_one(); if (!$info) { message(__('Bad request'), '404'); From 06e3c178f82e9329e0936ab3ba361eafd17e6ac7 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 22 Aug 2015 21:19:14 +0200 Subject: [PATCH 125/353] Clean up things Remove legacy CSS styles. Make FeatherBB theme views default --- style/Air.css | 1664 ----------------- style/Air/base_admin.css | 163 -- style/Air/img/asterisk.png | Bin 168 -> 0 bytes style/Air/img/bull.png | Bin 107 -> 0 bytes style/Air/img/email.png | Bin 390 -> 0 bytes style/Air/img/exclaim.png | Bin 432 -> 0 bytes style/Air/img/ext.png | Bin 130 -> 0 bytes style/Air/img/feed.png | Bin 439 -> 0 bytes style/Air/img/help.png | Bin 394 -> 0 bytes style/Air/img/index.html | 1 - style/Air/index.html | 1 - style/Cobalt.css | 1168 ------------ style/Earth.css | 1664 ----------------- style/Earth/base_admin.css | 163 -- style/Earth/img/asterisk.png | Bin 168 -> 0 bytes style/Earth/img/bull.png | Bin 107 -> 0 bytes style/Earth/img/email.png | Bin 388 -> 0 bytes style/Earth/img/exclaim.png | Bin 432 -> 0 bytes style/Earth/img/ext.png | Bin 130 -> 0 bytes style/Earth/img/feed.png | Bin 439 -> 0 bytes style/Earth/img/help.png | Bin 379 -> 0 bytes style/Earth/img/index.html | 1 - style/Earth/index.html | 1 - style/FeatherBB/view/admin/bans/add_ban.php | 96 - .../FeatherBB/view/admin/bans/admin_bans.php | 102 - style/FeatherBB/view/admin/bans/index.html | 1 - .../FeatherBB/view/admin/bans/search_ban.php | 87 - style/FeatherBB/view/admin/categories.php | 111 -- style/FeatherBB/view/admin/censoring.php | 84 - .../view/admin/forums/admin_forums.php | 114 -- .../view/admin/forums/delete_forum.php | 35 - style/FeatherBB/view/admin/forums/index.html | 1 - .../view/admin/forums/permissions.php | 137 -- .../view/admin/groups/add_edit_group.php | 311 --- .../view/admin/groups/admin_groups.php | 110 -- .../view/admin/groups/confirm_delete.php | 36 - .../view/admin/groups/delete_group.php | 39 - style/FeatherBB/view/admin/index.html | 1 - style/FeatherBB/view/admin/index.php | 63 - style/FeatherBB/view/admin/loader.php | 17 - .../admin/maintenance/admin_maintenance.php | 99 - .../view/admin/maintenance/index.html | 1 - .../view/admin/maintenance/prune.php | 39 - .../view/admin/maintenance/rebuild.php | 38 - style/FeatherBB/view/admin/menu.php | 112 -- style/FeatherBB/view/admin/options.php | 849 --------- style/FeatherBB/view/admin/parser.php | 299 --- style/FeatherBB/view/admin/permissions.php | 189 -- style/FeatherBB/view/admin/reports.php | 116 -- style/FeatherBB/view/admin/statistics.php | 42 - .../view/admin/users/admin_users.php | 172 -- .../FeatherBB/view/admin/users/ban_users.php | 58 - .../view/admin/users/delete_users.php | 39 - .../FeatherBB/view/admin/users/find_users.php | 100 - .../FeatherBB/view/admin/users/move_users.php | 47 - .../FeatherBB/view/admin/users/search_ip.php | 79 - .../FeatherBB/view/admin/users/show_users.php | 100 - style/FeatherBB/view/delete.php | 64 - style/FeatherBB/view/edit.php | 119 -- style/FeatherBB/view/footer.php | 147 -- style/FeatherBB/view/header.php | 131 -- style/FeatherBB/view/help.php | 141 -- style/FeatherBB/view/index.html | 1 - style/FeatherBB/view/index.php | 111 -- style/FeatherBB/view/login/form.php | 42 - style/FeatherBB/view/login/index.html | 1 - .../view/login/password_forgotten.php | 57 - style/FeatherBB/view/message.php | 25 - style/FeatherBB/view/misc/email.php | 37 - style/FeatherBB/view/misc/index.html | 1 - style/FeatherBB/view/misc/report.php | 44 - style/FeatherBB/view/misc/rules.php | 23 - .../FeatherBB/view/moderate/delete_posts.php | 33 - .../FeatherBB/view/moderate/delete_topics.php | 34 - style/FeatherBB/view/moderate/index.html | 1 - .../FeatherBB/view/moderate/merge_topics.php | 36 - .../view/moderate/moderator_forum.php | 101 - style/FeatherBB/view/moderate/move_topics.php | 44 - style/FeatherBB/view/moderate/posts_view.php | 95 - style/FeatherBB/view/moderate/split_posts.php | 40 - style/FeatherBB/view/post.php | 213 --- style/FeatherBB/view/profile/change_mail.php | 35 - style/FeatherBB/view/profile/change_pass.php | 39 - style/FeatherBB/view/profile/delete_user.php | 36 - style/FeatherBB/view/profile/index.html | 1 - style/FeatherBB/view/profile/menu.php | 55 - .../FeatherBB/view/profile/section_admin.php | 87 - .../view/profile/section_display.php | 101 - .../view/profile/section_essentials.php | 258 --- .../view/profile/section_messaging.php | 39 - .../view/profile/section_personal.php | 39 - .../view/profile/section_personality.php | 56 - .../view/profile/section_privacy.php | 62 - .../FeatherBB/view/profile/upload_avatar.php | 35 - style/FeatherBB/view/profile/view_profile.php | 66 - style/FeatherBB/view/register/email.php | 39 - style/FeatherBB/view/register/form.php | 134 -- style/FeatherBB/view/register/index.html | 1 - style/FeatherBB/view/register/rules.php | 32 - style/FeatherBB/view/search/footer.php | 40 - style/FeatherBB/view/search/form.php | 79 - style/FeatherBB/view/search/header.php | 48 - style/FeatherBB/view/search/index.html | 1 - style/FeatherBB/view/search/posts.php | 56 - style/FeatherBB/view/search/topics.php | 29 - style/FeatherBB/view/userlist.php | 115 -- style/FeatherBB/view/viewforum.php | 100 - style/FeatherBB/view/viewtopic.php | 204 -- style/Fire.css | 1663 ---------------- style/Fire/base_admin.css | 163 -- style/Fire/img/asterisk.png | Bin 168 -> 0 bytes style/Fire/img/bull.png | Bin 107 -> 0 bytes style/Fire/img/email.png | Bin 371 -> 0 bytes style/Fire/img/exclaim.png | Bin 432 -> 0 bytes style/Fire/img/ext.png | Bin 130 -> 0 bytes style/Fire/img/feed.png | Bin 439 -> 0 bytes style/Fire/img/help.png | Bin 380 -> 0 bytes style/Fire/img/index.html | 1 - style/Fire/index.html | 1 - style/Lithium.css | 1165 ------------ style/Mercury.css | 1168 ------------ style/Oxygen.css | 1168 ------------ style/Radium.css | 1168 ------------ style/Sulfur.css | 1163 ------------ style/Technetium.css | 1387 -------------- style/Technetium/bg.png | Bin 578 -> 0 bytes style/Technetium/dark-shade.png | Bin 157 -> 0 bytes style/Technetium/darker-shade.png | Bin 172 -> 0 bytes style/Technetium/feed.png | Bin 439 -> 0 bytes style/Technetium/icon-closed-sticky.png | Bin 457 -> 0 bytes style/Technetium/icon-closed.png | Bin 255 -> 0 bytes style/Technetium/icon-moved.png | Bin 423 -> 0 bytes style/Technetium/icon-new-sticky.png | Bin 505 -> 0 bytes style/Technetium/icon-new.png | Bin 324 -> 0 bytes style/Technetium/icon-nonew-sticky.png | Bin 443 -> 0 bytes style/Technetium/icon-nonew.png | Bin 265 -> 0 bytes style/Technetium/index.html | 1 - style/Technetium/inv-shade.png | Bin 117 -> 0 bytes style/Technetium/light-shade.png | Bin 120 -> 0 bytes style/index.html | 1 - view/admin/categories.php | 98 +- view/admin/forums/delete_forum.php | 4 +- view/admin/forums/permissions.php | 9 +- view/admin/groups/add_edit_group.php | 406 ++-- view/admin/groups/confirm_delete.php | 40 +- view/admin/reports.php | 150 +- view/admin/users/find_users.php | 4 +- view/edit.php | 168 +- view/header.php | 162 +- {style/FeatherBB/view => view}/install.php | 0 150 files changed, 533 insertions(+), 21435 deletions(-) delete mode 100644 style/Air.css delete mode 100644 style/Air/base_admin.css delete mode 100644 style/Air/img/asterisk.png delete mode 100644 style/Air/img/bull.png delete mode 100644 style/Air/img/email.png delete mode 100644 style/Air/img/exclaim.png delete mode 100644 style/Air/img/ext.png delete mode 100644 style/Air/img/feed.png delete mode 100644 style/Air/img/help.png delete mode 100644 style/Air/img/index.html delete mode 100644 style/Air/index.html delete mode 100644 style/Cobalt.css delete mode 100644 style/Earth.css delete mode 100644 style/Earth/base_admin.css delete mode 100644 style/Earth/img/asterisk.png delete mode 100644 style/Earth/img/bull.png delete mode 100644 style/Earth/img/email.png delete mode 100644 style/Earth/img/exclaim.png delete mode 100644 style/Earth/img/ext.png delete mode 100644 style/Earth/img/feed.png delete mode 100644 style/Earth/img/help.png delete mode 100644 style/Earth/img/index.html delete mode 100644 style/Earth/index.html delete mode 100644 style/FeatherBB/view/admin/bans/add_ban.php delete mode 100644 style/FeatherBB/view/admin/bans/admin_bans.php delete mode 100644 style/FeatherBB/view/admin/bans/index.html delete mode 100644 style/FeatherBB/view/admin/bans/search_ban.php delete mode 100644 style/FeatherBB/view/admin/categories.php delete mode 100644 style/FeatherBB/view/admin/censoring.php delete mode 100644 style/FeatherBB/view/admin/forums/admin_forums.php delete mode 100644 style/FeatherBB/view/admin/forums/delete_forum.php delete mode 100644 style/FeatherBB/view/admin/forums/index.html delete mode 100644 style/FeatherBB/view/admin/forums/permissions.php delete mode 100644 style/FeatherBB/view/admin/groups/add_edit_group.php delete mode 100644 style/FeatherBB/view/admin/groups/admin_groups.php delete mode 100644 style/FeatherBB/view/admin/groups/confirm_delete.php delete mode 100644 style/FeatherBB/view/admin/groups/delete_group.php delete mode 100644 style/FeatherBB/view/admin/index.html delete mode 100644 style/FeatherBB/view/admin/index.php delete mode 100644 style/FeatherBB/view/admin/loader.php delete mode 100644 style/FeatherBB/view/admin/maintenance/admin_maintenance.php delete mode 100644 style/FeatherBB/view/admin/maintenance/index.html delete mode 100644 style/FeatherBB/view/admin/maintenance/prune.php delete mode 100644 style/FeatherBB/view/admin/maintenance/rebuild.php delete mode 100644 style/FeatherBB/view/admin/menu.php delete mode 100644 style/FeatherBB/view/admin/options.php delete mode 100644 style/FeatherBB/view/admin/parser.php delete mode 100644 style/FeatherBB/view/admin/permissions.php delete mode 100644 style/FeatherBB/view/admin/reports.php delete mode 100644 style/FeatherBB/view/admin/statistics.php delete mode 100644 style/FeatherBB/view/admin/users/admin_users.php delete mode 100644 style/FeatherBB/view/admin/users/ban_users.php delete mode 100644 style/FeatherBB/view/admin/users/delete_users.php delete mode 100644 style/FeatherBB/view/admin/users/find_users.php delete mode 100644 style/FeatherBB/view/admin/users/move_users.php delete mode 100644 style/FeatherBB/view/admin/users/search_ip.php delete mode 100644 style/FeatherBB/view/admin/users/show_users.php delete mode 100644 style/FeatherBB/view/delete.php delete mode 100644 style/FeatherBB/view/edit.php delete mode 100644 style/FeatherBB/view/footer.php delete mode 100644 style/FeatherBB/view/header.php delete mode 100644 style/FeatherBB/view/help.php delete mode 100644 style/FeatherBB/view/index.html delete mode 100644 style/FeatherBB/view/index.php delete mode 100644 style/FeatherBB/view/login/form.php delete mode 100644 style/FeatherBB/view/login/index.html delete mode 100644 style/FeatherBB/view/login/password_forgotten.php delete mode 100644 style/FeatherBB/view/message.php delete mode 100644 style/FeatherBB/view/misc/email.php delete mode 100644 style/FeatherBB/view/misc/index.html delete mode 100644 style/FeatherBB/view/misc/report.php delete mode 100644 style/FeatherBB/view/misc/rules.php delete mode 100644 style/FeatherBB/view/moderate/delete_posts.php delete mode 100644 style/FeatherBB/view/moderate/delete_topics.php delete mode 100644 style/FeatherBB/view/moderate/index.html delete mode 100644 style/FeatherBB/view/moderate/merge_topics.php delete mode 100644 style/FeatherBB/view/moderate/moderator_forum.php delete mode 100644 style/FeatherBB/view/moderate/move_topics.php delete mode 100644 style/FeatherBB/view/moderate/posts_view.php delete mode 100644 style/FeatherBB/view/moderate/split_posts.php delete mode 100644 style/FeatherBB/view/post.php delete mode 100644 style/FeatherBB/view/profile/change_mail.php delete mode 100644 style/FeatherBB/view/profile/change_pass.php delete mode 100644 style/FeatherBB/view/profile/delete_user.php delete mode 100644 style/FeatherBB/view/profile/index.html delete mode 100644 style/FeatherBB/view/profile/menu.php delete mode 100644 style/FeatherBB/view/profile/section_admin.php delete mode 100644 style/FeatherBB/view/profile/section_display.php delete mode 100644 style/FeatherBB/view/profile/section_essentials.php delete mode 100644 style/FeatherBB/view/profile/section_messaging.php delete mode 100644 style/FeatherBB/view/profile/section_personal.php delete mode 100644 style/FeatherBB/view/profile/section_personality.php delete mode 100644 style/FeatherBB/view/profile/section_privacy.php delete mode 100644 style/FeatherBB/view/profile/upload_avatar.php delete mode 100644 style/FeatherBB/view/profile/view_profile.php delete mode 100644 style/FeatherBB/view/register/email.php delete mode 100644 style/FeatherBB/view/register/form.php delete mode 100644 style/FeatherBB/view/register/index.html delete mode 100644 style/FeatherBB/view/register/rules.php delete mode 100644 style/FeatherBB/view/search/footer.php delete mode 100644 style/FeatherBB/view/search/form.php delete mode 100644 style/FeatherBB/view/search/header.php delete mode 100644 style/FeatherBB/view/search/index.html delete mode 100644 style/FeatherBB/view/search/posts.php delete mode 100644 style/FeatherBB/view/search/topics.php delete mode 100644 style/FeatherBB/view/userlist.php delete mode 100644 style/FeatherBB/view/viewforum.php delete mode 100644 style/FeatherBB/view/viewtopic.php delete mode 100644 style/Fire.css delete mode 100644 style/Fire/base_admin.css delete mode 100644 style/Fire/img/asterisk.png delete mode 100644 style/Fire/img/bull.png delete mode 100644 style/Fire/img/email.png delete mode 100644 style/Fire/img/exclaim.png delete mode 100644 style/Fire/img/ext.png delete mode 100644 style/Fire/img/feed.png delete mode 100644 style/Fire/img/help.png delete mode 100644 style/Fire/img/index.html delete mode 100644 style/Fire/index.html delete mode 100644 style/Lithium.css delete mode 100644 style/Mercury.css delete mode 100644 style/Oxygen.css delete mode 100644 style/Radium.css delete mode 100644 style/Sulfur.css delete mode 100644 style/Technetium.css delete mode 100644 style/Technetium/bg.png delete mode 100644 style/Technetium/dark-shade.png delete mode 100644 style/Technetium/darker-shade.png delete mode 100644 style/Technetium/feed.png delete mode 100644 style/Technetium/icon-closed-sticky.png delete mode 100644 style/Technetium/icon-closed.png delete mode 100644 style/Technetium/icon-moved.png delete mode 100644 style/Technetium/icon-new-sticky.png delete mode 100644 style/Technetium/icon-new.png delete mode 100644 style/Technetium/icon-nonew-sticky.png delete mode 100644 style/Technetium/icon-nonew.png delete mode 100644 style/Technetium/index.html delete mode 100644 style/Technetium/inv-shade.png delete mode 100644 style/Technetium/light-shade.png delete mode 100644 style/index.html rename {style/FeatherBB/view => view}/install.php (100%) diff --git a/style/Air.css b/style/Air.css deleted file mode 100644 index decd6fe8..00000000 --- a/style/Air.css +++ /dev/null @@ -1,1664 +0,0 @@ -/***************************************************************** -1. INITIAL SETTINGS -*****************************************************************/ - -/* Limited Reset -----------------------------------------------------------------*/ - -html, body, .pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, .pun h4, .pun h5, .pun pre, .pun blockquote, -.pun ul, .pun ol, .pun li, .pun dl, .pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun legend .pun img, -.pun abbr, .pun cite { - border: 0; - font-style: normal; - font-weight: normal; - margin: 0; - padding: 0; -} - -.pun ul, .pun ol { - list-style: none; -} - -.pun select { - padding-bottom: 1px; - padding-top: 1px; - padding-right: 1px; -} - -/* Content Defaults -----------------------------------------------------------------*/ - -.pun { - font: 81.25%/1.462em Arial, Helvetica, sans-serif; -} - -.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun legend { - font-family: Arial, Helvetica, sans-serif; - font-size: 1em; -} - -.pun pre, .pun code { - font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace; - font-size: 1em; -} - -.pun pre code { - font-size: 1em; -} - -.pun table { - border-collapse: collapse; - border-spacing: 0; - border: 0; - empty-cells: show; - width: 100%; -} - -.pun h1 { - font:2.154em/1em "Trebuchet MS", Arial, Helvetica, sans-serif; - padding: 7px 0; -} - -.pun h2, .pun .hd h2 { - font: 1.462em/1em "Trebuchet MS", Arial, Helvetica, sans-serif; - padding: 7px 0; -} - -.pun h3 { - font-size: 1.154em; - line-height: 1.267em; - padding: 7px 0; -} - -.pun h4 { - font-size: 1.077em; - font-weight: bold; - padding: 7px 0; -} - -.pun h5, .pun h6 { - font-size: 1em; - font-weight: bold; - padding: 7px 0; -} - -.pun p, .pun ul, .pun ol, .pun dl, .pun th, .pun td, .pun legend { - padding: 7px 0; -} - -.pun strong, .pun th, .pun span.warntext, .pun p.warntext { - font-weight: bold; -} - -.pun em { - font-style: italic; -} - -.pun a, .pun a:link, .pun a:visited { - text-decoration: none; -} - -.pun a:hover, .pun a:active, .pun a:focus { - text-decoration: underline; -} - -.pun .actions span { - padding-left: 16px; - padding-right: 8px; - background: url(Air/img/bull.png) center left no-repeat; - display: inline-block; - line-height: normal; -} - -/* Hidden Elements -----------------------------------------------------------------*/ - -#brdfooter h2, #brdstats h2, #debug h2, #brdstats .conl dt, #brdstats .conr dt, #modcontrols dt, -#searchlinks dt, div.postright h3, .pun .subscribelink span, #announce .hd, #reportform h2, #punmoderate #vf h2, -#punviewforum #vf h2, .pun .required strong span, .pun .icon div { - display: block; - overflow: hidden; - position: absolute; - text-indent: -9999em; - width: 0; -} - -/* Generic Float Clear -----------------------------------------------------------------*/ - -.pun .inbox, .pun #brdmain, .pun .crumbs, .pun .pagepost, .pun .block2col { - min-height: 1px; -} - -* html .pun .inbox, * html .pun #brdmain, * html .pun .infldset, * html .pun .crumbs, * html .pun .pagepost, * html .pun .block2col { - display: inline-block; -} - -* html .pun .inbox, * html .pun #bdrdmain, * html .pun .infldset, * html .pun .crumbs, * html .pun .pagepost, * html .pun .block2col { - display: block; -} - -.pun .inbox:after, .pun #brdmain:after, .pun .crumbs:after, .pun .pagepost:after, .pun .block2col:after { - content: " "; - display: block; - height: 0; - font-size: 0; - clear: both; - visibility: hidden; -} - -.pun .block2col .inbox:after { - content: none; - clear: none; -} - -.clearl { - clear: left; -} - - -/***************************************************************** -2. COMMON STYLES -*****************************************************************/ - -/* Page Layout -----------------------------------------------------------------*/ - -.pun { - max-width: 1070px; - margin: 0 auto; - padding: 30px 40px; -} - -#punredirect, #punmaint { - padding: 60px 20% 12px 20%; -} - -#puninstall, #pundb_update { - padding: 20px 10%; -} - -.pun .punwrap { - border: 1px solid; - border-radius: 10px; - padding: 18px; -} - -#punredirect h2, #punmaint h2 { - border-bottom-style: dotted; - border-bottom-width: 1px; - margin-bottom: 3px; -} - -/* Section Spacing and Borders -----------------------------------------------------------------*/ - -#brdmain { - border-style: solid none; - border-width: 2px 0; - margin-bottom: 12px; - padding: 12px 0; -} - -#punindex #brdmain { - padding-top: 24px; -} - -#punredirect #brdmain, #punmaint #brdmain { - border: 0; - margin: 0; - padding: 0; -} - -#brdstats { - border-style: solid none none none; - border-width: 2px 0 0 0; - margin-top: 24px; - padding-top: 12px; -} - -#quickpost { - border-style: solid none none none; - border-width: 2px 0 0 0; - margin-top: 12px; - padding-top: 12px; -} - -#announce { - border-style: solid none none none; - border-width: 2px 0 0 0; - padding-top: 3px; -} - -/***************************************************************** -3. COMMON BOARD ELEMENTS -*****************************************************************/ - -/* Logo, Description and Main Menu -----------------------------------------------------------------*/ - -#brdtitle h1 { - padding: 0 0 10px 0; -} - -#brddesc { - border-top-style: dotted; - border-top-width: 1px; - padding: 10px 0; -} - -#brddesc p { - padding: 0; -} - -#brdmenu ul { - padding: 0; -} - -#brdmenu li { - float: left; -} - -#brdmenu a:link, #brdmenu a:visited { - border-right-style: solid; - border-width: 1px; - display: block; - min-width: 60px; - padding: 12px 16px 6px 8px; - white-space: nowrap; -} - -#brdmenu a:hover, #brmenu a:active, #brdmenu a:focus { - text-decoration: none; -} - -/* Welcome Box -----------------------------------------------------------------*/ - -#brdwelcome { - padding: 10px 0; -} - -#brdwelcome .conl, #brdwelcome .conr, #brdwelcome p, #brdwelcome li { - display: inline; - padding: 0; -} - -#brdwelcome .conl { - float: left; -} - -#brdwelcome .conr { - float: right; -} - -#brdwelcome li span { - background: url(Air/img/bull.png) center left no-repeat; - padding-left: 18px; - margin-right: 3px; - display: inline-block; - line-height: normal; - white-space: nowrap; -} - -#brdwelcome .conl li:first-child span { - padding-left: 0; - background: none; -} - -/* Stats -----------------------------------------------------------------*/ - -#brdstats .conl { - float: left; -} - -#brdstats .conr { - float: right; - text-align: right; -} - -#brdstats #onlinelist { - border-top-style: dotted; - border-top-width: 1px; - clear: both; -} - -#brdstats #onlinelist dt, #brdstats #onlinelist dd { - display: inline; -} - -/* Footer -----------------------------------------------------------------*/ - -.pun #modcontrols { - border-style: none none dotted none; - border-width: 0 0 1px 0; - margin-bottom: 4px; - text-align: center; - width: 100%; -} - -.pun #modcontrols dd { - display: inline; -} - -.pun #brdfooter #modcontrols dd span { - background: url(Air/img/bull.png) center left no-repeat; - display: inline-block; - line-height: normal; - padding-left: 18px; - white-space: nowrap; -} - -.pun #brdfooter .conl { - float: left; -} - -.pun #brdfooter .conr { - text-align: right; - float: right; -} - -.pun #brdfooter #poweredby a { - font-size: 1.077em; - font-weight: bold; -} - -.pun #brdfooter #qjump { - padding-top: 5px; -} - -.pun #brdfooter #qjump * { - white-space: nowrap; -} - -.pun #brdfooter #searchlinks dd span { - background: url(Air/img/bull.png) center left no-repeat; - display: inline-block; - line-height: normal; - padding-left: 18px; - white-space: nowrap; -} - -.pun #brdfooter #feedlinks { - padding-bottom: 0; -} - -.pun #brdfooter #feedlinks span { - background: url(Air/img/feed.png) center left no-repeat; - display: inline-block; - padding-left: 18px; - white-space: nowrap; -} - -.pun #debugtime { - border-style: dotted none none none; - border-width: 1px 0 0 0; - margin-top: 7px; - text-align: center; -} - -/* Breadcrumbs, Postlink, Pagination -----------------------------------------------------------------*/ - -.pun .linkst .inbox, .pun .linksb .inbox, .pun .postlinksb .inbox { - overflow: hidden; -} - -.pun .linksb, .pun .postlinksb, .pun .linkst, .pun .crumbs { - clear: both; - position: relative; -} - -.pun .linkst .crumbs { - font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; - font-size: 1.462em; - line-height: 1.211em; - padding: 7px 0; -} - -.pun .linksb .crumbs, .pun .postlinksb .crumbs { - font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; - font-size: 1.154em; -} - -.pun .linkst .crumbsplus .pagepost { - border-top-style: dotted; - border-top-width: 1px; -} - -.pun .linksb .crumbsplus .pagepost, .pun .postlinksb .crumbsplus .pagepost { - border-bottom-style: dotted; - border-bottom-width: 1px; -} - -.pun .postlinksb .crumbs { - margin-right: 11em; -} - -.pun .crumbs li { - float: left; - padding-right: 0.4em; - white-space: nowrap; -} - -.pun .crumbs li strong { - font-weight: normal; -} - -.pun .pagelink { - float: left; - white-space: nowrap; -} - -.pun .pagelink strong, .pun .pagelink a, .pun .pagelink span.spacer { - border-style: none none none solid; - border-width: 0 0 0 1px; - display: inline-block; - padding: 0 12px 0 10px; - margin-right: -6px; -} - -.pun .pagelink .item1 { - border: 0; -} - -.pun .pagelink .pages-label { - display: inline-block; -} - -.pun .postlink { - float: right; - font-weight: bold; - text-align: right; -} - -.pun .modbuttons { - float: right; - padding: 5px 0 3px 0; -} - -.pun .modbuttons input { - margin-left: 8px; -} - -.pun .subscribelink { - position: absolute; - right: 0; - text-align: right; - top: 33px; -} - -#punindex .subscribelink { - top: 0px; -} - -#punindex .linksb { - height: 12px; -} - -/***************************************************************** -4. MAIN TABLES -*****************************************************************/ - -.pun #brdmain .blocktable { - position: relative; -} - -#punindex #brdmain .blocktable h2, #punsearch #vf h2 { - font: 1em/1.462em Arial, Helvetica, sans-serif; - font-weight: bold; - margin: 1px 1px 0 1px; - padding-left: 8px; - position: absolute; - left: 0; - white-space: nowrap; - z-index: 100; -} - -#punindex .blocktable th.tcl, #punsearch #vf th.tcl { - font-size: 0; - text-indent: -9999em; -} - -.pun .blocktable .box { - border-style: solid; - border-width: 1px; - margin-bottom: -1px; - overflow: hidden; - position: relative; -} - -* html .pun .blocktable .box { - display: inline-block; -} - -.pun .blocktable table { - table-layout: fixed; - margin-bottom: -1px; -} - -.pun .blocktable th { - padding: 7px 8px; - border-style: none none solid none; - border-width: 1px; - text-align: left; -} - -.pun .blocktable td { - padding: 7px 8px; - line-height: 1.3077em; - border-style: none none solid none; - border-width: 1px; - text-align: left; -} - -.pun .blocktable h3 { - font-size: 1.077em; - font-weight: bold; - padding: 0; -} - -.pun .blocktable p { - padding: 0; -} - -.pun .blocktable .tcl p { - padding: 5px 0 0 0; -} - -.pun .blocktable .tcl { - width: auto; -} - -.pun .blocktable .tc2, .pun .blocktable .tc3, .pun .blocktable .tcmod { - padding-left: 0; - padding-right: 0; - text-align: center; - width: 11%; -} - -.pun .blocktable .tcr { - width: 30%; -} - -.pun .blocktable td .newtext, .pun .blocktable td .pagestext, .pun .blocktable td .byuser { - white-space: nowrap; -} - -.pun .blocktable .tcl h3 span.newtext { - font-size: 0.929em; - font-weight: normal; -} - -.pun #vf td.tcl span.stickytext, .pun #vf td.tcl span.closedtext { - font-size: 1em; - font-weight: bold; -} - -#punsearch #vf .tc2 { - padding-left: 8px; - padding-right: 8px; - text-align: left; - width: 18%; -} - -#users1 .tcr { - width: 25%; -} - -#users1 .tc2 { - padding-left: 8px; - padding-right: 8px; - text-align: left; - width: 25%; -} - -#debug { - margin-top: 12px; -} - -#debug .tcl { - width: 10%; -} - -#punredirect #debug .tcl, #punmaint #debug .tcl { - width: 20%; -} - -#debug .tcr { - width: 90%; - white-space: normal -} - -#punindex .tcr .byuser { - display: block -} - -#punindex td.tc2, #punindex td.tc3, #punindex td.tcr, .pun #vf td.tc2, .pun #vf td.tc3, -.pun #vf td.tcr, #punindex td.tcl div.forumdesc, .pun #vf td.tcl span { - font-size: 0.923em; -} - -.pun #vf td.tcl a { - font-weight: bold; -} - -.pun #vf td.tcl span a { - font-weight: normal; -} - -.pun .blocktable .tclcon { - min-height: 1px; - overflow: hidden; - padding: 0 11px 0 12px; - position: relative; -} - -.pun .blocktable .tclcon div { - width: 100%; - overflow: hidden; -} - -.pun .icon { - border-style: solid; - border-width: 8px; - float: left; - height: 0; - overflow: hidden; - width: 0; -} - -.pun .iposted .ipost { - font-weight: bold; - left: 0; - padding-left: 4px; - position: absolute; - text-align: center; - top: 0; - width: 8px; -} - -/***************************************************************** -MAIN POSTS -*****************************************************************/ - -/* Structure -----------------------------------------------------------------*/ - -.pun .blockpost { - border-style: solid; - border-width: 1px; - margin-bottom: -1px; - overflow: hidden; - position: relative; -} - -* html .pun .blockpost { - display: inline-block; -} - -.pun .blockpost h2 { - font: 1em/1.462em Arial, Helvetica, sans-serif; - white-space: nowrap; - border-bottom-style: solid; - border-bottom-width: 1px; - height: 1.462em; - padding: 0.538em 8px 0.538em 236px; - font-weight: normal; -} - -#punsearch .blockpost h2 { - height: auto; - padding-left: 36px; - white-space: normal; -} - -#punsearch .blockpost h2 span span { - white-space: nowrap; - display: inline-block; - font: 1.077em "Trebuchet MS", Arial, Helvetica, sans-serif -} - -#punsearch .blockpost .icon { - position: absolute; - top: 0; - margin-top: -2.154em; -} - -.pun .blockpost h2 .conr { - float: right; - text-align: right; -} - -.pun .blockpost .inbox { - float: right; - position: relative; - width: 100%; -} - -.pun .blockpost .postbody, .pun .blockpost .postfoot { - border-left-style: solid; - border-left-width: 1px; - float: right; - margin-right: -218px; - position: relative; - text-align: left; - width: 100%; -} - -.pun .blockpost .postleft, .pun .blockpost .postfootleft { - width: 194px; - padding: 7px 12px 7px 12px; - float: left; - margin-left: -218px; - position: relative; -} - -.pun .blockpost .postleft dl { - padding: 0; -} - -#punviewtopic .blockpost dt, #punmoderate .blockpost dt { - display: block; - position: absolute; - padding: 0.538em 0 0.538em 12px; - height: 1.462em; - top: -2.615em; - left: 0; - overflow: hidden; - width: 206px; -} - -.pun .blockpost dt strong { - font-size: 1.231em; - font-weight: bold; -} - -.pun .blockpost .postleft dd { - font-size: 0.923em; -} - -.pun .blockpost .postleft .usertitle { - padding: 4px 0 6px 0; - font-size: 1em; -} - -.pun .blockpost .postleft .postavatar { - display: block; - margin: 0 0 4px 0; -} - -.pun .blockpost .postright { - position: relative; - padding: 4px 230px 7px 18px; -} - -.pun .postmsg { - width:100%; - overflow: hidden; - word-wrap: break-word; -} - -.pun .blockpost .postfootright { - position: relative; - padding: 7px 230px 7px 18px; - text-align: right; -} - -.pun .postfoot p, .pun .postfoot ul { - padding: 0; -} - -.pun .blockpost .postfootright li { - display: inline; -} - -.pun .blockpost .postfootright li span { - display: inline-block; - padding-left: 16px; - margin-left: 8px; - line-height: normal; - background: url(Air/img/bull.png) center left no-repeat; -} - -.pun .blockpost .usercontacts { - padding: 7px 0; -} - -.pun .blockpost .usercontacts .email { - background: url(Air/img/email.png) left 65% no-repeat; - margin-right: 5px; - padding-left: 21px; - display: inline-block; - line-height: normal; -} - -.pun .blockpost .usercontacts .website { - background: url(Air/img/ext.png) left 65% no-repeat; - padding-left: 18px; - display: inline-block; - line-height: normal; -} - -.pun .postsignature hr { - border:none; - height: 1px; - margin-left: 0px; - text-align: left; -} - -/* Content (includes other user content) -----------------------------------------------------------------*/ - -.pun .usercontent { - padding: 7px 0; -} - -.pun .postmsg p, .pun .postmsg li, #punhelp p samp { - font-family: Verdana, Arial, Helvetica, sans-serif; -} - -.pun .usercontent h1, .pun .usercontent h2, .pun .usercontent h3, -.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { - padding: 7px 0 0 0; -} - -.pun .postmsg h5, #punhelp h5 { - font-size: 1.231em; - font-weight: bold; - padding: 7px 0; -} - -.pun .usercontent ul, .pun .postmsg ul { - list-style: disc; - padding: 4px 13px 4px 30px; -} - -.pun .usercontent ol, .pun .postmsg ol { - list-style: decimal; - padding: 4px 13px 4px 30px; -} - -.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { - list-style: lower-alpha; -} - -.pun .usercontent li, .pun .postmsg li { - padding: 0 3px; -} - -.pun .usercontent li p, .pun .postmsg li p { - padding: 0; -} - -.pun span.bbu { - text-decoration: underline; -} - -.pun span.bbs, .pun del { - text-decoration: line-through; -} - -.pun .postmsg ins, #punhelp samp ins { - text-decoration: none; -} - -.pun .blockpost .postmsg .postedit { - font-size: 0.857em; -} - -.pun .blockform .postsignature, .pun .blockpost .postsignature { - font-size: 0.923em; -} - -.pun .codebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0; -} - -.pun .quotebox { - border-style: solid; - border-width: 1px 1px 1px 3px; - margin: 0.75em 1em; - padding: 0 0.75em; -} - -.pun .quotebox cite { - display: block; - padding: 0.75em 0 0 0; - font-weight: bold; - line-height: 1.462em; -} - -.pun .quotebox blockquote { - overflow: hidden; - width: 100%; -} - -.pun .codebox pre { - overflow: auto; - width: 100%; - direction: ltr; - text-align: left; -} - -* html .pun .codebox pre { - padding-bottom: 10px; -} - -*:first-child+html .pun .codebox pre { - padding-bottom: 10px; -} - -.pun .codebox pre code { - padding: 0.5em; - white-space: pre; -} - -.pun div[class*=codebox] pre code { - display: inline-block; -} - -* html .pun .codebox pre code { - display: block; -} - -.pun .codebox pre.vscroll { - height: 32em; - overflow: auto; - overflow-y: auto -} - -.pun .postmsg img, #punhelp samp img { - vertical-align: text-top; -} - -.pun .postmsg .postimg img { - max-width: 98%; - vertical-align: middle; - margin: 7px 0.5em 7px 0; -} - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-style: solid; - border-width: 2px; -} - -/***************************************************************** -MAIN FORMS -*****************************************************************/ - -#punedit .blockform h2, #punpost .blockform h2, #postpreview h2, #posterror h2, -.pun #quickpost h2, .pun #reportform h2, #pundelete .blockform h2 { - font: 1em/1.462em Arial, Helvetica, sans-serif; - font-weight: bold; - white-space: nowrap; - padding: 10px 19px 4px 37px; - border: 0; -} - -#punpost .blockform h2, #punedit .blockform h2,.pun #quickpost h2, -#pundelete .blockform h2 { - margin: 1px 1px 0 1px; - width: 25em; - position: absolute; - z-index: 100; -} - -.pun #quickpost legend, #punpost legend, #punedit legend { - width: 25em; - overflow: hidden; - white-space: nowrap; -} - -.pun .blockform .box { - border-style: solid; - border-width: 1px; - padding-bottom: 12px; -} - -.pun #posterror { - border-style: solid; - border-width: 1px; -} - -.pun #posterror .box { - padding: 0 18px 12px 18px; -} - -* html .pun .blockform .box, * html .pun #posterror { - display: inline-block; -} - -.pun .blockform .forminfo, .pun .error-info { - padding: 12px 18px; - border-style: solid; - border-width: 1px; - position: relative; -} - -.pun .blockform .forminfo { - margin-top: 12px; -} - -#pundelete .blockform .forminfo { - margin-top: 33px; -} - -.pun .forminfo h3 { - padding-bottom: 0; -} - -.pun .error-list li { - padding-left: 24px; - background: url(Air/img/exclaim.png) center left no-repeat; -} - -.pun .inform { - padding: 0 18px; -} - -.pun legend { - font-weight: bold; - padding: 10px 19px 4px 19px; -} - -* html .pun legend { - margin-left: -7px; -} - -*:first-child+html .pun legend { - margin-left: -7px; -} - -.pun .infldset { - border-style: solid; - border-width: 1px; - padding: 12px 18px; -} - -#punregister #rules .infldset { - padding: 5px 18px; -} - -.pun fieldset p { - padding: 0 0 7px 0; - width: 100%; -} - -.pun fieldset .usercontent p { - padding: 7px 0; -} - -.pun fieldset label { - display: block; - padding: 0 0 7px 0; -} - -.pun label em { - font-weight: normal; - font-style: normal; -} - -.pun .required strong { - background: url(Air/img/asterisk.png) center right no-repeat; - font-weight: normal; - padding-right: 14px; - white-space: pre; - display: inline-block; - line-height: normal; -} - -.pun label input, .pun label select, .pun label textarea { - margin-top: 2px; -} - -.pun label.conl { - display: inline-block; - padding-right: 12px; -} - -.pun form .buttons { - padding: 8px 19px 8px 34px; - margin-bottom: -12px; -} - -.pun .blockform .buttons input { - margin-right: 12px; -} - -.pun .rbox { - padding: 3px 0; -} - -.pun .rbox label { - padding: 3px 0 3px 1.75em; - position: relative; - min-height: 1px; -} - -* html .pun .rbox label { - text-indent: -3px; - height: 1%; -} - -.pun .rbox input { - margin: 3px 0.75em 3px -1.75em; - float: left; - position: relative; - vertical-align: middle; - padding: 0; - height: 1em; - width: 1em; -} - -.pun input[type=text], .pun select, .pun textarea { - font-family: Verdana, Arial, Helvetica, sans-serif; -} - -.pun .txtarea textarea, .pun input.longinput { - width: 98%; -} - -.pun textarea { - resize: vertical; -} - -.pun #quickpost .txtarea { - padding-right: 12px; - position: relative; -} - -.pun .blockform .bblinks { - padding-top: 0; -} - -.pun .blockform .bblinks li { - display: inline; -} - -.pun .blockform .bblinks li span { - background: url(Air/img/help.png) center left no-repeat; - margin-right: 8px; - padding-left: 20px; - display: inline-block; -} - -.pun #quickpost .bblinks { - padding-top: 0; -} - -.pun #quickpost .bblinks li { - display: inline; -} - -.pun #login p.clearb { - border-top-style: dotted; - border-top-width: 1px; - font-size: 0; - height: 0; - line-height: 0; - margin-top: 7px; - overflow: hidden; - padding-bottom: 3px; - padding-top: 7px; - text-indent: -9999em; - width: 100%; -} - -.pun #postreview { - padding-top: 12px; -} - -.pun #postpreview, .pun #posterror { - margin-bottom: 12px; -} - -.pun #postpreview .postright { - padding: 0; -} - -.pun #postpreview .postbody { - border-style: solid; - border-width: 1px; - float: none; - margin: 0 18px 12px 18px; - padding: 0; - padding: 4px 18px 4px 18px; - width: auto; -} - -.pun span.email { - background: url(Air/img/email.png) left 65% no-repeat; - margin-right: 5px; - padding-left: 21px; - display: inline-block; - line-height: normal; -} - -.pun span.website { - background: url(Air/img/ext.png) left 65% no-repeat; - padding-left: 18px; - display: inline-block; - line-height: normal; -} - -#punmisc #rules .box { - border-style: solid; - border-width: 1px; - padding: 5px 18px; -} - - -#punhelp #brdmain .box { - border-style: solid; - border-width: 1px; - padding: 7px 12px; -} - -.pun .multiselect { - float: left; - padding-bottom: 7px; -} - -.pun .checklist { - border-width: 1px; - border-style: solid; - max-height: 9em; - width: 20em; - overflow: auto; - padding: 0.25em 0.5em; - margin: 0.25em 16px 0 0.15em; -} - -.pun .checklist legend { - padding: 0; -} - -.pun .checklist legend span { - width: auto; - max-width: 25em; -} - -/***************************************************************** -PROFILES (+ ADMIN MENU) -*****************************************************************/ - -/* Profile / Admin -----------------------------------------------------------------*/ - -.pun .blockmenu { - width: 13em; - float: left; - padding-bottom: 12px; -} - -.pun .block2col .blockform, .pun .block2col .block { - margin-left: 15em; -} - -.pun .blockmenu .block2 { - padding-top: 19px; -} - -.pun .blockmenu ul { - border-top-style: dotted; - border-top-width: 1px; - padding: 0; -} - -.pun .blockmenu li { - border-bottom-style: dotted; - border-bottom-width: 1px; - font-weight: bold; - padding: 0; -} - -.pun .blockmenu a:link, .pun .blockmenu a:visited { - display: block; - padding: 9px 6px 3px 6px; - min-height: 1px; - text-decoration: none; -} - -* html .pun .blockmenu a:link, * html .pun .blockmenu a:visited { - height: 1%; -} - -.pun .blockmenu a:hover, .pun .blockmenu a:active, .pun .blockmenu a:focus { - text-decoration: none; -} - -#viewprofile .box { - border-style: solid; - border-width: 1px; - padding-bottom: 18px; -} - -#viewprofile dt, #adstats dt { - padding: 7px 0; - position: absolute; - width: 13em; - left: 0; -} - -#viewprofile dl { - border-style: solid none none none; - border-width: 1px; - margin: 7px 0; - padding: 0; - width: 100%; - position: relative; -} - -#adintro, #adstats, #adalerts { - border-style: solid; - border-width: 1px; - padding: 18px; -} - -#adintro li span { - display: inline-block; - padding-left: 16px; - margin-left: 8px; - line-height: normal; - background: url(Air/img/bull.png) center left no-repeat; -} - -#adstats .inbox, #adintro .inbox, #adalerts p { - border-style: solid; - border-width: 1px; - padding: 18px; -} - -#adstats dl { - margin: 0; - padding: 0; - width: 100%; - position: relative; -} - -#viewprofile dd, #adstats dd { - border-style: none none solid none; - border-width: 1px; - padding: 7px 0 7px 13em; -} - -/***************************************************************** -COLOUR SCHEME -*****************************************************************/ - -/* Basic defaults and Common Items -----------------------------------------------------------------*/ - -html, body, .pun { - background: #f6f9fc; - color: #333; -} - -.pun .punwrap { - background: #fff; - border-color: #cad7e1; - color: #566579; -} - -#brdtitle #brddesc, .pun .pagepost, #brdstats #onlinelist, #brdfooter #searchlinks, #brdfooter #modcontrols, -#punmaint h2, #punredirect h2, #adminconsole .submittop, .pun #debugtime, .pun .pagelink a, .pun .pagelink * { - border-color: #b9c5ce; -} - -.pun a, .pun a:link, .pun a:visited { - color: #2365B0; -} - -.pun a:hover, .pun a:active, .pun a:focus { - color: #b50000; -} - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-color: #22538a; -} - -.pun .postmsg .postimg a:hover img, .pun .postmsg .postimg a:active img, .pun .postmsg .postimg a:focus img { - border-color: #b50000; -} - -/* Primary Navigation -----------------------------------------------------------------*/ - -#brdmenu { - background: #44699c; -} - -#brdmenu a, #brdmenu a:link, #brdmenu a:visited { - background: #44699c; - border-color: #fff; - color: #d4dae2; -} - -#brdmenu a:hover, #brdmenu a:active, #brdmenu a:focus { - background: #b50000; - border-color: #fff; - color: #fff; -} - -/* Main Tables -----------------------------------------------------------------*/ - -.pun .blocktable .box { - background: #fcfdfe; - border-color: #b9c5ce #d9e1e7; -} - -#punindex .blocktable h2, .pun #vf h2 { - color: #357082; -} - -#adminconsole fieldset th, #adminconsole fieldset td { - background: #f6f9fc; - border-color: #dfe6ee; -} - -.pun #users1 h2 { - background: #fff; -} - -.pun .blocktable td { - border-color: #dfe6ee; -} - -.pun .blocktable th { - background: #ebf1f5; - border-color: #cad7e1; - color: #357082; -} - -.pun .blocktable td.tcl span.stickytext { - color: #3399CC; -} - -/* Main Posts -----------------------------------------------------------------*/ - -.pun .blockpost { - background: #f6f9fc; - border-color: #b9c5ce #d9e1e7; -} - -.pun .blockpost h2 { - background: #ebf1f5; - border-color: #cad7e1; - color: #357082; -} - -.pun .blockpost .postbody, .pun .blockpost .postfoot { - background: #fcfdfe; - border-color: #dfe6ee; -} - -.pun .blockpost .postfootright li { - color: #fcfdfe; -} - -.pun .postmsg, #punhelp code, #punhelp samp { - color: #333; -} - -.pun .postsignature, .pun .postmsg .postedit { - color: #566579; -} - -.pun .quotebox { - background: #f8f9f0; - border-color: #7aadbd; - color: #566579; -} - -.pun .quotebox cite { - color: #357082; -} - -.pun .codebox, #punhelp .codebox code { - background: #333; - color: #fff; -} - -.pun .postmsg hr { - background: #b9c5ce; -} - -.pun .postmsg ins, #punhelp samp ins { - background-color: #ff0; -} - -/* Main Forms + Profile -----------------------------------------------------------------*/ - -.pun .blockform .box, #adstats, #adintro, #adalerts, #postpreview, #posterror { - border-color: #b9c5ce #d9e1e7; - background: #ebf1f5; -} - -#punmisc #rules .box, #punhelp #brdmain .box { - border-color: #b9c5ce #d9e1e7; - background: #f6f9fc; -} - -.pun #quickpost h2, #punpost .blockform h2, #punedit .blockform h2, #posterror h2, -#pundelete .blockform h2 { - background: #ebf1f5; - color: #357082; -} - -.pun .forminfo { - background: #fff; - border-color: #dfe6ee; -} - -#puninstall form#install .forminfo { - background: #44699c; - color: #fff; -} - -.pun #posterror .error-info, .pun #adalerts p { - background: #ffffe1; - border-color: #dfe6ee; -} - -#puninstall form#install .error-info { - background: #ffffe1; - border-color: #dfe6ee; - color: #333; -} - -.pun .infldset, #adintro .inbox, #adstats .inbox { - background: #f6f9fc; - border-color: #dfe6ee; -} - -.pun label, .pun legend, #adminconsole fieldset th { - color: #357082; -} - -.pun fieldset p { - border-color: #b9c5ce; -} - -.pun .blockmenu ul, .pun .blockmenu li { - border-color: #b9c5ce; -} - -.pun .blockmenu a:hover, .pun .blockmenu a:active, .pun .blockmenu a:focus { - background: #ffffe6; -} - -.pun .blockmenu .isactive a:link, .pun .blockmenu .isactive a:visited { - color: #333; - background: #f6f9fc; - } - -.pun #viewprofile .box { - border-color: #b9c5ce #d9e1e7; - background: #ebf1f5; -} - -.pun #viewprofile dt, #adstats dt { - color: #357082; -} - -.pun #viewprofile dl, .pun #viewprofile dd, #adstats dl, #adstats dd { - border-color: #dfe6ee; -} - -#adminconsole fieldset td.nodefault { - background: #d59b9b; -} - -.pun .multiselect { - color: #357082; -} - -.pun .checklist { - background: white; - border-color: #ccc; -} - -/* Status Indicators -----------------------------------------------------------------*/ - -.pun .icon { - border-color: #e8ecf1 #d4d9dd #dfe3e8 #e8ecf1; -} - -.pun .iredirect .icon { - border-color: #b9c5ce; - border-width: 1px; - padding: 7px; -} - -.pun .inew .icon { - border-color: #91b3d9 #87a8d1 #6c85bb #7292c3; -} - -/* Alert boxes -----------------------------------------------------------------*/ - -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 240px; - max-width: 410px; - padding: 5px; - z-index: 1000; - color: #fff; - background-color: #619bc4; - border-color: #1489e0; - border-width: 2px; - border-radius: 5px; -} diff --git a/style/Air/base_admin.css b/style/Air/base_admin.css deleted file mode 100644 index fdf41b10..00000000 --- a/style/Air/base_admin.css +++ /dev/null @@ -1,163 +0,0 @@ -#adminconsole .blockform .box { - padding-bottom: 12px; -} - -#adminconsole fieldset .infldset { - position: relative; - overflow: hidden; -} - -#adminconsole fieldset table { - margin-top: -1px; - margin-bottom: -1px; -} - -#adminconsole fieldset td, #adminconsole fieldset th { - padding: 10px 8px 10px 0; - text-align: left; - white-space: normal; - border-style: solid none; - border-width: 1px 0; -} - -#punadmin thead th { - border-top: 0; - font-weight: normal; -} - -#adminconsole fieldset td span, #adminconsole fieldset th span { - display: block; font-size: 1em; - font-weight: normal; -} - -#adminconsole fieldset td.location span { - display: inline-block; -} - -#adminconsole fieldset th { - width: 15em; - font-weight: normal; - padding-right: 8px; -} - -#adminconsole table.aligntop th, #adminconsole table.aligntop td { - vertical-align: top; -} - -#adminconsole table.aligntop th div { - padding-top: 3px; -} - -#adminconsole .inform { - padding-bottom: 0; -} - -#adminconsole .infldset { - padding-bottom: 0; - padding-top: 0; -} - -#adminconsole p.submittop { - text-align: center; - border-bottom-style: dotted; - border-bottom-width: 1px; - margin: 0 18px; - padding-top: 12px; -} - -#adminconsole p.submitend { - text-align: center; - padding-bottom: 0; -} - -#adminconsole fieldset p { - padding: 10px 0; -} - -#adminconsole .fsetsubmit { - padding: 10px 0 12px 0; -} - -#categoryedit .tcl { - width: 25%; -} - -#censoring .tcl, #censoring .tc2 { - width: 20%; -} - -#edforum .tcl { - width: 18%; -} - -#edforum .tc2 { - width: 12%; -} - -#forumperms thead th, #forumperms tbody td { - text-align: center; -} - -.pun .linkst .backlink, .pun .linksb .backlink { - padding: 7px 0; -} - -#punadmin #users1 h2, #punadmin #users2 h2, #punadmin #bans1 h2 { - display: block; - left: -9999em; - overflow: hidden; - position: absolute; - text-indent: -9999em; - width: 0; -} - -#punadmin #users1 th, #punadmin #users2 th, #punadmin #bans1 th { - font-weight: bold; -} - -#users2 th, #bans1 th { - text-align: left; -} - -#users2 th.tcmod { - text-align: center; -} - -#users2 .tcl, #bans1 .tcl { - width: auto; - text-align: left; -} - -#users2 .tc2, #bans1 .tc2 { - width: 18%; - text-align: left; -} - -#users2 .tc3, #users2 .tc5, #bans1 .tc3, #bans1 .tc5, #bans1 .tc6 { - width: 12%; - text-align: left; -} - -#users2 .tc4, #bans1 .tc4 { - width: 10%; - text-align: center; -} - -#users2 .tcr { - width: 20%; - white-space: nowrap; -} - -#bans1 .tcr { - width: 15%; - white-space: nowrap; -} - -#users2 .tcmod { - width: 10%; - text-align: center; -} - -.plugin p { - padding: 12px 18px 0; -} diff --git a/style/Air/img/asterisk.png b/style/Air/img/asterisk.png deleted file mode 100644 index f7438dea90907b0619cdfea4aa0f057fdc7ddfba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFv3GfMV^~o%})6nqk{{2G=3ODle zA5NHXIX-?T1H<`%fYS~RFE?y>ci@2eO5P}-dd89t<7zhU&XcXj5nDBT8^b9FfasfV%0zFt=a*UX7F_Nb6Mw<&;$Up C{~jg) diff --git a/style/Air/img/email.png b/style/Air/img/email.png deleted file mode 100644 index 39ee55f073e0a9a6b9bfd130f0933b36af4303c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 390 zcmV;10eSw3P)#184bl0vWh-y34Yki(tn zY4YK>DH@G2MbR`{5~MJpz^^QTvv4e76W3MN^Dbe;9Tn};&DWPF!62ie+7|gbKPX(0 zv33nCyQ#|mrr|x=S?t*Ro z!nOL7eCKOi)MHWQje^*3SjJpMY5s;V00001bW%=J06^y0W&i*Hs!2paR2Ug;z(tY* zK>z^3npPQC+?{n7{{Jrsf+NXY_1CwQ$+G6ApL{l1*1VQIuKH3$m6TQVSo8quL_}JH zQqgk}fMpqJt-(1rou@$3R7xrE-V5;$d}P`=2lisK1$?HQ^AA{Se>Pj7oC)vkEHx%> zcYENym|ANgj^ljQ0bxE$jajcJlYICR0LF_^+8Wd5!>0jPmdKI;Vst0A=4BdH?_b diff --git a/style/Air/img/feed.png b/style/Air/img/feed.png deleted file mode 100644 index 3704226a673de8aa886bb5d964fd65079347a35c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 439 zcmV;o0Z9IdP)Ut>u@Zj)- zFZhrs^@=3#fGGUu+4i%0{Jwwx_38SoVC8r*z z{n@nn!;s!%C-tXg`p>H1Z8GD8O!b{i`?hiDb0`1Ind^;F_|Uib+s*Q~lJ>%y@2-pU ztakE>G5q7p_s6CD$Bx=p9pG|9`OBpHs#f))S^w+S{oTI#q)}0fy#xRN00DGTPE!Ct z=GbNc005s!L_t(|+6~D=7Q{dl0Knf#Gd2gY#g#`F)9eUB>Au~Hw?f|{blho(e=zi zpeWuiisN_4_GSu1s;gJTu9-G3R3NU+s>Ma0ZCTTgx3;4 zmb*MB&g>LM3*~Z>BwJB&VgVSlTnl`yg>xRj){wGHY7ehdo&z98lv>wz|BxN;0Hj7} zt&tRz7F+^Id8)OPk}=kY0zeeGj#6vmIIfxofW3#RV3$kWHoo2CE6{`QZ@0dVh6s}b oy9Um~>G;IY`PvS{@pQ(V4}w?=T>Y+AivR!s07*qoM6N<$f~k.. diff --git a/style/Air/index.html b/style/Air/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/Air/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/Cobalt.css b/style/Cobalt.css deleted file mode 100644 index 267aa974..00000000 --- a/style/Cobalt.css +++ /dev/null @@ -1,1168 +0,0 @@ -/***************************************************************** -1. INITIAL SETTINGS -*****************************************************************/ - -/* Limited Reset -----------------------------------------------------------------*/ - -.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, -.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, -.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { - margin: 0; - padding: 0; - border: 0; - } - -.pun ul, .pun ol { - list-style: none - } - - -/* Structural Settings -----------------------------------------------------------------*/ - -.pun .clearer, .pun .nosize { - height: 0; - width: 0; - line-height: 0; - font-size: 0; - overflow: hidden - } - -.pun .clearer, .pun .clearb { - clear: both - } - -.pun .nosize { - position: absolute; - left: -9999em; - text-indent: -9999em; - width: 0; - } - -* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { - height: 1px - } - -.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { - min-height: 1px - } - -.clearl { - clear: left; - } - -/* Hidden Elements -----------------------------------------------------------------*/ - -#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, -#modcontrols dt, #searchlinks dt, div.postright h3, span.closedtext, -.pun .required strong span { - position: absolute; - display: block; - overflow: hidden; - width: 0; - left: -9999em; - text-indent: -9999em; - } - -/***************************************************************** -2. TEXT & CONTENT -*****************************************************************/ - -/* Text Defaults -----------------------------------------------------------------*/ - -.pun { - font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; - line-height: normal; - } - -.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun samp, .pun legend { - font-size: 1em; - font-family: verdana, helvetica, arial, sans-serif; - } - -.pun pre, .pun code { - font-size: 1.182em; - font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace - } - -.pun pre code { - font-size: 1em; - } - -.pun strong { - font-weight: bold; - } - -.pun em { - font-style: italic; - } - - -/* Content Defaults -----------------------------------------------------------------*/ - -.pun p, .pun ul, .pun ol, .pun dl { - font-size: 1em; - padding: 3px 0; - } - -.pun h2 { - font-size: 1em; - font-weight: normal; - padding: 4px 6px; - } - -.pun h3 { - font-size: 1.091em; - padding: 3px 0; - } - -.pun table p, .pun table h3 { - padding: 0; - } - -.pun span.warntext, .pun p.warntext { - font-weight: bold - } - -/* User Content (Announcements, Rules, Posts) -----------------------------------------------------------------*/ - -.pun .usercontent p, .pun .postmsg p { - padding: 0.75em 0 - } - -.pun .usercontent ul, .pun .postmsg ul { - padding: 0.75em 1em 0.75em 2.5em; - list-style: disc - } - -.pun .usercontent ol, .pun .postmsg ol { - padding: 0.75em 1em 0.75em 2.5em; - list-style: decimal - } - -.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { - list-style: lower-alpha - } - -.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { - padding: 0.25em 1em 0.75em 2.5em - } - -.pun .usercontent li p, .pun .postmsg li p { - padding: 0 - } - -.pun .usercontent h1 { - font-size: 1.4em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h2 { - font-size: 1.2em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h3 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { - font-size: 1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .quotebox cite { - font-weight: bold; - font-style: normal; - padding: 0.75em 0.75em 0 0.75em - } - -.pun span.bbu { - text-decoration: underline - } - -.pun span.bbs, .pun del { - text-decoration: line-through; - } - -.pun .postmsg ins, #punhelp samp ins { - text-decoration: none; - } - -.pun div.postmsg h5, #punhelp h5 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0; - } - - -/***************************************************************** -3. COMMON STYLES -*****************************************************************/ - -/* Page Layout -----------------------------------------------------------------*/ - -html, body { - margin: 0; - padding: 0 - } - -.pun { - max-width: 1070px; - width: 95%; - margin: 0 auto; - padding: 12px 20px; - } - -#punredirect, #punmaint, #puninstall, #pundb_update { - margin: 50px 20% 12px 20% - } - - -/* Vertical Element Spacing -----------------------------------------------------------------*/ - -#brdheader { - margin: 0 0 12px 0; - } - -#brdtitle p { - padding-top: 0px - } - -#announce, #brdstats { - margin: 12px 0 12px 0; - } - -.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { - margin-bottom: 12px - } - -#punindex .blocktable, .pun .blockpost { - margin-bottom: 6px - } - -#postreview .blockpost { - margin-bottom: -1px; - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-bottom: 0px - } - -.pun .linkst, .pun .linksb { - margin-top: -12px - } - -.pun .postlinksb { - margin-top: -6px - } - - -/* External Borders -----------------------------------------------------------------*/ - -.pun .box { - border-style: solid; - border-width: 1px; - } - -#brdheader .box { - border-top-width: 4px; - } - -/* Default Internal Spacing -----------------------------------------------------------------*/ - -.pun .block .inbox, .pun .blockmenu .inbox { - padding: 3px 6px - } - -/***************************************************************** -4. COMMON BOARD ELEMENTS -*****************************************************************/ - -/* Board Header -----------------------------------------------------------------*/ - -#brdtitle h1 { - font-size: 1.4em; - font-weight: bold; - padding: 3px 0 0 0; - } - -#brdmenu li { - display: inline; - margin-right: 12px; - } - -#brdmenu a:link, #brdmenu a:visited { - text-decoration: none - } - -#brdmenu a:hover, #brdmenu a:active { - text-decoration: underline - } - -#brdwelcome .conl { - float: left; - } - -#brdwelcome .conr { - float: right; - text-align: right; - } - -/* Breadcrumbs and Post Links -----------------------------------------------------------------*/ - -.pun .linkst { - padding: 8px 6px 3px 6px - } - -.pun .linksb, .pun .postlinksb { - padding: 3px 6px 8px 6px - } - -.pun .crumbs { - clear: both; - width: 100%; - overflow: hidden; - } - -.pun .crumbs li { - display: inline; - white-space: nowrap; - font-weight: bold; - } - -.pun .pagelink { - float: left; - white-space: nowrap; - } - -.pun .postlink { - font-weight: bold; - white-space: nowrap; - } - -.pun .postlink, .pun .modbuttons { - float: right; - text-align: right; - } - -.pun .modbuttons { - padding: 1px 0; - white-space: nowrap; - } - -.pun .modbuttons input { - margin-left: 6px; - } - -.pun .postlink a:link, .pun .postlink a:visited { - text-decoration: none - } - -.pun .postlink a:hover, .pun .postlink a:active { - text-decoration: underline; - } - -#punindex .subscribelink { - margin-top: 6px; - } - -/* Board Footer -----------------------------------------------------------------*/ - -#brdfooter .conl { - float: left; - } - -#brdfooter .conr { - float: right; - text-align: right; - } - -#brdfooter #modcontrols { - border-bottom-style: solid; - border-bottom-width: 1px; - text-align: center; - } - -#brdfooter #modcontrols dd { - display: inline; - margin:0 6px; - } - - -/* Board Stats -----------------------------------------------------------------*/ - -#brdstats .conl { - float: left; - } - -#brdstats .conr { - float: right; - text-align: right; - } - -#onlinelist dd, #onlinelist dt { - display: inline; - } - - -/***************************************************************** -5. MAIN TABLES -*****************************************************************/ - -.pun table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; - empty-cells: show; - } - -.pun .blocktable table { - table-layout: fixed; - } - -.pun td, .pun th { - padding: 4px 6px; - text-align: left; - font-weight: normal; - } - -.pun td, .pun th { - border-style: solid none none solid; - border-width: 1px; - } - -.pun .tcl { - border-left: 0; - width: auto; - } - -.pun .tc2, .pun .tc3, .pun .tcmod { - width: 10%; - text-align: center; - padding: 4px 0; - } - -.pun .tcr { - width: 30%; - } - -.pun .tcl h3 { - font-size: 1.091em; - font-weight: bold; - } - -.pun .tcl h3 span.newtext { - font-size: 0.917em; - } - -.pun .tcl span.newtext, .pun .tcl span.pagestext { - white-space: nowrap; - font-weight: normal; - } - -.pun td span.byuser { - white-space: nowrap; - } - -.pun .tcl p { - padding: 5px 0 0 0 - } - -#punsearch #vf .tc2 { - width: 18%; - text-align: left; - padding: 4px 6px; - } - -#users1 .tcr { - width: 25% - } - -#users1 .tc2 { - width: 25%; - text-align: left; - padding: 4px 6px; - } - -#debug .tcl { - width: 10% - } - -#debug .tcr { - width: 90%; - white-space: normal - } - -#punindex .tcr .byuser { - display: block - } - -.pun .blocktable .tclcon { - padding: 0 11px 0 12px; - overflow: hidden; - min-height: 1px; - position: relative; - } - -.pun .blocktable .tclcon div { - width: 100%; - overflow: hidden; - } - -.pun .icon { - margin: 0.1em 0 0 0.2em; - border-width: 0.6em; - border-style: solid; - height: 0; - width: 0; - overflow: hidden; - float: left; - } - -.pun .icon div { - position: absolute; - left: -9999em; - text-indent: -9999em; - height: 0; - } - -.pun .iposted .ipost { - position: absolute; - left: 0; - font-weight: bold; - width: 8px; - padding-left: 4px; - text-align: center; - top: 0; - } - -/***************************************************************** -6. MAIN FORMS -*****************************************************************/ - -.pun .blockform form, .pun .fakeform { - PADDING: 20px 20px 15px 20px - } - -.pun .forminfo { - margin-bottom: 12px; - padding: 9px 10px; - border-style: solid; - border-width: 1px; - } - -.pun .forminfo h3 { - font-weight: bold; - } - -.pun .inform { - padding-bottom: 12px - } - -.pun fieldset { - padding: 0px 12px 0px 12px; - border-style: solid; - border-width: 1px - } - -.pun legend { - padding: 0px 6px - } - -.pun .infldset { - padding: 9px 0px 12px 0 - } - -.pun label { - display: block; - padding: 3px 0 - } - -.pun label.conl { - float: left; - overflow: visible; - margin-right: 10px - } - -.pun fieldset .rbox br { - display: none; - } - -.pun fieldset .rbox label { - padding: 3px 0 3px 25px; - position: relative; - vertical-align: middle; - } - -.pun fieldset .rbox input { - margin: 0 9px 0 -25px; - padding: 0; - width: 16px; - position: relative; - vertical-align: middle; - } - -.pun .txtarea { - width: 75% - } - -.pun .txtarea textarea, .pun input.longinput { - width: 100% - } - -.pun .bblinks { - padding-bottom: 10px; - padding-left: 4px - } - -.pun .bblinks li { - display: inline; - padding-right: 20px - } - -.pun .blockform .buttons { - padding-left: 12px; - } - -.pun .blockform .buttons input { - margin-right: 8px; - } - -#posterror ul { - list-style: square; - padding: 3px 0 3px 24px; - } - -.pun .deletemsg { - border-style: solid; - border-width: 1px; - padding: 6px 15px; - } - -.pun p.actions span { - margin-right: 12px; - } - -.pun .multiselect { - float: left; - padding-bottom: 7px; - } - -.pun .checklist { - border-width: 1px; - border-style: solid; - max-height: 9em; - width: 20em; - overflow: auto; - padding: 0.3em 0.5em; - margin: 0.25em 16px 0 0.15em; - } - -.pun .checklist fieldset { - border: 0; - padding: 0; - } - -.pun .checklist legend { - padding: 0; - } - -.pun .checklist legend span { - width: auto; - max-width: 25em; - } - -/***************************************************************** -7. PROFILES AND ADMIN -*****************************************************************/ - -.pun .block2col { - padding-bottom: 1px - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-left: 14em - } - -.pun .blockmenu { - float:left; - width: 13em - } - -.pun .blockmenu li { - padding: 3px 0; - font-weight: bold; - } - -.pun .blockmenu a:link, .pun .blockmenu a:visited { - text-decoration: none - } - -.pun .blockmenu a:hover, .pun .blockmenu a:active { - text-decoration: underline - } - -#viewprofile dl { - float: left; - width: 100%; - overflow: hidden - } - -#viewprofile dd { - margin-left: 14em; - padding: 3px; - } - -#viewprofile dt { - float: left; - width: 13em; - margin: 3px 0; - } - -#profileavatar img { - float: right; - margin-left: 1em - } - -#adintro ul { - list-style-type: disc; - margin-left: 8px; - padding-left: 16px; - } - -/***************************************************************** -8. MAIN POSTS -*****************************************************************/ - -.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { - text-decoration: none; - } - -.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { - text-decoration: underline; - } - -.pun .blockpost h2 .conr { - float: right; - text-align: right; - } - -#punsearch .blockpost h2 span { - white-space: nowrap; - } - -.pun .blockpost .box { - overflow: hidden; - } - -.pun .postleft, .pun .postfootleft { - float:left; - width: 18em; - position: relative; - overflow: hidden; - } - -.pun .postleft dl { - padding: 6px; - } - -.pun .postleft .usercontacts, .pun .postleft .icon { - margin-top: 6px - } - -.pun .postleft .postavatar, .pun .postleft .usertitle { - margin-bottom: 6px; - display: block; - } - -.pun .blockpost dt { - font-size: 1.091em; - font-weight: bold; - } - -.pun .blockpost dt a:link, .pun .blockpost dt a:visited { - text-decoration: none; - } - -.pun .blockpost dt a:hover, .pun .blockpost dt a:active { - text-decoration: underline; - } - -.pun .postright, .pun .postfootright { - border-left-width: 18em; - border-left-style: solid - } - -#postpreview .postright { - border-left: 0 - } - -.pun .postright { - padding: 0 6px; - } - -.pun .postfootright, .pun .multidelete { - text-align: right - } - -.pun .postmsg { - width:98%; - overflow: hidden; - padding-bottom: 6px; - word-wrap: break-word; - } - -.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, -.pun .postfootleft p { - padding: 10px 6px 5px 6px; - } - -.pun .postfootright li { - display: inline; - } - -.pun .postfootright li:before { - content: " | "; - } - -.pun .postfootright li:first-child:before { - content: ""; - } - -.pun .postfootright a:link, .pun .postfootright a:visited { - text-decoration: none - } - -.pun .postfootright a:hover, .pun .postfootright a:active { - text-decoration: underline - } - -.pun .codebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0; - } - -.pun .quotebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0 0.75em; - } - -.pun .quotebox cite { - display: block; - padding: 0.75em 0 0 0; - } - -.pun .quotebox blockquote { - width: 100%; - overflow: hidden - } - -.pun .codebox pre { - overflow: auto; - width: 100%; - overflow-y:hidden - } - -* html .pun .codebox pre { - padding-bottom: 10px; - } - -*+html .pun .codebox pre { - padding-bottom: 10px - } - -.pun .codebox pre code { - display: block; - padding: 0.75em; - } - -.pun .codebox pre.vscroll { - height: 32em; - overflow: auto; - overflow-y: auto - } - -.pun .postmsg img { - vertical-align: bottom; - } - -.pun .postsignature hr { - margin-left: 0px; - width: 200px; - text-align: left; - height: 1px; - border:none - } - -.pun .postmsg .postimg img { - max-width: 98%; - vertical-align: middle; - margin: 7px 0.5em 7px 0; - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-style: solid; - border-width: 2px; - } - -.pun .blockpost label { - padding: 3px 6px; - border-style: solid; - border-width: 1px; - vertical-align: middle; - display: inline-block; - } - -.pun .blockpost label * { - vertical-align: middle; - margin: 0; - padding: 0; - } - -/****************************************************************/ -/* 9. HELP FILES AND MISC. */ -/****************************************************************/ - -#punhelp h2 { - margin-top: 12px - } - -#punhelp div.box { - padding: 10px - } - -#debugtime { - margin-top: -12px; - text-align: center; - } - -#brdwelcome, #brdfooter dl a, div.blockmenu li, div.rbox input { - line-height: 1.4em - } - -#announce div.inbox div { - padding: 3px 0 - } - -/***************************************************************** -COLOUR SCHEME -*****************************************************************/ - -/* Background / Text -----------------------------------------------------------------*/ - -body { - background: #2a2a2a; - color: #d4d4d4 - } - -.pun { - color: #d4d4d4 - } - -.pun .box, #adminconsole fieldset th { - background-color: #383838 - } - -.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, -#brdfooter #modcontrols, #adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { - background-color: #424242 - } - -.pun h2, #brdmenu { - background-color: #565656; - color: #d4d4d4 - } - -.pun th { - background-color: #484848 - } - -.pun legend { - color: #60a0dc - } - -.pun .blockmenu li.isactive a, #posterror li strong { - color: #d4d4d4 - } - -.pun .usercontent * { - background: transparent; - color: #d4d4d4 - } - -.pun textarea, .pun input, .pun select { - background-color: #2a2a2a; - color: #d4d4d4 - } - -.pun .multiselect, .pun .checklist { - color: #D4D4D4; - } - -.pun .checklist { - border-color: #666; - } - -/* Posts -----------------------------------------------------------------*/ - -.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { - background-color: #383838 - } - -.pun .postright, .pun .postfootright { - border-left-color: #424242 - } - -.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { - background-color: #424242 - } - -.pun .blockpost h2 { - background-color: #565656 - } - -.pun .blockpost h2 span.conr { - color: #a19e96 - } - -.pun .postmsg ins, #punhelp samp ins { - background-color: #ff0; - } - -.pun hr { - background-color: #606060; - color: #606060 - } - -/* Borders -----------------------------------------------------------------*/ - -.pun .box { - border-color:#565656 - } - -.pun td, #brdfooter #modcontrols { - border-color: #565656 - } - -.pun th { - border-color: #484848 - } - -.pun fieldset { - border-color: #606060 - } - -#adminconsole td, #adminconsole th { - border-color: #383838 - } - -.pun .quotebox, .pun .codebox, .pun .forminfo, -.pun .blockpost label, .pun .deletemsg { - border-color: #606060 - } - -/* Links -----------------------------------------------------------------*/ - -.pun a:link, .pun a:visited { - color: #60a0dc - } - -.pun a:hover, .pun a:active, .pun a:focus { - color: #80d6ff - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-color: #60a0dc; - } - -.pun .postmsg .postimg a:hover img, .pun .postmsg .postimg a:active img, .pun .postmsg .postimg a:focus img { - border-color: #80d6ff; - } - -.pun h2 a:link, .pun h2 a:visited, -#brdmenu a:link, #brdmenu a:visited { - color: #d4d4d4 - } - -.pun h2 a:hover, .pun h2 a:active, -#brdmenu a:hover, #brdmenu a:active { - color: #d4d4d4 - } - -.pun .postreport a:link, .pun .postreport a:visited, -.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { - color: #888 - } - -.pun .postreport a:hover, .pun .postreport a:active, -.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { - color: #aaa - } - -.pun .maintenancelink a:link, .pun .maintenancelink a:visited { - color: #ff4000 - } - -.pun .maintenancelink a:hover, .pun .maintenancelink a:active { - color: #ff5010 - } - -/* Status Indicators -----------------------------------------------------------------*/ - -.pun .icon { - border-color: #484848 #404040 #3c3c3c #444444 - } - -.pun .iredirect .icon { - border-color: #383838 #383838 #383838 #383838 - } - -.pun .inew .icon { - border-color: #5496d8 #4b85c0 #4377ac #4f8dcb - } - - -/* Alert box -----------------------------------------------------------------*/ - -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 230px; - max-width: 400px; - z-index: 1000; -} -#msgflash h2 { - color: #60a0dc; - font-weight: bold; -} diff --git a/style/Earth.css b/style/Earth.css deleted file mode 100644 index 6379b4f7..00000000 --- a/style/Earth.css +++ /dev/null @@ -1,1664 +0,0 @@ -/***************************************************************** -1. INITIAL SETTINGS -*****************************************************************/ - -/* Limited Reset -----------------------------------------------------------------*/ - -html, body, .pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, .pun h4, .pun h5, .pun pre, .pun blockquote, -.pun ul, .pun ol, .pun li, .pun dl, .pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun legend .pun img, -.pun abbr, .pun cite { - border: 0; - font-style: normal; - font-weight: normal; - margin: 0; - padding: 0; -} - -.pun ul, .pun ol { - list-style: none; -} - -.pun select { - padding-bottom: 1px; - padding-top: 1px; - padding-right: 1px; -} - -/* Content Defaults -----------------------------------------------------------------*/ - -.pun { - font: 81.25%/1.462em Arial, Helvetica, sans-serif; -} - -.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun legend { - font-family: Arial, Helvetica, sans-serif; - font-size: 1em; -} - -.pun pre, .pun code { - font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace; - font-size: 1em; -} - -.pun pre code { - font-size: 1em; -} - -.pun table { - border-collapse: collapse; - border-spacing: 0; - border: 0; - empty-cells: show; - width: 100%; -} - -.pun h1 { - font:2.154em/1em "Trebuchet MS", Arial, Helvetica, sans-serif; - padding: 7px 0; -} - -.pun h2, .pun .hd h2 { - font: 1.462em/1em "Trebuchet MS", Arial, Helvetica, sans-serif; - padding: 7px 0; -} - -.pun h3 { - font-size: 1.154em; - line-height: 1.267em; - padding: 7px 0; -} - -.pun h4 { - font-size: 1.077em; - font-weight: bold; - padding: 7px 0; -} - -.pun h5, .pun h6 { - font-size: 1em; - font-weight: bold; - padding: 7px 0; -} - -.pun p, .pun ul, .pun ol, .pun dl, .pun th, .pun td, .pun legend { - padding: 7px 0; -} - -.pun strong, .pun th, .pun span.warntext, .pun p.warntext { - font-weight: bold; -} - -.pun em { - font-style: italic; -} - -.pun a, .pun a:link, .pun a:visited { - text-decoration: none; -} - -.pun a:hover, .pun a:active, .pun a:focus { - text-decoration: underline; -} - -.pun .actions span { - padding-left: 16px; - padding-right: 8px; - background: url(Earth/img/bull.png) center left no-repeat; - display: inline-block; - line-height: normal; -} - -/* Hidden Elements -----------------------------------------------------------------*/ - -#brdfooter h2, #brdstats h2, #debug h2, #brdstats .conl dt, #brdstats .conr dt, #modcontrols dt, -#searchlinks dt, div.postright h3, .pun .subscribelink span, #announce .hd, #reportform h2, #punmoderate #vf h2, -#punviewforum #vf h2, .pun .required strong span, .pun .icon div { - display: block; - overflow: hidden; - position: absolute; - text-indent: -9999em; - width: 0; -} - -/* Generic Float Clear -----------------------------------------------------------------*/ - -.pun .inbox, .pun #brdmain, .pun .crumbs, .pun .pagepost, .pun .block2col { - min-height: 1px; -} - -* html .pun .inbox, * html .pun #brdmain, * html .pun .infldset, * html .pun .crumbs, * html .pun .pagepost, * html .pun .block2col { - display: inline-block; -} - -* html .pun .inbox, * html .pun #bdrdmain, * html .pun .infldset, * html .pun .crumbs, * html .pun .pagepost, * html .pun .block2col { - display: block; -} - -.pun .inbox:after, .pun #brdmain:after, .pun .crumbs:after, .pun .pagepost:after, .pun .block2col:after { - content: " "; - display: block; - height: 0; - font-size: 0; - clear: both; - visibility: hidden; -} - -.pun .block2col .inbox:after { - content: none; - clear: none; -} - -.clearl { - clear: left; -} - -/***************************************************************** -2. COMMON STYLES -*****************************************************************/ - -/* Page Layout -----------------------------------------------------------------*/ - -.pun { - max-width: 1070px; - margin: 0 auto; - padding: 30px 40px; -} - -#punredirect, #punmaint { - padding: 60px 20% 12px 20%; -} - -#puninstall, #pundb_update { - padding: 20px 10%; -} - -.pun .punwrap { - border: 1px solid; - border-radius: 10px; - padding: 18px; -} - -#punredirect h2, #punmaint h2 { - border-bottom-style: dotted; - border-bottom-width: 1px; - margin-bottom: 3px; -} - -/* Section Spacing and Borders -----------------------------------------------------------------*/ - -#brdmain { - border-style: solid none; - border-width: 2px 0; - margin-bottom: 12px; - padding: 12px 0; -} - -#punindex #brdmain { - padding-top: 24px; -} - -#punredirect #brdmain, #punmaint #brdmain { - border: 0; - margin: 0; - padding: 0; -} - -#brdstats { - border-style: solid none none none; - border-width: 2px 0 0 0; - margin-top: 24px; - padding-top: 12px; -} - -#quickpost { - border-style: solid none none none; - border-width: 2px 0 0 0; - margin-top: 12px; - padding-top: 12px; -} - -#announce { - border-style: solid none none none; - border-width: 2px 0 0 0; - padding-top: 3px; -} - -/***************************************************************** -3. COMMON BOARD ELEMENTS -*****************************************************************/ - -/* Logo, Description and Main Menu -----------------------------------------------------------------*/ - -#brdtitle h1 { - padding: 0 0 10px 0; -} - -#brddesc { - border-top-style: dotted; - border-top-width: 1px; - padding: 10px 0; -} - -#brddesc p { - padding: 0; -} - -#brdmenu ul { - padding: 0; -} - -#brdmenu li { - float: left; -} - -#brdmenu a:link, #brdmenu a:visited { - border-right-style: solid; - border-width: 1px; - display: block; - min-width: 60px; - padding: 12px 16px 6px 8px; - white-space: nowrap; -} - -#brdmenu a:hover, #brmenu a:active, #brdmenu a:focus { - text-decoration: none; -} - -/* Welcome Box -----------------------------------------------------------------*/ - -#brdwelcome { - padding: 10px 0; -} - -#brdwelcome .conl, #brdwelcome .conr, #brdwelcome p, #brdwelcome li { - display: inline; - padding: 0; -} - -#brdwelcome .conl { - float: left; -} - -#brdwelcome .conr { - float: right; -} - -#brdwelcome li span { - background: url(Earth/img/bull.png) center left no-repeat; - padding-left: 18px; - margin-right: 3px; - display: inline-block; - line-height: normal; - white-space: nowrap; -} - -#brdwelcome .conl li:first-child span { - padding-left: 0; - background: none; -} - -/* Stats -----------------------------------------------------------------*/ - -#brdstats .conl { - float: left; -} - -#brdstats .conr { - float: right; - text-align: right; -} - -#brdstats #onlinelist { - border-top-style: dotted; - border-top-width: 1px; - clear: both; -} - -#brdstats #onlinelist dt, #brdstats #onlinelist dd { - display: inline; -} - -/* Footer -----------------------------------------------------------------*/ - -.pun #modcontrols { - border-style: none none dotted none; - border-width: 0 0 1px 0; - margin-bottom: 4px; - text-align: center; - width: 100%; -} - -.pun #modcontrols dd { - display: inline; -} - -.pun #brdfooter #modcontrols dd span { - background: url(Earth/img/bull.png) center left no-repeat; - display: inline-block; - line-height: normal; - padding-left: 18px; - white-space: nowrap; -} - -.pun #brdfooter .conl { - float: left; -} - -.pun #brdfooter .conr { - text-align: right; - float: right; -} - -.pun #brdfooter #poweredby a { - font-size: 1.077em; - font-weight: bold; -} - -.pun #brdfooter #qjump { - padding-top: 5px; -} - -.pun #brdfooter #qjump * { - white-space: nowrap; -} - -.pun #brdfooter #searchlinks dd span { - background: url(Earth/img/bull.png) center left no-repeat; - display: inline-block; - line-height: normal; - padding-left: 18px; - white-space: nowrap; -} - -.pun #brdfooter #feedlinks { - padding-bottom: 0; -} - -.pun #brdfooter #feedlinks span { - background: url(Earth/img/feed.png) center left no-repeat; - display: inline-block; - padding-left: 18px; - white-space: nowrap; -} - -.pun #debugtime { - border-style: dotted none none none; - border-width: 1px 0 0 0; - margin-top: 7px; - text-align: center; -} - -/* Breadcrumbs, Postlink, Pagination -----------------------------------------------------------------*/ - -.pun .linkst .inbox, .pun .linksb .inbox, .pun .postlinksb .inbox { - overflow: hidden; -} - -.pun .linksb, .pun .postlinksb, .pun .linkst, .pun .crumbs { - clear: both; - position: relative; -} - -.pun .linkst .crumbs { - font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; - font-size: 1.462em; - line-height: 1.211em; - padding: 7px 0; -} - -.pun .linksb .crumbs, .pun .postlinksb .crumbs { - font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; - font-size: 1.154em; -} - -.pun .linkst .crumbsplus .pagepost { - border-top-style: dotted; - border-top-width: 1px; -} - -.pun .linksb .crumbsplus .pagepost, .pun .postlinksb .crumbsplus .pagepost { - border-bottom-style: dotted; - border-bottom-width: 1px; -} - -.pun .postlinksb .crumbs { - margin-right: 11em; -} - -.pun .crumbs li { - float: left; - padding-right: 0.4em; - white-space: nowrap; -} - -.pun .crumbs li strong { - font-weight: normal; -} - -.pun .pagelink { - float: left; - white-space: nowrap; -} - -.pun .pagelink strong, .pun .pagelink a, .pun .pagelink span.spacer { - border-style: none none none solid; - border-width: 0 0 0 1px; - display: inline-block; - padding: 0 12px 0 10px; - margin-right: -6px; -} - -.pun .pagelink .item1 { - border: 0; -} - -.pun .pagelink .pages-label { - display: inline-block; -} - -.pun .postlink { - float: right; - font-weight: bold; - text-align: right; -} - -.pun .modbuttons { - float: right; - padding: 5px 0 3px 0; -} - -.pun .modbuttons input { - margin-left: 8px; -} - -.pun .subscribelink { - position: absolute; - right: 0; - text-align: right; - top: 33px; -} - -#punindex .subscribelink { - top: 0px; -} - -#punindex .linksb { - height: 12px; -} - -/***************************************************************** -4. MAIN TABLES -*****************************************************************/ - -.pun #brdmain .blocktable { - position: relative; -} - -#punindex #brdmain .blocktable h2, #punsearch #vf h2 { - font: 1em/1.462em Arial, Helvetica, sans-serif; - font-weight: bold; - margin: 1px 1px 0 1px; - padding-left: 8px; - position: absolute; - left: 0; - white-space: nowrap; - z-index: 100; -} - -#punindex .blocktable th.tcl, #punsearch #vf th.tcl { - font-size: 0; - text-indent: -9999em; -} - -.pun .blocktable .box { - border-style: solid; - border-width: 1px; - margin-bottom: -1px; - overflow: hidden; - position: relative; -} - -* html .pun .blocktable .box { - display: inline-block; -} - -.pun .blocktable table { - table-layout: fixed; - margin-bottom: -1px; -} - -.pun .blocktable th { - padding: 7px 8px; - border-style: none none solid none; - border-width: 1px; - text-align: left; -} - -.pun .blocktable td { - padding: 7px 8px; - line-height: 1.3077em; - border-style: none none solid none; - border-width: 1px; - text-align: left; -} - -.pun .blocktable h3 { - font-size: 1.077em; - font-weight: bold; - padding: 0; -} - -.pun .blocktable p { - padding: 0; -} - -.pun .blocktable .tcl p { - padding: 5px 0 0 0; -} - -.pun .blocktable .tcl { - width: auto; -} - -.pun .blocktable .tc2, .pun .blocktable .tc3, .pun .blocktable .tcmod { - padding-left: 0; - padding-right: 0; - text-align: center; - width: 11%; -} - -.pun .blocktable .tcr { - width: 30%; -} - -.pun .blocktable td .newtext, .pun .blocktable td .pagestext, .pun .blocktable td .byuser { - white-space: nowrap; -} - -.pun .blocktable .tcl h3 span.newtext { - font-size: 0.929em; - font-weight: normal; -} - -.pun #vf td.tcl span.stickytext, .pun #vf td.tcl span.closedtext { - font-size: 1em; - font-weight: bold; -} - -#punsearch #vf .tc2 { - padding-left: 8px; - padding-right: 8px; - text-align: left; - width: 18%; -} - -#users1 .tcr { - width: 25%; -} - -#users1 .tc2 { - padding-left: 8px; - padding-right: 8px; - text-align: left; - width: 25%; -} - -#debug { - margin-top: 12px; -} - -#debug .tcl { - width: 10%; -} - -#punredirect #debug .tcl, #punmaint #debug .tcl { - width: 20%; -} - -#debug .tcr { - width: 90%; - white-space: normal -} - -#punindex .tcr .byuser { - display: block -} - -#punindex td.tc2, #punindex td.tc3, #punindex td.tcr, .pun #vf td.tc2, .pun #vf td.tc3, -.pun #vf td.tcr, #punindex td.tcl div.forumdesc, .pun #vf td.tcl span { - font-size: 0.923em; -} - -.pun #vf td.tcl a { - font-weight: bold; -} - -.pun #vf td.tcl span a { - font-weight: normal; -} - -.pun .blocktable .tclcon { - min-height: 1px; - overflow: hidden; - padding: 0 11px 0 12px; - position: relative; -} - -.pun .blocktable .tclcon div { - width: 100%; - overflow: hidden; -} - -.pun .icon { - border-style: solid; - border-width: 8px; - float: left; - height: 0; - overflow: hidden; - width: 0; -} - -.pun .iposted .ipost { - font-weight: bold; - left: 0; - padding-left: 4px; - position: absolute; - text-align: center; - top: 0; - width: 8px; -} - -/***************************************************************** -MAIN POSTS -*****************************************************************/ - -/* Structure -----------------------------------------------------------------*/ - -.pun .blockpost { - border-style: solid; - border-width: 1px; - margin-bottom: -1px; - overflow: hidden; - position: relative; -} - -* html .pun .blockpost { - display: inline-block; -} - -.pun .blockpost h2 { - font: 1em/1.462em Arial, Helvetica, sans-serif; - white-space: nowrap; - border-bottom-style: solid; - border-bottom-width: 1px; - height: 1.462em; - padding: 0.538em 8px 0.538em 236px; - font-weight: normal; -} - -#punsearch .blockpost h2 { - height: auto; - padding-left: 36px; - white-space: normal; -} - -#punsearch .blockpost h2 span span { - white-space: nowrap; - display: inline-block; - font: 1.077em "Trebuchet MS", Arial, Helvetica, sans-serif -} - -#punsearch .blockpost .icon { - position: absolute; - top: 0; - margin-top: -2.154em; -} - -.pun .blockpost h2 .conr { - float: right; - text-align: right; -} - -.pun .blockpost .inbox { - float: right; - position: relative; - width: 100%; -} - -.pun .blockpost .postbody, .pun .blockpost .postfoot { - border-left-style: solid; - border-left-width: 1px; - float: right; - margin-right: -218px; - position: relative; - text-align: left; - width: 100%; -} - -.pun .blockpost .postleft, .pun .blockpost .postfootleft { - width: 194px; - padding: 7px 12px 7px 12px; - float: left; - margin-left: -218px; - position: relative; -} - -.pun .blockpost .postleft dl { - padding: 0; -} - -#punviewtopic .blockpost dt, #punmoderate .blockpost dt { - display: block; - position: absolute; - padding: 0.538em 0 0.538em 12px; - height: 1.462em; - top: -2.615em; - left: 0; - overflow: hidden; - width: 206px; -} - -.pun .blockpost dt strong { - font-size: 1.231em; - font-weight: bold; -} - -.pun .blockpost .postleft dd { - font-size: 0.923em; -} - -.pun .blockpost .postleft .usertitle { - padding: 4px 0 6px 0; - font-size: 1em; -} - -.pun .blockpost .postleft .postavatar { - display: block; - margin: 0 0 4px 0; -} - -.pun .blockpost .postright { - position: relative; - padding: 4px 230px 7px 18px; -} - -.pun .postmsg { - width:100%; - overflow: hidden; - word-wrap: break-word; -} - -.pun .blockpost .postfootright { - position: relative; - padding: 7px 230px 7px 18px; - text-align: right; -} - -.pun .postfoot p, .pun .postfoot ul { - padding: 0; -} - -.pun .blockpost .postfootright li { - display: inline; -} - -.pun .blockpost .postfootright li span { - display: inline-block; - padding-left: 16px; - margin-left: 8px; - line-height: normal; - background: url(Earth/img/bull.png) center left no-repeat; -} - -.pun .blockpost .usercontacts { - padding: 7px 0; -} - -.pun .blockpost .usercontacts .email { - background: url(Earth/img/email.png) left 65% no-repeat; - margin-right: 5px; - padding-left: 21px; - display: inline-block; - line-height: normal; -} - -.pun .blockpost .usercontacts .website { - background: url(Earth/img/ext.png) left 65% no-repeat; - padding-left: 18px; - display: inline-block; - line-height: normal; -} - -.pun .postsignature hr { - border:none; - height: 1px; - margin-left: 0px; - text-align: left; -} - -/* Content (includes other user content) -----------------------------------------------------------------*/ - -.pun .usercontent { - padding: 7px 0; -} - -.pun .postmsg p, .pun .postmsg li, #punhelp p samp { - font-family: Verdana, Arial, Helvetica, sans-serif; -} - -.pun .usercontent h1, .pun .usercontent h2, .pun .usercontent h3, -.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { - padding: 7px 0 0 0; -} - -.pun .postmsg h5, #punhelp h5 { - font-size: 1.231em; - font-weight: bold; - padding: 7px 0; -} - -.pun .usercontent ul, .pun .postmsg ul { - list-style: disc; - padding: 4px 13px 4px 30px; -} - -.pun .usercontent ol, .pun .postmsg ol { - list-style: decimal; - padding: 4px 13px 4px 30px; -} - -.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { - list-style: lower-alpha; -} - -.pun .usercontent li, .pun .postmsg li { - padding: 0 3px; -} - -.pun .usercontent li p, .pun .postmsg li p { - padding: 0; -} - -.pun span.bbu { - text-decoration: underline; -} - -.pun span.bbs, .pun del { - text-decoration: line-through; -} - -.pun .postmsg ins, #punhelp samp ins { - text-decoration: none; -} - -.pun .blockpost .postmsg .postedit { - font-size: 0.857em; -} - -.pun .blockform .postsignature, .pun .blockpost .postsignature { - font-size: 0.923em; -} - -.pun .codebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0; -} - -.pun .quotebox { - border-style: solid; - border-width: 1px 1px 1px 3px; - margin: 0.75em 1em; - padding: 0 0.75em; -} - -.pun .quotebox cite { - display: block; - padding: 0.75em 0 0 0; - font-weight: bold; - line-height: 1.462em; -} - -.pun .quotebox blockquote { - overflow: hidden; - width: 100%; -} - -.pun .codebox pre { - overflow: auto; - width: 100%; - direction: ltr; - text-align: left; -} - -* html .pun .codebox pre { - padding-bottom: 10px; -} - -*:first-child+html .pun .codebox pre { - padding-bottom: 10px; -} - -.pun .codebox pre code { - padding: 0.5em; - white-space: pre; -} - -.pun div[class*=codebox] pre code { - display: inline-block; -} - -* html .pun .codebox pre code { - display: block; -} - -.pun .codebox pre.vscroll { - height: 32em; - overflow: auto; - overflow-y: auto -} - -.pun .postmsg img, #punhelp samp img { - vertical-align: text-top; -} - -.pun .postmsg .postimg img { - max-width: 98%; - vertical-align: middle; - margin: 7px 0.5em 7px 0; -} - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-style: solid; - border-width: 2px; -} - -/***************************************************************** -MAIN FORMS -*****************************************************************/ - -#punedit .blockform h2, #punpost .blockform h2, #postpreview h2, #posterror h2, -.pun #quickpost h2, .pun #reportform h2, #pundelete .blockform h2 { - font: 1em/1.462em Arial, Helvetica, sans-serif; - font-weight: bold; - white-space: nowrap; - padding: 10px 19px 4px 37px; - border: 0; -} - -#punpost .blockform h2, #punedit .blockform h2,.pun #quickpost h2, -#pundelete .blockform h2 { - margin: 1px 1px 0 1px; - width: 25em; - position: absolute; - z-index: 100; -} - -.pun #quickpost legend, #punpost legend, #punedit legend { - width: 25em; - overflow: hidden; - white-space: nowrap; -} - -.pun .blockform .box { - border-style: solid; - border-width: 1px; - padding-bottom: 12px; -} - -.pun #posterror { - border-style: solid; - border-width: 1px; -} - -.pun #posterror .box { - padding: 0 18px 12px 18px; -} - -* html .pun .blockform .box, * html .pun #posterror { - display: inline-block; -} - -.pun .blockform .forminfo, .pun .error-info { - padding: 12px 18px; - border-style: solid; - border-width: 1px; - position: relative; -} - -.pun .blockform .forminfo { - margin-top: 12px; -} - -#pundelete .blockform .forminfo { - margin-top: 33px; -} - -.pun .forminfo h3 { - padding-bottom: 0; -} - -.pun .error-list li { - padding-left: 24px; - background: url(Earth/img/exclaim.png) center left no-repeat; -} - -.pun .inform { - padding: 0 18px; -} - -.pun legend { - font-weight: bold; - padding: 10px 19px 4px 19px; -} - -* html .pun legend { - margin-left: -7px; -} - -*:first-child+html .pun legend { - margin-left: -7px; -} - -.pun .infldset { - border-style: solid; - border-width: 1px; - padding: 12px 18px; -} - -#punregister #rules .infldset { - padding: 5px 18px; -} - -.pun fieldset p { - padding: 0 0 7px 0; - width: 100%; -} - -.pun fieldset .usercontent p { - padding: 7px 0; -} - -.pun fieldset label { - display: block; - padding: 0 0 7px 0; -} - -.pun label em { - font-weight: normal; - font-style: normal; -} - -.pun .required strong { - background: url(Earth/img/asterisk.png) center right no-repeat; - font-weight: normal; - padding-right: 14px; - white-space: pre; - display: inline-block; - line-height: normal; -} - -.pun label input, .pun label select, .pun label textarea { - margin-top: 2px; -} - -.pun label.conl { - display: inline-block; - padding-right: 12px; -} - -.pun form .buttons { - padding: 8px 19px 8px 34px; - margin-bottom: -12px; -} - -.pun .blockform .buttons input { - margin-right: 12px; -} - -.pun .rbox { - padding: 3px 0; -} - -.pun .rbox label { - padding: 3px 0 3px 1.75em; - position: relative; - min-height: 1px; -} - -* html .pun .rbox label { - text-indent: -3px; - height: 1%; -} - -.pun .rbox input { - margin: 3px 0.75em 3px -1.75em; - float: left; - position: relative; - vertical-align: middle; - padding: 0; - height: 1em; - width: 1em; -} - -.pun input[type=text], .pun select, .pun textarea { - font-family: Verdana, Arial, Helvetica, sans-serif; -} - -.pun .txtarea textarea, .pun input.longinput { - width: 98%; -} - -.pun textarea { - resize: vertical; -} - -.pun #quickpost .txtarea { - padding-right: 12px; - position: relative; -} - -.pun .blockform .bblinks { - padding-top: 0; -} - -.pun .blockform .bblinks li { - display: inline; -} - -.pun .blockform .bblinks li span { - background: url(Earth/img/help.png) center left no-repeat; - margin-right: 8px; - padding-left: 20px; - display: inline-block; -} - -.pun #quickpost .bblinks { - padding-top: 0; -} - -.pun #quickpost .bblinks li { - display: inline; -} - -.pun #login p.clearb { - border-top-style: dotted; - border-top-width: 1px; - font-size: 0; - height: 0; - line-height: 0; - margin-top: 7px; - overflow: hidden; - padding-bottom: 3px; - padding-top: 7px; - text-indent: -9999em; - width: 100%; -} - -.pun #postreview { - padding-top: 12px; -} - -.pun #postpreview, .pun #posterror { - margin-bottom: 12px; -} - -.pun #postpreview .postright { - padding: 0; -} - -.pun #postpreview .postbody { - border-style: solid; - border-width: 1px; - float: none; - margin: 0 18px 12px 18px; - padding: 0; - padding: 4px 18px 4px 18px; - width: auto; -} - -.pun span.email { - background: url(Earth/img/email.png) left 65% no-repeat; - margin-right: 5px; - padding-left: 21px; - display: inline-block; - line-height: normal; -} - -.pun span.website { - background: url(Earth/img/ext.png) left 65% no-repeat; - padding-left: 18px; - display: inline-block; - line-height: normal; -} - -#punmisc #rules .box { - border-style: solid; - border-width: 1px; - padding: 5px 18px; -} - - -#punhelp #brdmain .box { - border-style: solid; - border-width: 1px; - padding: 7px 12px; -} - -.pun .multiselect { - float: left; - padding-bottom: 7px; -} - -.pun .checklist { - border-width: 1px; - border-style: solid; - max-height: 9em; - width: 20em; - overflow: auto; - padding: 0.25em 0.5em; - margin: 0.25em 16px 0 0.15em; -} - -.pun .checklist legend { - padding: 0; -} - -.pun .checklist legend span { - width: auto; - max-width: 25em; -} - -/***************************************************************** -PROFILES (+ ADMIN MENU) -*****************************************************************/ - -/* Profile / Admin -----------------------------------------------------------------*/ - -.pun .blockmenu { - width: 13em; - float: left; - padding-bottom: 12px; -} - -.pun .block2col .blockform, .pun .block2col .block { - margin-left: 15em; -} - -.pun .blockmenu .block2 { - padding-top: 19px; -} - -.pun .blockmenu ul { - border-top-style: dotted; - border-top-width: 1px; - padding: 0; -} - -.pun .blockmenu li { - border-bottom-style: dotted; - border-bottom-width: 1px; - font-weight: bold; - padding: 0; -} - -.pun .blockmenu a:link, .pun .blockmenu a:visited { - display: block; - padding: 9px 6px 3px 6px; - min-height: 1px; - text-decoration: none; -} - -* html .pun .blockmenu a:link, * html .pun .blockmenu a:visited { - height: 1%; -} - -.pun .blockmenu a:hover, .pun .blockmenu a:active, .pun .blockmenu a:focus { - text-decoration: none; -} - -#viewprofile .box { - border-style: solid; - border-width: 1px; - padding-bottom: 18px; -} - -#viewprofile dt, #adstats dt { - padding: 7px 0; - position: absolute; - width: 13em; - left: 0; -} - -#viewprofile dl { - border-style: solid none none none; - border-width: 1px; - margin: 7px 0; - padding: 0; - width: 100%; - position: relative; -} - -#adintro, #adstats, #adalerts { - border-style: solid; - border-width: 1px; - padding: 18px; -} - -#adintro li span { - display: inline-block; - padding-left: 16px; - margin-left: 8px; - line-height: normal; - background: url(Earth/img/bull.png) center left no-repeat; -} - -#adstats .inbox, #adintro .inbox, #adalerts p { - border-style: solid; - border-width: 1px; - padding: 18px; -} - -#adstats dl { - margin: 0; - padding: 0; - width: 100%; - position: relative; -} - -#viewprofile dd, #adstats dd { - border-style: none none solid none; - border-width: 1px; - padding: 7px 0 7px 13em; -} - -/***************************************************************** -COLOUR SCHEME -*****************************************************************/ - -/* Basic defaults and Common Items -----------------------------------------------------------------*/ - -html, body, .pun { - background: #eaede2; - color: #333; -} - -.pun .punwrap { - background: #fff; - border-color: #ccd7c1; - color: #526550; -} - -#brdtitle #brddesc, .pun .pagepost, #brdstats #onlinelist, #brdfooter #searchlinks, #brdfooter #modcontrols, -#punmaint h2, #punredirect h2, #adminconsole .submittop, .pun #debugtime, .pun .pagelink a, .pun .pagelink * { - border-color: #bbc6b2; -} - -.pun a, .pun a:link, .pun a:visited { - color: #047E00; -} - -.pun a:hover, .pun a:active, .pun a:focus { - color: #73A900; -} - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-color: #047E00; -} - -.pun .postmsg .postimg a:hover img, .pun .postmsg .postimg a:active img, .pun .postmsg .postimg a:focus img { - border-color: #73A900; -} - -/* Primary Navigation -----------------------------------------------------------------*/ - -#brdmenu { - background: #32671d; -} - -#brdmenu a, #brdmenu a:link, #brdmenu a:visited { - background: #32671d; - border-color: #fff; - color: #e3e3c8; -} - -#brdmenu a:hover, #brdmenu a:active, #brdmenu a:focus { - background: #2ca100; - border-color: #fff; - color: #fff; -} - -/* Main Tables -----------------------------------------------------------------*/ - -.pun .blocktable .box { - background: #fcfcf4; - border-color: #bbc6b2 #d8dccf; -} - -#punindex .blocktable h2, .pun #vf h2 { - color: #83866a; -} - -#adminconsole fieldset th, #adminconsole fieldset td { - background: #f6f6ea; - border-color: #dce6d8; -} - -.pun #users1 h2 { - background: #fff; -} - -.pun .blocktable td { - border-color: #dce6d8; -} - -.pun .blocktable th { - background: #eaecda; - border-color: #ccd7c1; - color: #83866a; -} - -.pun .blocktable td.tcl span.stickytext { - color: #c08b20; -} - -/* Main Posts -----------------------------------------------------------------*/ - -.pun .blockpost { - background: #f6f6ea; - border-color: #bbc6b2 #d8dccf; -} - -.pun .blockpost h2 { - background: #eaecda; - border-color: #ccd7c1; - color: #83866a; -} - -.pun .blockpost .postbody, .pun .blockpost .postfoot { - background: #fcfcf4; - border-color: #dce6d8; -} - -.pun .blockpost .postfootright li { - color: #fcfcf4; -} - -.pun .postmsg, #punhelp code, #punhelp samp { - color: #333; -} - -.pun .postsignature, .pun .postmsg .postedit { - color: #526550; -} - -.pun .quotebox { - background: #f9fae5; - border-color: #bdbc7a; - color: #566579; -} - -.pun .quotebox cite { - color: #83866a; -} - -.pun .codebox, #punhelp .codebox code { - background: #333; - color: #fff; -} - -.pun .postmsg hr { - background: #bbc6b2; -} - -.pun .postmsg ins, #punhelp samp ins { - background-color: #ff0; -} - -/* Main Forms + Profile -----------------------------------------------------------------*/ - -.pun .blockform .box, #adstats, #adintro, #adalerts, #postpreview, #posterror { - border-color: #bbc6b2 #d8dccf; - background: #eaecda; -} - -#punmisc #rules .box, #punhelp #brdmain .box { - border-color: #bbc6b2 #d8dccf; - background: #f6f6ea; -} - -.pun #quickpost h2, #punpost .blockform h2, #punedit .blockform h2, #posterror h2, -#pundelete .blockform h2 { - background: #eaecda; - color: #83866a; -} - -.pun .forminfo { - background: #fff; - border-color: #dce6d8; -} - -#puninstall form#install .forminfo { - background: #32671d; - color: #fff; -} - -.pun #posterror .error-info, .pun #adalerts p { - background: #ffffe1; - border-color: #dfe6ee; -} - -#puninstall form#install .error-info { - background: #ffffe1; - border-color: #dfe6ee; - color: #333; -} - -.pun .infldset, #adintro .inbox, #adstats .inbox { - background: #f6f6ea; - border-color: #dce6d8; -} - -.pun label, .pun legend, #adminconsole fieldset th { - color: #83866a; -} - -.pun fieldset p { - border-color: #bbc6b2; -} - -.pun .blockmenu ul, .pun .blockmenu li { - border-color: #bbc6b2; -} - -.pun .blockmenu a:hover, .pun .blockmenu a:active, .pun .blockmenu a:focus { - background: #ffffe6; -} - -.pun .blockmenu .isactive a:link, .pun .blockmenu .isactive a:visited { - color: #333; - background: #f6f6ea; - } - -.pun #viewprofile .box { - border-color: #bbc6b2 #d8dccf; - background: #eaecda; -} - -.pun #viewprofile dt, #adstats dt { - color: #83866a; -} - -.pun #viewprofile dl, .pun #viewprofile dd, #adstats dl, #adstats dd { - border-color: #dce6d8; -} - -#adminconsole fieldset td.nodefault { - background: #d59b9b; -} - -.pun .multiselect { - color: #83866A; -} - -.pun .checklist { - background: white; - border-color: #ccc; -} - -/* Status Indicators -----------------------------------------------------------------*/ - -.pun .icon { - border-color: #eef1e8 #dbddd4 #e6e8df #eef1e8; -} - -.pun .iredirect .icon { - border-color: #bbc6b2; - border-width: 1px; - padding: 7px; -} - -.pun .inew .icon { - border-color: #50a42f #408426 #32671d #4a982c; -} - - -/* Alert boxes -----------------------------------------------------------------*/ - -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 240px; - max-width: 410px; - padding: 5px; - z-index: 1000; - color: #fff; - background-color: #61c462; - border-color: #1489e0; - border-width: 2px; - border-radius: 5px; -} diff --git a/style/Earth/base_admin.css b/style/Earth/base_admin.css deleted file mode 100644 index fdf41b10..00000000 --- a/style/Earth/base_admin.css +++ /dev/null @@ -1,163 +0,0 @@ -#adminconsole .blockform .box { - padding-bottom: 12px; -} - -#adminconsole fieldset .infldset { - position: relative; - overflow: hidden; -} - -#adminconsole fieldset table { - margin-top: -1px; - margin-bottom: -1px; -} - -#adminconsole fieldset td, #adminconsole fieldset th { - padding: 10px 8px 10px 0; - text-align: left; - white-space: normal; - border-style: solid none; - border-width: 1px 0; -} - -#punadmin thead th { - border-top: 0; - font-weight: normal; -} - -#adminconsole fieldset td span, #adminconsole fieldset th span { - display: block; font-size: 1em; - font-weight: normal; -} - -#adminconsole fieldset td.location span { - display: inline-block; -} - -#adminconsole fieldset th { - width: 15em; - font-weight: normal; - padding-right: 8px; -} - -#adminconsole table.aligntop th, #adminconsole table.aligntop td { - vertical-align: top; -} - -#adminconsole table.aligntop th div { - padding-top: 3px; -} - -#adminconsole .inform { - padding-bottom: 0; -} - -#adminconsole .infldset { - padding-bottom: 0; - padding-top: 0; -} - -#adminconsole p.submittop { - text-align: center; - border-bottom-style: dotted; - border-bottom-width: 1px; - margin: 0 18px; - padding-top: 12px; -} - -#adminconsole p.submitend { - text-align: center; - padding-bottom: 0; -} - -#adminconsole fieldset p { - padding: 10px 0; -} - -#adminconsole .fsetsubmit { - padding: 10px 0 12px 0; -} - -#categoryedit .tcl { - width: 25%; -} - -#censoring .tcl, #censoring .tc2 { - width: 20%; -} - -#edforum .tcl { - width: 18%; -} - -#edforum .tc2 { - width: 12%; -} - -#forumperms thead th, #forumperms tbody td { - text-align: center; -} - -.pun .linkst .backlink, .pun .linksb .backlink { - padding: 7px 0; -} - -#punadmin #users1 h2, #punadmin #users2 h2, #punadmin #bans1 h2 { - display: block; - left: -9999em; - overflow: hidden; - position: absolute; - text-indent: -9999em; - width: 0; -} - -#punadmin #users1 th, #punadmin #users2 th, #punadmin #bans1 th { - font-weight: bold; -} - -#users2 th, #bans1 th { - text-align: left; -} - -#users2 th.tcmod { - text-align: center; -} - -#users2 .tcl, #bans1 .tcl { - width: auto; - text-align: left; -} - -#users2 .tc2, #bans1 .tc2 { - width: 18%; - text-align: left; -} - -#users2 .tc3, #users2 .tc5, #bans1 .tc3, #bans1 .tc5, #bans1 .tc6 { - width: 12%; - text-align: left; -} - -#users2 .tc4, #bans1 .tc4 { - width: 10%; - text-align: center; -} - -#users2 .tcr { - width: 20%; - white-space: nowrap; -} - -#bans1 .tcr { - width: 15%; - white-space: nowrap; -} - -#users2 .tcmod { - width: 10%; - text-align: center; -} - -.plugin p { - padding: 12px 18px 0; -} diff --git a/style/Earth/img/asterisk.png b/style/Earth/img/asterisk.png deleted file mode 100644 index f7438dea90907b0619cdfea4aa0f057fdc7ddfba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFv3GfMV^~o%})6nqk{{2G=3ODle zA5NHXIX-?T1H<`%fYS~RFE?y>ci@2eO5P}-dd89t<7fArM)t+&`RfFg_~ zL4Lsu4$p3+0Xf2+E{-7_*OL<(7;iEMv>Z!IU|9CZjUGw$o@A|>m?3k*bvdt)Zp*1 z$k(02-h=D*!_47~-0iE9vOTN6Pq@%;oWVkntxBWAPP);0vd(Ye>CEcy*6jMVC~>$X z00001bW%=J06^y0W&i*HmPtfGRCwBz&PNu5FbqXe+1Lm}Y(nofKziT*-XcaB=H$-) z(?syw)Srzpbsa@p5~MJpz^^QTyRdBG5Z6`q{F3m%9Tn};=KI2vV31K!U5B*a6e48o z&~rpS7kN(MhRjc5%eJjJUe<8IaqwB&G%X#LOhTxJQETn2{De!mdRz#hltPj{14xfy iSXE`YA@W3@{_g`n0ShubqWvZS00003nCyQ#|mrr|x=S?t*Ro z!nOL7eCKOi)MHWQje^*3SjJpMY5s;V00001bW%=J06^y0W&i*Hs!2paR2Ug;z(tY* zK>z^3npPQC+?{n7{{Jrsf+NXY_1CwQ$+G6ApL{l1*1VQIuKH3$m6TQVSo8quL_}JH zQqgk}fMpqJt-(1rou@$3R7xrE-V5;$d}P`=2lisK1$?HQ^AA{Se>Pj7oC)vkEHx%> zcYENym|ANgj^ljQ0bxE$jajcJlYICR0LF_^+8Wd5!>0jPe4NjLB8(+L ze!&b5&u*jvIa;1Bjv*Yf$qmfUmdKI;Vst07TUr3jhEB diff --git a/style/Earth/img/feed.png b/style/Earth/img/feed.png deleted file mode 100644 index 3704226a673de8aa886bb5d964fd65079347a35c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 439 zcmV;o0Z9IdP)Ut>u@Zj)- zFZhrs^@=3#fGGUu+4i%0{Jwwx_38SoVC8r*z z{n@nn!;s!%C-tXg`p>H1Z8GD8O!b{i`?hiDb0`1Ind^;F_|Uib+s*Q~lJ>%y@2-pU ztakE>G5q7p_s6CD$Bx=p9pG|9`OBpHs#f))S^w+S{oTI#q)}0fy#xRN00DGTPE!Ct z=GbNc005s!L_t(|+6~D=7Q{dl0Knf#Gd2gY#g#`F)9eUB>Au~Hw?f|{blho(e=zi zpeWuiisN_4_GSu1s;gJTu9-G3R3NU+s>Ma0ZCTTgx30fhdEP)U8=d#(|#>2{| zpsaJKvVW?zgs{1avb%`9!Jx#@mDAs(p{;bDK~7@;0004WQchCuN3&MHv>C=AhBLpIJef&nN*p*3SH zgz!!cfGqQsbJlXs`*8$dtJF8)a^ZZ8lf_qZr+DW4JY;Q##VOp95b4@J@FQ.. diff --git a/style/Earth/index.html b/style/Earth/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/Earth/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/admin/bans/add_ban.php b/style/FeatherBB/view/admin/bans/add_ban.php deleted file mode 100644 index 8170a2a9..00000000 --- a/style/FeatherBB/view/admin/bans/add_ban.php +++ /dev/null @@ -1,96 +0,0 @@ - - -
          -

          -
          -
          -
          - - - - - -
          - -
          - - - - - - - - - - - - - -
          - - -
          - - '.__('here').''); - } ?> -
          - - -
          -

          -
          -
          -
          -
          -
          - -
          - - - - - - - - - -
          - - -
          - - -
          -
          -
          -
          -

          -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/admin/bans/admin_bans.php b/style/FeatherBB/view/admin/bans/admin_bans.php deleted file mode 100644 index 3d714e7f..00000000 --- a/style/FeatherBB/view/admin/bans/admin_bans.php +++ /dev/null @@ -1,102 +0,0 @@ - - -
          -

          -
          -
          - -
          -
          - -
          - - - - - -
          - - -
          -
          -
          -
          -
          -
          - -

          -
          -
          - -

          -
          -
          - -
          -

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          -
          -
          - -     - -
          -
          -
          -
          -

          -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/admin/bans/index.html b/style/FeatherBB/view/admin/bans/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/admin/bans/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/admin/bans/search_ban.php b/style/FeatherBB/view/admin/bans/search_ban.php deleted file mode 100644 index 0d057182..00000000 --- a/style/FeatherBB/view/admin/bans/search_ban.php +++ /dev/null @@ -1,87 +0,0 @@ - - -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          - -
          -
          -
          -
          - - -
          -

          -
          -
          - - - - - - - - - - - - - - - - - - - - - - - -'."\n"; - } - -?> - -
          '.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>'.__('Edit').' | '.__('Remove').'' ?>
          '.__('No match').'
          -
          -
          -
          - -
          -
          -
          - -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/admin/categories.php b/style/FeatherBB/view/admin/categories.php deleted file mode 100644 index c8786528..00000000 --- a/style/FeatherBB/view/admin/categories.php +++ /dev/null @@ -1,111 +0,0 @@ - -
          -

          -
          -
          -
          -
          - -
          - - - - - -
          - - - '.__('Forums').'') ?> -
          -
          -
          -
          -
          -
          - -

          -
          -
          - -
          -
          - -
          - - - - - -
          - - -
          -
          -
          -
          -
          -
          - - -

          -
          -
          - -
          -
          - -
          - - - - - - - - - - - - - - - -
          -
          -
          -
          -
          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/censoring.php b/style/FeatherBB/view/admin/censoring.php deleted file mode 100644 index 71c253f7..00000000 --- a/style/FeatherBB/view/admin/censoring.php +++ /dev/null @@ -1,84 +0,0 @@ - - -
          -

          -
          -
          - -
          -
          - -
          -

          '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

          - - - - - - - - - - - - - - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - - -'."\n"; - } - - ?> - -
           
          -'.__('No words in list').'

          '."\n"; -} - -?> -
          -
          -
          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/forums/admin_forums.php b/style/FeatherBB/view/admin/forums/admin_forums.php deleted file mode 100644 index e966e6f5..00000000 --- a/style/FeatherBB/view/admin/forums/admin_forums.php +++ /dev/null @@ -1,114 +0,0 @@ - - -
          -

          -
          -
          - - -
          -
          - -
          - - - - - -
          - - -
          -
          -
          -
          - -
          -
          - -
          -

          -
          -
          -
          - -
          -
          - -

          -
          -
          - -

          - $cat_data) { - ?> -
          -
          - -
          - - - - - - - - - - - - - - - - - -
          |
          -
          -
          -
          - -

          -
          -
          -
          -
          - - diff --git a/style/FeatherBB/view/admin/forums/delete_forum.php b/style/FeatherBB/view/admin/forums/delete_forum.php deleted file mode 100644 index 6a5263ba..00000000 --- a/style/FeatherBB/view/admin/forums/delete_forum.php +++ /dev/null @@ -1,35 +0,0 @@ - - -
          -

          -
          -
          - -
          -
          - -
          -

          -

          -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/forums/index.html b/style/FeatherBB/view/admin/forums/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/admin/forums/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/admin/forums/permissions.php b/style/FeatherBB/view/admin/forums/permissions.php deleted file mode 100644 index df092f46..00000000 --- a/style/FeatherBB/view/admin/forums/permissions.php +++ /dev/null @@ -1,137 +0,0 @@ - - -
          -

          -
          -
          - -

          -
          -
          - -
          - - - - - - - - - - - - - - - - - - - - - -
          - -
          - -
          '; ?>
          -
          -
          -
          -
          -
          - -
          -

          '.__('User groups').'') ?>

          - - - - - - - - - - - - - - > - - tabindex="" /> - - > - - tabindex="" /> - - > - - tabindex="" /> - - - - -
           
          -
          -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/groups/add_edit_group.php b/style/FeatherBB/view/admin/groups/add_edit_group.php deleted file mode 100644 index bc2bc244..00000000 --- a/style/FeatherBB/view/admin/groups/add_edit_group.php +++ /dev/null @@ -1,311 +0,0 @@ - - -
          -

          -
          -
          - -

          -
          - - - -
          - -
          -

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - -
          - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - -
          - - -
          - - -
          - - -
          -

          -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/groups/admin_groups.php b/style/FeatherBB/view/admin/groups/admin_groups.php deleted file mode 100644 index 643b4883..00000000 --- a/style/FeatherBB/view/admin/groups/admin_groups.php +++ /dev/null @@ -1,110 +0,0 @@ - - -
          -

          -
          -
          -
          -
          - - -
          - - - - - -
          - - -
          -
          -
          -
          -
          -
          -
          -
          - - -
          - - - - - -
          - - -
          -
          -
          -
          -
          -
          - -

          -
          -
          -
          -
          - -
          -

          - -'."\n"; -} - -?> -
          '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
          -
          -
          -
          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/groups/confirm_delete.php b/style/FeatherBB/view/admin/groups/confirm_delete.php deleted file mode 100644 index ca595ab3..00000000 --- a/style/FeatherBB/view/admin/groups/confirm_delete.php +++ /dev/null @@ -1,36 +0,0 @@ - - -
          -

          -
          -
          - -
          - -
          - -
          -

          -

          -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/groups/delete_group.php b/style/FeatherBB/view/admin/groups/delete_group.php deleted file mode 100644 index 693baab1..00000000 --- a/style/FeatherBB/view/admin/groups/delete_group.php +++ /dev/null @@ -1,39 +0,0 @@ - - -
          -

          -
          -
          - -
          -
          - -
          -

          - -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/index.html b/style/FeatherBB/view/admin/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/admin/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/admin/index.php b/style/FeatherBB/view/admin/index.php deleted file mode 100644 index dc0dcf8c..00000000 --- a/style/FeatherBB/view/admin/index.php +++ /dev/null @@ -1,63 +0,0 @@ - - -
          -

          -
          -
          -

          -
            -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          -
          -
          - - -

          -
          -

          '.__('Delete install file').'') ?>

          -
          - - -

          -
          -
          -
          -
          -
          - '.__('Check for upgrade').'') ?> -
          -
          -
          - -
          -
          -
          - - -
          -
          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/loader.php b/style/FeatherBB/view/admin/loader.php deleted file mode 100644 index 6a61c22f..00000000 --- a/style/FeatherBB/view/admin/loader.php +++ /dev/null @@ -1,17 +0,0 @@ - - -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/maintenance/admin_maintenance.php b/style/FeatherBB/view/admin/maintenance/admin_maintenance.php deleted file mode 100644 index 068b914b..00000000 --- a/style/FeatherBB/view/admin/maintenance/admin_maintenance.php +++ /dev/null @@ -1,99 +0,0 @@ - - -
          -

          -
          -
          -
          - -
          - -
          -

          '.__('Maintenance mode').'') ?>

          - - - - - - - - - - - - - -
          - - -
          - - -
          - -
          -

          -
          -
          -
          -
          -
          - -
          - -
          - -
          - -
          - - - - - - - - - - - - - -
          - - -
          - - - -
          - - -
          -

          '.__('Maintenance mode').'') ?>

          -
          -
          -
          -
          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/maintenance/index.html b/style/FeatherBB/view/admin/maintenance/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/admin/maintenance/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/admin/maintenance/prune.php b/style/FeatherBB/view/admin/maintenance/prune.php deleted file mode 100644 index 9e3b0d2b..00000000 --- a/style/FeatherBB/view/admin/maintenance/prune.php +++ /dev/null @@ -1,39 +0,0 @@ - - -
          -

          -
          -
          - -
          - - - - -
          - -
          -

          -

          -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/maintenance/rebuild.php b/style/FeatherBB/view/admin/maintenance/rebuild.php deleted file mode 100644 index 5bd6ffc0..00000000 --- a/style/FeatherBB/view/admin/maintenance/rebuild.php +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -<?php echo generate_page_title($page_title) ?> - - - - -

          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/admin/menu.php b/style/FeatherBB/view/admin/menu.php deleted file mode 100644 index b33c2727..00000000 --- a/style/FeatherBB/view/admin/menu.php +++ /dev/null @@ -1,112 +0,0 @@ - -
          -
          -

          -
          -
          -
            - > - > -user->g_mod_ban_users == '1'): ?> > - > -
          -
          -
          - -

          -
          -
          -
            - > - > - > - > - > - > - > - > -
          -
          -
          - -

          -
          -
          - -
          -
          - -
          \ No newline at end of file diff --git a/style/FeatherBB/view/admin/options.php b/style/FeatherBB/view/admin/options.php deleted file mode 100644 index faa8e34c..00000000 --- a/style/FeatherBB/view/admin/options.php +++ /dev/null @@ -1,849 +0,0 @@ - - -
          -

          -
          -
          - -

          -
          - -
          - -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - - -
          - - -
          - - -
          - - -
          - - - -
          - - -
          - - -
          -
          -
          -
          -user->timezone + $feather->user->dst) * 3600; - $timestamp = time() + $diff; - -?> -
          -
          - -
          - - - - - - - - - - - - - - - - - - - - - -
          - - '.__('PHP manual').'') ?> -
          - - '.__('PHP manual').'') ?> -
          - - -
          - - -
          - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - -
          - - -
          - - -
          - - -
          - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - - - -
          - - - -
          - - - '.__('Censoring').'') ?> -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - -
          - - - - -
          - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - -
          - - - - -
          - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - - - - - - - - - - - - - -
          - - - -
          - - -
          - - -
          - - -
          - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - - -
          - - -
          - - - -
          - - - -
          - - -
          - - -
          - - - - - -
          - - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - - - - - - - - - - - - - - - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - -
          - - - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - -
          - - - -
          - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - -
          - - - -
          - - -
          -
          -
          -
          -

          -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/admin/parser.php b/style/FeatherBB/view/admin/parser.php deleted file mode 100644 index aec1f767..00000000 --- a/style/FeatherBB/view/admin/parser.php +++ /dev/null @@ -1,299 +0,0 @@ - - -
          -

          -
          -
          - -

          - - -

          -
          - -
          - -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - /> /> - - -
          - /> /> - - -
          - /> /> - - -
          - /> /> - - -
          - /> - /> -
          - /> -
          - X:Width - - Y:Height - - -
          - X:Width - - Y:Height -
          - - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - - $value) { - $i++; - $oldfile = $value['file']; - ?> - - - - - - - - - - - - - - - - - - - - - -
          :)
          - - - -

          New smiley text
          -
          -
          -
          -
          -
          -
          - - - -
          -
          - -
          - - - - - - - - - - - $tagdata) { - if ($tagname == '_ROOT_') { - continue; - } // Skip last pseudo-tag - $title = isset($lang_admin_parser['tag_summary'][$tagname]) ? - $lang_admin_parser['tag_summary'][$tagname] : ''; - ?> - - - - - - - - -
          - /> /> - - /> /> - - /> -
          -
          -
          -
          - - -

          - - -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/permissions.php b/style/FeatherBB/view/admin/permissions.php deleted file mode 100644 index a70328ae..00000000 --- a/style/FeatherBB/view/admin/permissions.php +++ /dev/null @@ -1,189 +0,0 @@ - - -
          -

          -
          -
          - -

          -
          - -
          - -
          - - - - - - - - - - - - - - - - - - - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          - - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - - - - - - - - - - - - - -
          - - - -
          - - - -
          - - - -
          - - -
          - - -
          -
          -
          -
          -
          -
          - -
          - - - - - - - - - -
          - - - -
          - - - -
          -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/reports.php b/style/FeatherBB/view/admin/reports.php deleted file mode 100644 index 63251681..00000000 --- a/style/FeatherBB/view/admin/reports.php +++ /dev/null @@ -1,116 +0,0 @@ - - -
          -

          -
          -
          - - -
          -
          - -
          - - - - - - - - - -
          '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), - $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
          ', feather_escape($report['message'])) ?>
          -
          -
          -
          - -
          -
          - -
          -

          -
          -
          -
          - -
          -
          -
          - -
          -

          -
          -
          - -
          -
          - '.feather_escape($report['zapped_by']).'' : __('NA')) ?> -
          - - - - - - - - - -
          '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), - $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
          ', feather_escape($report['message'])) ?>
          -
          -
          -
          - -
          -
          - -
          -

          -
          -
          -
          - -
          -
          -
          -
          - diff --git a/style/FeatherBB/view/admin/statistics.php b/style/FeatherBB/view/admin/statistics.php deleted file mode 100644 index 5306b027..00000000 --- a/style/FeatherBB/view/admin/statistics.php +++ /dev/null @@ -1,42 +0,0 @@ - - -
          -

          -
          -
          -
          -
          -
          - -
          -user->g_id == FEATHER_ADMIN): ?>
          -
          -
          - '.__('Show info').'') ?>
          - -
          -
          -
          - -
          -
          - -
          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/admin_users.php b/style/FeatherBB/view/admin/users/admin_users.php deleted file mode 100644 index 27e99a16..00000000 --- a/style/FeatherBB/view/admin/users/admin_users.php +++ /dev/null @@ -1,172 +0,0 @@ - - -
          -

          -
          -
          -

          -
          -
          - -
          -

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          -
          -
          -
          -
          -
          -
          -     -
          - -
          -
          -
          -
          -

          -
          -
          - -

          -
          -
          -
          -
          - -
          - - - - - -
          -
          -
          -
          -
          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/ban_users.php b/style/FeatherBB/view/admin/users/ban_users.php deleted file mode 100644 index e929c043..00000000 --- a/style/FeatherBB/view/admin/users/ban_users.php +++ /dev/null @@ -1,58 +0,0 @@ - - -
          -

          -
          -
          - - -
          -
          - -
          - - - - - - - - - - - - - -
          - - -
          - - -
          - - - -
          -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/delete_users.php b/style/FeatherBB/view/admin/users/delete_users.php deleted file mode 100644 index a82c22ec..00000000 --- a/style/FeatherBB/view/admin/users/delete_users.php +++ /dev/null @@ -1,39 +0,0 @@ - - -
          -

          -
          -
          - - -
          -
          - -
          -

          -
          - -
          -

          -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/find_users.php b/style/FeatherBB/view/admin/users/find_users.php deleted file mode 100644 index d426177d..00000000 --- a/style/FeatherBB/view/admin/users/find_users.php +++ /dev/null @@ -1,100 +0,0 @@ - - -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          - -
          -
          -
          -
          - - -
          - -
          -

          -
          -
          - - - - - - - - - - - - - - - - - - - - - - - - - -'."\n"; - } - - ?> - -
          '.feather_escape($user['username']).'' ?>'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
          '.__('No match').'
          -
          -
          -
          - -
          -
          -
          - -

          - -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          -
          -
          -
          diff --git a/style/FeatherBB/view/admin/users/move_users.php b/style/FeatherBB/view/admin/users/move_users.php deleted file mode 100644 index d43303e8..00000000 --- a/style/FeatherBB/view/admin/users/move_users.php +++ /dev/null @@ -1,47 +0,0 @@ - - -
          -

          -
          -
          - - -
          -
          - -
          - - - - - -
          - - -
          -
          -
          -
          -

          -
          -
          -
          -
          - \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/search_ip.php b/style/FeatherBB/view/admin/users/search_ip.php deleted file mode 100644 index a17e7ac5..00000000 --- a/style/FeatherBB/view/admin/users/search_ip.php +++ /dev/null @@ -1,79 +0,0 @@ - - -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          - -
          -
          -
          -
          - -
          -

          -
          -
          - - - - - - - - - - - - - - - - - -'."\n"; - endif; - - ?> - -
          '.__('Results no posts found').'
          -
          -
          -
          - -
          -
          -
          - -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/show_users.php b/style/FeatherBB/view/admin/users/show_users.php deleted file mode 100644 index 4ab008c7..00000000 --- a/style/FeatherBB/view/admin/users/show_users.php +++ /dev/null @@ -1,100 +0,0 @@ - - -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          - -
          -
          -
          -
          - -
          -

          -
          -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'."\n"; - } - - ?> - -
          '.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?>'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
              
          '.__('Results no IP found').'
          -
          -
          -
          - -
          -
          -
          - -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/delete.php b/style/FeatherBB/view/delete.php deleted file mode 100644 index 8a2d6959..00000000 --- a/style/FeatherBB/view/delete.php +++ /dev/null @@ -1,64 +0,0 @@ - - -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          • » 
          • -
          -
          -
          - -
          -

          -
          -
          - -
          -
          -

          '.feather_escape($cur_post['poster']).'', format_time($cur_post['posted'])) ?>

          -

          '.__('Topic warning').'' : ''.__('Warning').'' ?>

          -
          -
          -

          -
          -
          -
          - -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/edit.php b/style/FeatherBB/view/edit.php deleted file mode 100644 index 48a692e8..00000000 --- a/style/FeatherBB/view/edit.php +++ /dev/null @@ -1,119 +0,0 @@ - - -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          • » 
          • -
          -
          -
          - - -
          -

          -
          -
          -

          -
            -'.$cur_error.''."\n"; - } -?> -
          -
          -
          -
          -request->post('preview')): -?> -
          -

          -
          -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          - - - - -
          -

          -
          -
          - -
          -
          - - -
          - - - -
          -
          -
          - -
          -
          - -
          -
          - -
          -
          -
          -
          - -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php deleted file mode 100644 index 470d5c6b..00000000 --- a/style/FeatherBB/view/footer.php +++ /dev/null @@ -1,147 +0,0 @@ - - - -
          -

          -
          -'."\n"; - - if ($footer_style == 'viewforum') { - echo "\t\t\t".'
          '."\n"; - echo "\t\t\t\t".'
          '.__('Mod controls').'
          '."\n"; - echo "\t\t\t\t".'
          '.__('Moderate forum').'
          '."\n"; - echo "\t\t\t".'
          '."\n"; - } elseif ($footer_style == 'viewtopic') { - if (isset($pid)) { - $parameter = 'param/'.$pid.'/'; - } elseif (isset($p) && $p != 1) { - $parameter = 'param/'.$p.'/'; - } else { - $parameter = ''; - } - - - echo "\t\t\t".'
          '."\n"; - echo "\t\t\t\t".'
          '.__('Mod controls').'
          '."\n"; - // TODO: all - //echo "\t\t\t\t".'
          '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
          '."\n"; - echo "\t\t\t\t".'
          '.__('Moderate topic').'
          '."\n"; - echo "\t\t\t\t".'
          '.__('Move topic').'
          '."\n"; - - if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
          '.__('Open topic').'
          '."\n"; - } else { - echo "\t\t\t\t".'
          '.__('Close topic').'
          '."\n"; - } - - if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
          '.__('Unstick topic').'
          '."\n"; - } else { - echo "\t\t\t\t".'
          '.__('Stick topic').'
          '."\n"; - } - - echo "\t\t\t".'
          '."\n"; - } - - echo "\t\t\t".'
          '."\n\t\t".'
          '."\n"; -} - -?> -
          - - -
          -
          -
          - - -
          -
          -
          - - -
          -'.__('RSS active topics feed').'

          '."\n"; - } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; - } -} elseif ($footer_style == 'viewforum') { - if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; - } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; - } -} elseif ($footer_style == 'viewtopic') { - if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; - } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; - } -} - -?> -

          FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

          -
          -
          -
          -
          - -forum_env['FEATHER_SHOW_INFO']) { - echo '

          [ '; - - // Calculate script generation time - $time_diff = sprintf('%.3f', get_microtime() - $feather_start); - echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); - - if (function_exists('memory_get_usage')) { - echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); - - if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); - } - } - - echo ' ]

          '."\n"; -} -// Display executed queries (if enabled) -if ($feather->forum_env['FEATHER_SHOW_QUERIES']) { - display_saved_queries(); -} -?> - - - - - - - diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php deleted file mode 100644 index 9da121c2..00000000 --- a/style/FeatherBB/view/header.php +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - -<?php echo generate_page_title($page_title, $p) ?> - - - - - - -> - -
          - - - -
          -
          -

          - -

          -
          -
          -

          -
          - -
          -
          -
          - user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?> -
          -

          -
          -
          -
          -
          -
          -
          - - - -
          -

          ×

          -
          -
          -

          -
          -
          -
          - - -
          - -
          - -
          -
          diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php deleted file mode 100644 index b5477db4..00000000 --- a/style/FeatherBB/view/help.php +++ /dev/null @@ -1,141 +0,0 @@ - - -

          -
          -
          -

          -

          -
          -
          -

          -
          -
          -

          -

          [b][/b]

          -

          [u][/u]

          -

          [i][/i]

          -

          [s][/s]

          -

          [del][/del]

          -

          [ins][/ins]

          -

          [em][/em]

          -

          [color=#FF0000][/color]

          -

          [color=blue][/color]

          -

          [h][/h]

          -
          -
          -

          -
          -
          -

          -

          [url=][/url]

          -

          [url][/url]

          -

          [url=/help/][/url]

          -

          [email]myname@example.com[/email] myname@example.com

          -

          [email=myname@example.com][/email]

          -

          [topic=1][/topic]

          -

          [topic]1[/topic]

          -

          [post=1][/post]

          -

          [post]1[/post]

          -

          [forum=1][/forum]

          -

          [forum]1[/forum]

          -

          [user=2][/user]

          -

          [user]2[/user]

          -
          -
          -

          -

          [img=]/img/test.png[/img] <?php _e('FluxBB bbcode test') ?>

          -
          -
          -

          -
          -
          -

          -

          [quote=James][/quote]

          -

          -
          -
          James

          -
          -

          -

          [quote][/quote]

          -

          -
          -

          -
          -

          -
          -
          -

          -
          -
          -

          -

          [code][/code]

          -

          -
          -
          -
          -
          -
          -

          -
          -
          -

          -

          [list][*][/*][*][/*][*][/*][/list] -

          -
          -
          -
          -

          [list=1][*][/*][*][/*][*][/*][/list] -

          -
          -
          -
          -

          [list=a][*][/*][*][/*][*][/*][/list] -

          -
          -
          -
          -
          -
          -

          -
          -
          -

          -

          [b][u][/u][/b]

          -
          -
          -

          -
          -
          -

          - $smiley_data) { - $smiley_groups[$smiley_data['file']][] = $smiley_text; -} - -foreach ($smiley_groups as $smiley_img => $smiley_texts) { - echo "\t\t

          ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .__('produces'). ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

          '."\n"; -} - -?> -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/index.html b/style/FeatherBB/view/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/index.php b/style/FeatherBB/view/index.php deleted file mode 100644 index 3142e1bd..00000000 --- a/style/FeatherBB/view/index.php +++ /dev/null @@ -1,111 +0,0 @@ - -

          -cid != $cur_cat) : - if ($cur_cat != 0) : - ?> -
          -
          -
          -
          - -
          -

          cat_name) ?>

          -
          -
          - - - - - - - - - - - cid; - endif; - ?> - - - - - - - 0) : - ?> - -
          -
          forum_count_formatted) ?>
          -
          -
          - forum_field."\n".$forum->moderators_formatted ?> -
          -
          -
          num_topics_formatted) ?>num_posts_formatted) ?>last_post_formatted ?>
          -
          -
          -
          - -
          -
          - -
          -
          - -
          -

          -
          -
          -
          -
          -
          '.forum_number_format($stats['total_users']).'') ?>
          -
          '.forum_number_format($stats['total_topics']).'') ?>
          -
          '.forum_number_format($stats['total_posts']).'') ?>
          -
          -
          -
          -
          - -
          '.forum_number_format($online['num_users']).'') ?>
          -
          '.forum_number_format($online['num_guests']).'') ?>
          - -
          - 0) { - echo "\t\t\t".'
          '."\n\t\t\t\t".'
          '.__('Online').'
          '."\t\t\t\t".implode(',
          ', $online['users']).''."\n\t\t\t".'
          '."\n"; - } else { - echo "\t\t\t".'
          '."\n"; - } - endif; - ?> -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/login/form.php b/style/FeatherBB/view/login/form.php deleted file mode 100644 index 13d1744b..00000000 --- a/style/FeatherBB/view/login/form.php +++ /dev/null @@ -1,42 +0,0 @@ - -
          -

          -
          -
          - -
          -
          - -
          - - - - - -
          - -
          - -

          -

          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/login/index.html b/style/FeatherBB/view/login/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/login/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/FeatherBB/view/login/password_forgotten.php deleted file mode 100644 index 41c0a121..00000000 --- a/style/FeatherBB/view/login/password_forgotten.php +++ /dev/null @@ -1,57 +0,0 @@ - -
          -

          -
          -
          -

          -
            -'.$cur_error.''."\n"; - } - ?> -
          -
          -
          -
          - - -
          -

          -
          -
          - -
          -
          - -
          - - -

          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/message.php b/style/FeatherBB/view/message.php deleted file mode 100644 index 740b040e..00000000 --- a/style/FeatherBB/view/message.php +++ /dev/null @@ -1,25 +0,0 @@ - -
          -

          -
          -
          -

          -

          -
          -
          -
          diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php deleted file mode 100644 index eb44dafb..00000000 --- a/style/FeatherBB/view/misc/email.php +++ /dev/null @@ -1,37 +0,0 @@ - -
          -

          -
          -
          - -
          -
          - -
          - - - -

          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/misc/index.html b/style/FeatherBB/view/misc/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/misc/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/misc/report.php b/style/FeatherBB/view/misc/report.php deleted file mode 100644 index 252042c7..00000000 --- a/style/FeatherBB/view/misc/report.php +++ /dev/null @@ -1,44 +0,0 @@ - - -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          • » 
          • -
          -
          -
          - -
          -

          -
          -
          - -
          -
          - -
          - - -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/misc/rules.php b/style/FeatherBB/view/misc/rules.php deleted file mode 100644 index 366880ee..00000000 --- a/style/FeatherBB/view/misc/rules.php +++ /dev/null @@ -1,23 +0,0 @@ - -
          -

          -
          -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_posts.php b/style/FeatherBB/view/moderate/delete_posts.php deleted file mode 100644 index 00b80920..00000000 --- a/style/FeatherBB/view/moderate/delete_posts.php +++ /dev/null @@ -1,33 +0,0 @@ - -
          -

          -
          -
          - -
          -
          - -
          - -

          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_topics.php b/style/FeatherBB/view/moderate/delete_topics.php deleted file mode 100644 index d0ab1eed..00000000 --- a/style/FeatherBB/view/moderate/delete_topics.php +++ /dev/null @@ -1,34 +0,0 @@ - - -
          -

          -
          -
          - - -
          -
          - -
          -

          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/index.html b/style/FeatherBB/view/moderate/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/moderate/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/moderate/merge_topics.php b/style/FeatherBB/view/moderate/merge_topics.php deleted file mode 100644 index 820cedee..00000000 --- a/style/FeatherBB/view/moderate/merge_topics.php +++ /dev/null @@ -1,36 +0,0 @@ - - -
          -

          -
          -
          - - -
          -
          - -
          -
          - -
          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php deleted file mode 100644 index 35b67b41..00000000 --- a/style/FeatherBB/view/moderate/moderator_forum.php +++ /dev/null @@ -1,101 +0,0 @@ - - -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          - -
          -
          -
          -
          - -
          - - -
          -

          -
          -
          - - - - - - - - - - - - - - - - - - - - - '."\n"; - endif; - ?> - -
          -
          -
          -
          - -
          -
          -
          '.__('Empty forum').'
          -
          -
          -
          - -
          -
          -
          - -

          /> /> /> /> />

          -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/move_topics.php b/style/FeatherBB/view/moderate/move_topics.php deleted file mode 100644 index e72ae5cb..00000000 --- a/style/FeatherBB/view/moderate/move_topics.php +++ /dev/null @@ -1,44 +0,0 @@ - - -
          -

          -
          -
          - -
          - -
          - -
          - -
          - -
          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/FeatherBB/view/moderate/posts_view.php deleted file mode 100644 index 482a1c49..00000000 --- a/style/FeatherBB/view/moderate/posts_view.php +++ /dev/null @@ -1,95 +0,0 @@ - -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          • » 
          • -
          -
          - -
          -
          -
          -
          - -
          - - -
          -

          #

          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -

          -
          - - '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

          '."\n"; -} - ?> -
          -
          -
          -
          -
          -
          -

          ' : '

          '.__('Cannot select first').'

          ' ?>
          -
          -
          -
          -
          - - -
          -
          -
          - -

          /> />

          -
          -
          -
            -
          • -
          • » 
          • -
          • » 
          • -
          • » 
          • -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/split_posts.php b/style/FeatherBB/view/moderate/split_posts.php deleted file mode 100644 index 7c59b0b9..00000000 --- a/style/FeatherBB/view/moderate/split_posts.php +++ /dev/null @@ -1,40 +0,0 @@ - -
          -

          -
          -
          - -
          -
          - -
          - - - -

          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php deleted file mode 100644 index f1d22d07..00000000 --- a/style/FeatherBB/view/post.php +++ /dev/null @@ -1,213 +0,0 @@ - - -
          -
          -
            -
          • -
          • » 
          • -request->post('req_subject')): ?>
          • » request->post('req_subject')) ?>
          • - -
          • » 
          • -
          • » 
          • -
          -
          -
          - - -
          -

          -
          -
          -

          -
            -'.$cur_error.''."\n"; - } - ?> -
          -
          -
          -
          - -request->post('preview')) { - require_once FEATHER_ROOT.'include/parser.php'; - $preview_message = parse_message($post['message'], $post['hide_smilies']); - - ?> -
          -

          -
          -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          - - - - - - -
          -

          -
          - -
          -
          - -
          - - -user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); - $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; - ?> - - -
          - - - - -
          -
          - -
          -
          -
          - -
          -
          - -
          -
          -
          - -
          - user->is_guest) : ?> -
          -
          - -
          -

          - -
          -
          -
          - -

          - -
          -
          - - - -
          -

          - - -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          -
          - - -
          - diff --git a/style/FeatherBB/view/profile/change_mail.php b/style/FeatherBB/view/profile/change_mail.php deleted file mode 100644 index f8d25e99..00000000 --- a/style/FeatherBB/view/profile/change_mail.php +++ /dev/null @@ -1,35 +0,0 @@ - -
          -

          -
          -
          - -
          -
          - -
          - - - -

          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/profile/change_pass.php b/style/FeatherBB/view/profile/change_pass.php deleted file mode 100644 index 3f4285fb..00000000 --- a/style/FeatherBB/view/profile/change_pass.php +++ /dev/null @@ -1,39 +0,0 @@ - -
          -

          -
          -
          - -
          - -
          - -
          -user->is_admmod): ?> - - -

          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/profile/delete_user.php b/style/FeatherBB/view/profile/delete_user.php deleted file mode 100644 index 0fd42f52..00000000 --- a/style/FeatherBB/view/profile/delete_user.php +++ /dev/null @@ -1,36 +0,0 @@ - -
          -

          -
          -
          - -
          -
          - -
          -

          '.feather_escape($username).'.' ?>

          -
          - -
          -

          -
          -
          -
          -

          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/profile/index.html b/style/FeatherBB/view/profile/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/profile/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/profile/menu.php b/style/FeatherBB/view/profile/menu.php deleted file mode 100644 index 4627f8db..00000000 --- a/style/FeatherBB/view/profile/menu.php +++ /dev/null @@ -1,55 +0,0 @@ - -
          -
          -

          -
          -
          -
            - > - > - > - > - > - > -user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > -
          -
          -
          -
          diff --git a/style/FeatherBB/view/profile/section_admin.php b/style/FeatherBB/view/profile/section_admin.php deleted file mode 100644 index 18ba2f12..00000000 --- a/style/FeatherBB/view/profile/section_admin.php +++ /dev/null @@ -1,87 +0,0 @@ - -
          -

          -
          -
          - -
          - -
          -user->g_moderator == '1') { - ?> - -
          -

          -
          -
          -
          -user->id != $id) { - ?> - -
          - - -
          -
          -
          -
          -
          - - -
          - -
          -
          -
          - -
          -
          - -
          -

          - -
          -
          -
          -
          -
          -
          - - -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php deleted file mode 100644 index 5da0f4b4..00000000 --- a/style/FeatherBB/view/profile/section_display.php +++ /dev/null @@ -1,101 +0,0 @@ - -
          -

          -
          -
          - -
          -
          '."\n"; - } elseif (count($styles) > 1) { - ?> -
          -
          - -
          - -
          -
          -
          - - -
          -
          - -
          -

          -
          - - - - - - -
          -
          -
          -
          - -
          -
          - -
          - - -

          -
          -
          -
          -

          - -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_essentials.php b/style/FeatherBB/view/profile/section_essentials.php deleted file mode 100644 index 0050f89c..00000000 --- a/style/FeatherBB/view/profile/section_essentials.php +++ /dev/null @@ -1,258 +0,0 @@ - -
          -

          -
          -
          - -
          -
          - -
          - - -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

          -
          -
          -
          -
          -
          - -
          - -
          -
          -
          -
          -
          - -
          -

          - -
          - -
          - - - - 1) { - ?> - - -
          -
          -
          -
          -
          - -
          -

          user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

          -

          -

          - -user->is_admmod): ?> -
          -
          -
          -

          -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_messaging.php b/style/FeatherBB/view/profile/section_messaging.php deleted file mode 100644 index d944ee43..00000000 --- a/style/FeatherBB/view/profile/section_messaging.php +++ /dev/null @@ -1,39 +0,0 @@ - -
          -

          -
          -
          - -
          -
          - -
          - - - - - - -
          -
          -
          -

          -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_personal.php b/style/FeatherBB/view/profile/section_personal.php deleted file mode 100644 index a765e0aa..00000000 --- a/style/FeatherBB/view/profile/section_personal.php +++ /dev/null @@ -1,39 +0,0 @@ - -
          -

          -
          -
          - -
          -
          - -
          - - - - -user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?> - -
          -
          -
          -

          -
          -
          -
          -
          -
          \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_personality.php b/style/FeatherBB/view/profile/section_personality.php deleted file mode 100644 index 3624e5e6..00000000 --- a/style/FeatherBB/view/profile/section_personality.php +++ /dev/null @@ -1,56 +0,0 @@ - -
          -

          -
          -
          - -
          -
          -
          - -
          -
          -

          -

          -
          -
          -
          -
          -
          - -
          -

          -
          - -
          - - -
          -
          -
          -

          -
          -
          -
          -
          -
        diff --git a/style/FeatherBB/view/profile/section_privacy.php b/style/FeatherBB/view/profile/section_privacy.php deleted file mode 100644 index 36930415..00000000 --- a/style/FeatherBB/view/profile/section_privacy.php +++ /dev/null @@ -1,62 +0,0 @@ - -
        -

        -
        -
        - -
        -
        - -
        - -

        -
        - - - -
        -
        -
        -
        -
        -
        - -
        -
        - - - -
        -
        -
        -
        -

        -
        -
        -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/profile/upload_avatar.php b/style/FeatherBB/view/profile/upload_avatar.php deleted file mode 100644 index 4131569c..00000000 --- a/style/FeatherBB/view/profile/upload_avatar.php +++ /dev/null @@ -1,35 +0,0 @@ - -
        -

        -
        -
        - -
        -
        - -
        - - - -

        -
        -
        -
        -

        -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/profile/view_profile.php b/style/FeatherBB/view/profile/view_profile.php deleted file mode 100644 index d30181fd..00000000 --- a/style/FeatherBB/view/profile/view_profile.php +++ /dev/null @@ -1,66 +0,0 @@ - -
        -

        -
        -
        -
        -
        - -
        -
        - -
        -
        -
        -
        -
        -
        -
        - -
        -
        - -
        -
        -
        -
        -
        -
        -
        - -
        -
        - -
        -
        -
        -
        -
        -
        -
        - -
        -
        - -
        -
        -
        -
        -
        -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/register/email.php b/style/FeatherBB/view/register/email.php deleted file mode 100644 index e26ad690..00000000 --- a/style/FeatherBB/view/register/email.php +++ /dev/null @@ -1,39 +0,0 @@ - - -
        -

        -
        -
        - -
        -
        - -
        - - - - -

        -
        -
        -
        -

        -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/register/form.php b/style/FeatherBB/view/register/form.php deleted file mode 100644 index f1a360ef..00000000 --- a/style/FeatherBB/view/register/form.php +++ /dev/null @@ -1,134 +0,0 @@ - -
        -

        -
        -
        -

        -
          -'.$cur_error.''."\n"; - } - ?> -
        -
        -
        -
        - - -
        -

        -
        -
        - -
        -
        -

        -

        -

        -
        -
        - -
        - - - - -
        -
        -
        -
        -
        - -
        - - -

        -
        -
        -
        -
        -
        - -
        -

        - - -
        -
        -
        - 1) { - ?> -
        -
        - -
        - -
        -
        -
        - -
        -
        - -
        -

        - -
        -
        -
        -

        -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/register/index.html b/style/FeatherBB/view/register/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/register/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/register/rules.php b/style/FeatherBB/view/register/rules.php deleted file mode 100644 index cef62405..00000000 --- a/style/FeatherBB/view/register/rules.php +++ /dev/null @@ -1,32 +0,0 @@ - - -
        -

        -
        -
        -
        -
        - -
        -
        -
        -
        -
        -

        -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/search/footer.php b/style/FeatherBB/view/search/footer.php deleted file mode 100644 index a73ed5aa..00000000 --- a/style/FeatherBB/view/search/footer.php +++ /dev/null @@ -1,40 +0,0 @@ - - - -
        -
        -
        - - - -
        -
        -
        - -
        -
          -
        • -
        • » 
        • -
        • » 
        • -
        -'.implode(' - ', $search['forum_actions']).'

        '."\n" : '') ?> -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/search/form.php b/style/FeatherBB/view/search/form.php deleted file mode 100644 index 4731b068..00000000 --- a/style/FeatherBB/view/search/form.php +++ /dev/null @@ -1,79 +0,0 @@ - - -
        -

        -
        - -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/search/header.php b/style/FeatherBB/view/search/header.php deleted file mode 100644 index 01af597a..00000000 --- a/style/FeatherBB/view/search/header.php +++ /dev/null @@ -1,48 +0,0 @@ - -
        -
        -
          -
        • -
        • » 
        • -
        • » 
        • -
        -
        - -
        -
        -
        -
        - - -
        -

        -
        -
        - - - - - - - - - - -.. diff --git a/style/FeatherBB/view/search/posts.php b/style/FeatherBB/view/search/posts.php deleted file mode 100644 index c575f9c2..00000000 --- a/style/FeatherBB/view/search/posts.php +++ /dev/null @@ -1,56 +0,0 @@ - -
        -

        # »  » 

        -
        -
        -
        -
        -
        -
        -
        - -
        -
        -
        -
        -
        - -
        -
        -
        -
        -
        -
        -
        -
        -
          -
        • -
        • -
        -
        -
        -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/search/topics.php b/style/FeatherBB/view/search/topics.php deleted file mode 100644 index af843193..00000000 --- a/style/FeatherBB/view/search/topics.php +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/style/FeatherBB/view/userlist.php b/style/FeatherBB/view/userlist.php deleted file mode 100644 index 26c24027..00000000 --- a/style/FeatherBB/view/userlist.php +++ /dev/null @@ -1,115 +0,0 @@ - - -
        -

        -
        -
        -
        -
        - -
        -user->g_search_users == '1'): ?> - - - -

        user->g_search_users == '1' ? __('User search info').' ' : '').__('User sort info'); ?>

        -
        -
        -
        -

        - -
        -
        - -
        -
        - -
        -
        -
        - -
        -

        -
        -
        -
        -
        -
        -
        - -
        -
        -
        '.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
        - - - - - - - - - - - - - - - - - - '."\n\t\t\t\t\t".''."\n"; - } - ?> - -
        '.feather_escape($user['username']).'' ?>
        '.__('No hits').'
        -
        -
        -
        - -
        -
        - -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/viewforum.php b/style/FeatherBB/view/viewforum.php deleted file mode 100644 index a35faf22..00000000 --- a/style/FeatherBB/view/viewforum.php +++ /dev/null @@ -1,100 +0,0 @@ - -
        -
        -
          -
        • -
        • » 
        • -
        -
        - - -
        -
        -
        -
        - -
        -

        -
        -
        - - - - - - - - - - - - - - - - - - - - - - - -
        -
        -
        -
        - -
        -
        -
        -
        -
        -
        - -
        -
        -
        -
        -
        -
        - -
        -
        -
        - - -
        -
          -
        • -
        • » 
        • -
        -'.implode(' - ', $forum_actions).'

        '."\n" : '') ?> -
        -
        -
        \ No newline at end of file diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php deleted file mode 100644 index e2681757..00000000 --- a/style/FeatherBB/view/viewtopic.php +++ /dev/null @@ -1,204 +0,0 @@ - - -
        -
        -
          -
        • -
        • » 
        • -
        • » 
        • -
        -
        - - -
        -
        -
        -
        - - -
        -

        #

        -
        -
        -
        -
        -
        -
        -
        -'.$post['user_avatar'].''."\n"; -} - ?> - -'.implode(' ', $post['user_contacts']).''."\n"; -} - ?> -
        -
        -
        -

        -
        - -'.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

        '."\n"; -} - ?> -
        -
        '.$post['signature_formatted'].'
        '."\n"; -} - ?> -
        -
        -
        -
        -
        -
        1) { - echo '

        '.$post['is_online_formatted'].'

        '; -} - ?>
        -'."\n\t\t\t\t\t".'
          '."\n\t\t\t\t\t\t".implode("\n\t\t\t\t\t\t", $post['post_actions'])."\n\t\t\t\t\t".'
        '."\n\t\t\t\t".'
        '."\n"; -} - ?> -
        -
        -
        -
        - - -
        -
        -
        - - -
        -
          -
        • -
        • » 
        • -
        • » 
        • -
        - -
        -
        -
        - - -
        -

        -
        -
        - -
        -
        - -
        - - - -user->auto_notify == '1' || $cur_topic['is_subscribed'])): ?> -user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); - $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; - ?> - - -
        -'.__('Message').' '.__('Required').'
        '; - } else { - echo "\t\t\t\t\t\t".' - -
        -
        -
        - user->is_guest) : ?> -
        -
        - -
        -

        - -
        -
        -
        - -

        -
        -
        -
        -ci@2eO5P}-dd89t<7e|rCh1eVn*KoQ20 zAirP+hi5m^fE-~@7sn8e>&XcXj5nDBT8^b9FfasfV%0zFt=a*UX7F_Nb6Mw<&;$UE C&mDdM diff --git a/style/Fire/img/email.png b/style/Fire/img/email.png deleted file mode 100644 index dd3a39dd8245a19f06f45dd567a251623e6e3940..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 371 zcmV-(0gV2MP))rh6)%fq_{r2$p@a)EjQT+M${qNoX`t-tqP2#_m{qp3(f<^k?!^@ju_u|aNic!0M zJnPD)-MEISh+egWS;>@K=*6G&*u2M&SpV$g>(#vY>DBDct?ACP(4}zj)3L*jN$ka& z;=7HrfIhB+OV+iE$eCNxtb5zRpw+yb>fOz`id^vH*ZbJE@57YECjx>10004WQchC< zK<3zH0001vNklF>;He9Lqg)C@x0v&zuiuwwYDhg zdP^P|Tv6he%HbjdCOr~{hNVvpBkq3nCyQ#|mrr|x=S?t*Ro z!nOL7eCKOi)MHWQje^*3SjJpMY5s;V00001bW%=J06^y0W&i*Hs!2paR2Ug;z(tY* zK>z^3npPQC+?{n7{{Jrsf+NXY_1CwQ$+G6ApL{l1*1VQIuKH3$m6TQVSo8quL_}JH zQqgk}fMpqJt-(1rou@$3R7xrE-V5;$d}P`=2lisK1$?HQ^AA{Se>Pj7oC)vkEHx%> zcYENym|ANgj^ljQ0bxE$jajcJlYICR0LF_^+8Wd5!>0jPmdKI;Vst0BUt>u@Zj)- zFZhrs^@=3#fGGUu+4i%0{Jwwx_38SoVC8r*z z{n@nn!;s!%C-tXg`p>H1Z8GD8O!b{i`?hiDb0`1Ind^;F_|Uib+s*Q~lJ>%y@2-pU ztakE>G5q7p_s6CD$Bx=p9pG|9`OBpHs#f))S^w+S{oTI#q)}0fy#xRN00DGTPE!Ct z=GbNc005s!L_t(|+6~D=7Q{dl0Knf#Gd2gY#g#`F)9eUB>Au~Hw?f|{blho(e=zi zpeWuiisN_4_GSu1s;gJTu9-G3R3NU+s>Ma0ZCTTgx3?cUJm+RvthW$xqG-O9SOj&H4sYVhge;?cpXhh^c^$Gn+&>*Ctjz^Tiy zmg>~Mu#a)u$hOzRvdE~3&bp_!m3Flb5PX9x#7vO?%BmjZ>n(s0004WQchC1oLjrCj{@XpOsxtW5ROU_Iclg+>%)0109%NzgwlbmP zd0wza@dE%U*IR~{EenAF6q09I-V(@`Y6ie1%dBk=eiDNk0F;thYmwK^)k**;RcWmd zBE~qT8URrkobz65-Sj;GpQWab^Q?7Gi^ofHM;b4ev86rX;~1x;R66Z%_&QI^^}3wS a_~!{ER|=EhnXYjF0000.. diff --git a/style/Fire/index.html b/style/Fire/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/Fire/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/Lithium.css b/style/Lithium.css deleted file mode 100644 index 60aa9f4c..00000000 --- a/style/Lithium.css +++ /dev/null @@ -1,1165 +0,0 @@ -/***************************************************************** -1. INITIAL SETTINGS -*****************************************************************/ - -/* Limited Reset -----------------------------------------------------------------*/ - -.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, -.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, -.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { - margin: 0; - padding: 0; - border: 0; - } - -.pun ul, .pun ol { - list-style: none - } - - -/* Structural Settings -----------------------------------------------------------------*/ - -.pun .clearer, .pun .nosize { - height: 0; - width: 0; - line-height: 0; - font-size: 0; - overflow: hidden - } - -.pun .clearer, .pun .clearb { - clear: both - } - -.pun .nosize { - position: absolute; - left: -9999em; - text-indent: -9999em; - width: 0; - } - -* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { - height: 1px - } - -.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { - min-height: 1px - } - -.clearl { - clear: left; - } - -/* Hidden Elements -----------------------------------------------------------------*/ - -#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, -#modcontrols dt, #searchlinks dt, div.postright h3, span.closedtext, -.pun .required strong span { - position: absolute; - display: block; - overflow: hidden; - width: 0; - left: -9999em; - text-indent: -9999em; - } - -/***************************************************************** -2. TEXT & CONTENT -*****************************************************************/ - -/* Text Defaults -----------------------------------------------------------------*/ - -.pun { - font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; - line-height: normal; - } - -.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun samp, .pun legend { - font-size: 1em; - font-family: verdana, helvetica, arial, sans-serif; - } - -.pun pre, .pun code { - font-size: 1.182em; - font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace - } - -.pun pre code { - font-size: 1em; - } - -.pun strong { - font-weight: bold; - } - -.pun em { - font-style: italic; - } - - -/* Content Defaults -----------------------------------------------------------------*/ - -.pun p, .pun ul, .pun ol, .pun dl { - font-size: 1em; - padding: 3px 0; - } - -.pun h2 { - font-size: 1em; - font-weight: normal; - padding: 4px 6px; - } - -.pun h3 { - font-size: 1.091em; - padding: 3px 0; - } - -.pun table p, .pun table h3 { - padding: 0; - } - -.pun span.warntext, .pun p.warntext { - font-weight: bold - } - -/* User Content (Announcements, Rules, Posts) -----------------------------------------------------------------*/ - -.pun .usercontent p, .pun .postmsg p { - padding: 0.75em 0 - } - -.pun .usercontent ul, .pun .postmsg ul { - padding: 0.75em 1em 0.75em 2.5em; - list-style: disc - } - -.pun .usercontent ol, .pun .postmsg ol { - padding: 0.75em 1em 0.75em 2.5em; - list-style: decimal - } - -.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { - list-style: lower-alpha - } - -.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { - padding: 0.25em 1em 0.75em 2.5em - } - -.pun .usercontent li p, .pun .postmsg li p { - padding: 0 - } - -.pun .usercontent h1 { - font-size: 1.4em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h2 { - font-size: 1.2em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h3 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { - font-size: 1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .quotebox cite { - font-weight: bold; - font-style: normal; - padding: 0.75em 0.75em 0 0.75em - } - -.pun span.bbu { - text-decoration: underline - } - -.pun span.bbs, .pun del { - text-decoration: line-through; - } - -.pun .postmsg ins, #punhelp samp ins { - text-decoration: none; - } - -.pun div.postmsg h5, #punhelp h5 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0; - } - - -/***************************************************************** -3. COMMON STYLES -*****************************************************************/ - -/* Page Layout -----------------------------------------------------------------*/ - -html, body { - margin: 0; - padding: 0 - } - -.pun { - max-width: 1070px; - width: 95%; - margin: 0 auto; - padding: 12px 20px; - } - -#punredirect, #punmaint, #puninstall, #pundb_update { - margin: 50px 20% 12px 20% - } - - -/* Vertical Element Spacing -----------------------------------------------------------------*/ - -#brdheader { - margin: 0 0 12px 0; - } - -#brdtitle p { - padding-top: 0px - } - -#announce, #brdstats { - margin: 12px 0 12px 0; - } - -.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { - margin-bottom: 12px - } - -#punindex .blocktable, .pun .blockpost { - margin-bottom: 6px - } - -#postreview .blockpost { - margin-bottom: -1px; - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-bottom: 0px - } - -.pun .linkst, .pun .linksb { - margin-top: -12px - } - -.pun .postlinksb { - margin-top: -6px - } - - -/* External Borders -----------------------------------------------------------------*/ - -.pun .box { - border-style: solid; - border-width: 1px; - } - -#brdheader .box { - border-top-width: 4px; - } - -/* Default Internal Spacing -----------------------------------------------------------------*/ - -.pun .block .inbox, .pun .blockmenu .inbox { - padding: 3px 6px - } - -/***************************************************************** -4. COMMON BOARD ELEMENTS -*****************************************************************/ - -/* Board Header -----------------------------------------------------------------*/ - -#brdtitle h1 { - font-size: 1.4em; - font-weight: bold; - padding: 3px 0 0 0; - } - -#brdmenu li { - display: inline; - margin-right: 12px; - } - -#brdmenu a:link, #brdmenu a:visited { - text-decoration: none - } - -#brdmenu a:hover, #brdmenu a:active { - text-decoration: underline - } - -#brdwelcome .conl { - float: left; - } - -#brdwelcome .conr { - float: right; - text-align: right; - } - -/* Breadcrumbs and Post Links -----------------------------------------------------------------*/ - -.pun .linkst { - padding: 8px 6px 3px 6px - } - -.pun .linksb, .pun .postlinksb { - padding: 3px 6px 8px 6px - } - -.pun .crumbs { - clear: both; - width: 100%; - overflow: hidden; - } - -.pun .crumbs li { - display: inline; - white-space: nowrap; - font-weight: bold; - } - -.pun .pagelink { - float: left; - white-space: nowrap; - } - -.pun .postlink { - font-weight: bold; - white-space: nowrap; - } - -.pun .postlink, .pun .modbuttons { - float: right; - text-align: right; - } - -.pun .modbuttons { - padding: 1px 0; - white-space: nowrap; - } - -.pun .modbuttons input { - margin-left: 6px; - } - -.pun .postlink a:link, .pun .postlink a:visited { - text-decoration: none - } - -.pun .postlink a:hover, .pun .postlink a:active { - text-decoration: underline; - } - -#punindex .subscribelink { - margin-top: 6px; - } - -/* Board Footer -----------------------------------------------------------------*/ - -#brdfooter .conl { - float: left; - } - -#brdfooter .conr { - float: right; - text-align: right; - } - -#brdfooter #modcontrols { - border-bottom-style: solid; - border-bottom-width: 1px; - text-align: center; - } - -#brdfooter #modcontrols dd { - display: inline; - margin:0 6px; - } - - -/* Board Stats -----------------------------------------------------------------*/ - -#brdstats .conl { - float: left; - } - -#brdstats .conr { - float: right; - text-align: right; - } - -#onlinelist dd, #onlinelist dt { - display: inline; - } - - -/***************************************************************** -5. MAIN TABLES -*****************************************************************/ - -.pun table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; - empty-cells: show; - } - -.pun .blocktable table { - table-layout: fixed; - } - -.pun td, .pun th { - padding: 4px 6px; - text-align: left; - font-weight: normal; - } - -.pun td, .pun th { - border-style: solid none none solid; - border-width: 1px; - } - -.pun .tcl { - border-left: 0; - width: auto; - } - -.pun .tc2, .pun .tc3, .pun .tcmod { - width: 10%; - text-align: center; - padding: 4px 0; - } - -.pun .tcr { - width: 30%; - } - -.pun .tcl h3 { - font-size: 1.091em; - font-weight: bold; - } - -.pun .tcl h3 span.newtext { - font-size: 0.917em; - } - -.pun .tcl span.newtext, .pun .tcl span.pagestext { - white-space: nowrap; - font-weight: normal; - } - -.pun td span.byuser { - white-space: nowrap; - } - -.pun .tcl p { - padding: 5px 0 0 0 - } - -#punsearch #vf .tc2 { - width: 18%; - text-align: left; - padding: 4px 6px; - } - -#users1 .tcr { - width: 25% - } - -#users1 .tc2 { - width: 25%; - text-align: left; - padding: 4px 6px; - } - -#debug .tcl { - width: 10% - } - -#debug .tcr { - width: 90%; - white-space: normal - } - -#punindex .tcr .byuser { - display: block - } - -.pun .blocktable .tclcon { - padding: 0 11px 0 12px; - overflow: hidden; - min-height: 1px; - position: relative; - } - -.pun .blocktable .tclcon div { - width: 100%; - overflow: hidden; - } - -.pun .icon { - margin: 0.1em 0 0 0.2em; - border-width: 0.6em; - border-style: solid; - height: 0; - width: 0; - overflow: hidden; - float: left; - } - -.pun .icon div { - position: absolute; - left: -9999em; - text-indent: -9999em; - height: 0; - } - -.pun .iposted .ipost { - position: absolute; - left: 0; - font-weight: bold; - width: 8px; - padding-left: 4px; - text-align: center; - top: 0; - } - -/***************************************************************** -6. MAIN FORMS -*****************************************************************/ - -.pun .blockform form, .pun .fakeform { - PADDING: 20px 20px 15px 20px - } - -.pun .forminfo { - margin-bottom: 12px; - padding: 9px 10px; - border-style: solid; - border-width: 1px; - } - -.pun .forminfo h3 { - font-weight: bold; - } - -.pun .inform { - padding-bottom: 12px - } - -.pun fieldset { - padding: 0px 12px 0px 12px; - border-style: solid; - border-width: 1px - } - -.pun legend { - padding: 0px 6px - } - -.pun .infldset { - padding: 9px 0px 12px 0 - } - -.pun label { - display: block; - padding: 3px 0 - } - -.pun label.conl { - float: left; - overflow: visible; - margin-right: 10px - } - -.pun fieldset .rbox br { - display: none; - } - -.pun fieldset .rbox label { - padding: 3px 0 3px 25px; - position: relative; - vertical-align: middle; - } - -.pun fieldset .rbox input { - margin: 0 9px 0 -25px; - padding: 0; - width: 16px; - position: relative; - vertical-align: middle; - } - -.pun .txtarea { - width: 75% - } - -.pun .txtarea textarea, .pun input.longinput { - width: 100% - } - -.pun .bblinks { - padding-bottom: 10px; - padding-left: 4px - } - -.pun .bblinks li { - display: inline; - padding-right: 20px - } - -.pun .blockform .buttons { - padding-left: 12px; - } - -.pun .blockform .buttons input { - margin-right: 8px; - } - -#posterror ul { - list-style: square; - padding: 3px 0 3px 24px; - } - -.pun .deletemsg { - border-style: solid; - border-width: 1px; - padding: 6px 15px; - } - -.pun p.actions span { - margin-right: 12px; - } - -.pun .multiselect { - float: left; - padding-bottom: 7px; - } - -.pun .checklist { - border-width: 1px; - border-style: solid; - max-height: 9em; - width: 20em; - overflow: auto; - padding: 0.3em 0.5em; - margin: 0.25em 16px 0 0.15em; - } - -.pun .checklist fieldset { - border: 0; - padding: 0; - } - -.pun .checklist legend { - padding: 0; - } - -.pun .checklist legend span { - width: auto; - max-width: 25em; - } - -/***************************************************************** -7. PROFILES AND ADMIN -*****************************************************************/ - -.pun .block2col { - padding-bottom: 1px - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-left: 14em - } - -.pun .blockmenu { - float:left; - width: 13em - } - -.pun .blockmenu li { - padding: 3px 0; - font-weight: bold; - } - -.pun .blockmenu a:link, .pun .blockmenu a:visited { - text-decoration: none - } - -.pun .blockmenu a:hover, .pun .blockmenu a:active { - text-decoration: underline - } - -#viewprofile dl { - float: left; - width: 100%; - overflow: hidden - } - -#viewprofile dd { - margin-left: 14em; - padding: 3px; - } - -#viewprofile dt { - float: left; - width: 13em; - margin: 3px 0; - } - -#profileavatar img { - float: right; - margin-left: 1em - } - -#adintro ul { - list-style-type: disc; - margin-left: 8px; - padding-left: 16px; - } - -/***************************************************************** -8. MAIN POSTS -*****************************************************************/ - -.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { - text-decoration: none; - } - -.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { - text-decoration: underline; - } - -.pun .blockpost h2 .conr { - float: right; - text-align: right; - } - -#punsearch .blockpost h2 span { - white-space: nowrap; - } - -.pun .blockpost .box { - overflow: hidden; - } - -.pun .postleft, .pun .postfootleft { - float:left; - width: 18em; - position: relative; - overflow: hidden; - } - -.pun .postleft dl { - padding: 6px; - } - -.pun .postleft .usercontacts, .pun .postleft .icon { - margin-top: 6px - } - -.pun .postleft .postavatar, .pun .postleft .usertitle { - margin-bottom: 6px; - display: block; - } - -.pun .blockpost dt { - font-size: 1.091em; - font-weight: bold; - } - -.pun .blockpost dt a:link, .pun .blockpost dt a:visited { - text-decoration: none; - } - -.pun .blockpost dt a:hover, .pun .blockpost dt a:active { - text-decoration: underline; - } - -.pun .postright, .pun .postfootright { - border-left-width: 18em; - border-left-style: solid - } - -#postpreview .postright { - border-left: 0 - } - -.pun .postright { - padding: 0 6px; - } - -.pun .postfootright, .pun .multidelete { - text-align: right - } - -.pun .postmsg { - width:98%; - overflow: hidden; - padding-bottom: 6px; - word-wrap: break-word; - } - -.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, -.pun .postfootleft p { - padding: 10px 6px 5px 6px; - } - -.pun .postfootright li { - display: inline; - } - -.pun .postfootright li:before { - content: " | "; - } - -.pun .postfootright li:first-child:before { - content: ""; - } - -.pun .postfootright a:link, .pun .postfootright a:visited { - text-decoration: none - } - -.pun .postfootright a:hover, .pun .postfootright a:active { - text-decoration: underline - } - -.pun .codebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0; - } - -.pun .quotebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0 0.75em; - } - -.pun .quotebox cite { - display: block; - padding: 0.75em 0 0 0; - } - -.pun .quotebox blockquote { - width: 100%; - overflow: hidden - } - -.pun .codebox pre { - overflow: auto; - width: 100%; - overflow-y:hidden - } - -* html .pun .codebox pre { - padding-bottom: 10px; - } - -*+html .pun .codebox pre { - padding-bottom: 10px - } - -.pun .codebox pre code { - display: block; - padding: 0.75em; - } - -.pun .codebox pre.vscroll { - height: 32em; - overflow: auto; - overflow-y: auto - } - -.pun .postmsg img { - vertical-align: bottom; - } - -.pun .postsignature hr { - margin-left: 0px; - width: 200px; - text-align: left; - height: 1px; - border:none - } - -.pun .postmsg .postimg img { - max-width: 98%; - vertical-align: middle; - margin: 7px 0.5em 7px 0; - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-style: solid; - border-width: 2px; - } - -.pun .blockpost label { - padding: 3px 6px; - border-style: solid; - border-width: 1px; - vertical-align: middle; - display: inline-block; - } - -.pun .blockpost label * { - vertical-align: middle; - margin: 0; - padding: 0; - } - -/****************************************************************/ -/* 9. HELP FILES AND MISC. */ -/****************************************************************/ - -#punhelp h2 { - margin-top: 12px - } - -#punhelp div.box { - padding: 10px - } - -#debugtime { - margin-top: -12px; - text-align: center; - } - -#brdwelcome, #brdfooter dl a, div.blockmenu li, div.rbox input { - line-height: 1.4em - } - -#announce div.inbox div { - padding: 3px 0 - } - -/***************************************************************** -COLOUR SCHEME -*****************************************************************/ - -/* Background / Text -----------------------------------------------------------------*/ - -body { - background: #fff; - color: #333 - } - -.pun { - color: #333 - } - -.pun .box, #adminconsole fieldset th { - background-color: #f1f1f1 - } - -.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, -#brdfooter #modcontrols, #adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { - background-color: #dedfdf - } - -.pun h2, #brdmenu { - background-color: #6c8a3f; - color: #fff - } - -.pun th { - background-color: #d1d1d1 - } - -.pun legend { - color: #6c8a3f - } - -.pun .blockmenu li.isactive a, #posterror li strong { - color: #333 - } - -.pun .usercontent * { - background: transparent; - color: #333 - } - -.pun .multiselect, .pun .checklist { - color: #333; - } - -.pun .checklist { - border-color: #ACA899; - } - -/* posts -----------------------------------------------------------------*/ - -.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { - background-color: #dedfdf - } - -.pun .postright, .pun .postfootright { - border-left-color: #f1f1f1 - } - -.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { - background-color: #f1f1f1 - } - -#punhelp .codebox, #punhelp .quotebox { - background-color: #f9f9f9; - } - -.pun .blockpost h2 { - background-color: #7ea34b - } - -.pun .blockpost h2 span.conr { - color: #b7d094 - } - -.pun .postmsg ins, #punhelp samp ins { - background-color: #ff0; - } - -.pun hr { - background-color: #333; - color: #333 - } - -/* Borders -----------------------------------------------------------------*/ - -.pun .box { - border-color: #6c8a3f - } - -.pun td, #brdfooter #modcontrols { - border-color: #cedeb9 - } - -.pun th { - border-color: #d1d1d1 - } - -.pun fieldset { - border-color: #aca899 - } - -#adminconsole td, #adminconsole th { - border-color: #f1f1f1 - } - -.pun .quotebox, .pun .codebox, .pun .forminfo, -.pun .blockpost label, .pun .deletemsg { - border-color: #aca899 #fff #fff #aca899 - } - -/* Links -----------------------------------------------------------------*/ - -.pun a:link, .pun a:visited { - color: #638137 - } - -.pun a:hover, .pun a:active, .pun a:focus { - color: #8eb653 - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-color: #638137; - } - -.pun .postmsg .postimg a:hover img, .pun .postmsg .postimg a:active img, .pun .postmsg .postimg a:focus img { - border-color: #8eb653; - } - -.pun h2 a:link, .pun h2 a:visited, -#brdmenu a:link, #brdmenu a:visited { - color: #fff - } - -.pun h2 a:hover, .pun h2 a:active, -#brdmenu a:hover, #brdmenu a:active { - color: #fff - } - -.pun .postreport a:link, .pun .postreport a:visited, -.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { - color: #888 - } - -.pun .postreport a:hover, .pun .postreport a:active, -.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { - color: #aaa - } - -.pun .maintenancelink a:link, .pun .maintenancelink a:visited { - color: #b42000 - } - -.pun .maintenancelink a:hover, .pun .maintenancelink a:active { - color: #b42000 - } - -/* Status Indicators -----------------------------------------------------------------*/ - -.pun .icon { - border-color: #e6e6e6 #dedede #dadada #e2e2e2 - } - -.pun .iredirect .icon { - border-color: #f1f1f1 #f1f1f1 #f1f1f1 #f1f1f1 - } - -.pun .inew .icon { - border-color: #8bb453 #7a9e48 #709142 #799c47 - } - -/* Alert boxes -----------------------------------------------------------------*/ - -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 240px; - max-width: 410px; - padding: 5px; - z-index: 1000; - background-color: #61c462; - border-width: 0px -} diff --git a/style/Mercury.css b/style/Mercury.css deleted file mode 100644 index 55170078..00000000 --- a/style/Mercury.css +++ /dev/null @@ -1,1168 +0,0 @@ -/***************************************************************** -1. INITIAL SETTINGS -*****************************************************************/ - -/* Limited Reset -----------------------------------------------------------------*/ - -.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, -.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, -.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { - margin: 0; - padding: 0; - border: 0; - } - -.pun ul, .pun ol { - list-style: none - } - - -/* Structural Settings -----------------------------------------------------------------*/ - -.pun .clearer, .pun .nosize { - height: 0; - width: 0; - line-height: 0; - font-size: 0; - overflow: hidden - } - -.pun .clearer, .pun .clearb { - clear: both - } - -.pun .nosize { - position: absolute; - left: -9999em; - text-indent: -9999em; - width: 0; - } - -* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { - height: 1px - } - -.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { - min-height: 1px - } - -.clearl { - clear: left; - } - -/* Hidden Elements -----------------------------------------------------------------*/ - -#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, -#modcontrols dt, #searchlinks dt, div.postright h3, span.closedtext, -.pun .required strong span { - position: absolute; - display: block; - overflow: hidden; - width: 0; - left: -9999em; - text-indent: -9999em; - } - -/***************************************************************** -2. TEXT & CONTENT -*****************************************************************/ - -/* Text Defaults -----------------------------------------------------------------*/ - -.pun { - font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; - line-height: normal; - } - -.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun samp, .pun legend { - font-size: 1em; - font-family: verdana, helvetica, arial, sans-serif; - } - -.pun pre, .pun code { - font-size: 1.182em; - font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace - } - -.pun pre code { - font-size: 1em; - } - -.pun strong { - font-weight: bold; - } - -.pun em { - font-style: italic; - } - - -/* Content Defaults -----------------------------------------------------------------*/ - -.pun p, .pun ul, .pun ol, .pun dl { - font-size: 1em; - padding: 3px 0; - } - -.pun h2 { - font-size: 1em; - font-weight: normal; - padding: 4px 6px; - } - -.pun h3 { - font-size: 1.091em; - padding: 3px 0; - } - -.pun table p, .pun table h3 { - padding: 0; - } - -.pun span.warntext, .pun p.warntext { - font-weight: bold - } - -/* User Content (Announcements, Rules, Posts) -----------------------------------------------------------------*/ - -.pun .usercontent p, .pun .postmsg p { - padding: 0.75em 0 - } - -.pun .usercontent ul, .pun .postmsg ul { - padding: 0.75em 1em 0.75em 2.5em; - list-style: disc - } - -.pun .usercontent ol, .pun .postmsg ol { - padding: 0.75em 1em 0.75em 2.5em; - list-style: decimal - } - -.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { - list-style: lower-alpha - } - -.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { - padding: 0.25em 1em 0.75em 2.5em - } - -.pun .usercontent li p, .pun .postmsg li p { - padding: 0 - } - -.pun .usercontent h1 { - font-size: 1.4em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h2 { - font-size: 1.2em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h3 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { - font-size: 1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .quotebox cite { - font-weight: bold; - font-style: normal; - padding: 0.75em 0.75em 0 0.75em - } - -.pun span.bbu { - text-decoration: underline - } - -.pun span.bbs, .pun del { - text-decoration: line-through; - } - -.pun .postmsg ins, #punhelp samp ins { - text-decoration: none; - } - -.pun div.postmsg h5, #punhelp h5 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0; - } - - -/***************************************************************** -3. COMMON STYLES -*****************************************************************/ - -/* Page Layout -----------------------------------------------------------------*/ - -html, body { - margin: 0; - padding: 0 - } - -.pun { - max-width: 1070px; - width: 95%; - margin: 0 auto; - padding: 12px 20px; - } - -#punredirect, #punmaint, #puninstall, #pundb_update { - margin: 50px 20% 12px 20% - } - - -/* Vertical Element Spacing -----------------------------------------------------------------*/ - -#brdheader { - margin: 0 0 12px 0; - } - -#brdtitle p { - padding-top: 0px - } - -#announce, #brdstats { - margin: 12px 0 12px 0; - } - -.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { - margin-bottom: 12px - } - -#punindex .blocktable, .pun .blockpost { - margin-bottom: 6px - } - -#postreview .blockpost { - margin-bottom: -1px; - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-bottom: 0px - } - -.pun .linkst, .pun .linksb { - margin-top: -12px - } - -.pun .postlinksb { - margin-top: -6px - } - - -/* External Borders -----------------------------------------------------------------*/ - -.pun .box { - border-style: solid; - border-width: 1px; - } - -#brdheader .box { - border-top-width: 4px; - } - -/* Default Internal Spacing -----------------------------------------------------------------*/ - -.pun .block .inbox, .pun .blockmenu .inbox { - padding: 3px 6px - } - -/***************************************************************** -4. COMMON BOARD ELEMENTS -*****************************************************************/ - -/* Board Header -----------------------------------------------------------------*/ - -#brdtitle h1 { - font-size: 1.4em; - font-weight: bold; - padding: 3px 0 0 0; - } - -#brdmenu li { - display: inline; - margin-right: 12px; - } - -#brdmenu a:link, #brdmenu a:visited { - text-decoration: none - } - -#brdmenu a:hover, #brdmenu a:active { - text-decoration: underline - } - -#brdwelcome .conl { - float: left; - } - -#brdwelcome .conr { - float: right; - text-align: right; - } - -/* Breadcrumbs and Post Links -----------------------------------------------------------------*/ - -.pun .linkst { - padding: 8px 6px 3px 6px - } - -.pun .linksb, .pun .postlinksb { - padding: 3px 6px 8px 6px - } - -.pun .crumbs { - clear: both; - width: 100%; - overflow: hidden; - } - -.pun .crumbs li { - display: inline; - white-space: nowrap; - font-weight: bold; - } - -.pun .pagelink { - float: left; - white-space: nowrap; - } - -.pun .postlink { - font-weight: bold; - white-space: nowrap; - } - -.pun .postlink, .pun .modbuttons { - float: right; - text-align: right; - } - -.pun .modbuttons { - padding: 1px 0; - white-space: nowrap; - } - -.pun .modbuttons input { - margin-left: 6px; - } - -.pun .postlink a:link, .pun .postlink a:visited { - text-decoration: none - } - -.pun .postlink a:hover, .pun .postlink a:active { - text-decoration: underline; - } - -#punindex .subscribelink { - margin-top: 6px; - } - -/* Board Footer -----------------------------------------------------------------*/ - -#brdfooter .conl { - float: left; - } - -#brdfooter .conr { - float: right; - text-align: right; - } - -#brdfooter #modcontrols { - border-bottom-style: solid; - border-bottom-width: 1px; - text-align: center; - } - -#brdfooter #modcontrols dd { - display: inline; - margin:0 6px; - } - - -/* Board Stats -----------------------------------------------------------------*/ - -#brdstats .conl { - float: left; - } - -#brdstats .conr { - float: right; - text-align: right; - } - -#onlinelist dd, #onlinelist dt { - display: inline; - } - - -/***************************************************************** -5. MAIN TABLES -*****************************************************************/ - -.pun table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; - empty-cells: show; - } - -.pun .blocktable table { - table-layout: fixed; - } - -.pun td, .pun th { - padding: 4px 6px; - text-align: left; - font-weight: normal; - } - -.pun td, .pun th { - border-style: solid none none solid; - border-width: 1px; - } - -.pun .tcl { - border-left: 0; - width: auto; - } - -.pun .tc2, .pun .tc3, .pun .tcmod { - width: 10%; - text-align: center; - padding: 4px 0; - } - -.pun .tcr { - width: 30%; - } - -.pun .tcl h3 { - font-size: 1.091em; - font-weight: bold; - } - -.pun .tcl h3 span.newtext { - font-size: 0.917em; - } - -.pun .tcl span.newtext, .pun .tcl span.pagestext { - white-space: nowrap; - font-weight: normal; - } - -.pun td span.byuser { - white-space: nowrap; - } - -.pun .tcl p { - padding: 5px 0 0 0 - } - -#punsearch #vf .tc2 { - width: 18%; - text-align: left; - padding: 4px 6px; - } - -#users1 .tcr { - width: 25% - } - -#users1 .tc2 { - width: 25%; - text-align: left; - padding: 4px 6px; - } - -#debug .tcl { - width: 10% - } - -#debug .tcr { - width: 90%; - white-space: normal - } - -#punindex .tcr .byuser { - display: block - } - -.pun .blocktable .tclcon { - padding: 0 11px 0 12px; - overflow: hidden; - min-height: 1px; - position: relative; - } - -.pun .blocktable .tclcon div { - width: 100%; - overflow: hidden; - } - -.pun .icon { - margin: 0.1em 0 0 0.2em; - border-width: 0.6em; - border-style: solid; - height: 0; - width: 0; - overflow: hidden; - float: left; - } - -.pun .icon div { - position: absolute; - left: -9999em; - text-indent: -9999em; - height: 0; - } - -.pun .iposted .ipost { - position: absolute; - left: 0; - font-weight: bold; - width: 8px; - padding-left: 4px; - text-align: center; - top: 0; - } - -/***************************************************************** -6. MAIN FORMS -*****************************************************************/ - -.pun .blockform form, .pun .fakeform { - PADDING: 20px 20px 15px 20px - } - -.pun .forminfo { - margin-bottom: 12px; - padding: 9px 10px; - border-style: solid; - border-width: 1px; - } - -.pun .forminfo h3 { - font-weight: bold; - } - -.pun .inform { - padding-bottom: 12px - } - -.pun fieldset { - padding: 0px 12px 0px 12px; - border-style: solid; - border-width: 1px - } - -.pun legend { - padding: 0px 6px - } - -.pun .infldset { - padding: 9px 0px 12px 0 - } - -.pun label { - display: block; - padding: 3px 0 - } - -.pun label.conl { - float: left; - overflow: visible; - margin-right: 10px - } - -.pun fieldset .rbox br { - display: none; - } - -.pun fieldset .rbox label { - padding: 3px 0 3px 25px; - position: relative; - vertical-align: middle; - } - -.pun fieldset .rbox input { - margin: 0 9px 0 -25px; - padding: 0; - width: 16px; - position: relative; - vertical-align: middle; - } - -.pun .txtarea { - width: 75% - } - -.pun .txtarea textarea, .pun input.longinput { - width: 100% - } - -.pun .bblinks { - padding-bottom: 10px; - padding-left: 4px - } - -.pun .bblinks li { - display: inline; - padding-right: 20px - } - -.pun .blockform .buttons { - padding-left: 12px; - } - -.pun .blockform .buttons input { - margin-right: 8px; - } - -#posterror ul { - list-style: square; - padding: 3px 0 3px 24px; - } - -.pun .deletemsg { - border-style: solid; - border-width: 1px; - padding: 6px 15px; - } - -.pun p.actions span { - margin-right: 12px; - } - -.pun .multiselect { - float: left; - padding-bottom: 7px; - } - -.pun .checklist { - border-width: 1px; - border-style: solid; - max-height: 9em; - width: 20em; - overflow: auto; - padding: 0.3em 0.5em; - margin: 0.25em 16px 0 0.15em; - } - -.pun .checklist fieldset { - border: 0; - padding: 0; - } - -.pun .checklist legend { - padding: 0; - } - -.pun .checklist legend span { - width: auto; - max-width: 25em; - } - -/***************************************************************** -7. PROFILES AND ADMIN -*****************************************************************/ - -.pun .block2col { - padding-bottom: 1px - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-left: 14em - } - -.pun .blockmenu { - float:left; - width: 13em - } - -.pun .blockmenu li { - padding: 3px 0; - font-weight: bold; - } - -.pun .blockmenu a:link, .pun .blockmenu a:visited { - text-decoration: none - } - -.pun .blockmenu a:hover, .pun .blockmenu a:active { - text-decoration: underline - } - -#viewprofile dl { - float: left; - width: 100%; - overflow: hidden - } - -#viewprofile dd { - margin-left: 14em; - padding: 3px; - } - -#viewprofile dt { - float: left; - width: 13em; - margin: 3px 0; - } - -#profileavatar img { - float: right; - margin-left: 1em - } - -#adintro ul { - list-style-type: disc; - margin-left: 8px; - padding-left: 16px; - } - -/***************************************************************** -8. MAIN POSTS -*****************************************************************/ - -.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { - text-decoration: none; - } - -.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { - text-decoration: underline; - } - -.pun .blockpost h2 .conr { - float: right; - text-align: right; - } - -#punsearch .blockpost h2 span { - white-space: nowrap; - } - -.pun .blockpost .box { - overflow: hidden; - } - -.pun .postleft, .pun .postfootleft { - float:left; - width: 18em; - position: relative; - overflow: hidden; - } - -.pun .postleft dl { - padding: 6px; - } - -.pun .postleft .usercontacts, .pun .postleft .icon { - margin-top: 6px - } - -.pun .postleft .postavatar, .pun .postleft .usertitle { - margin-bottom: 6px; - display: block; - } - -.pun .blockpost dt { - font-size: 1.091em; - font-weight: bold; - } - -.pun .blockpost dt a:link, .pun .blockpost dt a:visited { - text-decoration: none; - } - -.pun .blockpost dt a:hover, .pun .blockpost dt a:active { - text-decoration: underline; - } - -.pun .postright, .pun .postfootright { - border-left-width: 18em; - border-left-style: solid - } - -#postpreview .postright { - border-left: 0 - } - -.pun .postright { - padding: 0 6px; - } - -.pun .postfootright, .pun .multidelete { - text-align: right - } - -.pun .postmsg { - width:98%; - overflow: hidden; - padding-bottom: 6px; - word-wrap: break-word; - } - -.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, -.pun .postfootleft p { - padding: 10px 6px 5px 6px; - } - -.pun .postfootright li { - display: inline; - } - -.pun .postfootright li:before { - content: " | "; - } - -.pun .postfootright li:first-child:before { - content: ""; - } - -.pun .postfootright a:link, .pun .postfootright a:visited { - text-decoration: none - } - -.pun .postfootright a:hover, .pun .postfootright a:active { - text-decoration: underline - } - -.pun .codebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0; - } - -.pun .quotebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0 0.75em; - } - -.pun .quotebox cite { - display: block; - padding: 0.75em 0 0 0; - } - -.pun .quotebox blockquote { - width: 100%; - overflow: hidden - } - -.pun .codebox pre { - overflow: auto; - width: 100%; - overflow-y:hidden - } - -* html .pun .codebox pre { - padding-bottom: 10px; - } - -*+html .pun .codebox pre { - padding-bottom: 10px - } - -.pun .codebox pre code { - display: block; - padding: 0.75em; - } - -.pun .codebox pre.vscroll { - height: 32em; - overflow: auto; - overflow-y: auto - } - -.pun .postmsg img { - vertical-align: bottom; - } - -.pun .postsignature hr { - margin-left: 0px; - width: 200px; - text-align: left; - height: 1px; - border:none - } - -.pun .postmsg .postimg img { - max-width: 98%; - vertical-align: middle; - margin: 7px 0.5em 7px 0; - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-style: solid; - border-width: 2px; - } - -.pun .blockpost label { - padding: 3px 6px; - border-style: solid; - border-width: 1px; - vertical-align: middle; - display: inline-block; - } - -.pun .blockpost label * { - vertical-align: middle; - margin: 0; - padding: 0; - } - -/****************************************************************/ -/* 9. HELP FILES AND MISC. */ -/****************************************************************/ - -#punhelp h2 { - margin-top: 12px - } - -#punhelp div.box { - padding: 10px - } - -#debugtime { - margin-top: -12px; - text-align: center; - } - -#brdwelcome, #brdfooter dl a, div.blockmenu li, div.rbox input { - line-height: 1.4em - } - -#announce div.inbox div { - padding: 3px 0 - } - -/***************************************************************** -COLOUR SCHEME -*****************************************************************/ - -/* Background / Text -----------------------------------------------------------------*/ - -body { - background: #2a2a2a; - color: #d4d4d4 - } - -.pun { - color: #d4d4d4 - } - -.pun .box, #adminconsole fieldset th { - background-color: #383838 - } - -.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, -#brdfooter #modcontrols, #adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { - background-color: #424242 - } - -.pun h2, #brdmenu { - background-color: #565656; - color: #d4d4d4 - } - -.pun th { - background-color: #484848 - } - -.pun legend { - color: #f6b620 - } - -.pun .blockmenu li.isactive a, #posterror li strong { - color: #d4d4d4 - } - -.pun .usercontent * { - background: transparent; - color: #d4d4d4 - } - -.pun textarea, .pun input, .pun select { - background-color: #2a2a2a; - color: #d4d4d4 - } - -.pun .multiselect, .pun .checklist { - color: #D4D4D4; - } - -.pun .checklist { - border-color: #666; - } - -/* Posts -----------------------------------------------------------------*/ - -.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { - background-color: #383838 - } - -.pun .postright, .pun .postfootright { - border-left-color: #424242 - } - -.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { - background-color: #424242 - } - -.pun .blockpost h2 { - background-color: #565656 - } - -.pun .blockpost h2 span.conr { - color: #a19e96 - } - -.pun .postmsg ins, #punhelp samp ins { - background-color: #ff0; - } - -.pun hr { - background-color: #606060; - color: #606060 - } - -/* Borders -----------------------------------------------------------------*/ - -.pun .box { - border-color:#565656 - } - -.pun td, #brdfooter #modcontrols { - border-color: #565656 - } - -.pun th { - border-color: #484848 - } - -.pun fieldset { - border-color: #565656 - } - -#adminconsole td, #adminconsole th { - border-color: #383838 - } - -.pun .quotebox, .pun .codebox, .pun .forminfo, -.pun .blockpost label, .pun .deletemsg { - border-color: #565656 - } - -/* Links -----------------------------------------------------------------*/ - -.pun a:link, .pun a:visited { - color: #f6b620 - } - -.pun a:hover, .pun a:active, .pun a:focus { - color: #ffee40 - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-color: #f6b620; - } - -.pun .postmsg .postimg a:hover img, .pun .postmsg .postimg a:active img, .pun .postmsg .postimg a:focus img { - border-color: #ffee40; - } - -.pun h2 a:link, .pun h2 a:visited, -#brdmenu a:link, #brdmenu a:visited { - color: #d4d4d4 - } - -.pun h2 a:hover, .pun h2 a:active, -#brdmenu a:hover, #brdmenu a:active { - color: #d4d4d4 - } - -.pun .postreport a:link, .pun .postreport a:visited, -.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { - color: #888 - } - -.pun .postreport a:hover, .pun .postreport a:active, -.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { - color: #aaa - } - -.pun .maintenancelink a:link, .pun .maintenancelink a:visited { - color: #ff4000 - } - -.pun .maintenancelink a:hover, .pun .maintenancelink a:active { - color: #ff5010 - } - -/* Status Indicators -----------------------------------------------------------------*/ - -.pun .icon { - border-color: #484848 #404040 #3c3c3c #444444 - } - -.pun .iredirect .icon { - border-color: #383838 #383838 #383838 #383838 - } - -.pun .inew .icon { - border-color: #f6b620 #ecae1f #d09a1b #e1a61d - } - -/* Alert boxes -----------------------------------------------------------------*/ - -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 240px; - max-width: 410px; - padding: 5px; - z-index: 1000; -} -#msgflash h2 { - color: #f6b620; - font-weight: bold; -} diff --git a/style/Oxygen.css b/style/Oxygen.css deleted file mode 100644 index 34173131..00000000 --- a/style/Oxygen.css +++ /dev/null @@ -1,1168 +0,0 @@ -/***************************************************************** -1. INITIAL SETTINGS -*****************************************************************/ - -/* Limited Reset -----------------------------------------------------------------*/ - -.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, -.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, -.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { - margin: 0; - padding: 0; - border: 0; - } - -.pun ul, .pun ol { - list-style: none - } - - -/* Structural Settings -----------------------------------------------------------------*/ - -.pun .clearer, .pun .nosize { - height: 0; - width: 0; - line-height: 0; - font-size: 0; - overflow: hidden - } - -.pun .clearer, .pun .clearb { - clear: both - } - -.pun .nosize { - position: absolute; - left: -9999em; - text-indent: -9999em; - width: 0; - } - -* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { - height: 1px - } - -.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { - min-height: 1px - } - -.clearl { - clear: left; - } - -/* Hidden Elements -----------------------------------------------------------------*/ - -#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, -#modcontrols dt, #searchlinks dt, div.postright h3, span.closedtext, -.pun .required strong span { - position: absolute; - display: block; - overflow: hidden; - width: 0; - left: -9999em; - text-indent: -9999em; - } - -/***************************************************************** -2. TEXT & CONTENT -*****************************************************************/ - -/* Text Defaults -----------------------------------------------------------------*/ - -.pun { - font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; - line-height: normal; - } - -.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun small, .pun samp, .pun legend { - font-size: 1em; - font-family: verdana, helvetica, arial, sans-serif; - } - -.pun pre, .pun code { - font-size: 1.182em; - font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace - } - -.pun pre code { - font-size: 1em; - } - -.pun strong { - font-weight: bold; - } - -.pun em { - font-style: italic; - } - - -/* Content Defaults -----------------------------------------------------------------*/ - -.pun p, .pun ul, .pun ol, .pun dl { - font-size: 1em; - padding: 3px 0; - } - -.pun h2 { - font-size: 1em; - font-weight: normal; - padding: 4px 6px; - } - -.pun h3 { - font-size: 1.091em; - padding: 3px 0; - } - -.pun table p, .pun table h3 { - padding: 0; - } - -.pun span.warntext, .pun p.warntext { - font-weight: bold - } - - -/* User Content (Announcements, Rules, Posts) -----------------------------------------------------------------*/ - -.pun .usercontent p, .pun .postmsg p { - padding: 0.75em 0 - } - -.pun .usercontent ul, .pun .postmsg ul { - padding: 0.75em 1em 0.75em 2.5em; - list-style: disc - } - -.pun .usercontent ol, .pun .postmsg ol { - padding: 0.75em 1em 0.75em 2.5em; - list-style: decimal - } - -.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { - list-style: lower-alpha - } - -.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { - padding: 0.25em 1em 0.75em 2.5em - } - -.pun .usercontent li p, .pun .postmsg li p { - padding: 0 - } - -.pun .usercontent h1 { - font-size: 1.4em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h2 { - font-size: 1.2em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h3 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { - font-size: 1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .quotebox cite { - font-weight: bold; - font-style: normal; - padding: 0.75em 0.75em 0 0.75em - } - -.pun span.bbu { - text-decoration: underline - } - -.pun span.bbs, .pun del { - text-decoration: line-through; - } - -.pun .postmsg ins, #punhelp samp ins { - text-decoration: none; - } - -.pun div.postmsg h5, #punhelp h5 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0; - } - - -/***************************************************************** -3. COMMON STYLES -*****************************************************************/ - -/* Page Layout -----------------------------------------------------------------*/ - -html, body { - margin: 0; - padding: 0 - } - -.pun { - max-width: 1070px; - width: 95%; - margin: 0 auto; - padding: 12px 20px; - } - -#punredirect, #punmaint, #puninstall, #pundb_update { - margin: 50px 20% 12px 20% - } - - -/* Vertical Element Spacing -----------------------------------------------------------------*/ - -#brdheader { - margin: 0 0 12px 0; - } - -#brdtitle p { - padding-top: 0px - } - -#announce, #brdstats { - margin: 12px 0 12px 0; - } - -.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { - margin-bottom: 12px - } - -#punindex .blocktable, .pun .blockpost { - margin-bottom: 6px - } - -#postreview .blockpost { - margin-bottom: -1px; - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-bottom: 0px - } - -.pun .linkst, .pun .linksb { - margin-top: -12px - } - -.pun .postlinksb { - margin-top: -6px - } - - -/* External Borders -----------------------------------------------------------------*/ - -.pun .box { - border-style: solid; - border-width: 1px; - } - -#brdheader .box { - border-top-width: 4px; - } - -/* Default Internal Spacing -----------------------------------------------------------------*/ - -.pun .block .inbox, .pun .blockmenu .inbox { - padding: 3px 6px - } - -/***************************************************************** -4. COMMON BOARD ELEMENTS -*****************************************************************/ - -/* Board Header -----------------------------------------------------------------*/ - -#brdtitle h1 { - font-size: 1.4em; - font-weight: bold; - padding: 3px 0 0 0; - } - -#brdmenu li { - display: inline; - margin-right: 12px; - } - -#brdmenu a:link, #brdmenu a:visited { - text-decoration: none - } - -#brdmenu a:hover, #brdmenu a:active { - text-decoration: underline - } - -#brdwelcome .conl { - float: left; - } - -#brdwelcome .conr { - float: right; - text-align: right; - } - -/* Breadcrumbs and Post Links -----------------------------------------------------------------*/ - -.pun .linkst { - padding: 8px 6px 3px 6px - } - -.pun .linksb, .pun .postlinksb { - padding: 3px 6px 8px 6px - } - -.pun .crumbs { - clear: both; - width: 100%; - overflow: hidden; - } - -.pun .crumbs li { - display: inline; - white-space: nowrap; - font-weight: bold; - } - -.pun .pagelink { - float: left; - white-space: nowrap; - } - -.pun .postlink { - font-weight: bold; - white-space: nowrap; - } - -.pun .postlink, .pun .modbuttons { - float: right; - text-align: right; - } - -.pun .modbuttons { - padding: 1px 0; - white-space: nowrap; - } - -.pun .modbuttons input { - margin-left: 6px; - } - -.pun .postlink a:link, .pun .postlink a:visited { - text-decoration: none - } - -.pun .postlink a:hover, .pun .postlink a:active { - text-decoration: underline; - } - -#punindex .subscribelink { - margin-top: 6px; - } - -/* Board Footer -----------------------------------------------------------------*/ - -#brdfooter .conl { - float: left; - } - -#brdfooter .conr { - float: right; - text-align: right; - } - -#brdfooter #modcontrols { - border-bottom-style: solid; - border-bottom-width: 1px; - text-align: center; - } - -#brdfooter #modcontrols dd { - display: inline; - margin:0 6px; - } - - -/* Board Stats -----------------------------------------------------------------*/ - -#brdstats .conl { - float: left; - } - -#brdstats .conr { - float: right; - text-align: right; - } - -#onlinelist dd, #onlinelist dt { - display: inline; - } - - -/***************************************************************** -5. MAIN TABLES -*****************************************************************/ - -.pun table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; - empty-cells: show; - } - -.pun .blocktable table { - table-layout: fixed; - } - -.pun td, .pun th { - padding: 4px 6px; - text-align: left; - font-weight: normal; - } - -.pun td, .pun th { - border-style: solid none none solid; - border-width: 1px; - } - -.pun .tcl { - border-left: 0; - width: auto; - } - -.pun .tc2, .pun .tc3, .pun .tcmod { - width: 10%; - text-align: center; - padding: 4px 0; - } - -.pun .tcr { - width: 30%; - } - -.pun .tcl h3 { - font-size: 1.091em; - font-weight: bold; - } - -.pun .tcl h3 span.newtext { - font-size: 0.917em; - } - -.pun .tcl span.newtext, .pun .tcl span.pagestext { - white-space: nowrap; - font-weight: normal; - } - -.pun td span.byuser { - white-space: nowrap; - } - -.pun .tcl p { - padding: 5px 0 0 0 - } - -#punsearch #vf .tc2 { - width: 18%; - text-align: left; - padding: 4px 6px; - } - -#users1 .tcr { - width: 25% - } - -#users1 .tc2 { - width: 25%; - text-align: left; - padding: 4px 6px; - } - -#debug .tcl { - width: 10% - } - -#debug .tcr { - width: 90%; - white-space: normal - } - -#punindex .tcr .byuser { - display: block - } - -.pun .blocktable .tclcon { - padding: 0 11px 0 12px; - overflow: hidden; - min-height: 1px; - position: relative; - } - -.pun .blocktable .tclcon div { - width: 100%; - overflow: hidden; - } - -.pun .icon { - margin: 0.1em 0 0 0.2em; - border-width: 0.6em; - border-style: solid; - height: 0; - width: 0; - overflow: hidden; - float: left; - } - -.pun .icon div { - position: absolute; - left: -9999em; - text-indent: -9999em; - height: 0; - } - -.pun .iposted .ipost { - position: absolute; - left: 0; - font-weight: bold; - width: 8px; - padding-left: 4px; - text-align: center; - top: 0; - } - -/***************************************************************** -6. MAIN FORMS -*****************************************************************/ - -.pun .blockform form, .pun .fakeform { - PADDING: 20px 20px 15px 20px - } - -.pun .forminfo { - margin-bottom: 12px; - padding: 9px 10px; - border-style: solid; - border-width: 1px; - } - -.pun .forminfo h3 { - font-weight: bold; - } - -.pun .inform { - padding-bottom: 12px - } - -.pun fieldset { - padding: 0px 12px 0px 12px; - border-style: solid; - border-width: 1px - } - -.pun legend { - padding: 0px 6px - } - -.pun .infldset { - padding: 9px 0px 12px 0 - } - -.pun label { - display: block; - padding: 3px 0 - } - -.pun label.conl { - float: left; - overflow: visible; - margin-right: 10px - } - -.pun fieldset .rbox br { - display: none; - } - -.pun fieldset .rbox label { - padding: 3px 0 3px 25px; - position: relative; - vertical-align: middle; - } - -.pun fieldset .rbox input { - margin: 0 9px 0 -25px; - padding: 0; - width: 16px; - position: relative; - vertical-align: middle; - } - -.pun .txtarea { - width: 75% - } - -.pun .txtarea textarea, .pun input.longinput { - width: 100% - } - -.pun .bblinks { - padding-bottom: 10px; - padding-left: 4px - } - -.pun .bblinks li { - display: inline; - padding-right: 20px - } - -.pun .blockform .buttons { - padding-left: 12px; - } - -.pun .blockform .buttons input { - margin-right: 8px; - } - -#posterror ul { - list-style: square; - padding: 3px 0 3px 24px; - } - -.pun .deletemsg { - border-style: solid; - border-width: 1px; - padding: 6px 15px; - } - -.pun p.actions span { - margin-right: 12px; - } - -.pun .multiselect { - float: left; - padding-bottom: 7px; - } - -.pun .checklist { - border-width: 1px; - border-style: solid; - max-height: 9em; - width: 20em; - overflow: auto; - padding: 0.3em 0.5em; - margin: 0.25em 16px 0 0.15em; - } - -.pun .checklist fieldset { - border: 0; - padding: 0; - } - -.pun .checklist legend { - padding: 0; - } - -.pun .checklist legend span { - width: auto; - max-width: 25em; - } - -/***************************************************************** -7. PROFILES AND ADMIN -*****************************************************************/ - -.pun .block2col { - padding-bottom: 1px - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-left: 14em - } - -.pun .blockmenu { - float:left; - width: 13em - } - -.pun .blockmenu li { - padding: 3px 0; - font-weight: bold; - } - -.pun .blockmenu a:link, .pun .blockmenu a:visited { - text-decoration: none - } - -.pun .blockmenu a:hover, .pun .blockmenu a:active { - text-decoration: underline - } - -#viewprofile dl { - float: left; - width: 100%; - overflow: hidden - } - -#viewprofile dd { - margin-left: 14em; - padding: 3px; - } - -#viewprofile dt { - float: left; - width: 13em; - margin: 3px 0; - } - -#profileavatar img { - float: right; - margin-left: 1em - } - -#adintro ul { - list-style-type: disc; - margin-left: 8px; - padding-left: 16px; - } - -/***************************************************************** -8. MAIN POSTS -*****************************************************************/ - -.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { - text-decoration: none; - } - -.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { - text-decoration: underline; - } - -.pun .blockpost h2 .conr { - float: right; - text-align: right; - } - -#punsearch .blockpost h2 span { - white-space: nowrap; - } - -.pun .blockpost .box { - overflow: hidden; - } - -.pun .postleft, .pun .postfootleft { - float:left; - width: 18em; - position: relative; - overflow: hidden; - } - -.pun .postleft dl { - padding: 6px; - } - -.pun .postleft .usercontacts, .pun .postleft .icon { - margin-top: 6px - } - -.pun .postleft .postavatar, .pun .postleft .usertitle { - margin-bottom: 6px; - display: block; - } - -.pun .blockpost dt { - font-size: 1.091em; - font-weight: bold; - } - -.pun .blockpost dt a:link, .pun .blockpost dt a:visited { - text-decoration: none; - } - -.pun .blockpost dt a:hover, .pun .blockpost dt a:active { - text-decoration: underline; - } - -.pun .postright, .pun .postfootright { - border-left-width: 18em; - border-left-style: solid - } - -#postpreview .postright { - border-left: 0 - } - -.pun .postright { - padding: 0 6px; - } - -.pun .postfootright, .pun .multidelete { - text-align: right - } - -.pun .postmsg { - width:98%; - overflow: hidden; - padding-bottom: 6px; - word-wrap: break-word; - } - -.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, -.pun .postfootleft p { - padding: 10px 6px 5px 6px; - } - -.pun .postfootright li { - display: inline; - } - -.pun .postfootright li:before { - content: " | "; - } - -.pun .postfootright li:first-child:before { - content: ""; - } - -.pun .postfootright a:link, .pun .postfootright a:visited { - text-decoration: none - } - -.pun .postfootright a:hover, .pun .postfootright a:active { - text-decoration: underline - } - -.pun .codebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0; - } - -.pun .quotebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0 0.75em; - } - -.pun .quotebox cite { - display: block; - padding: 0.75em 0 0 0; - } - -.pun .quotebox blockquote { - width: 100%; - overflow: hidden - } - -.pun .codebox pre { - overflow: auto; - width: 100%; - overflow-y:hidden - } - -* html .pun .codebox pre { - padding-bottom: 10px; - } - -*+html .pun .codebox pre { - padding-bottom: 10px - } - -.pun .codebox pre code { - display: block; - padding: 0.75em; - } - -.pun .codebox pre.vscroll { - height: 32em; - overflow: auto; - overflow-y: auto - } - -.pun .postmsg img { - vertical-align: bottom; - } - -.pun .postsignature hr { - margin-left: 0px; - width: 200px; - text-align: left; - height: 1px; - border:none - } - -.pun .postmsg .postimg img { - max-width: 98%; - vertical-align: middle; - margin: 7px 0.5em 7px 0; - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-style: solid; - border-width: 2px; - } - -.pun .blockpost label { - padding: 3px 6px; - border-style: solid; - border-width: 1px; - vertical-align: middle; - display: inline-block; - } - -.pun .blockpost label * { - vertical-align: middle; - margin: 0; - padding: 0; - } - -/****************************************************************/ -/* 9. HELP FILES AND MISC. */ -/****************************************************************/ - -#punhelp h2 { - margin-top: 12px - } - -#punhelp div.box { - padding: 10px - } - -#debugtime { - margin-top: -12px; - text-align: center; - } - -#brdwelcome, #brdfooter dl a, div.blockmenu li, div.rbox input { - line-height: 1.4em - } - -#announce div.inbox div { - padding: 3px 0 - } - -/***************************************************************** -COLOUR SCHEME -*****************************************************************/ - -/* Background / Text -----------------------------------------------------------------*/ - -body { - background: #fff; - color: #333 - } - -.pun { - color: #333 - } - -.pun .box, #adminconsole fieldset th { - background-color: #f1f1f1 - } - -.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, -#adminconsole fieldset td, .pun .blockmenu .box, #adstats dd, #brdfooter #modcontrols { - background-color: #dedfdf - } - -.pun h2, #brdmenu { - background-color: #0066b9; - color: #fff - } - -.pun th { - background-color: #d1d1d1 - } - -.pun legend { - color: #005cb1 - } - -.pun .blockmenu li.isactive a, #posterror li strong { - color: #333 - } - -.pun .usercontent * { - background: transparent; - color: #333 - } - -.pun .multiselect, .pun .checklist { - color: #333; - } - -.pun .checklist { - border-color: #ACA899; - } - -/* Posts -----------------------------------------------------------------*/ - -.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { - background-color: #dedfdf - } - -.pun .postright, .pun .postfootright { - border-left-color: #f1f1f1 - } - -.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { - background-color: #f1f1f1 - } - -#punhelp .codebox, #punhelp .quotebox { - background-color: #f9f9f9; - } - -.pun .blockpost h2 { - background-color: #006fc9 - } - -.pun .blockpost h2 span.conr { - color: #aabdcd - } - -.pun .postmsg ins, #punhelp samp ins { - background-color: #ff0; - } - -.pun hr { - background-color: #333; - color: #333 - } - -/* Borders -----------------------------------------------------------------*/ - -.pun .box { - border-color: #0066b9 - } - -.pun td, #brdfooter #modcontrols { - border-color: #bbcede - } - -.pun th { - border-color: #d1d1d1 - } - -.pun fieldset { - border-color: #aca899 - } - -#adminconsole td, #adminconsole th { - border-color: #f1f1f1 - } - -.pun .quotebox, .pun .codebox, .pun .forminfo, -.pun .blockpost label, .pun .deletemsg { - border-color: #aca899 #fff #fff #aca899 - } - -/* Links -----------------------------------------------------------------*/ - -.pun a:link, .pun a:visited { - color: #005cb1 - } - -.pun a:hover, .pun a:active, .pun a:focus { - color: #b42000 - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-color: #005cb1; - } - -.pun .postmsg .postimg a:hover img, .pun .postmsg .postimg a:active img, .pun .postmsg .postimg a:focus img { - border-color: #b42000; - } - -.pun h2 a:link, .pun h2 a:visited, -#brdmenu a:link, #brdmenu a:visited { - color: #fff - } - -.pun h2 a:hover, .pun h2 a:active, -#brdmenu a:hover, #brdmenu a:active { - color: #fff - } - -.pun .postreport a:link, .pun .postreport a:visited, -.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { - color: #888 - } - -.pun .postreport a:hover, .pun .postreport a:active, -.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { - color: #aaa - } - -.pun .maintenancelink a:link, .pun .maintenancelink a:visited { - color: #b42000 - } - -.pun .maintenancelink a:hover, .pun .maintenancelink a:active { - color: #b42000 - } - -/* Status Indicators -----------------------------------------------------------------*/ - -.pun .icon { - border-color: #e6e6e6 #dedede #dadada #e2e2e2 - } - -.pun .iredirect .icon { - border-color: #f1f1f1 #f1f1f1 #f1f1f1 #f1f1f1 - } - -.pun .inew .icon { - border-color: #0080d7 #0065c0 #0058b3 #0072ca - } - -/* Alert boxes -----------------------------------------------------------------*/ - -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 240px; - max-width: 410px; - padding: 5px; - z-index: 1000; -} -#msgflash h2 { - color: #fff; - font-weight: bold; -} diff --git a/style/Radium.css b/style/Radium.css deleted file mode 100644 index c56c0735..00000000 --- a/style/Radium.css +++ /dev/null @@ -1,1168 +0,0 @@ -/***************************************************************** -1. INITIAL SETTINGS -*****************************************************************/ - -/* Limited Reset -----------------------------------------------------------------*/ - -.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, -.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, -.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { - margin: 0; - padding: 0; - border: 0; - } - -.pun ul, .pun ol { - list-style: none - } - - -/* Structural Settings -----------------------------------------------------------------*/ - -.pun .clearer, .pun .nosize { - height: 0; - width: 0; - line-height: 0; - font-size: 0; - overflow: hidden - } - -.pun .clearer, .pun .clearb { - clear: both - } - -.pun .nosize { - position: absolute; - left: -9999em; - text-indent: -9999em; - width: 0; - } - -* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { - height: 1px - } - -.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { - min-height: 1px - } - -.clearl { - clear: left; - } - -/* Hidden Elements -----------------------------------------------------------------*/ - -#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, -#modcontrols dt, #searchlinks dt, div.postright h3, span.closedtext, -.pun .required strong span { - position: absolute; - display: block; - overflow: hidden; - width: 0; - left: -9999em; - text-indent: -9999em; - } - -/***************************************************************** -2. TEXT & CONTENT -*****************************************************************/ - -/* Text Defaults -----------------------------------------------------------------*/ - -.pun { - font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; - line-height: normal; - } - -.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun samp, .pun legend { - font-size: 1em; - font-family: verdana, helvetica, arial, sans-serif; - } - -.pun pre, .pun code { - font-size: 1.182em; - font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace - } - -.pun pre code { - font-size: 1em; - } - -.pun strong { - font-weight: bold; - } - -.pun em { - font-style: italic; - } - - -/* Content Defaults -----------------------------------------------------------------*/ - -.pun p, .pun ul, .pun ol, .pun dl { - font-size: 1em; - padding: 3px 0; - } - -.pun h2 { - font-size: 1em; - font-weight: normal; - padding: 4px 6px; - } - -.pun h3 { - font-size: 1.091em; - padding: 3px 0; - } - -.pun table p, .pun table h3 { - padding: 0; - } - -.pun span.warntext, .pun p.warntext { - font-weight: bold - } - -/* User Content (Announcements, Rules, Posts) -----------------------------------------------------------------*/ - -.pun .usercontent p, .pun .postmsg p { - padding: 0.75em 0 - } - -.pun .usercontent ul, .pun .postmsg ul { - padding: 0.75em 1em 0.75em 2.5em; - list-style: disc - } - -.pun .usercontent ol, .pun .postmsg ol { - padding: 0.75em 1em 0.75em 2.5em; - list-style: decimal - } - -.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { - list-style: lower-alpha - } - -.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { - padding: 0.25em 1em 0.75em 2.5em - } - -.pun .usercontent li p, .pun .postmsg li p { - padding: 0 - } - -.pun .usercontent h1 { - font-size: 1.4em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h2 { - font-size: 1.2em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h3 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { - font-size: 1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .quotebox cite { - font-weight: bold; - font-style: normal; - padding: 0.75em 0.75em 0 0.75em - } - -.pun span.bbu { - text-decoration: underline - } - -.pun span.bbs, .pun del { - text-decoration: line-through; - } - -.pun .postmsg ins, #punhelp samp ins { - text-decoration: none; - } - -.pun div.postmsg h5, #punhelp h5 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0; - } - - -/***************************************************************** -3. COMMON STYLES -*****************************************************************/ - -/* Page Layout -----------------------------------------------------------------*/ - -html, body { - margin: 0; - padding: 0 - } - -.pun { - max-width: 1070px; - width: 95%; - margin: 0 auto; - padding: 12px 20px; - } - -#punredirect, #punmaint, #puninstall, #pundb_update { - margin: 50px 20% 12px 20% - } - - -/* Vertical Element Spacing -----------------------------------------------------------------*/ - -#brdheader { - margin: 0 0 12px 0; - } - -#brdtitle p { - padding-top: 0px - } - -#announce, #brdstats { - margin: 12px 0 12px 0; - } - -.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { - margin-bottom: 12px - } - -#punindex .blocktable, .pun .blockpost { - margin-bottom: 6px - } - -#postreview .blockpost { - margin-bottom: -1px; - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-bottom: 0px - } - -.pun .linkst, .pun .linksb { - margin-top: -12px - } - -.pun .postlinksb { - margin-top: -6px - } - - -/* External Borders -----------------------------------------------------------------*/ - -.pun .box { - border-style: solid; - border-width: 1px; - } - -#brdheader .box { - border-top-width: 4px; - } - -/* Default Internal Spacing -----------------------------------------------------------------*/ - -.pun .block .inbox, .pun .blockmenu .inbox { - padding: 3px 6px - } - -/***************************************************************** -4. COMMON BOARD ELEMENTS -*****************************************************************/ - -/* Board Header -----------------------------------------------------------------*/ - -#brdtitle h1 { - font-size: 1.4em; - font-weight: bold; - padding: 3px 0 0 0; - } - -#brdmenu li { - display: inline; - margin-right: 12px; - } - -#brdmenu a:link, #brdmenu a:visited { - text-decoration: none - } - -#brdmenu a:hover, #brdmenu a:active { - text-decoration: underline - } - -#brdwelcome .conl { - float: left; - } - -#brdwelcome .conr { - float: right; - text-align: right; - } - -/* Breadcrumbs and Post Links -----------------------------------------------------------------*/ - -.pun .linkst { - padding: 8px 6px 3px 6px - } - -.pun .linksb, .pun .postlinksb { - padding: 3px 6px 8px 6px - } - -.pun .crumbs { - clear: both; - width: 100%; - overflow: hidden; - } - -.pun .crumbs li { - display: inline; - white-space: nowrap; - font-weight: bold; - } - -.pun .pagelink { - float: left; - white-space: nowrap; - } - -.pun .postlink { - font-weight: bold; - white-space: nowrap; - } - -.pun .postlink, .pun .modbuttons { - float: right; - text-align: right; - } - -.pun .modbuttons { - padding: 1px 0; - white-space: nowrap; - } - -.pun .modbuttons input { - margin-left: 6px; - } - -.pun .postlink a:link, .pun .postlink a:visited { - text-decoration: none - } - -.pun .postlink a:hover, .pun .postlink a:active { - text-decoration: underline; - } - -#punindex .subscribelink { - margin-top: 6px; - } - -/* Board Footer -----------------------------------------------------------------*/ - -#brdfooter .conl { - float: left; - } - -#brdfooter .conr { - float: right; - text-align: right; - } - -#brdfooter #modcontrols { - border-bottom-style: solid; - border-bottom-width: 1px; - text-align: center; - } - -#brdfooter #modcontrols dd { - display: inline; - margin:0 6px; - } - - -/* Board Stats -----------------------------------------------------------------*/ - -#brdstats .conl { - float: left; - } - -#brdstats .conr { - float: right; - text-align: right; - } - -#onlinelist dd, #onlinelist dt { - display: inline; - } - - -/***************************************************************** -5. MAIN TABLES -*****************************************************************/ - -.pun table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; - empty-cells: show; - } - -.pun .blocktable table { - table-layout: fixed; - } - -.pun td, .pun th { - padding: 4px 6px; - text-align: left; - font-weight: normal; - } - -.pun td, .pun th { - border-style: solid none none solid; - border-width: 1px; - } - -.pun .tcl { - border-left: 0; - width: auto; - } - -.pun .tc2, .pun .tc3, .pun .tcmod { - width: 10%; - text-align: center; - padding: 4px 0; - } - -.pun .tcr { - width: 30%; - } - -.pun .tcl h3 { - font-size: 1.091em; - font-weight: bold; - } - -.pun .tcl h3 span.newtext { - font-size: 0.917em; - } - -.pun .tcl span.newtext, .pun .tcl span.pagestext { - white-space: nowrap; - font-weight: normal; - } - -.pun td span.byuser { - white-space: nowrap; - } - -.pun .tcl p { - padding: 5px 0 0 0 - } - -#punsearch #vf .tc2 { - width: 18%; - text-align: left; - padding: 4px 6px; - } - -#users1 .tcr { - width: 25% - } - -#users1 .tc2 { - width: 25%; - text-align: left; - padding: 4px 6px; - } - -#debug .tcl { - width: 10% - } - -#debug .tcr { - width: 90%; - white-space: normal - } - -#punindex .tcr .byuser { - display: block - } - -.pun .blocktable .tclcon { - padding: 0 11px 0 12px; - overflow: hidden; - min-height: 1px; - position: relative; - } - -.pun .blocktable .tclcon div { - width: 100%; - overflow: hidden; - } - -.pun .icon { - margin: 0.1em 0 0 0.2em; - border-width: 0.6em; - border-style: solid; - height: 0; - width: 0; - overflow: hidden; - float: left; - } - -.pun .icon div { - position: absolute; - left: -9999em; - text-indent: -9999em; - height: 0; - } - -.pun .iposted .ipost { - position: absolute; - left: 0; - font-weight: bold; - width: 8px; - padding-left: 4px; - text-align: center; - top: 0; - } - -/***************************************************************** -6. MAIN FORMS -*****************************************************************/ - -.pun .blockform form, .pun .fakeform { - PADDING: 20px 20px 15px 20px - } - -.pun .forminfo { - margin-bottom: 12px; - padding: 9px 10px; - border-style: solid; - border-width: 1px; - } - -.pun .forminfo h3 { - font-weight: bold; - } - -.pun .inform { - padding-bottom: 12px - } - -.pun fieldset { - padding: 0px 12px 0px 12px; - border-style: solid; - border-width: 1px - } - -.pun legend { - padding: 0px 6px - } - -.pun .infldset { - padding: 9px 0px 12px 0 - } - -.pun label { - display: block; - padding: 3px 0 - } - -.pun label.conl { - float: left; - overflow: visible; - margin-right: 10px - } - -.pun fieldset .rbox br { - display: none; - } - -.pun fieldset .rbox label { - padding: 3px 0 3px 25px; - position: relative; - vertical-align: middle; - } - -.pun fieldset .rbox input { - margin: 0 9px 0 -25px; - padding: 0; - width: 16px; - position: relative; - vertical-align: middle; - } - -.pun .txtarea { - width: 75% - } - -.pun .txtarea textarea, .pun input.longinput { - width: 100% - } - -.pun .bblinks { - padding-bottom: 10px; - padding-left: 4px - } - -.pun .bblinks li { - display: inline; - padding-right: 20px - } - -.pun .blockform .buttons { - padding-left: 12px; - } - -.pun .blockform .buttons input { - margin-right: 8px; - } - -#posterror ul { - list-style: square; - padding: 3px 0 3px 24px; - } - -.pun .deletemsg { - border-style: solid; - border-width: 1px; - padding: 6px 15px; - } - -.pun p.actions span { - margin-right: 12px; - } - -.pun .multiselect { - float: left; - padding-bottom: 7px; - } - -.pun .checklist { - border-width: 1px; - border-style: solid; - max-height: 9em; - width: 20em; - overflow: auto; - padding: 0.3em 0.5em; - margin: 0.25em 16px 0 0.15em; - } - -.pun .checklist fieldset { - border: 0; - padding: 0; - } - -.pun .checklist legend { - padding: 0; - } - -.pun .checklist legend span { - width: auto; - max-width: 25em; - } - -/***************************************************************** -7. PROFILES AND ADMIN -*****************************************************************/ - -.pun .block2col { - padding-bottom: 1px - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-left: 14em - } - -.pun .blockmenu { - float:left; - width: 13em - } - -.pun .blockmenu li { - padding: 3px 0; - font-weight: bold; - } - -.pun .blockmenu a:link, .pun .blockmenu a:visited { - text-decoration: none - } - -.pun .blockmenu a:hover, .pun .blockmenu a:active { - text-decoration: underline - } - -#viewprofile dl { - float: left; - width: 100%; - overflow: hidden - } - -#viewprofile dd { - margin-left: 14em; - padding: 3px; - } - -#viewprofile dt { - float: left; - width: 13em; - margin: 3px 0; - } - -#profileavatar img { - float: right; - margin-left: 1em - } - -#adintro ul { - list-style-type: disc; - margin-left: 8px; - padding-left: 16px; - } - -/***************************************************************** -8. MAIN POSTS -*****************************************************************/ - -.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { - text-decoration: none; - } - -.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { - text-decoration: underline; - } - -.pun .blockpost h2 .conr { - float: right; - text-align: right; - } - -#punsearch .blockpost h2 span { - white-space: nowrap; - } - -.pun .blockpost .box { - overflow: hidden; - } - -.pun .postleft, .pun .postfootleft { - float:left; - width: 18em; - position: relative; - overflow: hidden; - } - -.pun .postleft dl { - padding: 6px; - } - -.pun .postleft .usercontacts, .pun .postleft .icon { - margin-top: 6px - } - -.pun .postleft .postavatar, .pun .postleft .usertitle { - margin-bottom: 6px; - display: block; - } - -.pun .blockpost dt { - font-size: 1.091em; - font-weight: bold; - } - -.pun .blockpost dt a:link, .pun .blockpost dt a:visited { - text-decoration: none; - } - -.pun .blockpost dt a:hover, .pun .blockpost dt a:active { - text-decoration: underline; - } - -.pun .postright, .pun .postfootright { - border-left-width: 18em; - border-left-style: solid - } - -#postpreview .postright { - border-left: 0 - } - -.pun .postright { - padding: 0 6px; - } - -.pun .postfootright, .pun .multidelete { - text-align: right - } - -.pun .postmsg { - width:98%; - overflow: hidden; - padding-bottom: 6px; - word-wrap: break-word; - } - -.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, -.pun .postfootleft p { - padding: 10px 6px 5px 6px; - } - -.pun .postfootright li { - display: inline; - } - -.pun .postfootright li:before { - content: " | "; - } - -.pun .postfootright li:first-child:before { - content: ""; - } - -.pun .postfootright a:link, .pun .postfootright a:visited { - text-decoration: none - } - -.pun .postfootright a:hover, .pun .postfootright a:active { - text-decoration: underline - } - -.pun .codebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0; - } - -.pun .quotebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0 0.75em; - } - -.pun .quotebox cite { - display: block; - padding: 0.75em 0 0 0; - } - -.pun .quotebox blockquote { - width: 100%; - overflow: hidden - } - -.pun .codebox pre { - overflow: auto; - width: 100%; - overflow-y:hidden - } - -* html .pun .codebox pre { - padding-bottom: 10px; - } - -*+html .pun .codebox pre { - padding-bottom: 10px - } - -.pun .codebox pre code { - display: block; - padding: 0.75em; - } - -.pun .codebox pre.vscroll { - height: 32em; - overflow: auto; - overflow-y: auto - } - -.pun .postmsg img { - vertical-align: bottom; - } - -.pun .postsignature hr { - margin-left: 0px; - width: 200px; - text-align: left; - height: 1px; - border:none - } - -.pun .postmsg .postimg img { - max-width: 98%; - vertical-align: middle; - margin: 7px 0.5em 7px 0; - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-style: solid; - border-width: 2px; - } - -.pun .blockpost label { - padding: 3px 6px; - border-style: solid; - border-width: 1px; - vertical-align: middle; - display: inline-block; - } - -.pun .blockpost label * { - vertical-align: middle; - margin: 0; - padding: 0; - } - -/****************************************************************/ -/* 9. HELP FILES AND MISC. */ -/****************************************************************/ - -#punhelp h2 { - margin-top: 12px - } - -#punhelp div.box { - padding: 10px - } - -#debugtime { - margin-top: -12px; - text-align: center; - } - -#brdwelcome, #brdfooter dl a, div.blockmenu li, div.rbox input { - line-height: 1.4em - } - -#announce div.inbox div { - padding: 3px 0 - } - -/***************************************************************** -COLOUR SCHEME -*****************************************************************/ - -/* Background / Text -----------------------------------------------------------------*/ - -body { - background: #2a2a2a; - color: #d4d4d4 - } - -.pun { - color: #d4d4d4 - } - -.pun .box, #adminconsole fieldset th { - background-color: #383838 - } - -.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, -#brdfooter #modcontrols, #adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { - background-color: #424242 - } - -.pun h2, #brdmenu { - background-color: #565656; - color: #d4d4d4 - } - -.pun th { - background-color: #484848 - } - -.pun legend { - color: #60c860 - } - -.pun .blockmenu li.isactive a, #posterror li strong { - color: #d4d4d4 - } - -.pun .usercontent * { - background: transparent; - color: #d4d4d4 - } - -.pun textarea, .pun input, .pun select { - background-color: #2a2a2a; - color: #d4d4d4 - } - -.pun .multiselect, .pun .checklist { - color: #D4D4D4; - } - -.pun .checklist { - border-color: #666; - } - -/* Posts -----------------------------------------------------------------*/ - -.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { - background-color: #383838 - } - -.pun .postright, .pun .postfootright { - border-left-color: #424242 - } - -.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { - background-color: #424242 - } - -.pun .blockpost h2 { - background-color: #565656 - } - -.pun .blockpost h2 span.conr { - color: #a19e96 - } - -.pun .postmsg ins, #punhelp samp ins { - background-color: #ff0; - } - -.pun hr { - background-color: #606060; - color: #606060 - } - -/* Borders -----------------------------------------------------------------*/ - -.pun .box { - border-color:#565656 - } - -.pun td, #brdfooter #modcontrols { - border-color: #565656 - } - -.pun th { - border-color: #484848 - } - -.pun fieldset { - border-color: #606060 - } - -#adminconsole td, #adminconsole th { - border-color: #383838 - } - -.pun .quotebox, .pun .codebox, .pun .forminfo, -.pun .blockpost label, .pun .deletemsg { - border-color: #606060 - } - -/* Links -----------------------------------------------------------------*/ - -.pun a:link, .pun a:visited { - color: #60c860 - } - -.pun a:hover, .pun a:active, .pun a:focus { - color: #80ee80 - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-color: #60c860; - } - -.pun .postmsg .postimg a:hover img, .pun .postmsg .postimg a:active img, .pun .postmsg .postimg a:focus img { - border-color: #80ee80; - } - -.pun h2 a:link, .pun h2 a:visited, -#brdmenu a:link, #brdmenu a:visited { - color: #d4d4d4 - } - -.pun h2 a:hover, .pun h2 a:active, -#brdmenu a:hover, #brdmenu a:active { - color: #d4d4d4 - } - -.pun .postreport a:link, .pun .postreport a:visited, -.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { - color: #888 - } - -.pun .postreport a:hover, .pun .postreport a:active, -.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { - color: #aaa - } - -.pun .maintenancelink a:link, .pun .maintenancelink a:visited { - color: #ff4000 - } - -.pun .maintenancelink a:hover, .pun .maintenancelink a:active { - color: #ff5010 - } - -/* Status Indicators -----------------------------------------------------------------*/ - -.pun .icon { - border-color: #484848 #404040 #3c3c3c #444444 - } - -.pun .iredirect .icon { - border-color: #383838 #383838 #383838 #383838 - } - -.pun .inew .icon { - border-color: #60c860 #54af54 #499849 #59b657 - } - -/* Alert boxes -----------------------------------------------------------------*/ - -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 240px; - max-width: 410px; - padding: 5px; - z-index: 1000; -} -#msgflash h2 { - color: #60c860; - font-weight: bold; -} diff --git a/style/Sulfur.css b/style/Sulfur.css deleted file mode 100644 index 9babc343..00000000 --- a/style/Sulfur.css +++ /dev/null @@ -1,1163 +0,0 @@ -/***************************************************************** -1. INITIAL SETTINGS -*****************************************************************/ - -/* Limited Reset -----------------------------------------------------------------*/ - -.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, -.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, -.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { - margin: 0; - padding: 0; - border: 0; - } - -.pun ul, .pun ol { - list-style: none - } - - -/* Structural Settings -----------------------------------------------------------------*/ - -.pun .clearer, .pun .nosize { - height: 0; - width: 0; - line-height: 0; - font-size: 0; - overflow: hidden - } - -.pun .clearer, .pun .clearb { - clear: both - } - -.pun .nosize { - position: absolute; - left: -9999em; - text-indent: -9999em; - width: 0; - } - -* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { - height: 1px - } - -.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { - min-height: 1px - } - -.clearl { - clear: left; - } - -/* Hidden Elements -----------------------------------------------------------------*/ - -#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, -#modcontrols dt, #searchlinks dt, div.postright h3, span.closedtext, -.pun .required strong span { - position: absolute; - display: block; - overflow: hidden; - width: 0; - left: -9999em; - text-indent: -9999em; - } - -/***************************************************************** -2. TEXT & CONTENT -*****************************************************************/ - -/* Text Defaults -----------------------------------------------------------------*/ - -.pun { - font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; - line-height: normal; - } - -.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun samp, .pun legend { - font-size: 1em; - font-family: verdana, helvetica, arial, sans-serif; - } - -.pun pre, .pun code { - font-size: 1.182em; - font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace - } - -.pun pre code { - font-size: 1em; - } - -.pun strong { - font-weight: bold; - } - -.pun em { - font-style: italic; - } - - -/* Content Defaults -----------------------------------------------------------------*/ - -.pun p, .pun ul, .pun ol, .pun dl { - font-size: 1em; - padding: 3px 0; - } - -.pun h2 { - font-size: 1em; - font-weight: normal; - padding: 4px 6px; - } - -.pun h3 { - font-size: 1.091em; - padding: 3px 0; - } - -.pun table p, .pun table h3 { - padding: 0; - } - -.pun span.warntext, .pun p.warntext { - font-weight: bold - } - -/* User Content (Announcements, Rules, Posts) -----------------------------------------------------------------*/ - -.pun .usercontent p, .pun .postmsg p { - padding: 0.75em 0 - } - -.pun .usercontent ul, .pun .postmsg ul { - padding: 0.75em 1em 0.75em 2.5em; - list-style: disc - } - -.pun .usercontent ol, .pun .postmsg ol { - padding: 0.75em 1em 0.75em 2.5em; - list-style: decimal - } - -.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { - list-style: lower-alpha - } - -.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { - padding: 0.25em 1em 0.75em 2.5em - } - -.pun .usercontent li p, .pun .postmsg li p { - padding: 0 - } - -.pun .usercontent h1 { - font-size: 1.4em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h2 { - font-size: 1.2em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h3 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { - font-size: 1em; - font-weight: bold; - padding: 0.75em 0 0 0 - } - -.pun .quotebox cite { - font-weight: bold; - font-style: normal; - padding: 0.75em 0.75em 0 0.75em - } - -.pun span.bbu { - text-decoration: underline - } - -.pun span.bbs, .pun del { - text-decoration: line-through; - } - -.pun .postmsg ins, #punhelp samp ins { - text-decoration: none; - } - -.pun div.postmsg h5, #punhelp h5 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0; - } - - -/***************************************************************** -3. COMMON STYLES -*****************************************************************/ - -/* Page Layout -----------------------------------------------------------------*/ - -html, body { - margin: 0; - padding: 0 - } - -.pun { - max-width: 1070px; - width: 95%; - margin: 0 auto; - padding: 12px 20px; - } - -#punredirect, #punmaint, #puninstall, #pundb_update { - margin: 50px 20% 12px 20% - } - - -/* Vertical Element Spacing -----------------------------------------------------------------*/ - -#brdheader { - margin: 0 0 12px 0; - } - -#brdtitle p { - padding-top: 0px - } - -#announce, #brdstats { - margin: 12px 0 12px 0; - } - -.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { - margin-bottom: 12px - } - -#punindex .blocktable, .pun .blockpost { - margin-bottom: 6px - } - -#postreview .blockpost { - margin-bottom: -1px; - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-bottom: 0px - } - -.pun .linkst, .pun .linksb { - margin-top: -12px - } - -.pun .postlinksb { - margin-top: -6px - } - - -/* External Borders -----------------------------------------------------------------*/ - -.pun .box { - border-style: solid; - border-width: 1px; - } - -#brdheader .box { - border-top-width: 4px; - } - -/* Default Internal Spacing -----------------------------------------------------------------*/ - -.pun .block .inbox, .pun .blockmenu .inbox { - padding: 3px 6px - } - -/***************************************************************** -4. COMMON BOARD ELEMENTS -*****************************************************************/ - -/* Board Header -----------------------------------------------------------------*/ - -#brdtitle h1 { - font-size: 1.4em; - font-weight: bold; - padding: 3px 0 0 0; - } - -#brdmenu li { - display: inline; - margin-right: 12px; - } - -#brdmenu a:link, #brdmenu a:visited { - text-decoration: none - } - -#brdmenu a:hover, #brdmenu a:active { - text-decoration: underline - } - -#brdwelcome .conl { - float: left; - } - -#brdwelcome .conr { - float: right; - text-align: right; - } - -/* Breadcrumbs and Post Links -----------------------------------------------------------------*/ - -.pun .linkst { - padding: 8px 6px 3px 6px - } - -.pun .linksb, .pun .postlinksb { - padding: 3px 6px 8px 6px - } - -.pun .crumbs { - clear: both; - width: 100%; - overflow: hidden; - } - -.pun .crumbs li { - display: inline; - white-space: nowrap; - font-weight: bold; - } - -.pun .pagelink { - float: left; - white-space: nowrap; - } - -.pun .postlink { - font-weight: bold; - white-space: nowrap; - } - -.pun .postlink, .pun .modbuttons { - float: right; - text-align: right; - } - -.pun .modbuttons { - padding: 1px 0; - white-space: nowrap; - } - -.pun .modbuttons input { - margin-left: 6px; - } - -.pun .postlink a:link, .pun .postlink a:visited { - text-decoration: none - } - -.pun .postlink a:hover, .pun .postlink a:active { - text-decoration: underline; - } - -#punindex .subscribelink { - margin-top: 6px; - } - -/* Board Footer -----------------------------------------------------------------*/ - -#brdfooter .conl { - float: left; - } - -#brdfooter .conr { - float: right; - text-align: right; - } - -#brdfooter #modcontrols { - border-bottom-style: solid; - border-bottom-width: 1px; - text-align: center; - } - -#brdfooter #modcontrols dd { - display: inline; - margin:0 6px; - } - - -/* Board Stats -----------------------------------------------------------------*/ - -#brdstats .conl { - float: left; - } - -#brdstats .conr { - float: right; - text-align: right; - } - -#onlinelist dd, #onlinelist dt { - display: inline; - } - - -/***************************************************************** -5. MAIN TABLES -*****************************************************************/ - -.pun table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; - empty-cells: show; - } - -.pun .blocktable table { - table-layout: fixed; - } - -.pun td, .pun th { - padding: 4px 6px; - text-align: left; - font-weight: normal; - } - -.pun td, .pun th { - border-style: solid none none solid; - border-width: 1px; - } - -.pun .tcl { - border-left: 0; - width: auto; - } - -.pun .tc2, .pun .tc3, .pun .tcmod { - width: 10%; - text-align: center; - padding: 4px 0; - } - -.pun .tcr { - width: 30%; - } - -.pun .tcl h3 { - font-size: 1.091em; - font-weight: bold; - } - -.pun .tcl h3 span.newtext { - font-size: 0.917em; - } - -.pun .tcl span.newtext, .pun .tcl span.pagestext { - white-space: nowrap; - font-weight: normal; - } - -.pun td span.byuser { - white-space: nowrap; - } - -.pun .tcl p { - padding: 5px 0 0 0 - } - -#punsearch #vf .tc2 { - width: 18%; - text-align: left; - padding: 4px 6px; - } - -#users1 .tcr { - width: 25% - } - -#users1 .tc2 { - width: 25%; - text-align: left; - padding: 4px 6px; - } - -#debug .tcl { - width: 10% - } - -#debug .tcr { - width: 90%; - white-space: normal - } - -#punindex .tcr .byuser { - display: block - } - -.pun .blocktable .tclcon { - padding: 0 11px 0 12px; - overflow: hidden; - min-height: 1px; - position: relative; - } - -.pun .blocktable .tclcon div { - width: 100%; - overflow: hidden; - } - -.pun .icon { - margin: 0.1em 0 0 0.2em; - border-width: 0.6em; - border-style: solid; - height: 0; - width: 0; - overflow: hidden; - float: left; - } - -.pun .icon div { - position: absolute; - left: -9999em; - text-indent: -9999em; - height: 0; - } - -.pun .iposted .ipost { - position: absolute; - left: 0; - font-weight: bold; - width: 8px; - padding-left: 4px; - text-align: center; - top: 0; - } - -/***************************************************************** -6. MAIN FORMS -*****************************************************************/ - -.pun .blockform form, .pun .fakeform { - PADDING: 20px 20px 15px 20px - } - -.pun .forminfo { - margin-bottom: 12px; - padding: 9px 10px; - border-style: solid; - border-width: 1px; - } - -.pun .forminfo h3 { - font-weight: bold; - } - -.pun .inform { - padding-bottom: 12px - } - -.pun fieldset { - padding: 0px 12px 0px 12px; - border-style: solid; - border-width: 1px - } - -.pun legend { - padding: 0px 6px - } - -.pun .infldset { - padding: 9px 0px 12px 0 - } - -.pun label { - display: block; - padding: 3px 0 - } - -.pun label.conl { - float: left; - overflow: visible; - margin-right: 10px - } - -.pun fieldset .rbox br { - display: none; - } - -.pun fieldset .rbox label { - padding: 3px 0 3px 25px; - position: relative; - vertical-align: middle; - } - -.pun fieldset .rbox input { - margin: 0 9px 0 -25px; - padding: 0; - width: 16px; - position: relative; - vertical-align: middle; - } - -.pun .txtarea { - width: 75% - } - -.pun .txtarea textarea, .pun input.longinput { - width: 100% - } - -.pun .bblinks { - padding-bottom: 10px; - padding-left: 4px - } - -.pun .bblinks li { - display: inline; - padding-right: 20px - } - -.pun .blockform .buttons { - padding-left: 12px; - } - -.pun .blockform .buttons input { - margin-right: 8px; - } - -#posterror ul { - list-style: square; - padding: 3px 0 3px 24px; - } - -.pun .deletemsg { - border-style: solid; - border-width: 1px; - padding: 6px 15px; - } - -.pun p.actions span { - margin-right: 12px; - } - -.pun .multiselect { - float: left; - padding-bottom: 7px; - } - -.pun .checklist { - border-width: 1px; - border-style: solid; - max-height: 9em; - width: 20em; - overflow: auto; - padding: 0.3em 0.5em; - margin: 0.25em 16px 0 0.15em; - } - -.pun .checklist fieldset { - border: 0; - padding: 0; - } - -.pun .checklist legend { - padding: 0; - } - -.pun .checklist legend span { - width: auto; - max-width: 25em; - } - -/***************************************************************** -7. PROFILES AND ADMIN -*****************************************************************/ - -.pun .block2col { - padding-bottom: 1px - } - -.pun .block2col .blockform, .pun .block2col .block { - margin-left: 14em - } - -.pun .blockmenu { - float:left; - width: 13em - } - -.pun .blockmenu li { - padding: 3px 0; - font-weight: bold; - } - -.pun .blockmenu a:link, .pun .blockmenu a:visited { - text-decoration: none - } - -.pun .blockmenu a:hover, .pun .blockmenu a:active { - text-decoration: underline - } - -#viewprofile dl { - float: left; - width: 100%; - overflow: hidden - } - -#viewprofile dd { - margin-left: 14em; - padding: 3px; - } - -#viewprofile dt { - float: left; - width: 13em; - margin: 3px 0; - } - -#profileavatar img { - float: right; - margin-left: 1em - } - -#adintro ul { - list-style-type: disc; - margin-left: 8px; - padding-left: 16px; - } - -/***************************************************************** -8. MAIN POSTS -*****************************************************************/ - -.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { - text-decoration: none; - } - -.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { - text-decoration: underline; - } - -.pun .blockpost h2 .conr { - float: right; - text-align: right; - } - -#punsearch .blockpost h2 span { - white-space: nowrap; - } - -.pun .blockpost .box { - overflow: hidden; - } - -.pun .postleft, .pun .postfootleft { - float:left; - width: 18em; - position: relative; - overflow: hidden; - } - -.pun .postleft dl { - padding: 6px; - } - -.pun .postleft .usercontacts, .pun .postleft .icon { - margin-top: 6px - } - -.pun .postleft .postavatar, .pun .postleft .usertitle { - margin-bottom: 6px; - display: block; - } - -.pun .blockpost dt { - font-size: 1.091em; - font-weight: bold; - } - -.pun .blockpost dt a:link, .pun .blockpost dt a:visited { - text-decoration: none; - } - -.pun .blockpost dt a:hover, .pun .blockpost dt a:active { - text-decoration: underline; - } - -.pun .postright, .pun .postfootright { - border-left-width: 18em; - border-left-style: solid - } - -#postpreview .postright { - border-left: 0 - } - -.pun .postright { - padding: 0 6px; - } - -.pun .postfootright, .pun .multidelete { - text-align: right - } - -.pun .postmsg { - width:98%; - overflow: hidden; - padding-bottom: 6px; - word-wrap: break-word; - } - -.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, -.pun .postfootleft p { - padding: 10px 6px 5px 6px; - } - -.pun .postfootright li { - display: inline; - } - -.pun .postfootright li:before { - content: " | "; - } - -.pun .postfootright li:first-child:before { - content: ""; - } - -.pun .postfootright a:link, .pun .postfootright a:visited { - text-decoration: none - } - -.pun .postfootright a:hover, .pun .postfootright a:active { - text-decoration: underline - } - -.pun .codebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0; - } - -.pun .quotebox { - border-style: solid; - border-width: 1px; - margin: 0.75em 1em; - padding: 0 0.75em; - } - -.pun .quotebox cite { - display: block; - padding: 0.75em 0 0 0; - } - -.pun .quotebox blockquote { - width: 100%; - overflow: hidden - } - -.pun .codebox pre { - overflow: auto; - width: 100%; - overflow-y:hidden - } - -* html .pun .codebox pre { - padding-bottom: 10px; - } - -*+html .pun .codebox pre { - padding-bottom: 10px - } - -.pun .codebox pre code { - display: block; - padding: 0.75em; - } - -.pun .codebox pre.vscroll { - height: 32em; - overflow: auto; - overflow-y: auto - } - -.pun .postmsg img { - vertical-align: bottom; - } - -.pun .postsignature hr { - margin-left: 0px; - width: 200px; - text-align: left; - height: 1px; - border:none - } - -.pun .postmsg .postimg img { - max-width: 98%; - vertical-align: middle; - margin: 7px 0.5em 7px 0; - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-style: solid; - border-width: 2px; - } - -.pun .blockpost label { - padding: 3px 6px; - border-style: solid; - border-width: 1px; - vertical-align: middle; - display: inline-block; - } - -.pun .blockpost label * { - vertical-align: middle; - margin: 0; - padding: 0; - } - -/****************************************************************/ -/* 9. HELP FILES AND MISC. */ -/****************************************************************/ - -#punhelp h2 { - margin-top: 12px - } - -#punhelp div.box { - padding: 10px - } - -#debugtime { - margin-top: -12px; - text-align: center; - } - -#brdwelcome, #brdfooter dl a, div.blockmenu li, div.rbox input { - line-height: 1.4em - } - -#announce div.inbox div { - padding: 3px 0 - } - -/***************************************************************** -COLOUR SCHEME -*****************************************************************/ - -/* Background / Text -----------------------------------------------------------------*/ - -body { - background: #fff; - color: #333 - } - -.pun { - color: #333 - } - -.pun .box, #adminconsole fieldset th { - background-color: #f1f1f1 - } - -.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, -#brdfooter #modcontrols, #adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { - background-color: #dedfdf - } - -.pun h2, #brdmenu { - background-color: #b84623; - color: #fff - } - -.pun th { - background-color: #d1d1d1 - } - -.pun legend { - color: #822100 - } - -.pun .blockmenu li.isactive a, #posterror li strong { - color: #333 - } - -.pun .usercontent * { - background: transparent; - color: #333 - } - -.pun .multiselect, .pun .checklist { - color: #333; - } - -.pun .checklist { - border-color: #ACA899; - } - -/* Posts -----------------------------------------------------------------*/ - -.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { - background-color: #dedfdf - } - -.pun .postright, .pun .postfootright { - border-left-color: #f1f1f1 - } - -.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { - background-color: #f1f1f1 - } - -#punhelp .codebox, #punhelp .quotebox { - background-color: #f9f9f9; - } - -.pun .blockpost h2 { - background-color: #d25028 - } - -.pun .blockpost h2 span.conr { - color: #fccfc1 - } - -.pun .postmsg ins, #punhelp samp ins { - background-color: #ff0; - } - -.pun hr { - background-color: #333; - color: #333 - } - -/* Borders -----------------------------------------------------------------*/ - -.pun .box { - border-color: #b84623 - } - -.pun td, #brdfooter #modcontrols { - border-color: #e1c3c3 - } - -.pun th { - border-color: #d1d1d1 - } - -.pun fieldset { - border-color: #aca899 - } - -#adminconsole td, #adminconsole th { - border-color: #f1f1f1 - } - -.pun .quotebox, .pun .codebox, .pun .forminfo, -.pun .blockpost label, .pun .deletemsg { - border-color: #aca899 #fff #fff #aca899 - } - -/* Links -----------------------------------------------------------------*/ - -.pun a:link, .pun a:visited { - color: #822100 - } - -.pun a:hover, .pun a:active, .pun a:focus { - color: #ca3300 - } - -.pun .postmsg .postimg a:link img, .pun .postmsg .postimg a:visited img { - border-color: #822100; - } - -.pun .postmsg .postimg a:hover img, .pun .postmsg .postimg a:active img, .pun .postmsg .postimg a:focus img { - border-color: #ca3300; - } - -.pun h2 a:link, .pun h2 a:visited, -#brdmenu a:link, #brdmenu a:visited { - color: #fff - } - -.pun h2 a:hover, .pun h2 a:active, -#brdmenu a:hover, #brdmenu a:active { - color: #fff - } - -.pun .postreport a:link, .pun .postreport a:visited, -.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { - color: #888 - } - -.pun .postreport a:hover, .pun .postreport a:active, -.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { - color: #aaa - } - -.pun .maintenancelink a:link, .pun .maintenancelink a:visited { - color: #b42000 - } - -.pun .maintenancelink a:hover, .pun .maintenancelink a:active { - color: #b42000 - } - -/* Status Indicators -----------------------------------------------------------------*/ - -.pun .icon { - border-color: #e6e6e6 #dedede #dadada #e2e2e2 - } - -.pun .iredirect .icon { - border-color: #f1f1f1 #f1f1f1 #f1f1f1 #f1f1f1 - } - -.pun .inew .icon { - border-color: #c23000 #af2c00 #992600 #ac2b00 - } - -/* Alert boxes -----------------------------------------------------------------*/ - -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 240px; - max-width: 410px; - padding: 5px; - z-index: 1000; -} diff --git a/style/Technetium.css b/style/Technetium.css deleted file mode 100644 index aba20eb0..00000000 --- a/style/Technetium.css +++ /dev/null @@ -1,1387 +0,0 @@ -/***************************************************************** -Technitium theme CSS -*****************************************************************/ - -/***************************************************************** -1. INITIAL SETTINGS -*****************************************************************/ - -/* Limited Reset -----------------------------------------------------------------*/ - -.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, -.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, -.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { - margin: 0; - padding: 0; - border: 0; -} - -.pun ul, .pun ol { - list-style: none -} - - -/* Structural Settings -----------------------------------------------------------------*/ - -body { - line-height: 1.9em; -} - -.pun { - width: 95%; - margin: 0 auto; -} - -.pun .clearer, .pun .nosize { - height: 0; - width: 0; - line-height: 0; - font-size: 0; - overflow: hidden -} - -.pun .clearer, .pun .clearb { - clear: both -} - -.pun .nosize { - position: absolute; - left: -9999em; - text-indent: -9999em; - width: 0; -} - -* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { - height: 1px -} - -.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { - min-height: 1px -} - -.clearl { - clear: left; -} - -/* Hidden Elements -----------------------------------------------------------------*/ - -#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, -#modcontrols dt, #searchlinks dt, div.postright h3 { - position: absolute; - display: block; - overflow: hidden; - width: 0; - left: -9999em; - text-indent: -9999em; -} - -/***************************************************************** -2. TEXT & CONTENT -*****************************************************************/ - -/* Text Defaults -----------------------------------------------------------------*/ - -.pun { - font: 10pt Georgia, Times, "Times New Roman", serif -} - -.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea, .pun samp, .pun legend { - font-size: 1em; - font-family: Georgia, Times, "Times New Roman", serif; -} - -.pun pre, .pun code { - font-size: 1.182em; - font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace -} - -.pun pre code { - font-size: 1em; -} - -.pun strong { - font-weight: bold; -} - -.pun em { - font-style: italic; -} - -#vf td { - font-size: 1.1em; -} - - -/* Content Defaults -----------------------------------------------------------------*/ - -.pun p, .pun ul, .pun ol, .pun dl { - font-size: 1em; - padding: 3px 0; -} - -.pun h2 { - font-size: 1.5em; - font-weight: normal; - padding: 4px 6px; - padding: 6px; - border-radius: 0.3em 0.3em 0 0; -} - -.pun h2 #brdmenu { - font-size: 1.1em; -} - -.pun .blockpost h2 { - font-size: 1.0em; - padding: 8px; -} - -.pun h3 { - font-size: 1.091em; - padding: 3px 0; -} - -.pun table p, .pun table h3 { - padding: 0; -} - -.pun span.warntext, .pun p.warntext { - font-weight: bold -} - -.pun .postleft dl dt { - font-size: 1.4em; -} - -/* User Content (Announcements, Rules, Posts) -----------------------------------------------------------------*/ - -.pun .usercontent p, .pun .postmsg p { - padding: 0.5em 0; - line-height: 1.6em; -} - -.pun .usercontent ul, .pun .postmsg ul { - padding: 0.75em 1em 0.75em 2.5em; - list-style: disc -} - -.pun .usercontent ol, .pun .postmsg ol { - padding: 0.75em 1em 0.75em 2.5em; - list-style: decimal -} - -.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { - list-style: lower-alpha -} - -.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { - padding: 0.25em 1em 0.75em 2.5em -} - -.pun .usercontent li p, .pun .postmsg li p { - padding: 0 -} - -.pun .usercontent h1 { - font-size: 1.4em; - font-weight: bold; - padding: 0.75em 0 0 0 -} - -.pun .usercontent h2 { - font-size: 1.2em; - font-weight: bold; - padding: 0.75em 0 0 0 -} - -.pun .usercontent h3 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0 -} - -.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { - font-size: 1em; - font-weight: bold; - padding: 0.75em 0 0 0 -} - -.pun .quotebox cite { - font-weight: bold; - font-style: normal; - padding: 0.75em 0.75em 0 0.75em -} - -.pun span.bbu { - text-decoration: underline -} - -.pun span.bbs, .pun del { - text-decoration: line-through; -} - -.pun .postmsg ins, #punhelp samp ins { - text-decoration: none; -} - -.pun div.postmsg h5, #punhelp h5 { - font-size: 1.1em; - font-weight: bold; - padding: 0.75em 0 0 0; -} - -/***************************************************************** -3. COMMON STYLES -*****************************************************************/ - -/* Page Layout -----------------------------------------------------------------*/ - -.pun { - max-width: 1070px; - width: 95%; - margin: 0 auto; - padding: 12px 20px; -} - -#punredirect, #punmaint, #puninstall, #pundb_update { - margin: 50px 20% 12px 20%; - width: auto; -} - - -/* Vertical Element Spacing -----------------------------------------------------------------*/ - -#brdheader { - margin: 0 0 12px 0; -} - -#announce, #brdstats { - margin: 12px 0 12px 0; -} - -.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { - margin-bottom: 12px -} - -#punindex .blocktable, .pun .blockpost { - margin-bottom: 6px -} - -#postreview .box { - margin-bottom: 3px; -} - -.pun .block2col .blockform, .pun .block2col .block { - margin-bottom: 0px -} - -.pun .linkst, .pun .linksb { - margin-top: -12px -} - -.pun .postlinksb { - margin-top: -6px -} - - -/* External Borders -----------------------------------------------------------------*/ - -.pun .box { - border-style: solid; - border-width: 1px; -} - - -.pun h2 { - border-width: 1px; - border-style: solid; - border-bottom: none; -} - - -/* Default Internal Spacing -----------------------------------------------------------------*/ - -.pun .block .inbox, .pun .blockmenu .inbox { - padding: 3px 6px -} - -/***************************************************************** -4. COMMON BOARD ELEMENTS -*****************************************************************/ - -/* Board Header -----------------------------------------------------------------*/ - -#brdtitle h1 { - font-size: 1.5em; - line-height: 1.1em; - padding: 3px 0 0 0; -} - -#brdmenu { - font-size:1.2em; -} - -#brddesc { - padding: 3px 0; -} - -#brddesc * { - padding-top: 0; - padding-bottom: 0; -} - - -#brdmenu li { - display: inline; - margin-right: 10px; - margin-top: 12px; - margin-bottom: 12px; -} - - -#brdmenu a:link, #brdmenu a:visited { - text-decoration: none; - text-shadow: #FFF 1px -1px 0.4em; - padding: 0.2em; -} - -#brdwelcome .conl { - float: left; - white-space: nowrap; -} - -#brdwelcome li { - float:left; - margin-right:8px; - white-space:nowrap; -} - -#brdwelcome .conl li strong:after { - content: '.' -} - -#brdwelcome .conr { - float: right; - text-align: right; -} - -#brdwelcome .conr li { - float: right; - text-align: right; -} - -/* Breadcrumbs and Post Links -----------------------------------------------------------------*/ - -.pun .linkst { - padding: 8px 6px 3px 6px -} - -.pun .linksb, .pun .postlinksb { - padding: 3px 6px 8px 6px -} - -.pun .crumbs { - clear: both; - width: 100%; - overflow: hidden; -} - -.pun .crumbs li { - display: inline; - white-space: nowrap; - font-weight: bold; -} - -.pun .linkst .crumbs { - font-size: 1.3em; -} - -.pun .pagelink { - float: left; - display: block; - white-space: normal; -} - -.pun .postlink { - font-size: 1.1em; - font-weight: bold; - white-space: wrap; - text-decoration: none; -} - -.pun .linkst .postlink { - position: relative; - margin-top: -0.2em; - margin-bottom: 0.5em; -} - -.pun .linksb .postlink, .pun .postlinksb .postlink { - position: relative; - margin-top: 0.5em; - margin-bottom: -0.5em; -} - -.pun .postlink, .pun .modbuttons { - float: right; - text-align: right; -} - -.pun .modbuttons { - padding: 1px 0; - white-space: nowrap; -} - -.pun .modbuttons input { - margin-left: 6px; -} - -#punindex .subscribelink { - margin-top: 6px; -} - -/* Board Footer -----------------------------------------------------------------*/ - -#brdfooter #modcontrols { - border-bottom-style: solid; - border-bottom-width: 1px; - text-align: center; -} - -#brdfooter #modcontrols dd { - display: inline; - margin-right: 10px; -} - -#brdfooter .conl { - float: left; -} - -#brdfooter .conr { - float: right; - text-align: right; -} - -#brdfooter #feedlinks span { - background:url("Technetium/feed.png") no-repeat scroll left center transparent; - padding-left:18px; - display: inline; -} - - -/* Board Stats -----------------------------------------------------------------*/ - -#brdstats .conl { - float: left; -} - -#brdstats .conr { - float: right; - text-align: right; -} - -#onlinelist dd, #onlinelist dt { - display: inline; -} - - -/***************************************************************** -5. MAIN TABLES -*****************************************************************/ - -.pun table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; - empty-cells: show; -} - -.pun .blocktable table { - table-layout: fixed; -} - -.pun td, .pun th { - padding: 4px 6px; - line-height: 1.4em; - text-align: left; - font-weight: normal; -} - -.pun td { - border-style: solid none none solid; - border-width: 1px; -} - -.pun .tcl { - border-left: 0; - width: auto; -} - -.pun .tc2, .pun .tc3, .pun .tcmod { - width: 10%; - text-align: center; - padding: 4px 0; -} - -.pun .tcr { - width: 30%; -} - -.pun .tcl h3 { - font-size: 1.3em; - font-weight: bold; -} - -.pun .tcl span.newtext, .pun .tcl span.pagestext { - white-space: nowrap -} - -.pun .tcl p { - padding: 5px 0 0 0 -} - -#punsearch #vf .tc2 { - width: 18%; - text-align: left; - padding: 4px 6px; -} - -#users1 .tcr { - width: 25% -} - -#users1 .tc2 { - width: 25%; - text-align: left; - padding: 4px 6px; -} - -#debug .tcl { - width: 10% -} - -#debug .tcr { - width: 90%; - white-space: normal -} - -#punindex .tcr .byuser { - display: block -} - -.pun .blocktable .tclcon { - padding: 0 11px 0 12px; - overflow: hidden; - min-height: 1px; - position: relative; -} - -.pun .blocktable .tclcon div { - width: 100%; - overflow: hidden; -} - -.pun .icon { - height: 24px; - width: 24px; - overflow: hidden; - float: left; -} - -.pun .icon div { - position: absolute; - left: -9999em; - text-indent: -9999em; - height: 0; -} - -.pun .iposted .ipost { - position: absolute; - left: 0; - font-weight: bold; - width: 8px; - padding-left: 4px; - text-align: center; - top: 0; -} - -.pun .stickytext { - display: none; -} - -.pun .movedtext { - display: none; -} - -.pun .closedtext { - font-weight: bold; -} -/***************************************************************** -6. MAIN FORMS -*****************************************************************/ - - -.pun .forminfo { - margin-bottom: 12px; - padding: 9px 10px; - border-style: solid; - border-width: 1px; -} - -.pun .forminfo h3 { - font-weight: bold; -} - - - -.pun .inform { - padding: 0 18px; -} - -.pun fieldset { - overflow: hidden; - width: 100%; - padding-bottom: 0.8em; -} - -.pun legend { - font-size: 1.2em; - font-weight: bold; - margin-left: -7px; - padding: 10px 19px 7px 19px; -} - -.pun div[class*="inform"] legend { - margin-left: 0; -} - -.pun .infldset { - border-style: solid; - border-width: 1px; - display: inline-block; - overflow: hidden; - padding: 12px 18px; -} - -.pun div[class*="infldset"] { - display: block; -} - -#punregister #rules .infldset { - padding: 5px 18px; -} - -.pun fieldset p { - clear: both; - padding: 0 0 7px 0; - width: 100%; -} - -.pun fieldset .usercontent p { - padding: 7px 0; -} - -.pun fieldset label { - clear: both; - display: block; - padding: 0 0 7px 0; -} - - -.pun label { - display: block; - padding: 3px 0 -} - -.pun label.conl { - float: left; - overflow: visible; - margin-right: 10px -} - -.pun select { - padding-top: 1px; - padding-bottom: 1px; -} - -.pun fieldset .rbox { -} - -.pun fieldset .rbox br { - display: none; -} - -.pun fieldset .rbox label { - padding: 3px 0 3px 25px; - position: relative; - vertical-align: middle; -} - -.pun fieldset .rbox input { - margin: 0 9px 0 -25px; - padding: 0; - width: 16px; - position: relative; - vertical-align: middle; -} - -.pun .txtarea { - width: 90% -} - -.pun .txtarea textarea, .pun input.longinput { - width: 100% -} - -.pun .bblinks { - padding-bottom: 10px; - padding-left: 4px -} - -.pun .bblinks li { - display: inline; - padding-right: 20px -} - -.pun .blockform .buttons { - padding-left: 18px; - padding-bottom: 5px; -} - -.pun .blockform .buttons input { - margin-right: 8px; -} - -#posterror ul { - list-style: square; - padding: 3px 0 3px 24px; -} - -.pun .deletemsg { - border-style: solid; - border-width: 1px; - padding: 6px 15px; -} - -.pun .multiselect { - float: left; - padding-bottom: 7px; -} - -.pun .checklist { - border-width: 1px; - border-style: solid; - max-height: 9em; - width: 20em; - overflow: auto; - padding: 0.25em 0.5em; - margin: 0.25em 16px 0 0.15em; -} - -.pun .checklist legend { - padding: 0; -} - -.pun .checklist legend span { - width: auto; - max-width: 25em; -} - -/***************************************************************** -7. PROFILES AND ADMIN -*****************************************************************/ - -.pun .block2col { - padding-bottom: 1px -} - -.pun .block2col .blockform, .pun .block2col .block { - margin-left: 14em -} - -.pun .blockmenu { - float:left; - width: 13em -} - -.pun .blockmenu li { - padding: 3px 0; - font-weight: bold; -} - -.pun .blockmenu a:link, .pun .blockmenu a:visited { - text-decoration: none -} - -.pun .blockmenu a:hover, .pun .blockmenu a:active { - text-decoration: underline -} - -#viewprofile dl { - float: left; - width: 100%; - overflow: hidden -} - -#viewprofile dd { - margin-left: 14em; - padding: 3px; -} - -#viewprofile dt { - float: left; - width: 13em; - margin: 3px 0; -} - -#profileavatar img { - float: right; - margin-left: 1em -} - -/***************************************************************** -8. MAIN POSTS -*****************************************************************/ - -.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { - text-decoration: none; -} - -.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { - text-decoration: underline; -} - -.pun .blockpost h2 .conr { - float: right; - text-align: right; -} - -#punsearch .blockpost h2 span { - white-space: nowrap; -} - -.pun .blockpost .box { - overflow: hidden; -} - -.pun .postleft, .pun .postfootleft { - float:left; - width: 18em; - overflow: hidden; - position: relative; - overflow: hidden; -} - -.pun .postleft dl { - padding: 0.5em 6px; -} - -.pun .postleft .usercontacts, .pun .postleft .icon { - margin-top: 6px -} - -.pun .postleft .postavatar, .pun .postleft .usertitle { - margin-bottom: 6px; - display: block; -} - -.pun .blockpost dt { - font-size: 1.091em; - font-weight: bold; -} - -.pun .blockpost dt a:link, .pun .blockpost dt a:visited { - text-decoration: none; -} - -.pun .blockpost dt a:hover, .pun .blockpost dt a:active { - text-decoration: underline; -} - -.pun .postright, .pun .postfootright { - border-left-width: 18em; - border-left-style: solid -} - -#postpreview .postright { - border-left: 0 -} - -.pun .postright { - padding: 0 6px; -} - -.pun .postfootright, .pun .multidelete { - text-align: right -} - -.pun .postmsg { - width:98%; - overflow: hidden; - padding-bottom: 6px; - word-wrap: break-word; -} - -.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, -.pun .postfootleft p { - padding: 6px 6px 6px 6px; -} - -.pun .postfootright li { - display: inline; -} - -.pun .postfootright li:before { - content: " | "; -} - -.pun .postfootright li:first-child:before { - content: ""; -} - -.pun .postfootright a:link, .pun .postfootright a:visited { - text-decoration: none -} - -.pun .postfootright a:hover, .pun .postfootright a:active { - text-decoration: underline -} - - -.pun .quotebox, .pun .codebox { - border-style: solid; - border-width: 2px; - border-left: 5px solid; - margin: 0.75em 1em; - padding: 0 0.75em; -} - -.pun .quotebox cite { - display: block; - padding: 0.75em 0 0 0; -} - -.pun .quotebox blockquote { - width: 100%; - overflow: hidden -} - -.pun .codebox pre { - overflow: auto; - width: 100%; - overflow-y:hidden -} - -* html .pun .codebox pre { - padding-bottom: 10px; -} - -*+html .pun .codebox pre { - padding-bottom: 10px -} - -.pun .codebox pre code { - display: block; - padding: 0.75em; -} - -.pun .codebox pre.vscroll { - height: 32em; - overflow: auto; - overflow-y: auto -} - -.pun .postmsg .postimg img, .pun .postmsg a .postimg img { - max-width: 100%; - vertical-align: middle; -} - -.pun .postmsg img { - vertical-align: bottom; -} - -.pun .postsignature hr { - margin-left: 0px; - width: 200px; - text-align: left; - height: 1px; - border:none -} - -.pun .blockpost label { - padding: 3px 6px; - border-style: solid; - border-width: 1px; - vertical-align: middle; - display: inline-block; -} - -.pun .blockpost label * { - vertical-align: middle; - margin: 0; - padding: 0; -} - - -/****************************************************************/ -/* 9. HELP FILES AND MISC. */ -/****************************************************************/ - -#punhelp h2 { - margin-top: 12px -} - -#punhelp div.box { - padding: 10px -} - -/***************************************************************** -COLOUR SCHEME -*****************************************************************/ - -/* Background / Text -----------------------------------------------------------------*/ - -body { - background: #fff url("Technetium/bg.png") repeat-x top; - color: #122434 -} - -.pun { - color: #122434 -} - -.pun .box, #adminconsole fieldset th { - background-color: #FBFCFD; - background-image: url("Technetium/light-shade.png"); - background-position: bottom; - background-repeat: repeat-x; -} - -.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, -#brdfooter #modcontrols, #adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { - background-color: #F4F9FD; - background-image: url("Technetium/light-shade.png"); - background-repeat: repeat-x; - background-position: bottom; -} - -.pun h2, #brdmenu { - background-color: #C5D8EB; - color: #122434; - background-image: url("Technetium/dark-shade.png"); - background-repeat: repeat-x; - background-position: top; -} - -.pun h2 { - background-color: #C5D8EB; - background-image: url("Technetium/inv-shade.png"); - background-repeat: repeat-x; - color: #122434; - text-shadow: #FFF 1px -1px 0.7em; -} - -.pun #announce h2 { - display: none; -} - -.box #announce-block { - background-color: #FDFCE3; -} - -.pun th { - background-color: #EFF3F8; - background-image: url("Technetium/light-shade.png"); - background-repeat: repeat-x; -} - -.pun td { - background-image: url("Technetium/light-shade.png"); - background-color: #FBFCFD; - background-position: bottom; - background-repeat: repeat-x; -} - -.pun .isticky td { - background-color: #E4EBF1; -} - -.pun .iclosed td { - background-color: #ECEEF0 -} - -.pun .iclosed.isticky td { - background-color: #CDD6E0; -} - -.pun legend { - color: #122434 -} - -.pun .blockmenu li.isactive a, #posterror li strong { - color: #333 -} - -.pun .usercontent * { - background: transparent; - color: #333 -} - -#adminmenu .box { - background: #FBFCFD; -} - -.pun .postlink a:link, .pun .postlink a:visited, .pun .postlink a:active { - background-color:#F0F5FA; - background-image:url(Technetium/inv-shade.png); - background-repeat:repeat-x; - border: 1px solid; - color:#2B3037; - text-shadow: #FFF 1px -1px 0.4em; - padding: 0.3em; - border-radius: 0.4em; - position: relative; -} - -.pun .postlink a:hover { - background-color: #C0D6E9; - color: #000; -} - -#brdheader .box { - background-color:#F0F5FA; - background-image:url(Technetium/light-shade.png); - background-repeat:repeat-x; - background-position: top; - color:#122434; - border-radius: 0.4em; -} - -.pun #brdtitle { - background-color: #D1E1EF; - background-image: url("Technetium/inv-shade.png"); - background-repeat: repeat-x; - text-shadow: #FFF 1px -1px 0.4em; -} - - -.pun .infldset, #pundelete .deletemsg, #adintro .inbox, #adstats .inbox { - background: #FBFCFD url(Technetium/light-shade.png) bottom repeat-x; - border-color: #C0CCD8; -} - -#adintro ul { - list-style-type: disc; - margin-left: 8px; - padding-left: 16px; -} - -.pun .multiselect { - color: #122434; -} - -.pun .checklist { - background: white; - border-color: #A2B5CC; -} - -/* Posts -----------------------------------------------------------------*/ - -.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { - background-color: #F8FAFD; -} - -.pun .postright, .pun .postfootright { - border-left-color: #F0F5FA -} - -.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { - background-color: #F0F5FA -} - -#punhelp .codebox, #punhelp .quotebox { - background-color: #f9f9f9; -} - -.pun .blockpost h2 { - background-color: #F0F5FA; -} - -.pun .blockpost h2 span.conr { - color: #aabdcd -} - -.pun hr { - background-color: #333; - color: #333 -} - -.pun .quotebox { - background-color: #FAFCFE; -} - -.pun .postmsg ins, #punhelp samp ins { - background-color: #ff0; -} - -/* Borders -----------------------------------------------------------------*/ - -.pun .box, .pun h2, #brdfooter #modcontrols { - border-color: #A2B5CC; -} - -.blocktable #announce h2 { - border-color: #F6B620; -} - -.pun td { - border-color: #A2B5CC; -} - -.pun th, .pun fieldset { - border-color: #A2B5CC; -} - -#adminconsole td, #adminconsole th { - border-style:solid; - border-width:1px 0px !important; -} - -#adminconsole th { - border-width: 1px 0px 1px 1px !important; -} - -#adminconsole td { - border-width: 1px 1px 1px 1px !important; -} - -.pun .forminfo, .pun .blockpost label, .pun .deletemsg { - border-color: #aca899 #fff #fff #aca899; -} - -.pun .quotebox, .pun .codebox { - border-color: #BCD2E9; -} - -.pun .postlink a:link, .pun .postlink a:visited { - border-color: #C0D6E9 -} - - -/* Links -----------------------------------------------------------------*/ - -.pun a:link, .pun a:visited { - color: #1F537B; - text-decoration: none; -} - -.pun a:hover, .pun a:active, .pun a:focus { - color: #9E1D00 -} - -#brdmenu li a:active, #brdmenu li a:link, #brdmenu li a:visited { - color: #1F2E3D; -} - -#brdmenu li a:hover { - color: #000; - text-shadow: #8895A2 1px -1px 0.4em; -} - -#vf a { - font-weight: bold; -} - -.pun .postreport a:link, .pun .postreport a:visited, -.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { - color: #888 -} - -.pun .isticky.iclosed td.tcl a:link, .pun .isticky.iclosed td.tcl a:visited { - color: #475F6B !important; -} - -.pun .isticky.iclosed td.tcl a:hover { - color: #577382 !important; -} - - -.pun .postreport a:hover, .pun .postreport a:active, -.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { - color: #aaa -} - -.pun .maintenancelink a:link, .pun .maintenancelink a:visited { - color: #b42000 -} - -.pun .maintenancelink a:hover, .pun .maintenancelink a:active { - color: #b42000 -} - - -/* Status Indicators -----------------------------------------------------------------*/ - -.pun .icon { - background-image:url(Technetium/icon-nonew.png); -} - -.pun .iredirect .icon { - background-image:url(Technetium/icon-moved.png); -} - -.pun .inew .icon{ - background-image:url(Technetium/icon-new.png); -} - -.pun .iclosed .icon { - background-image:url(Technetium/icon-closed.png); -} - -.pun .isticky .icon { - background-image:url(Technetium/icon-nonew-sticky.png); -} - -.pun .isticky.inew .icon { - background-image:url(Technetium/icon-new-sticky.png); -} - -.pun .iclosed.isticky .icon { - background-image:url(Technetium/icon-closed-sticky.png); -} - -.pun .imoved .icon { - background-image:url(Technetium/icon-moved.png); -} - -/* Alert boxes -----------------------------------------------------------------*/ - -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 240px; - max-width: 410px; - padding: 5px; - z-index: 1000; -} diff --git a/style/Technetium/bg.png b/style/Technetium/bg.png deleted file mode 100644 index 92611176286042627d2f527114a931ed0b7205fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 578 zcmeAS@N?(olHy`uVBq!ia0vp^DGUtE3@pq*mV)E`Z9qyiz$e7@-~azVfB*UV^Vgrh z|2};E@%`8D&)C4>RvL2sB)5U9He!lHgIdzK}apQC8x6 zywi=jUsaqer&tu&{Iy&v{#@6Jod{St2{<-fQgv-a|{dmndg-+J~k`)kHWa`k@l zYxUR0oh-M!k*Bq@KIZhPht^9p!Z&T){eIhS;lPzMPVe~lYI4rD+4^OFv;W8S@ah0fm#%u>#^Lt<$E#wNNxZ(nzx~aw^suJ9|2Bud9kA`=5m#UI>6gUk irM-s7BtA1fGxu~b(^^}fzXO;k7(8A5T-G@yGywoRrWr&4 diff --git a/style/Technetium/dark-shade.png b/style/Technetium/dark-shade.png deleted file mode 100644 index 0bd7ae6a11cd9659606749d372ee9cea2c3464b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^Y(Ol>!VDz;rWf^sH~~H(uBHwic+m2g_gjD}xk`fk zg4MVgW!S_N1%#Cqci;R36jkwbaSY+Oo*bBzkdWArl=3Z7rA%syn2YfK_9JF)i!M(* bQkcMC@tvh|`>lmFK=llsu6{1-oD!M!VDz;rWf@BDU|@95LaF>@X0KMFtC!XK39r? z>Um0n{DQR<8F(Z`*<}UPRayQ9C*A^zYkRslhHzX@4opf&NMv|4(_xR)DLd|^&KG~Y qU%16^$~@MkiN72_z4S<`FkmoZVz1oRY_kfejlt8^&t;ucLK6V!*(y!| diff --git a/style/Technetium/feed.png b/style/Technetium/feed.png deleted file mode 100644 index 3704226a673de8aa886bb5d964fd65079347a35c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 439 zcmV;o0Z9IdP)Ut>u@Zj)- zFZhrs^@=3#fGGUu+4i%0{Jwwx_38SoVC8r*z z{n@nn!;s!%C-tXg`p>H1Z8GD8O!b{i`?hiDb0`1Ind^;F_|Uib+s*Q~lJ>%y@2-pU ztakE>G5q7p_s6CD$Bx=p9pG|9`OBpHs#f))S^w+S{oTI#q)}0fy#xRN00DGTPE!Ct z=GbNc005s!L_t(|+6~D=7Q{dl0Knf#Gd2gY#g#`F)9eUB>Au~Hw?f|{blho(e=zi zpeWuiisN_4_GSu1s;gJTu9-G3R3NU+s>Ma0ZCTTgx3oUp=$p0kIaw5YnuxW?0!s=aoNnRJVo;^^)A`~2VK>-_!w=j`x)m#+Bw z`}g?z_4oPx{{G$M>f7SzcaECm>F(+7^7Hoi>+kb>lAiJO_s-Yd!OYXN!pxbgwe9fq zg_@UL#;hvmeXVWK0xrJbF zYY`r9A>f=dt@v{RRXoW@5&<8M3Z_uF6NDH`5<3}g5yGYj z2Q>&m9SwQ~0JBNmu;W*(c}->`l)&p1!2M@$-GU%xwa#Fi00000NkvXXu0mjfN$2)j diff --git a/style/Technetium/icon-closed.png b/style/Technetium/icon-closed.png deleted file mode 100644 index 4d9c93e00f7daac9c3654bcf9d463232200b6412..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmVizxw`1tta+kRH`T6v$=KuF=kC?v>C)cj$J_1GSX`` diff --git a/style/Technetium/icon-new-sticky.png b/style/Technetium/icon-new-sticky.png deleted file mode 100644 index e9fb5a66d2122c2bce13d1a5a0db5344d6634393..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 505 zcmVb}+Ky3**(-tLsS z+=;T-m%H7YzTTd|-=f0crNrU4(C4nostjXlC%jL7q z=C{!2zSZf$*XoqH+{M}Kkhj{6wAskq?TE40%--&IpTl(AQS{q1r3sU z){~3ke$!~qjs$@rIRm5iKX41_{KbnIdb}0X`!TO>4QkYd3A4y}p2@FkOyaB-#f!`SQ0-tOG!^q8=~`TPBuvBCTO{+6%5_xk+v_xttv z{Qds^l&-$%@%Y~9^vT!a-FO7_2%#Q@%H+iw8QW9`qkm;#o6ra^7*E`%D~Xt zuEWsL-R9lr@YCb*vc=Ki>F=Sq$hgYY#nj!9ad2Nn*8_8*b3nS&`p0JRjYARc!0J%cx8*5 z!WGnb8v}fM+!XGh%)nIRTjQp112W07G1TxT8aIUtVp6)7;o4JR`;`tuWWp5_LD+HA lv6;^B-3Cj<7b3WS^a49l9b9{chOGbq002ovPDHLkV1liH_LBer diff --git a/style/Technetium/icon-nonew.png b/style/Technetium/icon-nonew.png deleted file mode 100644 index 547c760303c8485f190d9b7e49f7d7b4311cdba1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 265 zcmV+k0rvihP)B-#fz}D--*z520`rGL9{r>**_xttv{N(NS_xk+t_WIuG z^!oh%*yi%b+wIfi@diA8od5s;3UpFVQvm<}|5xV!RsQBrsWTA(003!8L_t(|+I`7M z0)QY41VJ|g3>F|IU;x5V+T#}Gnfz_rQn{uLcsN$&0@&D-qTBH)&!htsf P00000NkvXXu0mjftEq?d diff --git a/style/Technetium/index.html b/style/Technetium/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/Technetium/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/Technetium/inv-shade.png b/style/Technetium/inv-shade.png deleted file mode 100644 index eb9650b403dbe251fef9fde91bdec028d8d7be80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^Y(Ol>#0(^h)Z2A|6lZ`>h^wiC2N3yW7BW6PcN!?j zToU9L%*DbmxwnM}$d&MPaSY+Oo}6%i+lg6%iPb?xW^I&%3KN4-vgq#0(^h)Z2A|6i.. diff --git a/view/admin/categories.php b/view/admin/categories.php index 23929e47..c8786528 100644 --- a/view/admin/categories.php +++ b/view/admin/categories.php @@ -6,38 +6,38 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { - exit; + exit; } ?> -
        -

        -
        -
        -
        -
        - -
        - - - - - -
        - - - '.__('Forums').'') ?> -
        -
        -
        -
        -
        -
        +
        +

        +
        +
        +
        +
        + +
        + + + + + +
        + + + '.__('Forums').'') ?> +
        +
        +
        +
        +
        +
        -

        +

        @@ -50,13 +50,13 @@
        @@ -67,9 +67,9 @@
        - + -

        +

        @@ -78,27 +78,27 @@
        - + - - - + + - - - - - + + + + + - +?> +
        @@ -106,6 +106,6 @@
        -
        -
        +
        +
        \ No newline at end of file diff --git a/view/admin/forums/delete_forum.php b/view/admin/forums/delete_forum.php index 027a03e4..6a5263ba 100644 --- a/view/admin/forums/delete_forum.php +++ b/view/admin/forums/delete_forum.php @@ -16,13 +16,13 @@

        -
        +
        -

        +

        diff --git a/view/admin/forums/permissions.php b/view/admin/forums/permissions.php index e6869913..df092f46 100644 --- a/view/admin/forums/permissions.php +++ b/view/admin/forums/permissions.php @@ -16,7 +16,7 @@

        - +

        @@ -36,7 +36,10 @@ @@ -58,7 +61,7 @@ - '; ?> + '; ?>
        diff --git a/view/admin/groups/add_edit_group.php b/view/admin/groups/add_edit_group.php index 9a91a65f..bc2bc244 100644 --- a/view/admin/groups/add_edit_group.php +++ b/view/admin/groups/add_edit_group.php @@ -6,147 +6,147 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { - exit; + exit; } ?> -
        -

        -
        - - -

        -
        - - - -
        - -
        -

        - - - - - - - - - - - - - - +
        +

        +
        + + +

        +
        + + + +
        + +
        +

        +
        - -
        - - -
        - - - -
        + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -154,11 +154,11 @@ @@ -166,83 +166,83 @@ - + - - - - - - - - - + + + + + + + + + - + - + @@ -250,27 +250,27 @@ - + - + - + - - - - -
        + +
        + + +
        + + + +
        + echo ' checked="checked"'; +} ?> tabindex="5" />  + echo ' checked="checked"'; +} ?> tabindex="6" /> 
        - - - -
        - - - -
        - - - -
        - - - -
        - - - -
        - - - -
        + + + +
        + + + +
        + + + +
        + + + +
        + + + +
        + + + +
        + echo ' checked="checked"'; +} ?> tabindex="19" />  + echo ' checked="checked"'; +} ?> tabindex="20" /> 
        + echo ' checked="checked"'; +} ?> tabindex="21" />  + echo ' checked="checked"'; +} ?> tabindex="22" /> 
        + echo ' checked="checked"'; +} ?> tabindex="23" />  + echo ' checked="checked"'; +} ?> tabindex="24" /> 
        + echo ' checked="checked"'; +} ?> tabindex="25" />  + echo ' checked="checked"'; +} ?> tabindex="26" /> 
        - - - -
        - - - -
        + + + +
        + + + +
        + echo ' checked="checked"'; +} ?> tabindex="31" />  + echo ' checked="checked"'; +} ?> tabindex="32" /> 
        + echo ' checked="checked"'; +} ?> tabindex="33" />  + echo ' checked="checked"'; +} ?> tabindex="34" /> 
        + echo ' checked="checked"'; +} ?> tabindex="35" />  + echo ' checked="checked"'; +} ?> tabindex="36" /> 
        + echo ' checked="checked"'; +} ?> tabindex="37" />  + echo ' checked="checked"'; +} ?> tabindex="38" /> 
        + echo ' checked="checked"'; +} ?> tabindex="39" />  + echo ' checked="checked"'; +} ?> tabindex="40" /> 
        @@ -284,28 +284,28 @@
        - - -
        -

        -
        -
        -
        -

        - + + + + + + + + +

        +
        +
        +
        +

        + +
        -
        -
        +
        \ No newline at end of file diff --git a/view/admin/groups/confirm_delete.php b/view/admin/groups/confirm_delete.php index 94edb821..ca595ab3 100644 --- a/view/admin/groups/confirm_delete.php +++ b/view/admin/groups/confirm_delete.php @@ -6,31 +6,31 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { - exit; + exit; } ?> -
        -

        -
        -
        - -
        +
        +

        +
        + + +
        -
        - -
        -

        -

        -
        -
        -
        -

        - +
        + +
        +

        +

        +
        +
        +
        +

        + +
        -
        -
        +
        \ No newline at end of file diff --git a/view/admin/reports.php b/view/admin/reports.php index 7b9b1e3d..63251681 100644 --- a/view/admin/reports.php +++ b/view/admin/reports.php @@ -6,46 +6,46 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { - exit; + exit; } ?> -
        -

        -
        -
        - - -
        -
        - -
        - - - - - - - - - -
        '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), - $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
        ', feather_escape($report['message'])) ?>
        -
        -
        -
        - +

        +
        + + + +
        +
        + +
        + + + + + + + + + +
        '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), + $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
        ', feather_escape($report['message'])) ?>
        +
        +
        +
        + + } +} else { + ?>
        @@ -54,48 +54,48 @@
        - - +?> + +
        -
        -
        -

        -
        -
        - +

        +
        +
        + -
        -
        - '.feather_escape($report['zapped_by']).'' : __('NA')) ?> -
        - - - - - - - - - -
        '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), - $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
        ', feather_escape($report['message'])) ?>
        -
        -
        -
        - +
        +
        + '.feather_escape($report['zapped_by']).'' : __('NA')) ?> +
        + + + + + + + + + +
        '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), + $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
        ', feather_escape($report['message'])) ?>
        +
        +
        +
        + + } +} else { + ?>
        @@ -104,13 +104,13 @@
        - +?> +
        -
        -
        +
        diff --git a/view/admin/users/find_users.php b/view/admin/users/find_users.php index cf547cc5..d426177d 100644 --- a/view/admin/users/find_users.php +++ b/view/admin/users/find_users.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -97,4 +97,4 @@
        - \ No newline at end of file + diff --git a/view/edit.php b/view/edit.php index 2c926634..48a692e8 100644 --- a/view/edit.php +++ b/view/edit.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -17,54 +17,54 @@ ?>
        -
        -
          -
        • -
        • » 
        • -
        • » 
        • -
        • » 
        • -
        -
        +
        +
          +
        • +
        • » 
        • +
        • » 
        • +
        • » 
        • +
        +
        -
        -

        -
        -
        -

        -
          - '.$cur_error.''."\n"; - } - ?> -
        -
        -
        -
        - +
        +

        +
        +
        +

        +
          +'.$cur_error.''."\n"; + } +?> +
        +
        +
        +
        +request->post('preview')): - ?> -
        -

        -
        -
        -
        -
        -
        - -
        -
        -
        -
        -
        -
        - +
        +

        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        + @@ -74,46 +74,46 @@
        -

        -
        -
        - -
        -
        - - -
        - - - -
        -
        -
        - -
        -
        - -
        -
        - -
        -
        -
        -
        - -

        -
        -
        +

        +
        +
        + +
        +
        + + +
        + + + +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + +

        +
        +
        \ No newline at end of file diff --git a/view/header.php b/view/header.php index d9fbd687..9da121c2 100644 --- a/view/header.php +++ b/view/header.php @@ -12,6 +12,8 @@ + + <?php echo generate_page_title($page_title, $p) ?> - - + /* $elem_trans) { + echo "\t\t\"".$elem_orig.'": "'.addslashes(str_replace(' ', ' ', $elem_trans)); + if (--$tpl_temp) { + echo "\",\n"; + } else { + echo "\"\n\t};\n"; + } + } + ?> + if (document.all || document.getElementById) + { + for (var i = 0; i < the_form.length; ++i) + { + var elem = the_form.elements[i]; + if (elem.name && required_fields[elem.name] && !elem.value && elem.type && (/^(?:text(?:area)?|password|file)$/i.test(elem.type))) + { + alert('"' + required_fields[elem.name] + '" '); + elem.focus(); + return false; + } + } + } + return true; + } + /* ]]> */ + + -> - -
        -
        -
        +> -
        -
        -
        -

        -
        -
        - - -
        -
        +
        -user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?> -
        -

        -
        -
        -
        +
        -
        - + - - -
        -

        ×

        -
        -
        -

        +
        +
        +

        + +

        +
        +
        +

        +
        + +
        +
        + user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?> +
        +

        +
        +
        +
        +
        +
        +
        + + + +
        +

        ×

        +
        +
        +

        +
        +
        +
        + +
        -
        - - -
        +
        + +
        +
        diff --git a/style/FeatherBB/view/install.php b/view/install.php similarity index 100% rename from style/FeatherBB/view/install.php rename to view/install.php From f5e9f2b32ea9c1809d074f42a471cab8c431319a Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 22 Aug 2015 21:24:29 +0200 Subject: [PATCH 126/353] Clean up things, again --- .htaccess | 1 + .htaccess.dist | 1 + Slim/Extras/Middleware/FeatherBBAuth.php | 1 + style/FeatherBB/view/admin/bans/add_ban.php | 96 ++ .../FeatherBB/view/admin/bans/admin_bans.php | 102 +++ style/FeatherBB/view/admin/bans/index.html | 1 + .../FeatherBB/view/admin/bans/search_ban.php | 87 ++ style/FeatherBB/view/admin/categories.php | 111 +++ style/FeatherBB/view/admin/censoring.php | 84 ++ .../view/admin/forums/admin_forums.php | 114 +++ .../view/admin/forums/delete_forum.php | 35 + style/FeatherBB/view/admin/forums/index.html | 1 + .../view/admin/forums/permissions.php | 137 +++ .../view/admin/groups/add_edit_group.php | 311 +++++++ .../view/admin/groups/admin_groups.php | 110 +++ .../view/admin/groups/confirm_delete.php | 36 + .../view/admin/groups/delete_group.php | 39 + style/FeatherBB/view/admin/index.html | 1 + style/FeatherBB/view/admin/index.php | 63 ++ style/FeatherBB/view/admin/loader.php | 17 + .../admin/maintenance/admin_maintenance.php | 99 ++ .../view/admin/maintenance/index.html | 1 + .../view/admin/maintenance/prune.php | 39 + .../view/admin/maintenance/rebuild.php | 38 + style/FeatherBB/view/admin/menu.php | 112 +++ style/FeatherBB/view/admin/options.php | 849 ++++++++++++++++++ style/FeatherBB/view/admin/parser.php | 299 ++++++ style/FeatherBB/view/admin/permissions.php | 189 ++++ style/FeatherBB/view/admin/reports.php | 116 +++ style/FeatherBB/view/admin/statistics.php | 42 + .../view/admin/users/admin_users.php | 172 ++++ .../FeatherBB/view/admin/users/ban_users.php | 58 ++ .../view/admin/users/delete_users.php | 39 + .../FeatherBB/view/admin/users/find_users.php | 100 +++ .../FeatherBB/view/admin/users/move_users.php | 47 + .../FeatherBB/view/admin/users/search_ip.php | 79 ++ .../FeatherBB/view/admin/users/show_users.php | 100 +++ style/FeatherBB/view/delete.php | 64 ++ style/FeatherBB/view/edit.php | 119 +++ style/FeatherBB/view/footer.php | 147 +++ style/FeatherBB/view/header.php | 131 +++ style/FeatherBB/view/help.php | 141 +++ style/FeatherBB/view/index.html | 1 + style/FeatherBB/view/index.php | 111 +++ style/FeatherBB/view/install.php | 222 +++++ style/FeatherBB/view/login/form.php | 42 + style/FeatherBB/view/login/index.html | 1 + .../view/login/password_forgotten.php | 57 ++ style/FeatherBB/view/message.php | 25 + style/FeatherBB/view/misc/email.php | 37 + style/FeatherBB/view/misc/index.html | 1 + style/FeatherBB/view/misc/report.php | 44 + style/FeatherBB/view/misc/rules.php | 23 + .../FeatherBB/view/moderate/delete_posts.php | 33 + .../FeatherBB/view/moderate/delete_topics.php | 34 + style/FeatherBB/view/moderate/index.html | 1 + .../FeatherBB/view/moderate/merge_topics.php | 36 + .../view/moderate/moderator_forum.php | 101 +++ style/FeatherBB/view/moderate/move_topics.php | 44 + style/FeatherBB/view/moderate/posts_view.php | 95 ++ style/FeatherBB/view/moderate/split_posts.php | 40 + style/FeatherBB/view/post.php | 213 +++++ style/FeatherBB/view/profile/change_mail.php | 35 + style/FeatherBB/view/profile/change_pass.php | 39 + style/FeatherBB/view/profile/delete_user.php | 36 + style/FeatherBB/view/profile/index.html | 1 + style/FeatherBB/view/profile/menu.php | 55 ++ .../FeatherBB/view/profile/section_admin.php | 87 ++ .../view/profile/section_display.php | 101 +++ .../view/profile/section_essentials.php | 258 ++++++ .../view/profile/section_messaging.php | 39 + .../view/profile/section_personal.php | 39 + .../view/profile/section_personality.php | 56 ++ .../view/profile/section_privacy.php | 62 ++ .../FeatherBB/view/profile/upload_avatar.php | 35 + style/FeatherBB/view/profile/view_profile.php | 66 ++ style/FeatherBB/view/register/email.php | 39 + style/FeatherBB/view/register/form.php | 134 +++ style/FeatherBB/view/register/index.html | 1 + style/FeatherBB/view/register/rules.php | 32 + style/FeatherBB/view/search/footer.php | 40 + style/FeatherBB/view/search/form.php | 79 ++ style/FeatherBB/view/search/header.php | 48 + style/FeatherBB/view/search/index.html | 1 + style/FeatherBB/view/search/posts.php | 56 ++ style/FeatherBB/view/search/topics.php | 29 + style/FeatherBB/view/userlist.php | 115 +++ style/FeatherBB/view/viewforum.php | 100 +++ style/FeatherBB/view/viewtopic.php | 204 +++++ 89 files changed, 7277 insertions(+) create mode 100644 style/FeatherBB/view/admin/bans/add_ban.php create mode 100644 style/FeatherBB/view/admin/bans/admin_bans.php create mode 100644 style/FeatherBB/view/admin/bans/index.html create mode 100644 style/FeatherBB/view/admin/bans/search_ban.php create mode 100644 style/FeatherBB/view/admin/categories.php create mode 100644 style/FeatherBB/view/admin/censoring.php create mode 100644 style/FeatherBB/view/admin/forums/admin_forums.php create mode 100644 style/FeatherBB/view/admin/forums/delete_forum.php create mode 100644 style/FeatherBB/view/admin/forums/index.html create mode 100644 style/FeatherBB/view/admin/forums/permissions.php create mode 100644 style/FeatherBB/view/admin/groups/add_edit_group.php create mode 100644 style/FeatherBB/view/admin/groups/admin_groups.php create mode 100644 style/FeatherBB/view/admin/groups/confirm_delete.php create mode 100644 style/FeatherBB/view/admin/groups/delete_group.php create mode 100644 style/FeatherBB/view/admin/index.html create mode 100644 style/FeatherBB/view/admin/index.php create mode 100644 style/FeatherBB/view/admin/loader.php create mode 100644 style/FeatherBB/view/admin/maintenance/admin_maintenance.php create mode 100644 style/FeatherBB/view/admin/maintenance/index.html create mode 100644 style/FeatherBB/view/admin/maintenance/prune.php create mode 100644 style/FeatherBB/view/admin/maintenance/rebuild.php create mode 100644 style/FeatherBB/view/admin/menu.php create mode 100644 style/FeatherBB/view/admin/options.php create mode 100644 style/FeatherBB/view/admin/parser.php create mode 100644 style/FeatherBB/view/admin/permissions.php create mode 100644 style/FeatherBB/view/admin/reports.php create mode 100644 style/FeatherBB/view/admin/statistics.php create mode 100644 style/FeatherBB/view/admin/users/admin_users.php create mode 100644 style/FeatherBB/view/admin/users/ban_users.php create mode 100644 style/FeatherBB/view/admin/users/delete_users.php create mode 100644 style/FeatherBB/view/admin/users/find_users.php create mode 100644 style/FeatherBB/view/admin/users/move_users.php create mode 100644 style/FeatherBB/view/admin/users/search_ip.php create mode 100644 style/FeatherBB/view/admin/users/show_users.php create mode 100644 style/FeatherBB/view/delete.php create mode 100644 style/FeatherBB/view/edit.php create mode 100644 style/FeatherBB/view/footer.php create mode 100644 style/FeatherBB/view/header.php create mode 100644 style/FeatherBB/view/help.php create mode 100644 style/FeatherBB/view/index.html create mode 100644 style/FeatherBB/view/index.php create mode 100644 style/FeatherBB/view/install.php create mode 100644 style/FeatherBB/view/login/form.php create mode 100644 style/FeatherBB/view/login/index.html create mode 100644 style/FeatherBB/view/login/password_forgotten.php create mode 100644 style/FeatherBB/view/message.php create mode 100644 style/FeatherBB/view/misc/email.php create mode 100644 style/FeatherBB/view/misc/index.html create mode 100644 style/FeatherBB/view/misc/report.php create mode 100644 style/FeatherBB/view/misc/rules.php create mode 100644 style/FeatherBB/view/moderate/delete_posts.php create mode 100644 style/FeatherBB/view/moderate/delete_topics.php create mode 100644 style/FeatherBB/view/moderate/index.html create mode 100644 style/FeatherBB/view/moderate/merge_topics.php create mode 100644 style/FeatherBB/view/moderate/moderator_forum.php create mode 100644 style/FeatherBB/view/moderate/move_topics.php create mode 100644 style/FeatherBB/view/moderate/posts_view.php create mode 100644 style/FeatherBB/view/moderate/split_posts.php create mode 100644 style/FeatherBB/view/post.php create mode 100644 style/FeatherBB/view/profile/change_mail.php create mode 100644 style/FeatherBB/view/profile/change_pass.php create mode 100644 style/FeatherBB/view/profile/delete_user.php create mode 100644 style/FeatherBB/view/profile/index.html create mode 100644 style/FeatherBB/view/profile/menu.php create mode 100644 style/FeatherBB/view/profile/section_admin.php create mode 100644 style/FeatherBB/view/profile/section_display.php create mode 100644 style/FeatherBB/view/profile/section_essentials.php create mode 100644 style/FeatherBB/view/profile/section_messaging.php create mode 100644 style/FeatherBB/view/profile/section_personal.php create mode 100644 style/FeatherBB/view/profile/section_personality.php create mode 100644 style/FeatherBB/view/profile/section_privacy.php create mode 100644 style/FeatherBB/view/profile/upload_avatar.php create mode 100644 style/FeatherBB/view/profile/view_profile.php create mode 100644 style/FeatherBB/view/register/email.php create mode 100644 style/FeatherBB/view/register/form.php create mode 100644 style/FeatherBB/view/register/index.html create mode 100644 style/FeatherBB/view/register/rules.php create mode 100644 style/FeatherBB/view/search/footer.php create mode 100644 style/FeatherBB/view/search/form.php create mode 100644 style/FeatherBB/view/search/header.php create mode 100644 style/FeatherBB/view/search/index.html create mode 100644 style/FeatherBB/view/search/posts.php create mode 100644 style/FeatherBB/view/search/topics.php create mode 100644 style/FeatherBB/view/userlist.php create mode 100644 style/FeatherBB/view/viewforum.php create mode 100644 style/FeatherBB/view/viewtopic.php diff --git a/.htaccess b/.htaccess index 51c6beec..33353df3 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,4 @@ RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] +Options -Indexes diff --git a/.htaccess.dist b/.htaccess.dist index 51c6beec..33353df3 100644 --- a/.htaccess.dist +++ b/.htaccess.dist @@ -1,3 +1,4 @@ RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] +Options -Indexes diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php index 20f124e9..fec39fa0 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -291,6 +291,7 @@ public function call() // Configure Slim $this->app->config('templates.path', $this->app->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); + var_dump($this->app->view->getTemplatePathname('header.php')); $this->next->call(); } } diff --git a/style/FeatherBB/view/admin/bans/add_ban.php b/style/FeatherBB/view/admin/bans/add_ban.php new file mode 100644 index 00000000..8170a2a9 --- /dev/null +++ b/style/FeatherBB/view/admin/bans/add_ban.php @@ -0,0 +1,96 @@ + + +
        +

        +
        +
        +
        + + + + + +
        + +
        + + + + + + + + + + + + + +
        + + +
        + + '.__('here').''); + } ?> +
        + + +
        +

        +
        +
        +
        +
        +
        + +
        + + + + + + + + + +
        + + +
        + + +
        +
        +
        +
        +

        +
        +
        +
        +
        +
        \ No newline at end of file diff --git a/style/FeatherBB/view/admin/bans/admin_bans.php b/style/FeatherBB/view/admin/bans/admin_bans.php new file mode 100644 index 00000000..3d714e7f --- /dev/null +++ b/style/FeatherBB/view/admin/bans/admin_bans.php @@ -0,0 +1,102 @@ + + +
        +

        +
        +
        + +
        +
        + +
        + + + + + +
        + + +
        +
        +
        +
        +
        +
        + +

        +
        +
        + +

        +
        +
        + +
        +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        +
        + +     + +
        +
        +
        +
        +

        +
        +
        +
        +
        +
        \ No newline at end of file diff --git a/style/FeatherBB/view/admin/bans/index.html b/style/FeatherBB/view/admin/bans/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/admin/bans/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/admin/bans/search_ban.php b/style/FeatherBB/view/admin/bans/search_ban.php new file mode 100644 index 00000000..0d057182 --- /dev/null +++ b/style/FeatherBB/view/admin/bans/search_ban.php @@ -0,0 +1,87 @@ + + +
        +
        +
          +
        • +
        • » 
        • +
        • » 
        • +
        +
        + +
        +
        +
        +
        + + +
        +

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + +'."\n"; + } + +?> + +
        '.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>'.__('Edit').' | '.__('Remove').'' ?>
        '.__('No match').'
        +
        +
        +
        + +
        +
        +
        + +
        +
          +
        • +
        • » 
        • +
        • » 
        • +
        +
        +
        +
        \ No newline at end of file diff --git a/style/FeatherBB/view/admin/categories.php b/style/FeatherBB/view/admin/categories.php new file mode 100644 index 00000000..c8786528 --- /dev/null +++ b/style/FeatherBB/view/admin/categories.php @@ -0,0 +1,111 @@ + +
        +

        +
        +
        +
        +
        + +
        + + + + + +
        + + + '.__('Forums').'') ?> +
        +
        +
        +
        +
        +
        + +

        +
        +
        + +
        +
        + +
        + + + + + +
        + + +
        +
        +
        +
        +
        +
        + + +

        +
        +
        + +
        +
        + +
        + + + + + + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        \ No newline at end of file diff --git a/style/FeatherBB/view/admin/censoring.php b/style/FeatherBB/view/admin/censoring.php new file mode 100644 index 00000000..71c253f7 --- /dev/null +++ b/style/FeatherBB/view/admin/censoring.php @@ -0,0 +1,84 @@ + + +
        +

        +
        +
        + +
        +
        + +
        +

        '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

        + + + + + + + + + + + + + + + +
        +
        +
        +
        +
        +
        + +
        + + + + + + + + + + +'."\n"; + } + + ?> + +
         
        +'.__('No words in list').'

        '."\n"; +} + +?> +
        +
        +
        +
        +
        +
        +
        +
        \ No newline at end of file diff --git a/style/FeatherBB/view/admin/forums/admin_forums.php b/style/FeatherBB/view/admin/forums/admin_forums.php new file mode 100644 index 00000000..e966e6f5 --- /dev/null +++ b/style/FeatherBB/view/admin/forums/admin_forums.php @@ -0,0 +1,114 @@ + + +
        +

        +
        +
        + + +
        +
        + +
        + + + + + +
        + + +
        +
        +
        +
        + +
        +
        + +
        +

        +
        +
        +
        + +
        +
        + +

        +
        +
        + +

        + $cat_data) { + ?> +
        +
        + +
        + + + + + + + + + + + + + + + + + +
        |
        +
        +
        +
        + +

        +
        +
        +
        +
        +
        + diff --git a/style/FeatherBB/view/admin/forums/delete_forum.php b/style/FeatherBB/view/admin/forums/delete_forum.php new file mode 100644 index 00000000..6a5263ba --- /dev/null +++ b/style/FeatherBB/view/admin/forums/delete_forum.php @@ -0,0 +1,35 @@ + + +
        +

        +
        +
        + +
        +
        + +
        +

        +

        +
        +
        +
        +

        +
        +
        +
        +
        +
        \ No newline at end of file diff --git a/style/FeatherBB/view/admin/forums/index.html b/style/FeatherBB/view/admin/forums/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/admin/forums/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/admin/forums/permissions.php b/style/FeatherBB/view/admin/forums/permissions.php new file mode 100644 index 00000000..df092f46 --- /dev/null +++ b/style/FeatherBB/view/admin/forums/permissions.php @@ -0,0 +1,137 @@ + + +
        +

        +
        +
        + +

        +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + +
        + +
        + +
        '; ?>
        +
        +
        +
        +
        +
        + +
        +

        '.__('User groups').'') ?>

        + + + + + + + + + + + + + + > + + tabindex="" /> + + > + + tabindex="" /> + + > + + tabindex="" /> + + + + +
         
        +
        +
        +
        +
        +

        +
        +
        +
        +
        +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/groups/add_edit_group.php b/style/FeatherBB/view/admin/groups/add_edit_group.php new file mode 100644 index 00000000..bc2bc244 --- /dev/null +++ b/style/FeatherBB/view/admin/groups/add_edit_group.php @@ -0,0 +1,311 @@ + + +
      +

      +
      +
      + +

      +
      + + + +
      + +
      +

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + +
      + + +
      + + +
      + + +
      +

      +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/groups/admin_groups.php b/style/FeatherBB/view/admin/groups/admin_groups.php new file mode 100644 index 00000000..643b4883 --- /dev/null +++ b/style/FeatherBB/view/admin/groups/admin_groups.php @@ -0,0 +1,110 @@ + + +
      +

      +
      +
      +
      +
      + + +
      + + + + + +
      + + +
      +
      +
      +
      +
      +
      +
      +
      + + +
      + + + + + +
      + + +
      +
      +
      +
      +
      +
      + +

      +
      +
      +
      +
      + +
      +

      + +'."\n"; +} + +?> +
      '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
      +
      +
      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/groups/confirm_delete.php b/style/FeatherBB/view/admin/groups/confirm_delete.php new file mode 100644 index 00000000..ca595ab3 --- /dev/null +++ b/style/FeatherBB/view/admin/groups/confirm_delete.php @@ -0,0 +1,36 @@ + + +
      +

      +
      +
      + +
      + +
      + +
      +

      +

      +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/groups/delete_group.php b/style/FeatherBB/view/admin/groups/delete_group.php new file mode 100644 index 00000000..693baab1 --- /dev/null +++ b/style/FeatherBB/view/admin/groups/delete_group.php @@ -0,0 +1,39 @@ + + +
      +

      +
      +
      + +
      +
      + +
      +

      + +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/index.html b/style/FeatherBB/view/admin/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/admin/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/admin/index.php b/style/FeatherBB/view/admin/index.php new file mode 100644 index 00000000..dc0dcf8c --- /dev/null +++ b/style/FeatherBB/view/admin/index.php @@ -0,0 +1,63 @@ + + +
      +

      +
      +
      +

      +
        +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      +
      +
      + + +

      +
      +

      '.__('Delete install file').'') ?>

      +
      + + +

      +
      +
      +
      +
      +
      + '.__('Check for upgrade').'') ?> +
      +
      +
      + +
      +
      +
      + - +
      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/loader.php b/style/FeatherBB/view/admin/loader.php new file mode 100644 index 00000000..6a61c22f --- /dev/null +++ b/style/FeatherBB/view/admin/loader.php @@ -0,0 +1,17 @@ + + +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/maintenance/admin_maintenance.php b/style/FeatherBB/view/admin/maintenance/admin_maintenance.php new file mode 100644 index 00000000..068b914b --- /dev/null +++ b/style/FeatherBB/view/admin/maintenance/admin_maintenance.php @@ -0,0 +1,99 @@ + + +
      +

      +
      +
      +
      + +
      + +
      +

      '.__('Maintenance mode').'') ?>

      + + + + + + + + + + + + + +
      + + +
      + + +
      + +
      +

      +
      +
      +
      +
      +
      + +
      + +
      + +
      + +
      + + + + + + + + + + + + + +
      + + +
      + + + +
      + + +
      +

      '.__('Maintenance mode').'') ?>

      +
      +
      +
      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/maintenance/index.html b/style/FeatherBB/view/admin/maintenance/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/admin/maintenance/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/admin/maintenance/prune.php b/style/FeatherBB/view/admin/maintenance/prune.php new file mode 100644 index 00000000..9e3b0d2b --- /dev/null +++ b/style/FeatherBB/view/admin/maintenance/prune.php @@ -0,0 +1,39 @@ + + +
      +

      +
      +
      + +
      + + + + +
      + +
      +

      +

      +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/maintenance/rebuild.php b/style/FeatherBB/view/admin/maintenance/rebuild.php new file mode 100644 index 00000000..5bd6ffc0 --- /dev/null +++ b/style/FeatherBB/view/admin/maintenance/rebuild.php @@ -0,0 +1,38 @@ + + + + + + + +<?php echo generate_page_title($page_title) ?> + + + + +

      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/menu.php b/style/FeatherBB/view/admin/menu.php new file mode 100644 index 00000000..b33c2727 --- /dev/null +++ b/style/FeatherBB/view/admin/menu.php @@ -0,0 +1,112 @@ + +
      +
      +

      +
      +
      +
        + > + > +user->g_mod_ban_users == '1'): ?> > + > +
      +
      +
      + +

      +
      +
      +
        + > + > + > + > + > + > + > + > +
      +
      +
      + +

      +
      +
      + +
      +
      + +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/options.php b/style/FeatherBB/view/admin/options.php new file mode 100644 index 00000000..faa8e34c --- /dev/null +++ b/style/FeatherBB/view/admin/options.php @@ -0,0 +1,849 @@ + + +
      +

      +
      +
      + +

      +
      + +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + +
      + + +
      + + +
      + + +
      + + + +
      + + +
      + + +
      +
      +
      +
      +user->timezone + $feather->user->dst) * 3600; + $timestamp = time() + $diff; + +?> +
      +
      + +
      + + + + + + + + + + + + + + + + + + + + + +
      + + '.__('PHP manual').'') ?> +
      + + '.__('PHP manual').'') ?> +
      + + +
      + + +
      + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + +
      + + +
      + + +
      + + +
      + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + +
      + + + +
      + + + '.__('Censoring').'') ?> +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + +
      + + + + +
      + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + +
      + + + + +
      + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + + + + + + + + + + + + + +
      + + + +
      + + +
      + + +
      + + +
      + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + +
      + + +
      + + + +
      + + + +
      + + +
      + + +
      + + + + + +
      + + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + +
      + + + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + +
      + + + +
      + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + +
      + + + +
      + + +
      +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/parser.php b/style/FeatherBB/view/admin/parser.php new file mode 100644 index 00000000..aec1f767 --- /dev/null +++ b/style/FeatherBB/view/admin/parser.php @@ -0,0 +1,299 @@ + + +
      +

      +
      +
      + +

      + + +

      +
      + +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + /> /> + + +
      + /> /> + + +
      + /> /> + + +
      + /> /> + + +
      + /> + /> +
      + /> +
      + X:Width + + Y:Height + + +
      + X:Width + + Y:Height +
      + + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + + $value) { + $i++; + $oldfile = $value['file']; + ?> + + + + + + + + + + + + + + + + + + + + + +
      :)
      + + + +

      New smiley text
      +
      +
      +
      +
      +
      +
      + + + +
      +
      + +
      + + + + + + + + + + + $tagdata) { + if ($tagname == '_ROOT_') { + continue; + } // Skip last pseudo-tag + $title = isset($lang_admin_parser['tag_summary'][$tagname]) ? + $lang_admin_parser['tag_summary'][$tagname] : ''; + ?> + + + + + + + + +
      + /> /> + + /> /> + + /> +
      +
      +
      +
      + + +

      + + +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/permissions.php b/style/FeatherBB/view/admin/permissions.php new file mode 100644 index 00000000..a70328ae --- /dev/null +++ b/style/FeatherBB/view/admin/permissions.php @@ -0,0 +1,189 @@ + + +
      +

      +
      +
      + +

      +
      + +
      + +
      + + + + + + + + + + + + + + + + + + + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      + + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + + + + + + + + + + + + + +
      + + + +
      + + + +
      + + + +
      + + +
      + + +
      +
      +
      +
      +
      +
      + +
      + + + + + + + + + +
      + + + +
      + + + +
      +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/reports.php b/style/FeatherBB/view/admin/reports.php new file mode 100644 index 00000000..63251681 --- /dev/null +++ b/style/FeatherBB/view/admin/reports.php @@ -0,0 +1,116 @@ + + +
      +

      +
      +
      + + +
      +
      + +
      + + + + + + + + + +
      '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), + $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
      ', feather_escape($report['message'])) ?>
      +
      +
      +
      + +
      +
      + +
      +

      +
      +
      +
      + +
      +
      +
      + +
      +

      +
      +
      + +
      +
      + '.feather_escape($report['zapped_by']).'' : __('NA')) ?> +
      + + + + + + + + + +
      '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), + $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
      ', feather_escape($report['message'])) ?>
      +
      +
      +
      + +
      +
      + +
      +

      +
      +
      +
      + +
      +
      +
      +
      +
      diff --git a/style/FeatherBB/view/admin/statistics.php b/style/FeatherBB/view/admin/statistics.php new file mode 100644 index 00000000..5306b027 --- /dev/null +++ b/style/FeatherBB/view/admin/statistics.php @@ -0,0 +1,42 @@ + + +
      +

      +
      +
      +
      +
      +
      + +
      +user->g_id == FEATHER_ADMIN): ?>
      +
      +
      + '.__('Show info').'') ?>
      + +
      +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/admin_users.php b/style/FeatherBB/view/admin/users/admin_users.php new file mode 100644 index 00000000..27e99a16 --- /dev/null +++ b/style/FeatherBB/view/admin/users/admin_users.php @@ -0,0 +1,172 @@ + + +
      +

      +
      +
      +

      +
      +
      + +
      +

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      +
      +
      +
      +
      +
      +     +
      + +
      +
      +
      +
      +

      +
      +
      + +

      +
      +
      +
      +
      + +
      + + + + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/ban_users.php b/style/FeatherBB/view/admin/users/ban_users.php new file mode 100644 index 00000000..e929c043 --- /dev/null +++ b/style/FeatherBB/view/admin/users/ban_users.php @@ -0,0 +1,58 @@ + + +
      +

      +
      +
      + + +
      +
      + +
      + + + + + + + + + + + + + +
      + + +
      + + +
      + + + +
      +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/delete_users.php b/style/FeatherBB/view/admin/users/delete_users.php new file mode 100644 index 00000000..a82c22ec --- /dev/null +++ b/style/FeatherBB/view/admin/users/delete_users.php @@ -0,0 +1,39 @@ + + +
      +

      +
      +
      + + +
      +
      + +
      +

      +
      + +
      +

      +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/find_users.php b/style/FeatherBB/view/admin/users/find_users.php new file mode 100644 index 00000000..d426177d --- /dev/null +++ b/style/FeatherBB/view/admin/users/find_users.php @@ -0,0 +1,100 @@ + + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      + +
      +
      +
      +
      + + +
      + +
      +

      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + +'."\n"; + } + + ?> + +
      '.feather_escape($user['username']).'' ?>'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
      '.__('No match').'
      +
      +
      +
      + +
      +
      +
      + +

      + +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      +
      +
      +
      diff --git a/style/FeatherBB/view/admin/users/move_users.php b/style/FeatherBB/view/admin/users/move_users.php new file mode 100644 index 00000000..d43303e8 --- /dev/null +++ b/style/FeatherBB/view/admin/users/move_users.php @@ -0,0 +1,47 @@ + + +
      +

      +
      +
      + + +
      +
      + +
      + + + + + +
      + + +
      +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/search_ip.php b/style/FeatherBB/view/admin/users/search_ip.php new file mode 100644 index 00000000..a17e7ac5 --- /dev/null +++ b/style/FeatherBB/view/admin/users/search_ip.php @@ -0,0 +1,79 @@ + + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      + +
      +
      +
      +
      + +
      +

      +
      +
      + + + + + + + + + + + + + + + + + +'."\n"; + endif; + + ?> + +
      '.__('Results no posts found').'
      +
      +
      +
      + +
      +
      +
      + +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/admin/users/show_users.php b/style/FeatherBB/view/admin/users/show_users.php new file mode 100644 index 00000000..4ab008c7 --- /dev/null +++ b/style/FeatherBB/view/admin/users/show_users.php @@ -0,0 +1,100 @@ + + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      + +
      +
      +
      +
      + +
      +

      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +'."\n"; + } + + ?> + +
      '.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?>'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
          
      '.__('Results no IP found').'
      +
      +
      +
      + +
      +
      +
      + +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/delete.php b/style/FeatherBB/view/delete.php new file mode 100644 index 00000000..8a2d6959 --- /dev/null +++ b/style/FeatherBB/view/delete.php @@ -0,0 +1,64 @@ + + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      • » 
      • +
      +
      +
      + +
      +

      +
      +
      + +
      +
      +

      '.feather_escape($cur_post['poster']).'', format_time($cur_post['posted'])) ?>

      +

      '.__('Topic warning').'' : ''.__('Warning').'' ?>

      +
      +
      +

      +
      +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/edit.php b/style/FeatherBB/view/edit.php new file mode 100644 index 00000000..48a692e8 --- /dev/null +++ b/style/FeatherBB/view/edit.php @@ -0,0 +1,119 @@ + + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      • » 
      • +
      +
      +
      + + +
      +

      +
      +
      +

      +
        +'.$cur_error.''."\n"; + } +?> +
      +
      +
      +
      +request->post('preview')): +?> +
      +

      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      + + + + +
      +

      +
      +
      + +
      +
      + + +
      + + + +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      + +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php new file mode 100644 index 00000000..470d5c6b --- /dev/null +++ b/style/FeatherBB/view/footer.php @@ -0,0 +1,147 @@ + +
      + +
      +

      +
      +'."\n"; + + if ($footer_style == 'viewforum') { + echo "\t\t\t".'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Mod controls').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Moderate forum').'
      '."\n"; + echo "\t\t\t".'
      '."\n"; + } elseif ($footer_style == 'viewtopic') { + if (isset($pid)) { + $parameter = 'param/'.$pid.'/'; + } elseif (isset($p) && $p != 1) { + $parameter = 'param/'.$p.'/'; + } else { + $parameter = ''; + } + + + echo "\t\t\t".'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Mod controls').'
      '."\n"; + // TODO: all + //echo "\t\t\t\t".'
      '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Moderate topic').'
      '."\n"; + echo "\t\t\t\t".'
      '.__('Move topic').'
      '."\n"; + + if ($cur_topic['closed'] == '1') { + echo "\t\t\t\t".'
      '.__('Open topic').'
      '."\n"; + } else { + echo "\t\t\t\t".'
      '.__('Close topic').'
      '."\n"; + } + + if ($cur_topic['sticky'] == '1') { + echo "\t\t\t\t".'
      '.__('Unstick topic').'
      '."\n"; + } else { + echo "\t\t\t\t".'
      '.__('Stick topic').'
      '."\n"; + } + + echo "\t\t\t".'
      '."\n"; + } + + echo "\t\t\t".'
      '."\n\t\t".'
      '."\n"; +} + +?> +
      + + +
      +
      +
      + + +
      +
      +
      + + +
      +'.__('RSS active topics feed').'

      '."\n"; + } elseif ($feather_config['o_feed_type'] == '2') { + echo "\t\t\t\t".''."\n"; + } +} elseif ($footer_style == 'viewforum') { + if ($feather_config['o_feed_type'] == '1') { + echo "\t\t\t\t".''."\n"; + } elseif ($feather_config['o_feed_type'] == '2') { + echo "\t\t\t\t".''."\n"; + } +} elseif ($footer_style == 'viewtopic') { + if ($feather_config['o_feed_type'] == '1') { + echo "\t\t\t\t".''."\n"; + } elseif ($feather_config['o_feed_type'] == '2') { + echo "\t\t\t\t".''."\n"; + } +} + +?> +

      FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

      +
      +
      +
      +
      +
      +forum_env['FEATHER_SHOW_INFO']) { + echo '

      [ '; + + // Calculate script generation time + $time_diff = sprintf('%.3f', get_microtime() - $feather_start); + echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); + + if (function_exists('memory_get_usage')) { + echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); + + if (function_exists('memory_get_peak_usage')) { + echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); + } + } + + echo ' ]

      '."\n"; +} +// Display executed queries (if enabled) +if ($feather->forum_env['FEATHER_SHOW_QUERIES']) { + display_saved_queries(); +} +?> + + + + + + + diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php new file mode 100644 index 00000000..9da121c2 --- /dev/null +++ b/style/FeatherBB/view/header.php @@ -0,0 +1,131 @@ + + + + + + + +<?php echo generate_page_title($page_title, $p) ?> + + + + + + +> + +
      + + + +
      +
      +

      + +

      +
      +
      +

      +
      + +
      +
      +
      + user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?> +
      +

      +
      +
      +
      +
      +
      +
      + + + +
      +

      ×

      +
      +
      +

      +
      +
      +
      + + +
      + +
      + +
      +
      diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php new file mode 100644 index 00000000..b5477db4 --- /dev/null +++ b/style/FeatherBB/view/help.php @@ -0,0 +1,141 @@ + + +

      +
      +
      +

      +

      +
      +
      +

      +
      +
      +

      +

      [b][/b]

      +

      [u][/u]

      +

      [i][/i]

      +

      [s][/s]

      +

      [del][/del]

      +

      [ins][/ins]

      +

      [em][/em]

      +

      [color=#FF0000][/color]

      +

      [color=blue][/color]

      +

      [h][/h]

      +
      +
      +

      +
      +
      +

      +

      [url=][/url]

      +

      [url][/url]

      +

      [url=/help/][/url]

      +

      [email]myname@example.com[/email] myname@example.com

      +

      [email=myname@example.com][/email]

      +

      [topic=1][/topic]

      +

      [topic]1[/topic]

      +

      [post=1][/post]

      +

      [post]1[/post]

      +

      [forum=1][/forum]

      +

      [forum]1[/forum]

      +

      [user=2][/user]

      +

      [user]2[/user]

      +
      +
      +

      +

      [img=]/img/test.png[/img] <?php _e('FluxBB bbcode test') ?>

      +
      +
      +

      +
      +
      +

      +

      [quote=James][/quote]

      +

      +
      +
      James

      +
      +

      +

      [quote][/quote]

      +

      +
      +

      +
      +

      +
      +
      +

      +
      +
      +

      +

      [code][/code]

      +

      +
      +
      +
      +
      +
      +

      +
      +
      +

      +

      [list][*][/*][*][/*][*][/*][/list] +

      +
      +
      +
      +

      [list=1][*][/*][*][/*][*][/*][/list] +

      +
      +
      +
      +

      [list=a][*][/*][*][/*][*][/*][/list] +

      +
      +
      +
      +
      +
      +

      +
      +
      +

      +

      [b][u][/u][/b]

      +
      +
      +

      +
      +
      +

      + $smiley_data) { + $smiley_groups[$smiley_data['file']][] = $smiley_text; +} + +foreach ($smiley_groups as $smiley_img => $smiley_texts) { + echo "\t\t

      ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .__('produces'). ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

      '."\n"; +} + +?> +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/index.html b/style/FeatherBB/view/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/index.php b/style/FeatherBB/view/index.php new file mode 100644 index 00000000..3142e1bd --- /dev/null +++ b/style/FeatherBB/view/index.php @@ -0,0 +1,111 @@ + +

      +cid != $cur_cat) : + if ($cur_cat != 0) : + ?> + + +
      +
      +
      + +
      +

      cat_name) ?>

      +
      +
      + + + + + + + + + + + cid; + endif; + ?> + + + + + + + 0) : + ?> + +
      +
      forum_count_formatted) ?>
      +
      +
      + forum_field."\n".$forum->moderators_formatted ?> +
      +
      +
      num_topics_formatted) ?>num_posts_formatted) ?>last_post_formatted ?>
      +
      +
      +
      + +
      +
      + +
      +
      + +
      +

      +
      +
      +
      +
      +
      '.forum_number_format($stats['total_users']).'') ?>
      +
      '.forum_number_format($stats['total_topics']).'') ?>
      +
      '.forum_number_format($stats['total_posts']).'') ?>
      +
      +
      +
      +
      + +
      '.forum_number_format($online['num_users']).'') ?>
      +
      '.forum_number_format($online['num_guests']).'') ?>
      + +
      + 0) { + echo "\t\t\t".'
      '."\n\t\t\t\t".'
      '.__('Online').'
      '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
      '."\n"; + } else { + echo "\t\t\t".'
      '."\n"; + } + endif; + ?> +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/install.php b/style/FeatherBB/view/install.php new file mode 100644 index 00000000..c146b1b7 --- /dev/null +++ b/style/FeatherBB/view/install.php @@ -0,0 +1,222 @@ + + + + + + <?php _e('FeatherBB Installation') ?> + + + + +
      +
      +
      + +
      +
      +
      +
      +

      +

      +
      +
      +
      +
      + +
      +
      + 1): ?> +
      +

      +
      +
      + +
      +
      + +
      +

      + +
      +
      +
      +

      +
      +
      +
      + + +
      +

      +
      +
      + +
      +
      +

      +
        + '.$error.''."\n"; + } + ?> +
      +
      +
      + + +
      +
      +

      +

      +
      +
      + +
      +

      + + +
      +
      +
      + +
      +
      + +
      +

      + + +
      +
      +
      + +
      +
      + +
      +

      + + +
      +
      +
      + +
      +
      + +
      +

      + + + + +
      +
      +
      +
      + +
      +
      + +
      +

      + + +
      +
      +
      + +
      +
      +

      +

      +
      +
      + +
      +

      + + + + + + + + + +
      +
      +
      + +
      +
      +

      +

      +
      +
      + +
      + + + + + + + + +
      +
      +
      + +

      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/style/FeatherBB/view/login/form.php b/style/FeatherBB/view/login/form.php new file mode 100644 index 00000000..13d1744b --- /dev/null +++ b/style/FeatherBB/view/login/form.php @@ -0,0 +1,42 @@ + +
      +

      +
      +
      + +
      +
      + +
      + + + + + +
      + +
      + +

      +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/login/index.html b/style/FeatherBB/view/login/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/login/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/FeatherBB/view/login/password_forgotten.php new file mode 100644 index 00000000..41c0a121 --- /dev/null +++ b/style/FeatherBB/view/login/password_forgotten.php @@ -0,0 +1,57 @@ + +
      +

      +
      +
      +

      +
        +'.$cur_error.''."\n"; + } + ?> +
      +
      +
      +
      + + +
      +

      +
      +
      + +
      +
      + +
      + + +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/message.php b/style/FeatherBB/view/message.php new file mode 100644 index 00000000..740b040e --- /dev/null +++ b/style/FeatherBB/view/message.php @@ -0,0 +1,25 @@ + +
      +

      +
      +
      +

      +

      +
      +
      +
      diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php new file mode 100644 index 00000000..eb44dafb --- /dev/null +++ b/style/FeatherBB/view/misc/email.php @@ -0,0 +1,37 @@ + +
      +

      +
      +
      + +
      +
      + +
      + + + +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/misc/index.html b/style/FeatherBB/view/misc/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/misc/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/misc/report.php b/style/FeatherBB/view/misc/report.php new file mode 100644 index 00000000..252042c7 --- /dev/null +++ b/style/FeatherBB/view/misc/report.php @@ -0,0 +1,44 @@ + + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      • » 
      • +
      +
      +
      + +
      +

      +
      +
      + +
      +
      + +
      + + +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/misc/rules.php b/style/FeatherBB/view/misc/rules.php new file mode 100644 index 00000000..366880ee --- /dev/null +++ b/style/FeatherBB/view/misc/rules.php @@ -0,0 +1,23 @@ + +
      +

      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_posts.php b/style/FeatherBB/view/moderate/delete_posts.php new file mode 100644 index 00000000..00b80920 --- /dev/null +++ b/style/FeatherBB/view/moderate/delete_posts.php @@ -0,0 +1,33 @@ + +
      +

      +
      +
      + +
      +
      + +
      + +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/delete_topics.php b/style/FeatherBB/view/moderate/delete_topics.php new file mode 100644 index 00000000..d0ab1eed --- /dev/null +++ b/style/FeatherBB/view/moderate/delete_topics.php @@ -0,0 +1,34 @@ + + +
      +

      +
      +
      + + +
      +
      + +
      +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/index.html b/style/FeatherBB/view/moderate/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/moderate/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/moderate/merge_topics.php b/style/FeatherBB/view/moderate/merge_topics.php new file mode 100644 index 00000000..820cedee --- /dev/null +++ b/style/FeatherBB/view/moderate/merge_topics.php @@ -0,0 +1,36 @@ + + +
      +

      +
      +
      + + +
      +
      + +
      +
      + +
      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php new file mode 100644 index 00000000..35b67b41 --- /dev/null +++ b/style/FeatherBB/view/moderate/moderator_forum.php @@ -0,0 +1,101 @@ + + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      + +
      +
      +
      +
      + +
      + + +
      +

      +
      +
      + + + + + + + + + + + + + + + + + + + + + '."\n"; + endif; + ?> + +
      +
      +
      +
      + +
      +
      +
      '.__('Empty forum').'
      +
      +
      +
      + +
      +
      +
      + +

      /> /> /> /> />

      +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/move_topics.php b/style/FeatherBB/view/moderate/move_topics.php new file mode 100644 index 00000000..e72ae5cb --- /dev/null +++ b/style/FeatherBB/view/moderate/move_topics.php @@ -0,0 +1,44 @@ + + +
      +

      +
      +
      + +
      + +
      + +
      + +
      + +
      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/FeatherBB/view/moderate/posts_view.php new file mode 100644 index 00000000..482a1c49 --- /dev/null +++ b/style/FeatherBB/view/moderate/posts_view.php @@ -0,0 +1,95 @@ + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      • » 
      • +
      +
      + +
      +
      +
      +
      + +
      + + +
      +

      #

      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      +
      + + '.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

      '."\n"; +} + ?> +
      +
      +
      +
      +
      +
      +

      ' : '

      '.__('Cannot select first').'

      ' ?>
      +
      +
      +
      +
      + + +
      +
      +
      + +

      /> />

      +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      • » 
      • +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/moderate/split_posts.php b/style/FeatherBB/view/moderate/split_posts.php new file mode 100644 index 00000000..7c59b0b9 --- /dev/null +++ b/style/FeatherBB/view/moderate/split_posts.php @@ -0,0 +1,40 @@ + +
      +

      +
      +
      + +
      +
      + +
      + + + +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php new file mode 100644 index 00000000..f1d22d07 --- /dev/null +++ b/style/FeatherBB/view/post.php @@ -0,0 +1,213 @@ + + +
      +
      +
        +
      • +
      • » 
      • +request->post('req_subject')): ?>
      • » request->post('req_subject')) ?>
      • + +
      • » 
      • +
      • » 
      • +
      +
      +
      + + +
      +

      +
      +
      +

      +
        +'.$cur_error.''."\n"; + } + ?> +
      +
      +
      +
      + +request->post('preview')) { + require_once FEATHER_ROOT.'include/parser.php'; + $preview_message = parse_message($post['message'], $post['hide_smilies']); + + ?> +
      +

      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      + + + + + + +
      +

      +
      + +
      +
      + +
      + + +user->is_guest) { + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; + ?> + + +
      + + + + +
      +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      + user->is_guest) : ?> +
      +
      + +
      +

      + +
      +
      +
      + +

      + +
      +
      + + + +
      +

      + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      +
      + + +
      + diff --git a/style/FeatherBB/view/profile/change_mail.php b/style/FeatherBB/view/profile/change_mail.php new file mode 100644 index 00000000..f8d25e99 --- /dev/null +++ b/style/FeatherBB/view/profile/change_mail.php @@ -0,0 +1,35 @@ + +
      +

      +
      +
      + +
      +
      + +
      + + + +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/change_pass.php b/style/FeatherBB/view/profile/change_pass.php new file mode 100644 index 00000000..3f4285fb --- /dev/null +++ b/style/FeatherBB/view/profile/change_pass.php @@ -0,0 +1,39 @@ + +
      +

      +
      +
      + +
      + +
      + +
      +user->is_admmod): ?> + + +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/delete_user.php b/style/FeatherBB/view/profile/delete_user.php new file mode 100644 index 00000000..0fd42f52 --- /dev/null +++ b/style/FeatherBB/view/profile/delete_user.php @@ -0,0 +1,36 @@ + +
      +

      +
      +
      + +
      +
      + +
      +

      '.feather_escape($username).'.' ?>

      +
      + +
      +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/index.html b/style/FeatherBB/view/profile/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/profile/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/profile/menu.php b/style/FeatherBB/view/profile/menu.php new file mode 100644 index 00000000..4627f8db --- /dev/null +++ b/style/FeatherBB/view/profile/menu.php @@ -0,0 +1,55 @@ + +
      +
      +

      +
      +
      +
        + > + > + > + > + > + > +user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > +
      +
      +
      +
      diff --git a/style/FeatherBB/view/profile/section_admin.php b/style/FeatherBB/view/profile/section_admin.php new file mode 100644 index 00000000..18ba2f12 --- /dev/null +++ b/style/FeatherBB/view/profile/section_admin.php @@ -0,0 +1,87 @@ + +
      +

      +
      +
      + +
      + +
      +user->g_moderator == '1') { + ?> + +
      +

      +
      +
      +
      +user->id != $id) { + ?> + +
      + + +
      +
      +
      +
      +
      + + +
      + +
      +
      +
      + +
      +
      + +
      +

      + +
      +
      +
      +
      +
      +
      + + +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php new file mode 100644 index 00000000..5da0f4b4 --- /dev/null +++ b/style/FeatherBB/view/profile/section_display.php @@ -0,0 +1,101 @@ + +
      +

      +
      +
      + +
      +
      '."\n"; + } elseif (count($styles) > 1) { + ?> +
      +
      + +
      + +
      +
      +
      + + +
      +
      + +
      +

      +
      + + + + + + +
      +
      +
      +
      + +
      +
      + +
      + + +

      +
      +
      +
      +

      + +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_essentials.php b/style/FeatherBB/view/profile/section_essentials.php new file mode 100644 index 00000000..0050f89c --- /dev/null +++ b/style/FeatherBB/view/profile/section_essentials.php @@ -0,0 +1,258 @@ + +
      +

      +
      +
      + +
      +
      + +
      + + +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + +
      +

      + +
      + +
      + + + + 1) { + ?> + + +
      +
      +
      +
      +
      + +
      +

      user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

      +

      +

      + +user->is_admmod): ?> +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_messaging.php b/style/FeatherBB/view/profile/section_messaging.php new file mode 100644 index 00000000..d944ee43 --- /dev/null +++ b/style/FeatherBB/view/profile/section_messaging.php @@ -0,0 +1,39 @@ + +
      +

      +
      +
      + +
      +
      + +
      + + + + + + +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_personal.php b/style/FeatherBB/view/profile/section_personal.php new file mode 100644 index 00000000..a765e0aa --- /dev/null +++ b/style/FeatherBB/view/profile/section_personal.php @@ -0,0 +1,39 @@ + +
      +

      +
      +
      + +
      +
      + +
      + + + + +user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?> + +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/section_personality.php b/style/FeatherBB/view/profile/section_personality.php new file mode 100644 index 00000000..3624e5e6 --- /dev/null +++ b/style/FeatherBB/view/profile/section_personality.php @@ -0,0 +1,56 @@ + +
      +

      +
      +
      + +
      +
      +
      + +
      +
      +

      +

      +
      +
      +
      +
      +
      + +
      +

      +
      + +
      + + +
      +
      +
      +

      +
      +
      +
      +
      +
      diff --git a/style/FeatherBB/view/profile/section_privacy.php b/style/FeatherBB/view/profile/section_privacy.php new file mode 100644 index 00000000..36930415 --- /dev/null +++ b/style/FeatherBB/view/profile/section_privacy.php @@ -0,0 +1,62 @@ + +
      +

      +
      +
      + +
      +
      + +
      + +

      +
      + + + +
      +
      +
      +
      +
      +
      + +
      +
      + + + +
      +
      +
      +
      +

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/upload_avatar.php b/style/FeatherBB/view/profile/upload_avatar.php new file mode 100644 index 00000000..4131569c --- /dev/null +++ b/style/FeatherBB/view/profile/upload_avatar.php @@ -0,0 +1,35 @@ + +
      +

      +
      +
      + +
      +
      + +
      + + + +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/profile/view_profile.php b/style/FeatherBB/view/profile/view_profile.php new file mode 100644 index 00000000..d30181fd --- /dev/null +++ b/style/FeatherBB/view/profile/view_profile.php @@ -0,0 +1,66 @@ + +
      +

      +
      +
      +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/register/email.php b/style/FeatherBB/view/register/email.php new file mode 100644 index 00000000..e26ad690 --- /dev/null +++ b/style/FeatherBB/view/register/email.php @@ -0,0 +1,39 @@ + + +
      +

      +
      +
      + +
      +
      + +
      + + + + +

      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/register/form.php b/style/FeatherBB/view/register/form.php new file mode 100644 index 00000000..f1a360ef --- /dev/null +++ b/style/FeatherBB/view/register/form.php @@ -0,0 +1,134 @@ + +
      +

      +
      +
      +

      +
        +'.$cur_error.''."\n"; + } + ?> +
      +
      +
      +
      + + +
      +

      +
      +
      + +
      +
      +

      +

      +

      +
      +
      + +
      + + + + +
      +
      +
      +
      +
      + +
      + + +

      +
      +
      +
      +
      +
      + +
      +

      + + +
      +
      +
      + 1) { + ?> +
      +
      + +
      + +
      +
      +
      + +
      +
      + +
      +

      + +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/register/index.html b/style/FeatherBB/view/register/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/style/FeatherBB/view/register/index.html @@ -0,0 +1 @@ +.. diff --git a/style/FeatherBB/view/register/rules.php b/style/FeatherBB/view/register/rules.php new file mode 100644 index 00000000..cef62405 --- /dev/null +++ b/style/FeatherBB/view/register/rules.php @@ -0,0 +1,32 @@ + + +
      +

      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +

      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/search/footer.php b/style/FeatherBB/view/search/footer.php new file mode 100644 index 00000000..a73ed5aa --- /dev/null +++ b/style/FeatherBB/view/search/footer.php @@ -0,0 +1,40 @@ + + + +
      +
      +
      + + + +
      +
      +
      + +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +'.implode(' - ', $search['forum_actions']).'

      '."\n" : '') ?> +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/search/form.php b/style/FeatherBB/view/search/form.php new file mode 100644 index 00000000..4731b068 --- /dev/null +++ b/style/FeatherBB/view/search/form.php @@ -0,0 +1,79 @@ + + +
      +

      +
      + +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/search/header.php b/style/FeatherBB/view/search/header.php new file mode 100644 index 00000000..01af597a --- /dev/null +++ b/style/FeatherBB/view/search/header.php @@ -0,0 +1,48 @@ + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      + +
      +
      +
      +
      + + +
      +

      +
      +
      + + + + + + + + + + +.. diff --git a/style/FeatherBB/view/search/posts.php b/style/FeatherBB/view/search/posts.php new file mode 100644 index 00000000..c575f9c2 --- /dev/null +++ b/style/FeatherBB/view/search/posts.php @@ -0,0 +1,56 @@ + +
      +

      # »  » 

      +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
        +
      • +
      • +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/search/topics.php b/style/FeatherBB/view/search/topics.php new file mode 100644 index 00000000..af843193 --- /dev/null +++ b/style/FeatherBB/view/search/topics.php @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/style/FeatherBB/view/userlist.php b/style/FeatherBB/view/userlist.php new file mode 100644 index 00000000..26c24027 --- /dev/null +++ b/style/FeatherBB/view/userlist.php @@ -0,0 +1,115 @@ + + +
      +

      +
      +
      +
      +
      + +
      +user->g_search_users == '1'): ?> + + + +

      user->g_search_users == '1' ? __('User search info').' ' : '').__('User sort info'); ?>

      +
      +
      +
      +

      + +
      +
      + +
      +
      + +
      +
      +
      + +
      +

      +
      +
      +
      +
      +
      +
      + +
      +
      +
      '.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
      + + + + + + + + + + + + + + + + + + '."\n\t\t\t\t\t".''."\n"; + } + ?> + +
      '.feather_escape($user['username']).'' ?>
      '.__('No hits').'
      +
      +
      +
      + +
      +
      + +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/viewforum.php b/style/FeatherBB/view/viewforum.php new file mode 100644 index 00000000..a35faf22 --- /dev/null +++ b/style/FeatherBB/view/viewforum.php @@ -0,0 +1,100 @@ + +
      +
      +
        +
      • +
      • » 
      • +
      +
      + + +
      +
      +
      +
      + +
      +

      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      + +
      +
      +
      + + +
      +
        +
      • +
      • » 
      • +
      +'.implode(' - ', $forum_actions).'

      '."\n" : '') ?> +
      +
      +
      \ No newline at end of file diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php new file mode 100644 index 00000000..e2681757 --- /dev/null +++ b/style/FeatherBB/view/viewtopic.php @@ -0,0 +1,204 @@ + + +
      +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      +
      + + +
      +
      +
      +
      + + +
      +

      #

      +
      +
      +
      +
      +
      +
      +
      +'.$post['user_avatar'].''."\n"; +} + ?> + +'.implode(' ', $post['user_contacts']).''."\n"; +} + ?> +
      +
      +
      +

      +
      + +'.__('Last edit').' '.feather_escape($post['edited_by']).' ('.format_time($post['edited']).')

      '."\n"; +} + ?> +
      +
      '.$post['signature_formatted'].'
      '."\n"; +} + ?> +
      +
      +
      +
      +
      +
      1) { + echo '

      '.$post['is_online_formatted'].'

      '; +} + ?>
      +'."\n\t\t\t\t\t".'
        '."\n\t\t\t\t\t\t".implode("\n\t\t\t\t\t\t", $post['post_actions'])."\n\t\t\t\t\t".'
      '."\n\t\t\t\t".'
      '."\n"; +} + ?> +
      +
      +
      +
      + + +
      +
      +
      + + +
      +
        +
      • +
      • » 
      • +
      • » 
      • +
      + +
      +
      +
      + + +
      +

      +
      +
      + +
      +
      + +
      + + + +user->auto_notify == '1' || $cur_topic['is_subscribed'])): ?> +user->is_guest) { + $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; + ?> + + +
      +'.__('Message').' '.__('Required').'
      '; + } else { + echo "\t\t\t\t\t\t".' + +
      +
      +
      + user->is_guest) : ?> +
      +
      + +
      +

      + +
      +
      +
      + +

      +
      +
      +
      + Date: Sat, 22 Aug 2015 21:25:03 +0200 Subject: [PATCH 127/353] Remove useless debug log --- Slim/Extras/Middleware/FeatherBBAuth.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/Slim/Extras/Middleware/FeatherBBAuth.php index fec39fa0..20f124e9 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/Slim/Extras/Middleware/FeatherBBAuth.php @@ -291,7 +291,6 @@ public function call() // Configure Slim $this->app->config('templates.path', $this->app->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); - var_dump($this->app->view->getTemplatePathname('header.php')); $this->next->call(); } } From c3fd8c70642baaa03287d6257391241cc21609f1 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 22 Aug 2015 21:27:10 +0200 Subject: [PATCH 128/353] Remove old installer --- install/dblayer/common_db.php | 49 - install/dblayer/index.html | 1 - install/dblayer/mysql.php | 389 ------ install/dblayer/mysql_innodb.php | 404 ------ install/dblayer/mysqli.php | 397 ------ install/dblayer/mysqli_innodb.php | 411 ------ install/dblayer/pgsql.php | 454 ------- install/dblayer/sqlite.php | 648 ---------- install/dblayer/sqlite3.php | 686 ---------- install/index.php | 1990 ----------------------------- 10 files changed, 5429 deletions(-) delete mode 100644 install/dblayer/common_db.php delete mode 100644 install/dblayer/index.html delete mode 100644 install/dblayer/mysql.php delete mode 100644 install/dblayer/mysql_innodb.php delete mode 100644 install/dblayer/mysqli.php delete mode 100644 install/dblayer/mysqli_innodb.php delete mode 100644 install/dblayer/pgsql.php delete mode 100644 install/dblayer/sqlite.php delete mode 100644 install/dblayer/sqlite3.php delete mode 100644 install/index.php diff --git a/install/dblayer/common_db.php b/install/dblayer/common_db.php deleted file mode 100644 index 26870fe2..00000000 --- a/install/dblayer/common_db.php +++ /dev/null @@ -1,49 +0,0 @@ -.. diff --git a/install/dblayer/mysql.php b/install/dblayer/mysql.php deleted file mode 100644 index 00cc0950..00000000 --- a/install/dblayer/mysql.php +++ /dev/null @@ -1,389 +0,0 @@ - 'INT(10) UNSIGNED AUTO_INCREMENT' - ); - - - public function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) - { - $this->prefix = $db_prefix; - - if ($p_connect) { - $this->link_id = @mysql_pconnect($db_host, $db_username, $db_password); - } else { - $this->link_id = @mysql_connect($db_host, $db_username, $db_password); - } - - if ($this->link_id) { - if (!@mysql_select_db($db_name, $this->link_id)) { - error('Unable to select database. MySQL reported: '.mysql_error(), __FILE__, __LINE__); - } - } else { - error('Unable to connect to MySQL server. MySQL reported: '.mysql_error(), __FILE__, __LINE__); - } - - // Setup the client-server character set (UTF-8) - if (!defined('FORUM_NO_SET_NAMES')) { - $this->set_names('utf8'); - } - - return $this->link_id; - } - - - public function start_transaction() - { - return; - } - - - public function end_transaction() - { - return; - } - - - public function query($sql, $unbuffered = false) - { - if (defined('FEATHER_SHOW_QUERIES')) { - $q_start = get_microtime(); - } - - if ($unbuffered) { - $this->query_result = @mysql_unbuffered_query($sql, $this->link_id); - } else { - $this->query_result = @mysql_query($sql, $this->link_id); - } - - if ($this->query_result) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - } - - ++$this->num_queries; - - return $this->query_result; - } else { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, 0); - } - - $this->error_no = @mysql_errno($this->link_id); - $this->error_msg = @mysql_error($this->link_id); - - return false; - } - } - - - public function result($query_id = 0, $row = 0, $col = 0) - { - return ($query_id) ? @mysql_result($query_id, $row, $col) : false; - } - - - public function fetch_assoc($query_id = 0) - { - return ($query_id) ? @mysql_fetch_assoc($query_id) : false; - } - - - public function fetch_row($query_id = 0) - { - return ($query_id) ? @mysql_fetch_row($query_id) : false; - } - - - public function num_rows($query_id = 0) - { - return ($query_id) ? @mysql_num_rows($query_id) : false; - } - - - public function affected_rows() - { - return ($this->link_id) ? @mysql_affected_rows($this->link_id) : false; - } - - - public function insert_id() - { - return ($this->link_id) ? @mysql_insert_id($this->link_id) : false; - } - - - public function get_num_queries() - { - return $this->num_queries; - } - - - public function get_saved_queries() - { - return $this->saved_queries; - } - - - public function free_result($query_id = false) - { - return ($query_id) ? @mysql_free_result($query_id) : false; - } - - - public function escape($str) - { - if (is_array($str)) { - return ''; - } elseif (function_exists('mysql_real_escape_string')) { - return mysql_real_escape_string($str, $this->link_id); - } else { - return mysql_escape_string($str); - } - } - - - public function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = $this->error_no; - $result['error_msg'] = $this->error_msg; - - return $result; - } - - - public function close() - { - if ($this->link_id) { - if ($this->query_result) { - @mysql_free_result($this->query_result); - } - - return @mysql_close($this->link_id); - } else { - return false; - } - } - - public function get_names() - { - $result = $this->query('SHOW VARIABLES LIKE \'character_set_connection\''); - return $this->result($result, 0, 1); - } - - - public function set_names($names) - { - return $this->query('SET NAMES \''.$this->escape($names).'\''); - } - - - public function get_version() - { - $result = $this->query('SELECT VERSION()'); - - return array( - 'name' => 'MySQL Standard', - 'version' => preg_replace('%^([^-]+).*$%', '\\1', $this->result($result)) - ); - } - - - public function table_exists($table_name, $no_prefix = false) - { - $result = $this->query('SHOW TABLES LIKE \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function field_exists($table_name, $field_name, $no_prefix = false) - { - $result = $this->query('SHOW COLUMNS FROM '.($no_prefix ? '' : $this->prefix).$table_name.' LIKE \''.$this->escape($field_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function index_exists($table_name, $index_name, $no_prefix = false) - { - $exists = false; - - $result = $this->query('SHOW INDEX FROM '.($no_prefix ? '' : $this->prefix).$table_name); - while ($cur_index = $this->fetch_assoc($result)) { - if (strtolower($cur_index['Key_name']) == strtolower(($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name)) { - $exists = true; - break; - } - } - - return $exists; - } - - - public function create_table($table_name, $schema, $no_prefix = false) - { - if ($this->table_exists($table_name, $no_prefix)) { - return true; - } - - $query = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name." (\n"; - - // Go through every schema element and add it to the query - foreach ($schema['FIELDS'] as $field_name => $field_data) { - $field_data['datatype'] = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_data['datatype']); - - $query .= $field_name.' '.$field_data['datatype']; - - if (isset($field_data['collation'])) { - $query .= 'CHARACTER SET utf8 COLLATE utf8_'.$field_data['collation']; - } - - if (!$field_data['allow_null']) { - $query .= ' NOT NULL'; - } - - if (isset($field_data['default'])) { - $query .= ' DEFAULT '.$field_data['default']; - } - - $query .= ",\n"; - } - - // If we have a primary key, add it - if (isset($schema['PRIMARY KEY'])) { - $query .= 'PRIMARY KEY ('.implode(',', $schema['PRIMARY KEY']).'),'."\n"; - } - - // Add unique keys - if (isset($schema['UNIQUE KEYS'])) { - foreach ($schema['UNIQUE KEYS'] as $key_name => $key_fields) { - $query .= 'UNIQUE KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$key_name.'('.implode(',', $key_fields).'),'."\n"; - } - } - - // Add indexes - if (isset($schema['INDEXES'])) { - foreach ($schema['INDEXES'] as $index_name => $index_fields) { - $query .= 'KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.'('.implode(',', $index_fields).'),'."\n"; - } - } - - // We remove the last two characters (a newline and a comma) and add on the ending - $query = substr($query, 0, strlen($query) - 2)."\n".') ENGINE = '.(isset($schema['ENGINE']) ? $schema['ENGINE'] : 'MyISAM').' CHARACTER SET utf8'; - - return $this->query($query) ? true : false; - } - - - public function drop_table($table_name, $no_prefix = false) - { - if (!$this->table_exists($table_name, $no_prefix)) { - return true; - } - - return $this->query('DROP TABLE '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } - - - public function rename_table($old_table, $new_table, $no_prefix = false) - { - // If the new table exists and the old one doesn't, then we're happy - if ($this->table_exists($new_table, $no_prefix) && !$this->table_exists($old_table, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$old_table.' RENAME TO '.($no_prefix ? '' : $this->prefix).$new_table) ? true : false; - } - - - public function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if ($this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - if (!is_null($default_value) && !is_int($default_value) && !is_float($default_value)) { - $default_value = '\''.$this->escape($default_value).'\''; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.$field_name.' '.$field_type.($allow_null ? '' : ' NOT NULL').(!is_null($default_value) ? ' DEFAULT '.$default_value : '').(!is_null($after_field) ? ' AFTER '.$after_field : '')) ? true : false; - } - - - public function alter_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - if (!is_null($default_value) && !is_int($default_value) && !is_float($default_value)) { - $default_value = '\''.$this->escape($default_value).'\''; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' MODIFY '.$field_name.' '.$field_type.($allow_null ? '' : ' NOT NULL').(!is_null($default_value) ? ' DEFAULT '.$default_value : '').(!is_null($after_field) ? ' AFTER '.$after_field : '')) ? true : false; - } - - - public function drop_field($table_name, $field_name, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP '.$field_name) ? true : false; - } - - - public function add_index($table_name, $index_name, $index_fields, $unique = false, $no_prefix = false) - { - if ($this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.($unique ? 'UNIQUE ' : '').'INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.' ('.implode(',', $index_fields).')') ? true : false; - } - - - public function drop_index($table_name, $index_name, $no_prefix = false) - { - if (!$this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name) ? true : false; - } - - public function truncate_table($table_name, $no_prefix = false) - { - return $this->query('TRUNCATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } -} diff --git a/install/dblayer/mysql_innodb.php b/install/dblayer/mysql_innodb.php deleted file mode 100644 index 79137ba6..00000000 --- a/install/dblayer/mysql_innodb.php +++ /dev/null @@ -1,404 +0,0 @@ - 'INT(10) UNSIGNED AUTO_INCREMENT' - ); - - - public function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) - { - $this->prefix = $db_prefix; - - if ($p_connect) { - $this->link_id = @mysql_pconnect($db_host, $db_username, $db_password); - } else { - $this->link_id = @mysql_connect($db_host, $db_username, $db_password); - } - - if ($this->link_id) { - if (!@mysql_select_db($db_name, $this->link_id)) { - error('Unable to select database. MySQL reported: '.mysql_error(), __FILE__, __LINE__); - } - } else { - error('Unable to connect to MySQL server. MySQL reported: '.mysql_error(), __FILE__, __LINE__); - } - - // Setup the client-server character set (UTF-8) - if (!defined('FORUM_NO_SET_NAMES')) { - $this->set_names('utf8'); - } - - return $this->link_id; - } - - - public function start_transaction() - { - ++$this->in_transaction; - - mysql_query('START TRANSACTION', $this->link_id); - return; - } - - - public function end_transaction() - { - --$this->in_transaction; - - mysql_query('COMMIT', $this->link_id); - return; - } - - - public function query($sql, $unbuffered = false) - { - if (defined('FEATHER_SHOW_QUERIES')) { - $q_start = get_microtime(); - } - - if ($unbuffered) { - $this->query_result = @mysql_unbuffered_query($sql, $this->link_id); - } else { - $this->query_result = @mysql_query($sql, $this->link_id); - } - - if ($this->query_result) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - } - - ++$this->num_queries; - - return $this->query_result; - } else { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, 0); - } - - $this->error_no = @mysql_errno($this->link_id); - $this->error_msg = @mysql_error($this->link_id); - - // Rollback transaction - if ($this->in_transaction) { - mysql_query('ROLLBACK', $this->link_id); - } - - --$this->in_transaction; - - return false; - } - } - - - public function result($query_id = 0, $row = 0, $col = 0) - { - return ($query_id) ? @mysql_result($query_id, $row, $col) : false; - } - - - public function fetch_assoc($query_id = 0) - { - return ($query_id) ? @mysql_fetch_assoc($query_id) : false; - } - - - public function fetch_row($query_id = 0) - { - return ($query_id) ? @mysql_fetch_row($query_id) : false; - } - - - public function num_rows($query_id = 0) - { - return ($query_id) ? @mysql_num_rows($query_id) : false; - } - - - public function affected_rows() - { - return ($this->link_id) ? @mysql_affected_rows($this->link_id) : false; - } - - - public function insert_id() - { - return ($this->link_id) ? @mysql_insert_id($this->link_id) : false; - } - - - public function get_num_queries() - { - return $this->num_queries; - } - - - public function get_saved_queries() - { - return $this->saved_queries; - } - - - public function free_result($query_id = false) - { - return ($query_id) ? @mysql_free_result($query_id) : false; - } - - - public function escape($str) - { - if (is_array($str)) { - return ''; - } elseif (function_exists('mysql_real_escape_string')) { - return mysql_real_escape_string($str, $this->link_id); - } else { - return mysql_escape_string($str); - } - } - - - public function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = $this->error_no; - $result['error_msg'] = $this->error_msg; - - return $result; - } - - - public function close() - { - if ($this->link_id) { - if ($this->query_result) { - @mysql_free_result($this->query_result); - } - - return @mysql_close($this->link_id); - } else { - return false; - } - } - - - public function get_names() - { - $result = $this->query('SHOW VARIABLES LIKE \'character_set_connection\''); - return $this->result($result, 0, 1); - } - - - public function set_names($names) - { - return $this->query('SET NAMES \''.$this->escape($names).'\''); - } - - - public function get_version() - { - $result = $this->query('SELECT VERSION()'); - - return array( - 'name' => 'MySQL Standard (InnoDB)', - 'version' => preg_replace('%^([^-]+).*$%', '\\1', $this->result($result)) - ); - } - - - public function table_exists($table_name, $no_prefix = false) - { - $result = $this->query('SHOW TABLES LIKE \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function field_exists($table_name, $field_name, $no_prefix = false) - { - $result = $this->query('SHOW COLUMNS FROM '.($no_prefix ? '' : $this->prefix).$table_name.' LIKE \''.$this->escape($field_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function index_exists($table_name, $index_name, $no_prefix = false) - { - $exists = false; - - $result = $this->query('SHOW INDEX FROM '.($no_prefix ? '' : $this->prefix).$table_name); - while ($cur_index = $this->fetch_assoc($result)) { - if (strtolower($cur_index['Key_name']) == strtolower(($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name)) { - $exists = true; - break; - } - } - - return $exists; - } - - - public function create_table($table_name, $schema, $no_prefix = false) - { - if ($this->table_exists($table_name, $no_prefix)) { - return true; - } - - $query = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name." (\n"; - - // Go through every schema element and add it to the query - foreach ($schema['FIELDS'] as $field_name => $field_data) { - $field_data['datatype'] = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_data['datatype']); - - $query .= $field_name.' '.$field_data['datatype']; - - if (isset($field_data['collation'])) { - $query .= 'CHARACTER SET utf8 COLLATE utf8_'.$field_data['collation']; - } - - if (!$field_data['allow_null']) { - $query .= ' NOT NULL'; - } - - if (isset($field_data['default'])) { - $query .= ' DEFAULT '.$field_data['default']; - } - - $query .= ",\n"; - } - - // If we have a primary key, add it - if (isset($schema['PRIMARY KEY'])) { - $query .= 'PRIMARY KEY ('.implode(',', $schema['PRIMARY KEY']).'),'."\n"; - } - - // Add unique keys - if (isset($schema['UNIQUE KEYS'])) { - foreach ($schema['UNIQUE KEYS'] as $key_name => $key_fields) { - $query .= 'UNIQUE KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$key_name.'('.implode(',', $key_fields).'),'."\n"; - } - } - - // Add indexes - if (isset($schema['INDEXES'])) { - foreach ($schema['INDEXES'] as $index_name => $index_fields) { - $query .= 'KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.'('.implode(',', $index_fields).'),'."\n"; - } - } - - // We remove the last two characters (a newline and a comma) and add on the ending - $query = substr($query, 0, strlen($query) - 2)."\n".') ENGINE = '.(isset($schema['ENGINE']) ? $schema['ENGINE'] : 'InnoDB').' CHARACTER SET utf8'; - - return $this->query($query) ? true : false; - } - - - public function drop_table($table_name, $no_prefix = false) - { - if (!$this->table_exists($table_name, $no_prefix)) { - return true; - } - - return $this->query('DROP TABLE '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } - - - public function rename_table($old_table, $new_table, $no_prefix = false) - { - // If the new table exists and the old one doesn't, then we're happy - if ($this->table_exists($new_table, $no_prefix) && !$this->table_exists($old_table, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$old_table.' RENAME TO '.($no_prefix ? '' : $this->prefix).$new_table) ? true : false; - } - - - public function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if ($this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - if (!is_null($default_value) && !is_int($default_value) && !is_float($default_value)) { - $default_value = '\''.$this->escape($default_value).'\''; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.$field_name.' '.$field_type.($allow_null ? '' : ' NOT NULL').(!is_null($default_value) ? ' DEFAULT '.$default_value : '').(!is_null($after_field) ? ' AFTER '.$after_field : '')) ? true : false; - } - - - public function alter_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - if (!is_null($default_value) && !is_int($default_value) && !is_float($default_value)) { - $default_value = '\''.$this->escape($default_value).'\''; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' MODIFY '.$field_name.' '.$field_type.($allow_null ? '' : ' NOT NULL').(!is_null($default_value) ? ' DEFAULT '.$default_value : '').(!is_null($after_field) ? ' AFTER '.$after_field : '')) ? true : false; - } - - - public function drop_field($table_name, $field_name, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP '.$field_name) ? true : false; - } - - - public function add_index($table_name, $index_name, $index_fields, $unique = false, $no_prefix = false) - { - if ($this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.($unique ? 'UNIQUE ' : '').'INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.' ('.implode(',', $index_fields).')') ? true : false; - } - - - public function drop_index($table_name, $index_name, $no_prefix = false) - { - if (!$this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name) ? true : false; - } - - public function truncate_table($table_name, $no_prefix = false) - { - return $this->query('TRUNCATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } -} diff --git a/install/dblayer/mysqli.php b/install/dblayer/mysqli.php deleted file mode 100644 index a22b6945..00000000 --- a/install/dblayer/mysqli.php +++ /dev/null @@ -1,397 +0,0 @@ - 'INT(10) UNSIGNED AUTO_INCREMENT' - ); - - - public function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) - { - $this->prefix = $db_prefix; - - // Was a custom port supplied with $db_host? - if (strpos($db_host, ':') !== false) { - list($db_host, $db_port) = explode(':', $db_host); - } - - // Persistent connection in MySQLi are only available in PHP 5.3 and later releases - $p_connect = $p_connect && version_compare(PHP_VERSION, '5.3.0', '>=') ? 'p:' : ''; - - if (isset($db_port)) { - $this->link_id = @mysqli_connect($p_connect.$db_host, $db_username, $db_password, $db_name, $db_port); - } else { - $this->link_id = @mysqli_connect($p_connect.$db_host, $db_username, $db_password, $db_name); - } - - if (!$this->link_id) { - error('Unable to connect to MySQL and select database. MySQL reported: '.mysqli_connect_error(), __FILE__, __LINE__); - } - - // Setup the client-server character set (UTF-8) - if (!defined('FORUM_NO_SET_NAMES')) { - $this->set_names('utf8'); - } - - return $this->link_id; - } - - - public function start_transaction() - { - return; - } - - - public function end_transaction() - { - return; - } - - - public function query($sql, $unbuffered = false) - { - if (defined('FEATHER_SHOW_QUERIES')) { - $q_start = get_microtime(); - } - - $this->query_result = @mysqli_query($this->link_id, $sql); - - if ($this->query_result) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - } - - ++$this->num_queries; - - return $this->query_result; - } else { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, 0); - } - - $this->error_no = @mysqli_errno($this->link_id); - $this->error_msg = @mysqli_error($this->link_id); - - return false; - } - } - - - public function result($query_id = 0, $row = 0, $col = 0) - { - if ($query_id) { - if ($row !== 0 && @mysqli_data_seek($query_id, $row) === false) { - return false; - } - - $cur_row = @mysqli_fetch_row($query_id); - if ($cur_row === false) { - return false; - } - - return $cur_row[$col]; - } else { - return false; - } - } - - - public function fetch_assoc($query_id = 0) - { - return ($query_id) ? @mysqli_fetch_assoc($query_id) : false; - } - - - public function fetch_row($query_id = 0) - { - return ($query_id) ? @mysqli_fetch_row($query_id) : false; - } - - - public function num_rows($query_id = 0) - { - return ($query_id) ? @mysqli_num_rows($query_id) : false; - } - - - public function affected_rows() - { - return ($this->link_id) ? @mysqli_affected_rows($this->link_id) : false; - } - - - public function insert_id() - { - return ($this->link_id) ? @mysqli_insert_id($this->link_id) : false; - } - - - public function get_num_queries() - { - return $this->num_queries; - } - - - public function get_saved_queries() - { - return $this->saved_queries; - } - - - public function free_result($query_id = false) - { - return ($query_id) ? @mysqli_free_result($query_id) : false; - } - - - public function escape($str) - { - return is_array($str) ? '' : mysqli_real_escape_string($this->link_id, $str); - } - - - public function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = $this->error_no; - $result['error_msg'] = $this->error_msg; - - return $result; - } - - - public function close() - { - if ($this->link_id) { - if ($this->query_result) { - @mysqli_free_result($this->query_result); - } - - return @mysqli_close($this->link_id); - } else { - return false; - } - } - - - public function get_names() - { - $result = $this->query('SHOW VARIABLES LIKE \'character_set_connection\''); - return $this->result($result, 0, 1); - } - - - public function set_names($names) - { - return $this->query('SET NAMES \''.$this->escape($names).'\''); - } - - - public function get_version() - { - $result = $this->query('SELECT VERSION()'); - - return array( - 'name' => 'MySQL Improved', - 'version' => preg_replace('%^([^-]+).*$%', '\\1', $this->result($result)) - ); - } - - - public function table_exists($table_name, $no_prefix = false) - { - $result = $this->query('SHOW TABLES LIKE \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function field_exists($table_name, $field_name, $no_prefix = false) - { - $result = $this->query('SHOW COLUMNS FROM '.($no_prefix ? '' : $this->prefix).$table_name.' LIKE \''.$this->escape($field_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function index_exists($table_name, $index_name, $no_prefix = false) - { - $exists = false; - - $result = $this->query('SHOW INDEX FROM '.($no_prefix ? '' : $this->prefix).$table_name); - while ($cur_index = $this->fetch_assoc($result)) { - if (strtolower($cur_index['Key_name']) == strtolower(($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name)) { - $exists = true; - break; - } - } - - return $exists; - } - - - public function create_table($table_name, $schema, $no_prefix = false) - { - if ($this->table_exists($table_name, $no_prefix)) { - return true; - } - - $query = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name." (\n"; - - // Go through every schema element and add it to the query - foreach ($schema['FIELDS'] as $field_name => $field_data) { - $field_data['datatype'] = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_data['datatype']); - - $query .= $field_name.' '.$field_data['datatype']; - - if (isset($field_data['collation'])) { - $query .= 'CHARACTER SET utf8 COLLATE utf8_'.$field_data['collation']; - } - - if (!$field_data['allow_null']) { - $query .= ' NOT NULL'; - } - - if (isset($field_data['default'])) { - $query .= ' DEFAULT '.$field_data['default']; - } - - $query .= ",\n"; - } - - // If we have a primary key, add it - if (isset($schema['PRIMARY KEY'])) { - $query .= 'PRIMARY KEY ('.implode(',', $schema['PRIMARY KEY']).'),'."\n"; - } - - // Add unique keys - if (isset($schema['UNIQUE KEYS'])) { - foreach ($schema['UNIQUE KEYS'] as $key_name => $key_fields) { - $query .= 'UNIQUE KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$key_name.'('.implode(',', $key_fields).'),'."\n"; - } - } - - // Add indexes - if (isset($schema['INDEXES'])) { - foreach ($schema['INDEXES'] as $index_name => $index_fields) { - $query .= 'KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.'('.implode(',', $index_fields).'),'."\n"; - } - } - - // We remove the last two characters (a newline and a comma) and add on the ending - $query = substr($query, 0, strlen($query) - 2)."\n".') ENGINE = '.(isset($schema['ENGINE']) ? $schema['ENGINE'] : 'MyISAM').' CHARACTER SET utf8'; - - return $this->query($query) ? true : false; - } - - - public function drop_table($table_name, $no_prefix = false) - { - if (!$this->table_exists($table_name, $no_prefix)) { - return true; - } - - return $this->query('DROP TABLE '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } - - - public function rename_table($old_table, $new_table, $no_prefix = false) - { - // If the new table exists and the old one doesn't, then we're happy - if ($this->table_exists($new_table, $no_prefix) && !$this->table_exists($old_table, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$old_table.' RENAME TO '.($no_prefix ? '' : $this->prefix).$new_table) ? true : false; - } - - - public function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if ($this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - if (!is_null($default_value) && !is_int($default_value) && !is_float($default_value)) { - $default_value = '\''.$this->escape($default_value).'\''; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.$field_name.' '.$field_type.($allow_null ? '' : ' NOT NULL').(!is_null($default_value) ? ' DEFAULT '.$default_value : '').(!is_null($after_field) ? ' AFTER '.$after_field : '')) ? true : false; - } - - - public function alter_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - if (!is_null($default_value) && !is_int($default_value) && !is_float($default_value)) { - $default_value = '\''.$this->escape($default_value).'\''; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' MODIFY '.$field_name.' '.$field_type.($allow_null ? '' : ' NOT NULL').(!is_null($default_value) ? ' DEFAULT '.$default_value : '').(!is_null($after_field) ? ' AFTER '.$after_field : '')) ? true : false; - } - - - public function drop_field($table_name, $field_name, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP '.$field_name) ? true : false; - } - - - public function add_index($table_name, $index_name, $index_fields, $unique = false, $no_prefix = false) - { - if ($this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.($unique ? 'UNIQUE ' : '').'INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.' ('.implode(',', $index_fields).')') ? true : false; - } - - - public function drop_index($table_name, $index_name, $no_prefix = false) - { - if (!$this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name) ? true : false; - } - - public function truncate_table($table_name, $no_prefix = false) - { - return $this->query('TRUNCATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } -} diff --git a/install/dblayer/mysqli_innodb.php b/install/dblayer/mysqli_innodb.php deleted file mode 100644 index 509bdff7..00000000 --- a/install/dblayer/mysqli_innodb.php +++ /dev/null @@ -1,411 +0,0 @@ - 'INT(10) UNSIGNED AUTO_INCREMENT' - ); - - - public function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) - { - $this->prefix = $db_prefix; - - // Was a custom port supplied with $db_host? - if (strpos($db_host, ':') !== false) { - list($db_host, $db_port) = explode(':', $db_host); - } - - // Persistent connection in MySQLi are only available in PHP 5.3 and later releases - $p_connect = $p_connect && version_compare(PHP_VERSION, '5.3.0', '>=') ? 'p:' : ''; - - if (isset($db_port)) { - $this->link_id = @mysqli_connect($p_connect.$db_host, $db_username, $db_password, $db_name, $db_port); - } else { - $this->link_id = @mysqli_connect($p_connect.$db_host, $db_username, $db_password, $db_name); - } - - if (!$this->link_id) { - error('Unable to connect to MySQL and select database. MySQL reported: '.mysqli_connect_error(), __FILE__, __LINE__); - } - - // Setup the client-server character set (UTF-8) - if (!defined('FORUM_NO_SET_NAMES')) { - $this->set_names('utf8'); - } - - return $this->link_id; - } - - - public function start_transaction() - { - ++$this->in_transaction; - - mysqli_query($this->link_id, 'START TRANSACTION'); - return; - } - - - public function end_transaction() - { - --$this->in_transaction; - - mysqli_query($this->link_id, 'COMMIT'); - return; - } - - - public function query($sql, $unbuffered = false) - { - if (defined('FEATHER_SHOW_QUERIES')) { - $q_start = get_microtime(); - } - - $this->query_result = @mysqli_query($this->link_id, $sql); - - if ($this->query_result) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - } - - ++$this->num_queries; - - return $this->query_result; - } else { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, 0); - } - - $this->error_no = @mysqli_errno($this->link_id); - $this->error_msg = @mysqli_error($this->link_id); - - // Rollback transaction - if ($this->in_transaction) { - mysqli_query($this->link_id, 'ROLLBACK'); - } - - --$this->in_transaction; - - return false; - } - } - - - public function result($query_id = 0, $row = 0, $col = 0) - { - if ($query_id) { - if ($row !== 0 && @mysqli_data_seek($query_id, $row) === false) { - return false; - } - - $cur_row = @mysqli_fetch_row($query_id); - if ($cur_row === false) { - return false; - } - - return $cur_row[$col]; - } else { - return false; - } - } - - - public function fetch_assoc($query_id = 0) - { - return ($query_id) ? @mysqli_fetch_assoc($query_id) : false; - } - - - public function fetch_row($query_id = 0) - { - return ($query_id) ? @mysqli_fetch_row($query_id) : false; - } - - - public function num_rows($query_id = 0) - { - return ($query_id) ? @mysqli_num_rows($query_id) : false; - } - - - public function affected_rows() - { - return ($this->link_id) ? @mysqli_affected_rows($this->link_id) : false; - } - - - public function insert_id() - { - return ($this->link_id) ? @mysqli_insert_id($this->link_id) : false; - } - - - public function get_num_queries() - { - return $this->num_queries; - } - - - public function get_saved_queries() - { - return $this->saved_queries; - } - - - public function free_result($query_id = false) - { - return ($query_id) ? @mysqli_free_result($query_id) : false; - } - - - public function escape($str) - { - return is_array($str) ? '' : mysqli_real_escape_string($this->link_id, $str); - } - - - public function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = $this->error_no; - $result['error_msg'] = $this->error_msg; - - return $result; - } - - - public function close() - { - if ($this->link_id) { - if ($this->query_result) { - @mysqli_free_result($this->query_result); - } - - return @mysqli_close($this->link_id); - } else { - return false; - } - } - - - public function get_names() - { - $result = $this->query('SHOW VARIABLES LIKE \'character_set_connection\''); - return $this->result($result, 0, 1); - } - - - public function set_names($names) - { - return $this->query('SET NAMES \''.$this->escape($names).'\''); - } - - - public function get_version() - { - $result = $this->query('SELECT VERSION()'); - - return array( - 'name' => 'MySQL Improved (InnoDB)', - 'version' => preg_replace('%^([^-]+).*$%', '\\1', $this->result($result)) - ); - } - - - public function table_exists($table_name, $no_prefix = false) - { - $result = $this->query('SHOW TABLES LIKE \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function field_exists($table_name, $field_name, $no_prefix = false) - { - $result = $this->query('SHOW COLUMNS FROM '.($no_prefix ? '' : $this->prefix).$table_name.' LIKE \''.$this->escape($field_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function index_exists($table_name, $index_name, $no_prefix = false) - { - $exists = false; - - $result = $this->query('SHOW INDEX FROM '.($no_prefix ? '' : $this->prefix).$table_name); - while ($cur_index = $this->fetch_assoc($result)) { - if (strtolower($cur_index['Key_name']) == strtolower(($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name)) { - $exists = true; - break; - } - } - - return $exists; - } - - - public function create_table($table_name, $schema, $no_prefix = false) - { - if ($this->table_exists($table_name, $no_prefix)) { - return true; - } - - $query = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name." (\n"; - - // Go through every schema element and add it to the query - foreach ($schema['FIELDS'] as $field_name => $field_data) { - $field_data['datatype'] = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_data['datatype']); - - $query .= $field_name.' '.$field_data['datatype']; - - if (isset($field_data['collation'])) { - $query .= 'CHARACTER SET utf8 COLLATE utf8_'.$field_data['collation']; - } - - if (!$field_data['allow_null']) { - $query .= ' NOT NULL'; - } - - if (isset($field_data['default'])) { - $query .= ' DEFAULT '.$field_data['default']; - } - - $query .= ",\n"; - } - - // If we have a primary key, add it - if (isset($schema['PRIMARY KEY'])) { - $query .= 'PRIMARY KEY ('.implode(',', $schema['PRIMARY KEY']).'),'."\n"; - } - - // Add unique keys - if (isset($schema['UNIQUE KEYS'])) { - foreach ($schema['UNIQUE KEYS'] as $key_name => $key_fields) { - $query .= 'UNIQUE KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$key_name.'('.implode(',', $key_fields).'),'."\n"; - } - } - - // Add indexes - if (isset($schema['INDEXES'])) { - foreach ($schema['INDEXES'] as $index_name => $index_fields) { - $query .= 'KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.'('.implode(',', $index_fields).'),'."\n"; - } - } - - // We remove the last two characters (a newline and a comma) and add on the ending - $query = substr($query, 0, strlen($query) - 2)."\n".') ENGINE = '.(isset($schema['ENGINE']) ? $schema['ENGINE'] : 'InnoDB').' CHARACTER SET utf8'; - - return $this->query($query) ? true : false; - } - - - public function drop_table($table_name, $no_prefix = false) - { - if (!$this->table_exists($table_name, $no_prefix)) { - return true; - } - - return $this->query('DROP TABLE '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } - - - public function rename_table($old_table, $new_table, $no_prefix = false) - { - // If the new table exists and the old one doesn't, then we're happy - if ($this->table_exists($new_table, $no_prefix) && !$this->table_exists($old_table, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$old_table.' RENAME TO '.($no_prefix ? '' : $this->prefix).$new_table) ? true : false; - } - - - public function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if ($this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - if (!is_null($default_value) && !is_int($default_value) && !is_float($default_value)) { - $default_value = '\''.$this->escape($default_value).'\''; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.$field_name.' '.$field_type.($allow_null ? '' : ' NOT NULL').(!is_null($default_value) ? ' DEFAULT '.$default_value : '').(!is_null($after_field) ? ' AFTER '.$after_field : '')) ? true : false; - } - - - public function alter_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - if (!is_null($default_value) && !is_int($default_value) && !is_float($default_value)) { - $default_value = '\''.$this->escape($default_value).'\''; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' MODIFY '.$field_name.' '.$field_type.($allow_null ? '' : ' NOT NULL').(!is_null($default_value) ? ' DEFAULT '.$default_value : '').(!is_null($after_field) ? ' AFTER '.$after_field : '')) ? true : false; - } - - - public function drop_field($table_name, $field_name, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP '.$field_name) ? true : false; - } - - - public function add_index($table_name, $index_name, $index_fields, $unique = false, $no_prefix = false) - { - if ($this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.($unique ? 'UNIQUE ' : '').'INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.' ('.implode(',', $index_fields).')') ? true : false; - } - - - public function drop_index($table_name, $index_name, $no_prefix = false) - { - if (!$this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name) ? true : false; - } - - public function truncate_table($table_name, $no_prefix = false) - { - return $this->query('TRUNCATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } -} diff --git a/install/dblayer/pgsql.php b/install/dblayer/pgsql.php deleted file mode 100644 index 2585e43f..00000000 --- a/install/dblayer/pgsql.php +++ /dev/null @@ -1,454 +0,0 @@ - 'SMALLINT', - '%^(MEDIUM)?INT( )?(\\([0-9]+\\))?( )?(UNSIGNED)?$%i' => 'INTEGER', - '%^BIGINT( )?(\\([0-9]+\\))?( )?(UNSIGNED)?$%i' => 'BIGINT', - '%^(TINY|MEDIUM|LONG)?TEXT$%i' => 'TEXT', - '%^DOUBLE( )?(\\([0-9,]+\\))?( )?(UNSIGNED)?$%i' => 'DOUBLE PRECISION', - '%^FLOAT( )?(\\([0-9]+\\))?( )?(UNSIGNED)?$%i' => 'REAL' - ); - - - public function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) - { - $this->prefix = $db_prefix; - - if ($db_host) { - if (strpos($db_host, ':') !== false) { - list($db_host, $dbport) = explode(':', $db_host); - $connect_str[] = 'host='.$db_host.' port='.$dbport; - } else { - $connect_str[] = 'host='.$db_host; - } - } - - if ($db_name) { - $connect_str[] = 'dbname='.$db_name; - } - - if ($db_username) { - $connect_str[] = 'user='.$db_username; - } - - if ($db_password) { - $connect_str[] = 'password='.$db_password; - } - - if ($p_connect) { - $this->link_id = @pg_pconnect(implode(' ', $connect_str)); - } else { - $this->link_id = @pg_connect(implode(' ', $connect_str)); - } - - if (!$this->link_id) { - error('Unable to connect to PostgreSQL server', __FILE__, __LINE__); - } - - // Setup the client-server character set (UTF-8) - if (!defined('FORUM_NO_SET_NAMES')) { - $this->set_names('utf8'); - } - - return $this->link_id; - } - - - public function start_transaction() - { - ++$this->in_transaction; - - return (@pg_query($this->link_id, 'BEGIN')) ? true : false; - } - - - public function end_transaction() - { - --$this->in_transaction; - - if (@pg_query($this->link_id, 'COMMIT')) { - return true; - } else { - @pg_query($this->link_id, 'ROLLBACK'); - return false; - } - } - - - public function query($sql, $unbuffered = false) // $unbuffered is ignored since there is no pgsql_unbuffered_query() - { - if (strrpos($sql, 'LIMIT') !== false) { - $sql = preg_replace('%LIMIT ([0-9]+),([ 0-9]+)%', 'LIMIT \\2 OFFSET \\1', $sql); - } - - if (defined('FEATHER_SHOW_QUERIES')) { - $q_start = get_microtime(); - } - - @pg_send_query($this->link_id, $sql); - $this->query_result = @pg_get_result($this->link_id); - - if (pg_result_status($this->query_result) != PGSQL_FATAL_ERROR) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - } - - ++$this->num_queries; - - $this->last_query_text[intval($this->query_result)] = $sql; - - return $this->query_result; - } else { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, 0); - } - - $this->error_no = false; - $this->error_msg = @pg_result_error($this->query_result); - - if ($this->in_transaction) { - @pg_query($this->link_id, 'ROLLBACK'); - } - - --$this->in_transaction; - - return false; - } - } - - - public function result($query_id = 0, $row = 0, $col = 0) - { - return ($query_id) ? @pg_fetch_result($query_id, $row, $col) : false; - } - - - public function fetch_assoc($query_id = 0) - { - return ($query_id) ? @pg_fetch_assoc($query_id) : false; - } - - - public function fetch_row($query_id = 0) - { - return ($query_id) ? @pg_fetch_row($query_id) : false; - } - - - public function num_rows($query_id = 0) - { - return ($query_id) ? @pg_num_rows($query_id) : false; - } - - - public function affected_rows() - { - return ($this->query_result) ? @pg_affected_rows($this->query_result) : false; - } - - - public function insert_id() - { - $query_id = $this->query_result; - - if ($query_id && $this->last_query_text[intval($query_id)] != '') { - if (preg_match('%^INSERT INTO ([a-z0-9\_\-]+)%is', $this->last_query_text[intval($query_id)], $table_name)) { - // Hack (don't ask) - if (substr($table_name[1], -6) == 'groups') { - $table_name[1] .= '_g'; - } - - $temp_q_id = @pg_query($this->link_id, 'SELECT currval(\''.$table_name[1].'_id_seq\')'); - return ($temp_q_id) ? intval(@pg_fetch_result($temp_q_id, 0)) : false; - } - } - - return false; - } - - - public function get_num_queries() - { - return $this->num_queries; - } - - - public function get_saved_queries() - { - return $this->saved_queries; - } - - - public function free_result($query_id = false) - { - if (!$query_id) { - $query_id = $this->query_result; - } - - return ($query_id) ? @pg_free_result($query_id) : false; - } - - - public function escape($str) - { - return is_array($str) ? '' : pg_escape_string($str); - } - - - public function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = $this->error_no; - $result['error_msg'] = $this->error_msg; - - return $result; - } - - - public function close() - { - if ($this->link_id) { - if ($this->in_transaction) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array('COMMIT', 0); - } - - @pg_query($this->link_id, 'COMMIT'); - } - - if ($this->query_result) { - @pg_free_result($this->query_result); - } - - return @pg_close($this->link_id); - } else { - return false; - } - } - - - public function get_names() - { - $result = $this->query('SHOW client_encoding'); - return strtolower($this->result($result)); // MySQL returns lowercase so lets be consistent - } - - - public function set_names($names) - { - return $this->query('SET NAMES \''.$this->escape($names).'\''); - } - - - public function get_version() - { - $result = $this->query('SELECT VERSION()'); - - return array( - 'name' => 'PostgreSQL', - 'version' => preg_replace('%^[^0-9]+([^\s,-]+).*$%', '\\1', $this->result($result)) - ); - } - - - public function table_exists($table_name, $no_prefix = false) - { - $result = $this->query('SELECT 1 FROM pg_class WHERE relname = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function field_exists($table_name, $field_name, $no_prefix = false) - { - $result = $this->query('SELECT 1 FROM pg_class c INNER JOIN pg_attribute a ON a.attrelid = c.oid WHERE c.relname = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' AND a.attname = \''.$this->escape($field_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function index_exists($table_name, $index_name, $no_prefix = false) - { - $result = $this->query('SELECT 1 FROM pg_index i INNER JOIN pg_class c1 ON c1.oid = i.indrelid INNER JOIN pg_class c2 ON c2.oid = i.indexrelid WHERE c1.relname = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' AND c2.relname = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_'.$this->escape($index_name).'\''); - return $this->num_rows($result) > 0; - } - - - public function create_table($table_name, $schema, $no_prefix = false) - { - if ($this->table_exists($table_name, $no_prefix)) { - return true; - } - - $query = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name." (\n"; - - // Go through every schema element and add it to the query - foreach ($schema['FIELDS'] as $field_name => $field_data) { - $field_data['datatype'] = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_data['datatype']); - - $query .= $field_name.' '.$field_data['datatype']; - - // The SERIAL datatype is a special case where we don't need to say not null - if (!$field_data['allow_null'] && $field_data['datatype'] != 'SERIAL') { - $query .= ' NOT NULL'; - } - - if (isset($field_data['default'])) { - $query .= ' DEFAULT '.$field_data['default']; - } - - $query .= ",\n"; - } - - // If we have a primary key, add it - if (isset($schema['PRIMARY KEY'])) { - $query .= 'PRIMARY KEY ('.implode(',', $schema['PRIMARY KEY']).'),'."\n"; - } - - // Add unique keys - if (isset($schema['UNIQUE KEYS'])) { - foreach ($schema['UNIQUE KEYS'] as $key_name => $key_fields) { - $query .= 'UNIQUE ('.implode(',', $key_fields).'),'."\n"; - } - } - - // We remove the last two characters (a newline and a comma) and add on the ending - $query = substr($query, 0, strlen($query) - 2)."\n".')'; - - $result = $this->query($query) ? true : false; - - // Add indexes - if (isset($schema['INDEXES'])) { - foreach ($schema['INDEXES'] as $index_name => $index_fields) { - $result &= $this->add_index($table_name, $index_name, $index_fields, false, $no_prefix); - } - } - - return $result; - } - - - public function drop_table($table_name, $no_prefix = false) - { - if (!$this->table_exists($table_name, $no_prefix)) { - return true; - } - - return $this->query('DROP TABLE '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } - - - public function rename_table($old_table, $new_table, $no_prefix = false) - { - // If the new table exists and the old one doesn't, then we're happy - if ($this->table_exists($new_table, $no_prefix) && !$this->table_exists($old_table, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$old_table.' RENAME TO '.($no_prefix ? '' : $this->prefix).$new_table) ? true : false; - } - - - public function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if ($this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - $result = $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.$field_name.' '.$field_type) ? true : false; - - if (!is_null($default_value)) { - if (!is_int($default_value) && !is_float($default_value)) { - $default_value = '\''.$this->escape($default_value).'\''; - } - - $result &= $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ALTER '.$field_name.' SET DEFAULT '.$default_value) ? true : false; - $result &= $this->query('UPDATE '.($no_prefix ? '' : $this->prefix).$table_name.' SET '.$field_name.'='.$default_value) ? true : false; - } - - if (!$allow_null) { - $result &= $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ALTER '.$field_name.' SET NOT NULL') ? true : false; - } - - return $result; - } - - - public function alter_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - - $result = $this->add_field($table_name, 'tmp_'.$field_name, $field_type, $allow_null, $default_value, $after_field, $no_prefix); - $result &= $this->query('UPDATE '.($no_prefix ? '' : $this->prefix).$table_name.' SET tmp_'.$field_name.' = '.$field_name) ? true : false; - $result &= $this->drop_field($table_name, $field_name, $no_prefix); - $result &= $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' RENAME COLUMN tmp_'.$field_name.' TO '.$field_name) ? true : false; - - return $result; - } - - - public function drop_field($table_name, $field_name, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - return $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP '.$field_name) ? true : false; - } - - - public function add_index($table_name, $index_name, $index_fields, $unique = false, $no_prefix = false) - { - if ($this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('CREATE '.($unique ? 'UNIQUE ' : '').'INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.' ON '.($no_prefix ? '' : $this->prefix).$table_name.'('.implode(',', $index_fields).')') ? true : false; - } - - - public function drop_index($table_name, $index_name, $no_prefix = false) - { - if (!$this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('DROP INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name) ? true : false; - } - - public function truncate_table($table_name, $no_prefix = false) - { - return $this->query('DELETE FROM '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } -} diff --git a/install/dblayer/sqlite.php b/install/dblayer/sqlite.php deleted file mode 100644 index 8c2416d3..00000000 --- a/install/dblayer/sqlite.php +++ /dev/null @@ -1,648 +0,0 @@ - 'INTEGER', - '%^(TINY|SMALL|MEDIUM|BIG)?INT( )?(\\([0-9]+\\))?( )?(UNSIGNED)?$%i' => 'INTEGER', - '%^(TINY|MEDIUM|LONG)?TEXT$%i' => 'TEXT' - ); - - public function forum_is_writable($path) - { - if (is_dir($path)) { - $path = rtrim($path, '/').'/'; - return forum_is_writable($path.uniqid(mt_rand()).'.tmp'); - } - - // Check temporary file for read/write capabilities - $rm = file_exists($path); - $f = @fopen($path, 'a'); - - if ($f === false) { - return false; - } - - fclose($f); - - if (!$rm) { - @unlink($path); - } - - return true; - } - - - public function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) - { - // Prepend $db_name with the path to the forum root directory - $db_name = FEATHER_ROOT.$db_name; - - $this->prefix = $db_prefix; - - if (!file_exists($db_name)) { - @touch($db_name); - @chmod($db_name, 0666); - if (!file_exists($db_name)) { - error('Unable to create new database \''.$db_name.'\'. Permission denied', __FILE__, __LINE__); - } - } - - if (!is_readable($db_name)) { - error('Unable to open database \''.$db_name.'\' for reading. Permission denied', __FILE__, __LINE__); - } - - if (!$this->forum_is_writable($db_name)) { - error('Unable to open database \''.$db_name.'\' for writing. Permission denied', __FILE__, __LINE__); - } - - if ($p_connect) { - $this->link_id = @sqlite_popen($db_name, 0666, $sqlite_error); - } else { - $this->link_id = @sqlite_open($db_name, 0666, $sqlite_error); - } - - if (!$this->link_id) { - error('Unable to open database \''.$db_name.'\'. SQLite reported: '.$sqlite_error, __FILE__, __LINE__); - } else { - return $this->link_id; - } - } - - - public function start_transaction() - { - ++$this->in_transaction; - - return (@sqlite_query($this->link_id, 'BEGIN')) ? true : false; - } - - - public function end_transaction() - { - --$this->in_transaction; - - if (@sqlite_query($this->link_id, 'COMMIT')) { - return true; - } else { - @sqlite_query($this->link_id, 'ROLLBACK'); - return false; - } - } - - - public function query($sql, $unbuffered = false) - { - if (defined('FEATHER_SHOW_QUERIES')) { - $q_start = get_microtime(); - } - - if ($unbuffered) { - $this->query_result = @sqlite_unbuffered_query($this->link_id, $sql); - } else { - $this->query_result = @sqlite_query($this->link_id, $sql); - } - - if ($this->query_result) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - } - - ++$this->num_queries; - - return $this->query_result; - } else { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, 0); - } - - $this->error_no = @sqlite_last_error($this->link_id); - $this->error_msg = @sqlite_error_string($this->error_no); - - if ($this->in_transaction) { - @sqlite_query($this->link_id, 'ROLLBACK'); - } - - --$this->in_transaction; - - return false; - } - } - - - public function result($query_id = 0, $row = 0, $col = 0) - { - if ($query_id) { - if ($row !== 0 && @sqlite_seek($query_id, $row) === false) { - return false; - } - - $cur_row = @sqlite_current($query_id); - if ($cur_row === false) { - return false; - } - - return $cur_row[$col]; - } else { - return false; - } - } - - - public function fetch_assoc($query_id = 0) - { - if ($query_id) { - $cur_row = @sqlite_fetch_array($query_id, SQLITE_ASSOC); - if ($cur_row) { - // Horrible hack to get rid of table names and table aliases from the array keys - foreach ($cur_row as $key => $value) { - $dot_spot = strpos($key, '.'); - if ($dot_spot !== false) { - unset($cur_row[$key]); - $key = substr($key, $dot_spot+1); - $cur_row[$key] = $value; - } - } - } - - return $cur_row; - } else { - return false; - } - } - - - public function fetch_row($query_id = 0) - { - return ($query_id) ? @sqlite_fetch_array($query_id, SQLITE_NUM) : false; - } - - - public function num_rows($query_id = 0) - { - return ($query_id) ? @sqlite_num_rows($query_id) : false; - } - - - public function affected_rows() - { - return ($this->link_id) ? @sqlite_changes($this->link_id) : false; - } - - - public function insert_id() - { - return ($this->link_id) ? @sqlite_last_insert_rowid($this->link_id) : false; - } - - - public function get_num_queries() - { - return $this->num_queries; - } - - - public function get_saved_queries() - { - return $this->saved_queries; - } - - - public function free_result($query_id = false) - { - return true; - } - - - public function escape($str) - { - return is_array($str) ? '' : sqlite_escape_string($str); - } - - - public function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = $this->error_no; - $result['error_msg'] = $this->error_msg; - - return $result; - } - - - public function close() - { - if ($this->link_id) { - if ($this->in_transaction) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array('COMMIT', 0); - } - - @sqlite_query($this->link_id, 'COMMIT'); - } - - return @sqlite_close($this->link_id); - } else { - return false; - } - } - - - public function get_names() - { - return ''; - } - - - public function set_names($names) - { - return true; - } - - - public function get_version() - { - return array( - 'name' => 'SQLite', - 'version' => sqlite_libversion() - ); - } - - - public function table_exists($table_name, $no_prefix = false) - { - $result = $this->query('SELECT 1 FROM sqlite_master WHERE name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' AND type=\'table\''); - return $this->num_rows($result) > 0; - } - - - public function field_exists($table_name, $field_name, $no_prefix = false) - { - $result = $this->query('SELECT sql FROM sqlite_master WHERE name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' AND type=\'table\''); - if (!$this->num_rows($result)) { - return false; - } - - return preg_match('%[\r\n]'.preg_quote($field_name, '%').' %', $this->result($result)); - } - - - public function index_exists($table_name, $index_name, $no_prefix = false) - { - $result = $this->query('SELECT 1 FROM sqlite_master WHERE tbl_name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' AND name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_'.$this->escape($index_name).'\' AND type=\'index\''); - return $this->num_rows($result) > 0; - } - - - public function create_table($table_name, $schema, $no_prefix = false) - { - if ($this->table_exists($table_name, $no_prefix)) { - return true; - } - - $query = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name." (\n"; - - // Go through every schema element and add it to the query - foreach ($schema['FIELDS'] as $field_name => $field_data) { - $field_data['datatype'] = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_data['datatype']); - - $query .= $field_name.' '.$field_data['datatype']; - - if (!$field_data['allow_null']) { - $query .= ' NOT NULL'; - } - - if (isset($field_data['default'])) { - $query .= ' DEFAULT '.$field_data['default']; - } - - $query .= ",\n"; - } - - // If we have a primary key, add it - if (isset($schema['PRIMARY KEY'])) { - $query .= 'PRIMARY KEY ('.implode(',', $schema['PRIMARY KEY']).'),'."\n"; - } - - // Add unique keys - if (isset($schema['UNIQUE KEYS'])) { - foreach ($schema['UNIQUE KEYS'] as $key_name => $key_fields) { - $query .= 'UNIQUE ('.implode(',', $key_fields).'),'."\n"; - } - } - - // We remove the last two characters (a newline and a comma) and add on the ending - $query = substr($query, 0, strlen($query) - 2)."\n".')'; - - $result = $this->query($query) ? true : false; - - // Add indexes - if (isset($schema['INDEXES'])) { - foreach ($schema['INDEXES'] as $index_name => $index_fields) { - $result &= $this->add_index($table_name, $index_name, $index_fields, false, $no_prefix); - } - } - - return $result; - } - - - public function drop_table($table_name, $no_prefix = false) - { - if (!$this->table_exists($table_name, $no_prefix)) { - return true; - } - - return $this->query('DROP TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name)) ? true : false; - } - - - public function rename_table($old_table, $new_table, $no_prefix = false) - { - // If the old table does not exist - if (!$this->table_exists($old_table, $no_prefix)) { - return false; - } - // If the table names are the same - elseif ($old_table == $new_table) { - return true; - } - // If the new table already exists - elseif ($this->table_exists($new_table, $no_prefix)) { - return false; - } - - $table = $this->get_table_info($old_table, $no_prefix); - - // Create new table - $query = str_replace('CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($old_table).' (', 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($new_table).' (', $table['sql']); - $result = $this->query($query) ? true : false; - - // Recreate indexes - if (!empty($table['indices'])) { - foreach ($table['indices'] as $cur_index) { - $query = str_replace('CREATE INDEX '.($no_prefix ? '' : $this->prefix).$this->escape($old_table), 'CREATE INDEX '.($no_prefix ? '' : $this->prefix).$this->escape($new_table), $cur_index); - $query = str_replace('ON '.($no_prefix ? '' : $this->prefix).$this->escape($old_table), 'ON '.($no_prefix ? '' : $this->prefix).$this->escape($new_table), $query); - $result &= $this->query($query) ? true : false; - } - } - - // Copy content across - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($new_table).' SELECT * FROM '.($no_prefix ? '' : $this->prefix).$this->escape($old_table)) ? true : false; - - // Drop the old table if the new one exists - if ($this->table_exists($new_table, $no_prefix)) { - $result &= $this->drop_table($old_table, $no_prefix); - } - - return $result; - } - - - public function get_table_info($table_name, $no_prefix = false) - { - // Grab table info - $result = $this->query('SELECT sql FROM sqlite_master WHERE tbl_name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' ORDER BY type DESC') or error('Unable to fetch table information', __FILE__, __LINE__, $this->error()); - $num_rows = $this->num_rows($result); - - if ($num_rows == 0) { - return; - } - - $table = array(); - $table['indices'] = array(); - while ($cur_index = $this->fetch_assoc($result)) { - if (empty($cur_index['sql'])) { - continue; - } - - if (!isset($table['sql'])) { - $table['sql'] = $cur_index['sql']; - } else { - $table['indices'][] = $cur_index['sql']; - } - } - - // Work out the columns in the table currently - $table_lines = explode("\n", $table['sql']); - $table['columns'] = array(); - foreach ($table_lines as $table_line) { - $table_line = trim($table_line, " \t\n\r,"); // trim spaces, tabs, newlines, and commas - if (substr($table_line, 0, 12) == 'CREATE TABLE') { - continue; - } elseif (substr($table_line, 0, 11) == 'PRIMARY KEY') { - $table['primary_key'] = $table_line; - } elseif (substr($table_line, 0, 6) == 'UNIQUE') { - $table['unique'] = $table_line; - } elseif (substr($table_line, 0, strpos($table_line, ' ')) != '') { - $table['columns'][substr($table_line, 0, strpos($table_line, ' '))] = trim(substr($table_line, strpos($table_line, ' '))); - } - } - - return $table; - } - - - public function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if ($this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $table = $this->get_table_info($table_name, $no_prefix); - - // Create temp table - $now = time(); - $tmptable = str_replace('CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' (', 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now.' (', $table['sql']); - $result = $this->query($tmptable) ? true : false; - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now.' SELECT * FROM '.($no_prefix ? '' : $this->prefix).$this->escape($table_name)) ? true : false; - - // Create new table sql - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - $query = $field_type; - - if (!$allow_null) { - $query .= ' NOT NULL'; - } - - if ($default_value === '') { - $default_value = '\'\''; - } - - if (!is_null($default_value)) { - $query .= ' DEFAULT '.$default_value; - } - - $old_columns = array_keys($table['columns']); - - // Determine the proper offset - if (!is_null($after_field)) { - $offset = array_search($after_field, array_keys($table['columns']), true) + 1; - } else { - $offset = count($table['columns']); - } - - // Out of bounds checks - if ($offset > count($table['columns'])) { - $offset = count($table['columns']); - } elseif ($offset < 0) { - $offset = 0; - } - - if (!is_null($field_name) && $field_name !== '') { - $table['columns'] = array_merge(array_slice($table['columns'], 0, $offset), array($field_name => $query), array_slice($table['columns'], $offset)); - } - - $new_table = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' ('; - - foreach ($table['columns'] as $cur_column => $column_details) { - $new_table .= "\n".$cur_column.' '.$column_details.','; - } - - if (isset($table['unique'])) { - $new_table .= "\n".$table['unique'].','; - } - - if (isset($table['primary_key'])) { - $new_table .= "\n".$table['primary_key'].','; - } - - $new_table = trim($new_table, ',')."\n".');'; - - // Drop old table - $result &= $this->drop_table($table_name, $no_prefix); - - // Create new table - $result &= $this->query($new_table) ? true : false; - - // Recreate indexes - if (!empty($table['indices'])) { - foreach ($table['indices'] as $cur_index) { - $result &= $this->query($cur_index) ? true : false; - } - } - - // Copy content back - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' ('.implode(', ', $old_columns).') SELECT * FROM '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now) ? true : false; - - // Drop temp table - $result &= $this->drop_table($table_name.'_t'.$now, $no_prefix); - - return $result; - } - - - public function alter_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - // Unneeded for SQLite - return true; - } - - - public function drop_field($table_name, $field_name, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $table = $this->get_table_info($table_name, $no_prefix); - - // Create temp table - $now = time(); - $tmptable = str_replace('CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' (', 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now.' (', $table['sql']); - $result = $this->query($tmptable) ? true : false; - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now.' SELECT * FROM '.($no_prefix ? '' : $this->prefix).$this->escape($table_name)) ? true : false; - - // Work out the columns we need to keep and the sql for the new table - unset($table['columns'][$field_name]); - $new_columns = array_keys($table['columns']); - - $new_table = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' ('; - - foreach ($table['columns'] as $cur_column => $column_details) { - $new_table .= "\n".$cur_column.' '.$column_details.','; - } - - if (isset($table['unique'])) { - $new_table .= "\n".$table['unique'].','; - } - - if (isset($table['primary_key'])) { - $new_table .= "\n".$table['primary_key'].','; - } - - $new_table = trim($new_table, ',')."\n".');'; - - // Drop old table - $result &= $this->drop_table($table_name, $no_prefix); - - // Create new table - $result &= $this->query($new_table) ? true : false; - - // Recreate indexes - if (!empty($table['indices'])) { - foreach ($table['indices'] as $cur_index) { - if (!preg_match('%\('.preg_quote($field_name, '%').'\)%', $cur_index)) { - $result &= $this->query($cur_index) ? true : false; - } - } - } - - // Copy content back - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' SELECT '.implode(', ', $new_columns).' FROM '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now) ? true : false; - - // Drop temp table - $result &= $this->drop_table($table_name.'_t'.$now, $no_prefix); - - return $result; - } - - - public function add_index($table_name, $index_name, $index_fields, $unique = false, $no_prefix = false) - { - if ($this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('CREATE '.($unique ? 'UNIQUE ' : '').'INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.' ON '.($no_prefix ? '' : $this->prefix).$table_name.'('.implode(',', $index_fields).')') ? true : false; - } - - - public function drop_index($table_name, $index_name, $no_prefix = false) - { - if (!$this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('DROP INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name) ? true : false; - } - - public function truncate_table($table_name, $no_prefix = false) - { - return $this->query('DELETE FROM '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } -} diff --git a/install/dblayer/sqlite3.php b/install/dblayer/sqlite3.php deleted file mode 100644 index 9b6438c6..00000000 --- a/install/dblayer/sqlite3.php +++ /dev/null @@ -1,686 +0,0 @@ - 'INTEGER', - '%^(TINY|SMALL|MEDIUM|BIG)?INT( )?(\\([0-9]+\\))?( )?(UNSIGNED)?$%i' => 'INTEGER', - '%^(TINY|MEDIUM|LONG)?TEXT$%i' => 'TEXT' - ); - - public function forum_is_writable($path) - { - if (is_dir($path)) { - $path = rtrim($path, '/').'/'; - return forum_is_writable($path.uniqid(mt_rand()).'.tmp'); - } - - // Check temporary file for read/write capabilities - $rm = file_exists($path); - $f = @fopen($path, 'a'); - - if ($f === false) { - return false; - } - - fclose($f); - - if (!$rm) { - @unlink($path); - } - - return true; - } - - - public function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) - { - // Prepend $db_name with the path to the forum root directory - $db_name = FEATHER_ROOT.$db_name; - - $this->prefix = $db_prefix; - - if (!file_exists($db_name)) { - @touch($db_name); - @chmod($db_name, 0666); - if (!file_exists($db_name)) { - error('Unable to create new database \''.$db_name.'\'. Permission denied', __FILE__, __LINE__); - } - } - - if (!is_readable($db_name)) { - error('Unable to open database \''.$db_name.'\' for reading. Permission denied', __FILE__, __LINE__); - } - - if (!$this->forum_is_writable($db_name)) { - error('Unable to open database \''.$db_name.'\' for writing. Permission denied', __FILE__, __LINE__); - } - - @$this->link_id = new SQLite3($db_name, SQLITE3_OPEN_READWRITE); - - if (!$this->link_id) { - error('Unable to open database \''.$db_name.'\'.', __FILE__, __LINE__); - } else { - return $this->link_id; - } - } - - - public function start_transaction() - { - ++$this->in_transaction; - - return ($this->link_id->exec('BEGIN TRANSACTION')) ? true : false; - } - - - public function end_transaction() - { - --$this->in_transaction; - - if ($this->link_id->exec('COMMIT')) { - return true; - } else { - $this->link_id->exec('ROLLBACK'); - return false; - } - } - - - public function query($sql, $unbuffered = false) - { - if (strlen($sql) > 140000) { - exit('Insane query. Aborting.'); - } - - $this->last_query = $sql; - - if (defined('FEATHER_SHOW_QUERIES')) { - $q_start = get_microtime(); - } - - $this->query_result = $this->link_id->query($sql); - - if ($this->query_result) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - } - - ++$this->num_queries; - - return $this->query_result; - } else { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array($sql, 0); - } - - $this->error_no = $this->link_id->lastErrorCode(); - $this->error_msg = $this->link_id->lastErrorMsg(); - - if ($this->in_transaction) { - $this->link_id->exec('ROLLBACK'); - } - - --$this->in_transaction; - - return false; - } - } - - - public function result($query_id = 0, $row = 0, $col = 0) - { - if ($query_id) { - $result_rows = array(); - while ($cur_result_row = @$query_id->fetchArray(SQLITE3_NUM)) { - $result_rows[] = $cur_result_row; - } - - if (!empty($result_rows) && array_key_exists($row, $result_rows)) { - $cur_row = $result_rows[$row]; - } - - if (isset($cur_row)) { - return $cur_row[$col]; - } else { - return false; - } - } else { - return false; - } - } - - - public function fetch_assoc($query_id = 0) - { - if ($query_id) { - $cur_row = @$query_id->fetchArray(SQLITE3_ASSOC); - if ($cur_row) { - // Horrible hack to get rid of table names and table aliases from the array keys - foreach ($cur_row as $key => $value) { - $dot_spot = strpos($key, '.'); - if ($dot_spot !== false) { - unset($cur_row[$key]); - $key = substr($key, $dot_spot+1); - $cur_row[$key] = $value; - } - } - } - - return $cur_row; - } else { - return false; - } - } - - - public function fetch_row($query_id = 0) - { - return ($query_id) ? @$query_id->fetchArray(SQLITE3_NUM) : false; - } - - - public function num_rows($query_id = 0) - { - if ($query_id && preg_match('/\bSELECT\b/i', $this->last_query)) { - $num_rows_query = preg_replace('/\bSELECT\b(.*)\bFROM\b/imsU', 'SELECT COUNT(*) FROM', $this->last_query); - $result = $this->query($num_rows_query); - - return intval($this->result($result)); - } else { - return false; - } - } - - - public function affected_rows() - { - return ($this->query_result) ? $this->link_id->changes() : false; - } - - - public function insert_id() - { - return ($this->link_id) ? $this->link_id->lastInsertRowID() : false; - } - - - public function get_num_queries() - { - return $this->num_queries; - } - - - public function get_saved_queries() - { - return $this->saved_queries; - } - - - public function free_result($query_id = false) - { - if ($query_id) { - @$query_id->finalize(); - } - - return true; - } - - - public function escape($str) - { - return is_array($str) ? '' : $this->link_id->escapeString($str); - } - - - public function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = $this->error_no; - $result['error_msg'] = $this->error_msg; - - return $result; - } - - - public function close() - { - if ($this->link_id) { - if ($this->in_transaction) { - if (defined('FEATHER_SHOW_QUERIES')) { - $this->saved_queries[] = array('COMMIT', 0); - } - - $this->link_id->exec('COMMIT'); - } - - return @$this->link_id->close(); - } else { - return false; - } - } - - - public function get_names() - { - return ''; - } - - - public function set_names($names) - { - return true; - } - - - public function get_version() - { - $info = SQLite3::version(); - - return array( - 'name' => 'SQLite3', - 'version' => $info['versionString'] - ); - } - - - public function table_exists($table_name, $no_prefix = false) - { - $result = $this->query('SELECT COUNT(type) FROM sqlite_master WHERE name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' AND type=\'table\''); - $table_exists = (intval($this->result($result)) > 0); - - // Free results for DROP - if ($result instanceof Sqlite3Result) { - $this->free_result($result); - } - - return $table_exists; - } - - - public function field_exists($table_name, $field_name, $no_prefix = false) - { - $result = $this->query('SELECT sql FROM sqlite_master WHERE name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' AND type=\'table\''); - $sql = $this->result($result); - - if (is_null($sql) || $sql === false) { - return false; - } - - return (preg_match('%[\r\n]'.preg_quote($field_name).' %', $sql) === 1); - } - - - public function index_exists($table_name, $index_name, $no_prefix = false) - { - $result = $this->query('SELECT COUNT(type) FROM sqlite_master WHERE tbl_name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' AND name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_'.$this->escape($index_name).'\' AND type=\'index\''); - $index_exists = (intval($this->result($result)) > 0); - - // Free results for DROP - if ($result instanceof Sqlite3Result) { - $this->free_result($result); - } - - return $index_exists; - } - - - public function create_table($table_name, $schema, $no_prefix = false) - { - if ($this->table_exists($table_name, $no_prefix)) { - return true; - } - - $query = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name." (\n"; - - // Go through every schema element and add it to the query - foreach ($schema['FIELDS'] as $field_name => $field_data) { - $field_data['datatype'] = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_data['datatype']); - - $query .= $field_name.' '.$field_data['datatype']; - - if (!$field_data['allow_null']) { - $query .= ' NOT NULL'; - } - - if (isset($field_data['default'])) { - $query .= ' DEFAULT '.$field_data['default']; - } - - $query .= ",\n"; - } - - // If we have a primary key, add it - if (isset($schema['PRIMARY KEY'])) { - $query .= 'PRIMARY KEY ('.implode(',', $schema['PRIMARY KEY']).'),'."\n"; - } - - // Add unique keys - if (isset($schema['UNIQUE KEYS'])) { - foreach ($schema['UNIQUE KEYS'] as $key_name => $key_fields) { - $query .= 'UNIQUE ('.implode(',', $key_fields).'),'."\n"; - } - } - - // We remove the last two characters (a newline and a comma) and add on the ending - $query = substr($query, 0, strlen($query) - 2)."\n".')'; - - $result = $this->query($query) ? true : false; - - // Add indexes - if (isset($schema['INDEXES'])) { - foreach ($schema['INDEXES'] as $index_name => $index_fields) { - $result &= $this->add_index($table_name, $index_name, $index_fields, false, $no_prefix); - } - } - - return $result; - } - - - public function drop_table($table_name, $no_prefix = false) - { - if (!$this->table_exists($table_name, $no_prefix)) { - return true; - } - - return $this->query('DROP TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name)) ? true : false; - } - - - public function rename_table($old_table, $new_table, $no_prefix = false) - { - // If the old table does not exist - if (!$this->table_exists($old_table, $no_prefix)) { - return false; - } - // If the table names are the same - elseif ($old_table == $new_table) { - return true; - } - // If the new table already exists - elseif ($this->table_exists($new_table, $no_prefix)) { - return false; - } - - $table = $this->get_table_info($old_table, $no_prefix); - - // Create new table - $query = str_replace('CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($old_table).' (', 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($new_table).' (', $table['sql']); - $result = $this->query($query) ? true : false; - - // Recreate indexes - if (!empty($table['indices'])) { - foreach ($table['indices'] as $cur_index) { - $query = str_replace('CREATE INDEX '.($no_prefix ? '' : $this->prefix).$this->escape($old_table), 'CREATE INDEX '.($no_prefix ? '' : $this->prefix).$this->escape($new_table), $cur_index); - $query = str_replace('ON '.($no_prefix ? '' : $this->prefix).$this->escape($old_table), 'ON '.($no_prefix ? '' : $this->prefix).$this->escape($new_table), $query); - $result &= $this->query($query) ? true : false; - } - } - - // Copy content across - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($new_table).' SELECT * FROM '.($no_prefix ? '' : $this->prefix).$this->escape($old_table)) ? true : false; - - // Drop the old table if the new one exists - if ($this->table_exists($new_table, $no_prefix)) { - $result &= $this->drop_table($old_table, $no_prefix); - } - - return $result; - } - - - public function get_table_info($table_name, $no_prefix = false) - { - // Grab table info - $result = $this->query('SELECT sql FROM sqlite_master WHERE tbl_name = \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\' ORDER BY type DESC') or error('Unable to fetch table information', __FILE__, __LINE__, $this->error()); - - $table = array(); - $table['indices'] = array(); - $num_rows = 0; - - while ($cur_index = $this->fetch_assoc($result)) { - if (empty($cur_index['sql'])) { - continue; - } - - if (!isset($table['sql'])) { - $table['sql'] = $cur_index['sql']; - } else { - $table['indices'][] = $cur_index['sql']; - } - - ++$num_rows; - } - - // Check for empty - if ($num_rows < 1) { - return; - } - - - // Work out the columns in the table currently - $table_lines = explode("\n", $table['sql']); - $table['columns'] = array(); - foreach ($table_lines as $table_line) { - $table_line = trim($table_line, " \t\n\r,"); // trim spaces, tabs, newlines, and commas - if (substr($table_line, 0, 12) == 'CREATE TABLE') { - continue; - } elseif (substr($table_line, 0, 11) == 'PRIMARY KEY') { - $table['primary_key'] = $table_line; - } elseif (substr($table_line, 0, 6) == 'UNIQUE') { - $table['unique'] = $table_line; - } elseif (substr($table_line, 0, strpos($table_line, ' ')) != '') { - $table['columns'][substr($table_line, 0, strpos($table_line, ' '))] = trim(substr($table_line, strpos($table_line, ' '))); - } - } - - return $table; - } - - - public function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - if ($this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $table = $this->get_table_info($table_name, $no_prefix); - - // Create temp table - $now = time(); - $tmptable = str_replace('CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' (', 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now.' (', $table['sql']); - $result = $this->query($tmptable) ? true : false; - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now.' SELECT * FROM '.($no_prefix ? '' : $this->prefix).$this->escape($table_name)) ? true : false; - - // Create new table sql - $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type); - $query = $field_type; - - if (!$allow_null) { - $query .= ' NOT NULL'; - } - - if ($default_value === '') { - $default_value = '\'\''; - } - - if (!is_null($default_value)) { - $query .= ' DEFAULT '.$default_value; - } - - $old_columns = array_keys($table['columns']); - - // Determine the proper offset - if (!is_null($after_field)) { - $offset = array_search($after_field, array_keys($table['columns']), true) + 1; - } else { - $offset = count($table['columns']); - } - - // Out of bounds checks - if ($offset > count($table['columns'])) { - $offset = count($table['columns']); - } elseif ($offset < 0) { - $offset = 0; - } - - if (!is_null($field_name) && $field_name !== '') { - $table['columns'] = array_merge(array_slice($table['columns'], 0, $offset), array($field_name => $query), array_slice($table['columns'], $offset)); - } - - $new_table = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' ('; - - foreach ($table['columns'] as $cur_column => $column_details) { - $new_table .= "\n".$cur_column.' '.$column_details.','; - } - - if (isset($table['unique'])) { - $new_table .= "\n".$table['unique'].','; - } - - if (isset($table['primary_key'])) { - $new_table .= "\n".$table['primary_key'].','; - } - - $new_table = trim($new_table, ',')."\n".');'; - - // Drop old table - $result &= $this->drop_table($table_name, $no_prefix); - - // Create new table - $result &= $this->query($new_table) ? true : false; - - // Recreate indexes - if (!empty($table['indices'])) { - foreach ($table['indices'] as $cur_index) { - $result &= $this->query($cur_index) ? true : false; - } - } - - // Copy content back - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' ('.implode(', ', $old_columns).') SELECT * FROM '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now) ? true : false; - - // Drop temp table - $result &= $this->drop_table($table_name.'_t'.$now, $no_prefix); - - return $result; - } - - - public function alter_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false) - { - // Unneeded for SQLite - return true; - } - - - public function drop_field($table_name, $field_name, $no_prefix = false) - { - if (!$this->field_exists($table_name, $field_name, $no_prefix)) { - return true; - } - - $table = $this->get_table_info($table_name, $no_prefix); - - // Create temp table - $now = time(); - $tmptable = str_replace('CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' (', 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now.' (', $table['sql']); - $result = $this->query($tmptable) ? true : false; - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now.' SELECT * FROM '.($no_prefix ? '' : $this->prefix).$this->escape($table_name)) ? true : false; - - // Work out the columns we need to keep and the sql for the new table - unset($table['columns'][$field_name]); - $new_columns = array_keys($table['columns']); - - $new_table = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' ('; - - foreach ($table['columns'] as $cur_column => $column_details) { - $new_table .= "\n".$cur_column.' '.$column_details.','; - } - - if (isset($table['unique'])) { - $new_table .= "\n".$table['unique'].','; - } - - if (isset($table['primary_key'])) { - $new_table .= "\n".$table['primary_key'].','; - } - - $new_table = trim($new_table, ',')."\n".');'; - - // Drop old table - $result &= $this->drop_table($table_name, $no_prefix); - - // Create new table - $result &= $this->query($new_table) ? true : false; - - // Recreate indexes - if (!empty($table['indices'])) { - foreach ($table['indices'] as $cur_index) { - if (!preg_match('%\('.preg_quote($field_name, '%').'\)%', $cur_index)) { - $result &= $this->query($cur_index) ? true : false; - } - } - } - - // Copy content back - $result &= $this->query('INSERT INTO '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).' SELECT '.implode(', ', $new_columns).' FROM '.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'_t'.$now) ? true : false; - - // Drop temp table - $result &= $this->drop_table($table_name.'_t'.$now, $no_prefix); - - return $result; - } - - - public function add_index($table_name, $index_name, $index_fields, $unique = false, $no_prefix = false) - { - if ($this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('CREATE '.($unique ? 'UNIQUE ' : '').'INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.' ON '.($no_prefix ? '' : $this->prefix).$table_name.'('.implode(',', $index_fields).')') ? true : false; - } - - - public function drop_index($table_name, $index_name, $no_prefix = false) - { - if (!$this->index_exists($table_name, $index_name, $no_prefix)) { - return true; - } - - return $this->query('DROP INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name) ? true : false; - } - - public function truncate_table($table_name, $no_prefix = false) - { - return $this->query('DELETE FROM '.($no_prefix ? '' : $this->prefix).$table_name) ? true : false; - } -} diff --git a/install/index.php b/install/index.php deleted file mode 100644 index 6c481fa4..00000000 --- a/install/index.php +++ /dev/null @@ -1,1990 +0,0 @@ - '', // COMBINING SHORT SOLIDUS OVERLAY 0337 * - "\xcc\xb8" => '', // COMBINING LONG SOLIDUS OVERLAY 0338 * - "\xe1\x85\x9F" => '', // HANGUL CHOSEONG FILLER 115F * - "\xe1\x85\xA0" => '', // HANGUL JUNGSEONG FILLER 1160 * - "\xe2\x80\x8b" => '', // ZERO WIDTH SPACE 200B * - "\xe2\x80\x8c" => '', // ZERO WIDTH NON-JOINER 200C - "\xe2\x80\x8d" => '', // ZERO WIDTH JOINER 200D - "\xe2\x80\x8e" => '', // LEFT-TO-RIGHT MARK 200E - "\xe2\x80\x8f" => '', // RIGHT-TO-LEFT MARK 200F - "\xe2\x80\xaa" => '', // LEFT-TO-RIGHT EMBEDDING 202A - "\xe2\x80\xab" => '', // RIGHT-TO-LEFT EMBEDDING 202B - "\xe2\x80\xac" => '', // POP DIRECTIONAL FORMATTING 202C - "\xe2\x80\xad" => '', // LEFT-TO-RIGHT OVERRIDE 202D - "\xe2\x80\xae" => '', // RIGHT-TO-LEFT OVERRIDE 202E - "\xe2\x80\xaf" => '', // NARROW NO-BREAK SPACE 202F * - "\xe2\x81\x9f" => '', // MEDIUM MATHEMATICAL SPACE 205F * - "\xe2\x81\xa0" => '', // WORD JOINER 2060 - "\xe3\x85\xa4" => '', // HANGUL FILLER 3164 * - "\xef\xbb\xbf" => '', // ZERO WIDTH NO-BREAK SPACE FEFF - "\xef\xbe\xa0" => '', // HALFWIDTH HANGUL FILLER FFA0 * - "\xef\xbf\xb9" => '', // INTERLINEAR ANNOTATION ANCHOR FFF9 * - "\xef\xbf\xba" => '', // INTERLINEAR ANNOTATION SEPARATOR FFFA * - "\xef\xbf\xbb" => '', // INTERLINEAR ANNOTATION TERMINATOR FFFB * - "\xef\xbf\xbc" => '', // OBJECT REPLACEMENT CHARACTER FFFC * - "\xef\xbf\xbd" => '', // REPLACEMENT CHARACTER FFFD * - "\xe2\x80\x80" => ' ', // EN QUAD 2000 * - "\xe2\x80\x81" => ' ', // EM QUAD 2001 * - "\xe2\x80\x82" => ' ', // EN SPACE 2002 * - "\xe2\x80\x83" => ' ', // EM SPACE 2003 * - "\xe2\x80\x84" => ' ', // THREE-PER-EM SPACE 2004 * - "\xe2\x80\x85" => ' ', // FOUR-PER-EM SPACE 2005 * - "\xe2\x80\x86" => ' ', // SIX-PER-EM SPACE 2006 * - "\xe2\x80\x87" => ' ', // FIGURE SPACE 2007 * - "\xe2\x80\x88" => ' ', // FEATHERCTUATION SPACE 2008 * - "\xe2\x80\x89" => ' ', // THIN SPACE 2009 * - "\xe2\x80\x8a" => ' ', // HAIR SPACE 200A * - "\xE3\x80\x80" => ' ', // IDEOGRAPHIC SPACE 3000 * - ); - } - - if (is_array($array)) { - return array_map('remove_bad_characters', $array); - } - - // Strip out any invalid characters - $array = utf8_bad_strip($array); - - // Remove control characters - $array = preg_replace('%[\x00-\x08\x0b-\x0c\x0e-\x1f]%', '', $array); - - // Replace some "bad" characters - $array = str_replace(array_keys($bad_utf8_chars), array_values($bad_utf8_chars), $array); - - return $array; -} - -// Strip out "bad" UTF-8 characters -$_GET = remove_bad_characters($_GET); -$_POST = remove_bad_characters($_POST); -$_COOKIE = remove_bad_characters($_COOKIE); -$_REQUEST = remove_bad_characters($_REQUEST); - -// -// Unset any variables instantiated as a result of register_globals being enabled -// -$register_globals = ini_get('register_globals'); -if ($register_globals === '' || $register_globals === '0' || strtolower($register_globals) === 'off') { - return; -} - -// Prevent script.php?GLOBALS[foo]=bar -if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) { - exit('I\'ll have a steak sandwich and... a steak sandwich.'); -} - -// Variables that shouldn't be unset -$no_unset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES'); - -// Remove elements in $GLOBALS that are present in any of the superglobals -$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array()); -foreach ($input as $k => $v) { - if (!in_array($k, $no_unset) && isset($GLOBALS[$k])) { - unset($GLOBALS[$k]); - unset($GLOBALS[$k]); // Double unset to circumvent the zend_hash_del_key_or_index hole in PHP <4.4.3 and <5.1.4 - } -} - -// Disable error reporting for uninitialized variables -error_reporting(E_ALL); - -// Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) -setlocale(LC_CTYPE, 'C'); - -// Turn off magic_quotes_runtime -if (get_magic_quotes_runtime()) { - set_magic_quotes_runtime(0); -} - -// Strip slashes from GET/POST/COOKIE (if magic_quotes_gpc is enabled) -if (get_magic_quotes_gpc()) { - function stripslashes_array($array) - { - return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array); - } - - $_GET = stripslashes_array($_GET); - $_POST = stripslashes_array($_POST); - $_COOKIE = stripslashes_array($_COOKIE); - $_REQUEST = stripslashes_array($_REQUEST); -} - -// Turn off PHP time limit -@set_time_limit(0); - - -// If we've been passed a default language, use it -$install_lang = isset($_POST['install_lang']) ? feather_trim($_POST['install_lang']) : 'English'; - -// Make sure we got a valid language string -$install_lang = preg_replace('%[\.\\\/]%', '', $install_lang); - -// If such a language pack doesn't exist, or isn't up-to-date enough to translate this page, default to English -if (!file_exists(FEATHER_ROOT.'lang/'.$feather->user->language.'/install.mo')) { - $install_lang = 'English'; -} - -// Load l10n -require_once FEATHER_ROOT.'include/pomo/MO.php'; -require_once FEATHER_ROOT.'include/l10n.php'; - -load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$install_lang.'/install.mo'); - -if (file_exists(FEATHER_ROOT.'include/config.php')) { - // Check to see whether FeatherBB is already installed - include FEATHER_ROOT.'include/config.php'; - - // If FEATHER is defined, config.php is probably valid and thus the software is installed - if (defined('FEATHER')) { - exit(__('Already installed')); - } -} - -// Define FEATHER because email.php requires it -define('FEATHER', 1); - -// If the cache directory is not specified, we use the default setting -if (!defined('FORUM_CACHE_DIR')) { - define('FORUM_CACHE_DIR', FEATHER_ROOT.'cache/'); -} - -// Make sure we are running at least MIN_PHP_VERSION -if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) { - exit(sprintf(__('You are running error'), 'PHP', PHP_VERSION, FORUM_VERSION, MIN_PHP_VERSION)); -} - - - -// -// Display a simple error message -// -function error($message, $file = null, $line = null, $db_error = false) -{ - global $feather_config; - // Set some default settings if the script failed before $feather_config could be populated - if (empty($feather_config)) { - $feather_config = array( - 'o_board_title' => 'FluxBB', - 'o_gzip' => '0' - ); - } - // Empty all output buffers and stop buffering - while (@ob_end_clean()); - // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent) - if ($feather_config['o_gzip'] && extension_loaded('zlib')) { - ob_start('ob_gzhandler'); - } - // Send no-cache headers - header('Expires: Thu, 21 Jul 1977 07:30:00 GMT'); // When yours truly first set eyes on this world! :) - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Cache-Control: post-check=0, pre-check=0', false); - header('Pragma: no-cache'); // For HTTP/1.0 compatibility - // Send the Content-type header in case the web server is setup to send something else - header('Content-type: text/html; charset=utf-8'); - ?> - - - - - -<?php echo generate_page_title($page_title) ?> - - - - -
      -

      An error was encountered

      -
      -File: '.$file.'
      '."\n\t\t".'Line: '.$line.'

      '."\n\t\t".'FluxBB reported: '.$message."\n"; - if ($db_error) { - echo "\t\t".'

      Database reported: '.feather_escape($db_error['error_msg']).(($db_error['error_no']) ? ' (Errno: '.$db_error['error_no'].')' : '')."\n"; - if ($db_error['error_sql'] != '') { - echo "\t\t".'

      Failed query: '.feather_escape($db_error['error_sql'])."\n"; - } - } - } else { - echo "\t\t".'Error: '.$message.'.'."\n"; - } - ?> -
      -
      - - - -close(); - } - exit; -} - - -// -// Generate output to be used for config.php -// -function generate_config_file() -{ - global $db_type, $db_host, $db_name, $db_username, $db_password, $db_prefix, $cookie_name, $cookie_seed; - - return ' \''.$db_type."',\n\t".'\'db_host\' => \''.$db_host."',\n\t".'\'db_name\' => \''.addslashes($db_name)."',\n\t".'\'db_user\' => \''.addslashes($db_username)."',\n\t".'\'db_pass\' => \''.addslashes($db_password)."',\n\t".'\'db_prefix\' => \''.addslashes($db_prefix)."'\n);\n\n".'$p_connect = false;'."\n\n".'$cookie_name = '."'".$cookie_name."';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n".'$cookie_seed = \''.random_key(16, false, true)."';\n"; -} - - -if (isset($_POST['generate_config'])) { - header('Content-Type: text/x-delimtext; name="config.php"'); - header('Content-disposition: attachment; filename=config.php'); - - $db_type = $_POST['db_type']; - $db_host = $_POST['db_host']; - $db_name = $_POST['db_name']; - $db_username = $_POST['db_username']; - $db_password = $_POST['db_password']; - $db_prefix = $_POST['db_prefix']; - $cookie_name = $_POST['cookie_name']; - $cookie_seed = $_POST['cookie_seed']; - - echo generate_config_file(); - exit; -} - - -if (!isset($_POST['form_sent'])) { - // Make an educated guess regarding base_url - $base_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://'; // protocol - $base_url .= preg_replace('%:(80|443)$%', '', $_SERVER['HTTP_HOST']); // host[:port] - $base_url .= str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])); // path - - if (substr($base_url, -1) == '/') { - $base_url = str_replace('/install', '', $base_url); - $base_url = substr($base_url, 0, -1); - } - - $db_type = $db_name = $db_username = $db_prefix = $username = $email = ''; - $db_host = 'localhost'; - $title = __('My FeatherBB Forum'); - $description = '

      '.__('Description').'

      '; - $default_lang = $install_lang; - $default_style = 'FeatherBB'; -} else { - $db_type = $_POST['req_db_type']; - $db_host = feather_trim($_POST['req_db_host']); - $db_name = feather_trim($_POST['req_db_name']); - $db_username = feather_trim($_POST['db_username']); - $db_password = feather_trim($_POST['db_password']); - $db_prefix = feather_trim($_POST['db_prefix']); - $username = feather_trim($_POST['req_username']); - $email = strtolower(feather_trim($_POST['req_email'])); - $password1 = feather_trim($_POST['req_password1']); - $password2 = feather_trim($_POST['req_password2']); - $title = feather_trim($_POST['req_title']); - $description = feather_trim($_POST['desc']); - $base_url = feather_trim($_POST['req_base_url']); - $default_lang = feather_trim($_POST['req_default_lang']); - $default_style = 'FeatherBB'; - $alerts = array(); - - // Make sure base_url doesn't end with a slash - if (substr($base_url, -1) == '/') { - $base_url = substr($base_url, 0, -1); - } - - // Validate username and passwords - if (feather_strlen($username) < 2) { - $alerts[] = __('Username 1'); - } elseif (feather_strlen($username) > 25) { // This usually doesn't happen since the form element only accepts 25 characters - $alerts[] = __('Username 2'); - } elseif (!strcasecmp($username, 'Guest')) { - $alerts[] = __('Username 3'); - } elseif (preg_match('%[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}%', $username) || preg_match('%((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))%', $username)) { - $alerts[] = __('Username 4'); - } elseif ((strpos($username, '[') !== false || strpos($username, ']') !== false) && strpos($username, '\'') !== false && strpos($username, '"') !== false) { - $alerts[] = __('Username 5'); - } elseif (preg_match('%(?:\[/?(?:b|u|i|h|colou?r|quote|code|img|url|email|list)\]|\[(?:code|quote|list)=)%i', $username)) { - $alerts[] = __('Username 6'); - } - - if (feather_strlen($password1) < 6) { - $alerts[] = __('Short password'); - } elseif ($password1 != $password2) { - $alerts[] = __('Passwords not match'); - } - - // Validate email - require FEATHER_ROOT.'include/email.php'; - - if (!is_valid_email($email)) { - $alerts[] = __('Wrong email'); - } - - if ($title == '') { - $alerts[] = __('No board title'); - } - - $languages = forum_list_langs(); - if (!in_array($default_lang, $languages)) { - $alerts[] = __('Error default language'); - } - - $styles = forum_list_styles(); - if (!in_array($default_style, $styles)) { - $alerts[] = __('Error default style'); - } -} - -// Check if the cache directory is writable -if (!forum_is_writable(FORUM_CACHE_DIR)) { - $alerts[] = sprintf(__('Alert cache'), FORUM_CACHE_DIR); -} - -// Check if default avatar directory is writable -if (!forum_is_writable(FEATHER_ROOT.'img/avatars/')) { - $alerts[] = sprintf(__('Alert avatar'), FEATHER_ROOT.'img/avatars/'); -} - -if (!isset($_POST['form_sent']) || !empty($alerts)) { - // Determine available database extensions - $dual_mysql = false; - $db_extensions = array(); - $mysql_innodb = false; - if (function_exists('mysqli_connect')) { - $db_extensions[] = array('mysqli', 'MySQL Improved'); - $db_extensions[] = array('mysqli_innodb', 'MySQL Improved (InnoDB)'); - $mysql_innodb = true; - } - if (function_exists('mysql_connect')) { - $db_extensions[] = array('mysql', 'MySQL Standard'); - $db_extensions[] = array('mysql_innodb', 'MySQL Standard (InnoDB)'); - $mysql_innodb = true; - - if (count($db_extensions) > 2) { - $dual_mysql = true; - } - } - if (function_exists('sqlite_open')) { - $db_extensions[] = array('sqlite', 'SQLite'); - } - if (class_exists('SQLite3')) { - $db_extensions[] = array('sqlite3', 'SQLite3'); - } - if (function_exists('pg_connect')) { - $db_extensions[] = array('pgsql', 'PostgreSQL'); - } - - if (empty($db_extensions)) { - error(__('No DB extensions')); - } - - // Fetch a list of installed languages - $languages = forum_list_langs(); - - ?> - - - - -<?php _e('FeatherBB Installation') ?> - - - - - -
      -
      -
      - -
      -
      -
      -
      -

      -

      -
      -
      -
      -
      - -
      -
      - 1): ?>
      -

      -
      -
      -
      -
      - -
      -

      - -
      -
      -
      -

      -
      -
      -
      - - -
      -

      -
      -
      -
      -
      -
      -

      -
        -'.$cur_alert.''."\n"; - } - ?> -
      -
      -
      -
      -
      -

      -

      -
      -
      - -
      -

      - -
      -
      -
      -
      -
      - -
      -

      - -
      -
      -
      -
      -
      - -
      -

      - -
      -
      -
      -
      -
      - -
      -

      - - -
      -
      -
      -
      -
      -
      - -
      -

      - -
      -
      -
      -
      -
      -

      -

      -
      -
      - -
      -

      - - - -
      - -
      -
      -
      -
      -
      -

      -

      -
      -
      - -
      - - - - -
      -
      -
      -

      -
      -
      -
      -
      -
      - -
      -
      -
      - - - - 0 && (!preg_match('%^[a-zA-Z_][a-zA-Z0-9_]*$%', $db_prefix) || strlen($db_prefix) > 40)) { - error(sprintf(__('Table prefix error'), $db->prefix)); - } - - // Do some DB type specific checks - switch ($db_type) { - case 'mysql': - case 'mysqli': - case 'mysql_innodb': - case 'mysqli_innodb': - $mysql_info = $db->get_version(); - if (version_compare($mysql_info['version'], MIN_MYSQL_VERSION, '<')) { - error(sprintf(__('You are running error'), 'MySQL', $mysql_info['version'], FORUM_VERSION, MIN_MYSQL_VERSION)); - } - break; - - case 'pgsql': - $pgsql_info = $db->get_version(); - if (version_compare($pgsql_info['version'], MIN_PGSQL_VERSION, '<')) { - error(sprintf(__('You are running error'), 'PostgreSQL', $pgsql_info['version'], FORUM_VERSION, MIN_PGSQL_VERSION)); - } - break; - - case 'sqlite': - case 'sqlite3': - if (strtolower($db_prefix) == 'sqlite_') { - error(__('Prefix reserved')); - } - break; - } - - - // Make sure FeatherBB isn't already installed - $result = $db->query('SELECT 1 FROM '.$db_prefix.'users WHERE id=1'); - if ($db->num_rows($result)) { - error(sprintf(__('Existing table error'), $db_prefix, $db_name)); - } - - // Check if InnoDB is available - if ($db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') { - $result = $db->query('SHOW VARIABLES LIKE \'have_innodb\''); - list(, $result) = $db->fetch_row($result); - if ((strtoupper($result) != 'YES')) { - error(__('InnoDB off')); - } - } - - - // Start a transaction - $db->start_transaction(); - - - // Create all tables - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'username' => array( - 'datatype' => 'VARCHAR(200)', - 'allow_null' => true - ), - 'ip' => array( - 'datatype' => 'VARCHAR(255)', - 'allow_null' => true - ), - 'email' => array( - 'datatype' => 'VARCHAR(80)', - 'allow_null' => true - ), - 'message' => array( - 'datatype' => 'VARCHAR(255)', - 'allow_null' => true - ), - 'expire' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'ban_creator' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ) - ), - 'PRIMARY KEY' => array('id'), - 'INDEXES' => array( - 'username_idx' => array('username') - ) - ); - - if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') { - $schema['INDEXES']['username_idx'] = array('username(25)'); - } - - $db->create_table('bans', $schema) or error('Unable to create bans table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'cat_name' => array( - 'datatype' => 'VARCHAR(80)', - 'allow_null' => false, - 'default' => '\'New Category\'' - ), - 'disp_position' => array( - 'datatype' => 'INT(10)', - 'allow_null' => false, - 'default' => '0' - ) - ), - 'PRIMARY KEY' => array('id') - ); - - $db->create_table('categories', $schema) or error('Unable to create categories table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'search_for' => array( - 'datatype' => 'VARCHAR(60)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'replace_with' => array( - 'datatype' => 'VARCHAR(60)', - 'allow_null' => false, - 'default' => '\'\'' - ) - ), - 'PRIMARY KEY' => array('id') - ); - - $db->create_table('censoring', $schema) or error('Unable to create censoring table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'conf_name' => array( - 'datatype' => 'VARCHAR(255)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'conf_value' => array( - 'datatype' => 'TEXT', - 'allow_null' => true - ) - ), - 'PRIMARY KEY' => array('conf_name') - ); - - $db->create_table('config', $schema) or error('Unable to create config table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'group_id' => array( - 'datatype' => 'INT(10)', - 'allow_null' => false, - 'default' => '0' - ), - 'forum_id' => array( - 'datatype' => 'INT(10)', - 'allow_null' => false, - 'default' => '0' - ), - 'read_forum' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'post_replies' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'post_topics' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ) - ), - 'PRIMARY KEY' => array('group_id', 'forum_id') - ); - - $db->create_table('forum_perms', $schema) or error('Unable to create forum_perms table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'forum_name' => array( - 'datatype' => 'VARCHAR(80)', - 'allow_null' => false, - 'default' => '\'New forum\'' - ), - 'forum_desc' => array( - 'datatype' => 'TEXT', - 'allow_null' => true - ), - 'redirect_url' => array( - 'datatype' => 'VARCHAR(100)', - 'allow_null' => true - ), - 'moderators' => array( - 'datatype' => 'TEXT', - 'allow_null' => true - ), - 'num_topics' => array( - 'datatype' => 'MEDIUMINT(8) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'num_posts' => array( - 'datatype' => 'MEDIUMINT(8) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'last_post' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'last_post_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'last_poster' => array( - 'datatype' => 'VARCHAR(200)', - 'allow_null' => true - ), - 'sort_by' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'disp_position' => array( - 'datatype' => 'INT(10)', - 'allow_null' => false, - 'default' => '0' - ), - 'cat_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ) - ), - 'PRIMARY KEY' => array('id') - ); - - $db->create_table('forums', $schema) or error('Unable to create forums table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'g_id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'g_title' => array( - 'datatype' => 'VARCHAR(50)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'g_user_title' => array( - 'datatype' => 'VARCHAR(50)', - 'allow_null' => true - ), - 'g_promote_min_posts' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'g_promote_next_group' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'g_moderator' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'g_mod_edit_users' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'g_mod_rename_users' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'g_mod_change_passwords' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'g_mod_ban_users' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'g_mod_promote_users' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'g_read_board' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_view_users' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_post_replies' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_post_topics' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_edit_posts' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_delete_posts' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_delete_topics' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_post_links' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_set_title' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_search' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_search_users' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_send_email' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'g_post_flood' => array( - 'datatype' => 'SMALLINT(6)', - 'allow_null' => false, - 'default' => '30' - ), - 'g_search_flood' => array( - 'datatype' => 'SMALLINT(6)', - 'allow_null' => false, - 'default' => '30' - ), - 'g_email_flood' => array( - 'datatype' => 'SMALLINT(6)', - 'allow_null' => false, - 'default' => '60' - ), - 'g_report_flood' => array( - 'datatype' => 'SMALLINT(6)', - 'allow_null' => false, - 'default' => '60' - ) - ), - 'PRIMARY KEY' => array('g_id') - ); - - $db->create_table('groups', $schema) or error('Unable to create groups table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'user_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '1' - ), - 'ident' => array( - 'datatype' => 'VARCHAR(200)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'logged' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'idle' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'last_post' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'last_search' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - ), - 'UNIQUE KEYS' => array( - 'user_id_ident_idx' => array('user_id', 'ident') - ), - 'INDEXES' => array( - 'ident_idx' => array('ident'), - 'logged_idx' => array('logged') - ) - ); - - if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') { - $schema['UNIQUE KEYS']['user_id_ident_idx'] = array('user_id', 'ident(25)'); - $schema['INDEXES']['ident_idx'] = array('ident(25)'); - } - - if ($db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') { - $schema['ENGINE'] = 'InnoDB'; - } - - $db->create_table('online', $schema) or error('Unable to create online table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'poster' => array( - 'datatype' => 'VARCHAR(200)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'poster_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '1' - ), - 'poster_ip' => array( - 'datatype' => 'VARCHAR(39)', - 'allow_null' => true - ), - 'poster_email' => array( - 'datatype' => 'VARCHAR(80)', - 'allow_null' => true - ), - 'message' => array( - 'datatype' => 'MEDIUMTEXT', - 'allow_null' => true - ), - 'hide_smilies' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'posted' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'edited' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'edited_by' => array( - 'datatype' => 'VARCHAR(200)', - 'allow_null' => true - ), - 'topic_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ) - ), - 'PRIMARY KEY' => array('id'), - 'INDEXES' => array( - 'topic_id_idx' => array('topic_id'), - 'multi_idx' => array('poster_id', 'topic_id') - ) - ); - - $db->create_table('posts', $schema) or error('Unable to create posts table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'post_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'topic_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'forum_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'reported_by' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'created' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'message' => array( - 'datatype' => 'TEXT', - 'allow_null' => true - ), - 'zapped' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'zapped_by' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ) - ), - 'PRIMARY KEY' => array('id'), - 'INDEXES' => array( - 'zapped_idx' => array('zapped') - ) - ); - - $db->create_table('reports', $schema) or error('Unable to create reports table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'ident' => array( - 'datatype' => 'VARCHAR(200)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'search_data' => array( - 'datatype' => 'MEDIUMTEXT', - 'allow_null' => true - ) - ), - 'PRIMARY KEY' => array('id'), - 'INDEXES' => array( - 'ident_idx' => array('ident') - ) - ); - - if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') { - $schema['INDEXES']['ident_idx'] = array('ident(8)'); - } - - $db->create_table('search_cache', $schema) or error('Unable to create search_cache table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'post_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'word_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'subject_match' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ) - ), - 'INDEXES' => array( - 'word_id_idx' => array('word_id'), - 'post_id_idx' => array('post_id') - ) - ); - - $db->create_table('search_matches', $schema) or error('Unable to create search_matches table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'word' => array( - 'datatype' => 'VARCHAR(20)', - 'allow_null' => false, - 'default' => '\'\'', - 'collation' => 'bin' - ) - ), - 'PRIMARY KEY' => array('word'), - 'INDEXES' => array( - 'id_idx' => array('id') - ) - ); - - if ($db_type == 'sqlite' || $db_type == 'sqlite3') { - $schema['PRIMARY KEY'] = array('id'); - $schema['UNIQUE KEYS'] = array('word_idx' => array('word')); - } - - $db->create_table('search_words', $schema) or error('Unable to create search_words table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'user_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'topic_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ) - ), - 'PRIMARY KEY' => array('user_id', 'topic_id') - ); - - $db->create_table('topic_subscriptions', $schema) or error('Unable to create topic subscriptions table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'user_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'forum_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ) - ), - 'PRIMARY KEY' => array('user_id', 'forum_id') - ); - - $db->create_table('forum_subscriptions', $schema) or error('Unable to create forum subscriptions table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'poster' => array( - 'datatype' => 'VARCHAR(200)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'subject' => array( - 'datatype' => 'VARCHAR(255)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'posted' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'first_post_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'last_post' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'last_post_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'last_poster' => array( - 'datatype' => 'VARCHAR(200)', - 'allow_null' => true - ), - 'num_views' => array( - 'datatype' => 'MEDIUMINT(8) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'num_replies' => array( - 'datatype' => 'MEDIUMINT(8) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'closed' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'sticky' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'moved_to' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'forum_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ) - ), - 'PRIMARY KEY' => array('id'), - 'INDEXES' => array( - 'forum_id_idx' => array('forum_id'), - 'moved_to_idx' => array('moved_to'), - 'last_post_idx' => array('last_post'), - 'first_post_id_idx' => array('first_post_id') - ) - ); - - $db->create_table('topics', $schema) or error('Unable to create topics table', __FILE__, __LINE__, $db->error()); - - - $schema = array( - 'FIELDS' => array( - 'id' => array( - 'datatype' => 'SERIAL', - 'allow_null' => false - ), - 'group_id' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '3' - ), - 'username' => array( - 'datatype' => 'VARCHAR(200)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'password' => array( - 'datatype' => 'VARCHAR(40)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'email' => array( - 'datatype' => 'VARCHAR(80)', - 'allow_null' => false, - 'default' => '\'\'' - ), - 'title' => array( - 'datatype' => 'VARCHAR(50)', - 'allow_null' => true - ), - 'realname' => array( - 'datatype' => 'VARCHAR(40)', - 'allow_null' => true - ), - 'url' => array( - 'datatype' => 'VARCHAR(100)', - 'allow_null' => true - ), - 'jabber' => array( - 'datatype' => 'VARCHAR(80)', - 'allow_null' => true - ), - 'icq' => array( - 'datatype' => 'VARCHAR(12)', - 'allow_null' => true - ), - 'msn' => array( - 'datatype' => 'VARCHAR(80)', - 'allow_null' => true - ), - 'aim' => array( - 'datatype' => 'VARCHAR(30)', - 'allow_null' => true - ), - 'yahoo' => array( - 'datatype' => 'VARCHAR(30)', - 'allow_null' => true - ), - 'location' => array( - 'datatype' => 'VARCHAR(30)', - 'allow_null' => true - ), - 'signature' => array( - 'datatype' => 'TEXT', - 'allow_null' => true - ), - 'disp_topics' => array( - 'datatype' => 'TINYINT(3) UNSIGNED', - 'allow_null' => true - ), - 'disp_posts' => array( - 'datatype' => 'TINYINT(3) UNSIGNED', - 'allow_null' => true - ), - 'email_setting' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'notify_with_post' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'auto_notify' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'show_smilies' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'show_img' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'show_img_sig' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'show_avatars' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'show_sig' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '1' - ), - 'timezone' => array( - 'datatype' => 'FLOAT', - 'allow_null' => false, - 'default' => '0' - ), - 'dst' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'time_format' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'date_format' => array( - 'datatype' => 'TINYINT(1)', - 'allow_null' => false, - 'default' => '0' - ), - 'language' => array( - 'datatype' => 'VARCHAR(25)', - 'allow_null' => false, - 'default' => '\''.$db->escape($default_lang).'\'' - ), - 'style' => array( - 'datatype' => 'VARCHAR(25)', - 'allow_null' => false, - 'default' => '\''.$db->escape($default_style).'\'' - ), - 'num_posts' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'last_post' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'last_search' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'last_email_sent' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'last_report_sent' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => true - ), - 'registered' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'registration_ip' => array( - 'datatype' => 'VARCHAR(39)', - 'allow_null' => false, - 'default' => '\'0.0.0.0\'' - ), - 'last_visit' => array( - 'datatype' => 'INT(10) UNSIGNED', - 'allow_null' => false, - 'default' => '0' - ), - 'admin_note' => array( - 'datatype' => 'VARCHAR(30)', - 'allow_null' => true - ), - 'activate_string' => array( - 'datatype' => 'VARCHAR(80)', - 'allow_null' => true - ), - 'activate_key' => array( - 'datatype' => 'VARCHAR(8)', - 'allow_null' => true - ), - ), - 'PRIMARY KEY' => array('id'), - 'UNIQUE KEYS' => array( - 'username_idx' => array('username') - ), - 'INDEXES' => array( - 'registered_idx' => array('registered') - ) - ); - - if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') { - $schema['UNIQUE KEYS']['username_idx'] = array('username(25)'); - } - - $db->create_table('users', $schema) or error('Unable to create users table', __FILE__, __LINE__, $db->error()); - - - $now = time(); - - // Insert the four preset groups - $db->query('INSERT INTO '.$db->prefix.'groups ('.($db_type != 'pgsql' ? 'g_id, ' : '').'g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood) VALUES('.($db_type != 'pgsql' ? '1, ' : '').'\''.$db->escape(__('Administrators')).'\', \''.$db->escape(__('Administrator')).'\', 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0)') or error('Unable to add group', __FILE__, __LINE__, $db->error()); - - $db->query('INSERT INTO '.$db->prefix.'groups ('.($db_type != 'pgsql' ? 'g_id, ' : '').'g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_mod_promote_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood) VALUES('.($db_type != 'pgsql' ? '2, ' : '').'\''.$db->escape(__('Moderators')).'\', \''.$db->escape(__('Moderator')).'\', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0)') or error('Unable to add group', __FILE__, __LINE__, $db->error()); - - $db->query('INSERT INTO '.$db->prefix.'groups ('.($db_type != 'pgsql' ? 'g_id, ' : '').'g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood) VALUES('.($db_type != 'pgsql' ? '3, ' : '').'\''.$db->escape(__('Guests')).'\', NULL, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 60, 30, 0, 0)') or error('Unable to add group', __FILE__, __LINE__, $db->error()); - - $db->query('INSERT INTO '.$db->prefix.'groups ('.($db_type != 'pgsql' ? 'g_id, ' : '').'g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood) VALUES('.($db_type != 'pgsql' ? '4, ' : '').'\''.$db->escape(__('Members')).'\', NULL, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 60, 30, 60, 60)') or error('Unable to add group', __FILE__, __LINE__, $db->error()); - - // Insert guest and first admin user - $db->query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email) VALUES(3, \''.$db->escape(__('Guest')).'\', \''.$db->escape(__('Guest')).'\', \''.$db->escape(__('Guest')).'\')') - or error('Unable to add guest user. Please check your configuration and try again', __FILE__, __LINE__, $db->error()); - - $db->query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email, language, style, num_posts, last_post, registered, registration_ip, last_visit) VALUES(1, \''.$db->escape($username).'\', \''.feather_hash($password1).'\', \''.$email.'\', \''.$db->escape($default_lang).'\', \''.$db->escape($default_style).'\', 1, '.$now.', '.$now.', \''.$db->escape(get_remote_address()).'\', '.$now.')') - or error('Unable to add administrator user. Please check your configuration and try again', __FILE__, __LINE__, $db->error()); - - // Enable/disable avatars depending on file_uploads setting in PHP configuration - $avatars = in_array(strtolower(@ini_get('file_uploads')), array('on', 'true', '1')) ? 1 : 0; - - // Insert config data - $feather_config = array( - 'o_cur_version' => FORUM_VERSION, - 'o_database_revision' => FORUM_DB_REVISION, - 'o_searchindex_revision' => FORUM_SI_REVISION, - 'o_parser_revision' => FORUM_PARSER_REVISION, - 'o_board_title' => $title, - 'o_board_desc' => $description, - 'o_default_timezone' => 0, - 'o_time_format' => 'H:i:s', - 'o_date_format' => 'Y-m-d', - 'o_timeout_visit' => 1800, - 'o_timeout_online' => 300, - 'o_redirect_delay' => 1, - 'o_show_version' => 0, - 'o_show_user_info' => 1, - 'o_show_post_count' => 1, - 'o_signatures' => 1, - 'o_smilies' => 1, - 'o_smilies_sig' => 1, - 'o_make_links' => 1, - 'o_default_lang' => $default_lang, - 'o_default_style' => $default_style, - 'o_default_user_group' => 4, - 'o_topic_review' => 15, - 'o_disp_topics_default' => 30, - 'o_disp_posts_default' => 25, - 'o_indent_num_spaces' => 4, - 'o_quote_depth' => 3, - 'o_quickpost' => 1, - 'o_users_online' => 1, - 'o_censoring' => 0, - 'o_show_dot' => 0, - 'o_topic_views' => 1, - 'o_quickjump' => 1, - 'o_gzip' => 0, - 'o_additional_navlinks' => '', - 'o_report_method' => 0, - 'o_regs_report' => 0, - 'o_default_email_setting' => 1, - 'o_mailing_list' => $email, - 'o_avatars' => $avatars, - 'o_avatars_dir' => 'img/avatars', - 'o_avatars_width' => 60, - 'o_avatars_height' => 60, - 'o_avatars_size' => 10240, - 'o_search_all_forums' => 1, - 'o_base_url' => $base_url, - 'o_admin_email' => $email, - 'o_webmaster_email' => $email, - 'o_forum_subscriptions' => 1, - 'o_topic_subscriptions' => 1, - 'o_smtp_host' => null, - 'o_smtp_user' => null, - 'o_smtp_pass' => null, - 'o_smtp_ssl' => 0, - 'o_regs_allow' => 1, - 'o_regs_verify' => 0, - 'o_announcement' => 0, - 'o_announcement_message' => __('Announcement'), - 'o_rules' => 0, - 'o_rules_message' => __('Rules'), - 'o_maintenance' => 0, - 'o_maintenance_message' => __('Maintenance message'), - 'o_default_dst' => 0, - 'o_feed_type' => 2, - 'o_feed_ttl' => 0, - 'p_message_bbcode' => 1, - 'p_message_img_tag' => 1, - 'p_message_all_caps' => 1, - 'p_subject_all_caps' => 1, - 'p_sig_all_caps' => 1, - 'p_sig_bbcode' => 1, - 'p_sig_img_tag' => 0, - 'p_sig_length' => 400, - 'p_sig_lines' => 4, - 'p_allow_banned_email' => 1, - 'p_allow_dupe_email' => 0, - 'p_force_guest_email' => 1 - ); - - foreach ($feather_config as $conf_name => $conf_value) { - $db->query('INSERT INTO '.$db_prefix.'config (conf_name, conf_value) VALUES(\''.$conf_name.'\', '.(is_null($conf_value) ? 'NULL' : '\''.$db->escape($conf_value).'\'').')') - or error('Unable to insert into table '.$db_prefix.'config. Please check your configuration and try again', __FILE__, __LINE__, $db->error()); - } - - // Insert some other default data - $subject = __('Test post'); - $message = __('Message'); - - $db->query('INSERT INTO '.$db_prefix.'categories (cat_name, disp_position) VALUES(\''.$db->escape(__('Test category')).'\', 1)') - or error('Unable to insert into table '.$db_prefix.'categories. Please check your configuration and try again', __FILE__, __LINE__, $db->error()); - - $db->query('INSERT INTO '.$db_prefix.'forums (forum_name, forum_desc, num_topics, num_posts, last_post, last_post_id, last_poster, disp_position, cat_id) VALUES(\''.$db->escape(__('Test forum')).'\', \''.$db->escape(__('This is just a test forum')).'\', 1, 1, '.$now.', 1, \''.$db->escape($username).'\', 1, 1)') - or error('Unable to insert into table '.$db_prefix.'forums. Please check your configuration and try again', __FILE__, __LINE__, $db->error()); - - $db->query('INSERT INTO '.$db_prefix.'topics (poster, subject, posted, first_post_id, last_post, last_post_id, last_poster, forum_id) VALUES(\''.$db->escape($username).'\', \''.$db->escape($subject).'\', '.$now.', 1, '.$now.', 1, \''.$db->escape($username).'\', 1)') - or error('Unable to insert into table '.$db_prefix.'topics. Please check your configuration and try again', __FILE__, __LINE__, $db->error()); - - $db->query('INSERT INTO '.$db_prefix.'posts (poster, poster_id, poster_ip, message, posted, topic_id) VALUES(\''.$db->escape($username).'\', 2, \''.$db->escape(get_remote_address()).'\', \''.$db->escape($message).'\', '.$now.', 1)') - or error('Unable to insert into table '.$db_prefix.'posts. Please check your configuration and try again', __FILE__, __LINE__, $db->error()); - - $db->end_transaction(); - - - $alerts = array(); - - // Check if we disabled uploading avatars because file_uploads was disabled - if ($avatars == '0') { - $alerts[] = __('Alert upload'); - } - - // Add some random bytes at the end of the cookie name to prevent collisions - $cookie_name = 'feather_cookie_'.random_key(6, false, true); - - // Generate the config.php file data - $config = generate_config_file(); - - // Attempt to write config.php and serve it up for download if writing fails - $written = false; - if (forum_is_writable(FEATHER_ROOT)) { - $fh = @fopen(FEATHER_ROOT.'include/config.php', 'wb'); - if ($fh) { - fwrite($fh, $config); - fclose($fh); - - $written = true; - } - } - - // Rename htaccess if rewrite is possible - if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) { - rename(FEATHER_ROOT.'.htaccess.dist', FEATHER_ROOT.'.htaccess'); - } - - - ?> - - - - - -<?php _e('FeatherBB Installation') ?> - - - - -
      -
      -
      - -
      -
      -
      -
      -

      -

      -
      -
      -
      - -
      - -
      -

      -
      - -
      -
      -
      -

      -

      -
      - - - - - - - - - - -
      -
        - '.$cur_alert.''."\n"; - } - ?> -
      -
      -
      -

      -
      - - -
      -
      -
      -

      -
      -
      -
      - -
      -
      -
      - -
      - -
      -
      -
      - - - - Date: Sat, 22 Aug 2015 21:31:35 +0200 Subject: [PATCH 129/353] Remove useless index.html Handled by .htaccess / URL rewriting --- Slim/Exception/index.html | 1 - Slim/Helper/index.html | 1 - Slim/Http/index.html | 1 - Slim/Middleware/index.html | 1 - Slim/index.html | 1 - controller/admin/index.html | 1 - img/avatars/index.html | 1 - img/index.html | 1 - img/smilies/index.html | 1 - include/index.html | 1 - include/user/index.html | 1 - include/utf8/index.html | 1 - include/utf8/mbstring/index.html | 1 - include/utf8/native/index.html | 1 - include/utf8/utils/index.html | 1 - lang/English/index.html | 1 - lang/English/mail_templates/index.html | 1 - lang/index.html | 1 - model/admin/index.html | 1 - model/index.html | 1 - plugins/index.html | 1 - style/FeatherBB/fonts/index.html | 0 style/FeatherBB/img/index.html | 0 style/FeatherBB/index.html | 0 style/FeatherBB/view/admin/bans/index.html | 1 - style/FeatherBB/view/admin/forums/index.html | 1 - style/FeatherBB/view/admin/index.html | 1 - style/FeatherBB/view/admin/maintenance/index.html | 1 - style/FeatherBB/view/index.html | 1 - style/FeatherBB/view/login/index.html | 1 - style/FeatherBB/view/misc/index.html | 1 - style/FeatherBB/view/moderate/index.html | 1 - style/FeatherBB/view/profile/index.html | 1 - style/FeatherBB/view/register/index.html | 1 - style/FeatherBB/view/search/index.html | 1 - style/imports/index.html | 1 - view/admin/bans/index.html | 1 - view/admin/forums/index.html | 1 - view/admin/index.html | 1 - view/admin/maintenance/index.html | 1 - view/index.html | 1 - view/login/index.html | 1 - view/misc/index.html | 1 - view/moderate/index.html | 1 - view/profile/index.html | 1 - view/register/index.html | 1 - view/search/index.html | 1 - 47 files changed, 44 deletions(-) delete mode 100644 Slim/Exception/index.html delete mode 100644 Slim/Helper/index.html delete mode 100644 Slim/Http/index.html delete mode 100644 Slim/Middleware/index.html delete mode 100644 Slim/index.html delete mode 100644 controller/admin/index.html delete mode 100644 img/avatars/index.html delete mode 100644 img/index.html delete mode 100644 img/smilies/index.html delete mode 100644 include/index.html delete mode 100644 include/user/index.html delete mode 100644 include/utf8/index.html delete mode 100644 include/utf8/mbstring/index.html delete mode 100644 include/utf8/native/index.html delete mode 100644 include/utf8/utils/index.html delete mode 100644 lang/English/index.html delete mode 100644 lang/English/mail_templates/index.html delete mode 100644 lang/index.html delete mode 100644 model/admin/index.html delete mode 100644 model/index.html delete mode 100644 plugins/index.html delete mode 100644 style/FeatherBB/fonts/index.html delete mode 100644 style/FeatherBB/img/index.html delete mode 100644 style/FeatherBB/index.html delete mode 100644 style/FeatherBB/view/admin/bans/index.html delete mode 100644 style/FeatherBB/view/admin/forums/index.html delete mode 100644 style/FeatherBB/view/admin/index.html delete mode 100644 style/FeatherBB/view/admin/maintenance/index.html delete mode 100644 style/FeatherBB/view/index.html delete mode 100644 style/FeatherBB/view/login/index.html delete mode 100644 style/FeatherBB/view/misc/index.html delete mode 100644 style/FeatherBB/view/moderate/index.html delete mode 100644 style/FeatherBB/view/profile/index.html delete mode 100644 style/FeatherBB/view/register/index.html delete mode 100644 style/FeatherBB/view/search/index.html delete mode 100644 style/imports/index.html delete mode 100644 view/admin/bans/index.html delete mode 100644 view/admin/forums/index.html delete mode 100644 view/admin/index.html delete mode 100644 view/admin/maintenance/index.html delete mode 100644 view/index.html delete mode 100644 view/login/index.html delete mode 100644 view/misc/index.html delete mode 100644 view/moderate/index.html delete mode 100644 view/profile/index.html delete mode 100644 view/register/index.html delete mode 100644 view/search/index.html diff --git a/Slim/Exception/index.html b/Slim/Exception/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/Slim/Exception/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/Slim/Helper/index.html b/Slim/Helper/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/Slim/Helper/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/Slim/Http/index.html b/Slim/Http/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/Slim/Http/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/Slim/Middleware/index.html b/Slim/Middleware/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/Slim/Middleware/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/Slim/index.html b/Slim/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/Slim/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/controller/admin/index.html b/controller/admin/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/controller/admin/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/img/avatars/index.html b/img/avatars/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/img/avatars/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/img/index.html b/img/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/img/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/img/smilies/index.html b/img/smilies/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/img/smilies/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/include/index.html b/include/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/include/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/include/user/index.html b/include/user/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/include/user/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/include/utf8/index.html b/include/utf8/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/include/utf8/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/include/utf8/mbstring/index.html b/include/utf8/mbstring/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/include/utf8/mbstring/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/include/utf8/native/index.html b/include/utf8/native/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/include/utf8/native/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/include/utf8/utils/index.html b/include/utf8/utils/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/include/utf8/utils/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/lang/English/index.html b/lang/English/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/lang/English/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/lang/English/mail_templates/index.html b/lang/English/mail_templates/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/lang/English/mail_templates/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/lang/index.html b/lang/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/lang/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/model/admin/index.html b/model/admin/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/model/admin/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/model/index.html b/model/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/model/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/plugins/index.html b/plugins/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/plugins/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/fonts/index.html b/style/FeatherBB/fonts/index.html deleted file mode 100644 index e69de29b..00000000 diff --git a/style/FeatherBB/img/index.html b/style/FeatherBB/img/index.html deleted file mode 100644 index e69de29b..00000000 diff --git a/style/FeatherBB/index.html b/style/FeatherBB/index.html deleted file mode 100644 index e69de29b..00000000 diff --git a/style/FeatherBB/view/admin/bans/index.html b/style/FeatherBB/view/admin/bans/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/admin/bans/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/admin/forums/index.html b/style/FeatherBB/view/admin/forums/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/admin/forums/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/admin/index.html b/style/FeatherBB/view/admin/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/admin/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/admin/maintenance/index.html b/style/FeatherBB/view/admin/maintenance/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/admin/maintenance/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/index.html b/style/FeatherBB/view/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/login/index.html b/style/FeatherBB/view/login/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/login/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/misc/index.html b/style/FeatherBB/view/misc/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/misc/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/moderate/index.html b/style/FeatherBB/view/moderate/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/moderate/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/profile/index.html b/style/FeatherBB/view/profile/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/profile/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/register/index.html b/style/FeatherBB/view/register/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/register/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/FeatherBB/view/search/index.html b/style/FeatherBB/view/search/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/FeatherBB/view/search/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/style/imports/index.html b/style/imports/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/style/imports/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/admin/bans/index.html b/view/admin/bans/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/admin/bans/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/admin/forums/index.html b/view/admin/forums/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/admin/forums/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/admin/index.html b/view/admin/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/admin/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/admin/maintenance/index.html b/view/admin/maintenance/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/admin/maintenance/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/index.html b/view/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/login/index.html b/view/login/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/login/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/misc/index.html b/view/misc/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/misc/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/moderate/index.html b/view/moderate/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/moderate/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/profile/index.html b/view/profile/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/profile/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/register/index.html b/view/register/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/register/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/view/search/index.html b/view/search/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/view/search/index.html +++ /dev/null @@ -1 +0,0 @@ -.. From 6a40a1a1da017f32ec090cd93dc858db92a0ac61 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 22 Aug 2015 22:00:56 +0200 Subject: [PATCH 130/353] Changes in namespaces Create FeatherBB namespace Reorganise files --- .../classes/auth.class.php | 4 +-- include/classes/autoload.class.php | 31 +++++++++++++++++++ .../classes/core.class.php | 6 ++-- index.php | 16 +++++----- 4 files changed, 45 insertions(+), 12 deletions(-) rename Slim/Extras/Middleware/FeatherBBAuth.php => include/classes/auth.class.php (99%) create mode 100644 include/classes/autoload.class.php rename Slim/Extras/Middleware/FeatherBBLoader.php => include/classes/core.class.php (98%) diff --git a/Slim/Extras/Middleware/FeatherBBAuth.php b/include/classes/auth.class.php similarity index 99% rename from Slim/Extras/Middleware/FeatherBBAuth.php rename to include/classes/auth.class.php index 20f124e9..d26f871b 100644 --- a/Slim/Extras/Middleware/FeatherBBAuth.php +++ b/include/classes/auth.class.php @@ -11,10 +11,10 @@ * */ -namespace Slim\Extras\Middleware; +namespace FeatherBB; use DB; -class FeatherBBAuth extends \Slim\Middleware +class Auth extends \Slim\Middleware { protected $model; diff --git a/include/classes/autoload.class.php b/include/classes/autoload.class.php new file mode 100644 index 00000000..a8bf8e35 --- /dev/null +++ b/include/classes/autoload.class.php @@ -0,0 +1,31 @@ + diff --git a/Slim/Extras/Middleware/FeatherBBLoader.php b/include/classes/core.class.php similarity index 98% rename from Slim/Extras/Middleware/FeatherBBLoader.php rename to include/classes/core.class.php index 5b17e8ce..c3884a51 100644 --- a/Slim/Extras/Middleware/FeatherBBLoader.php +++ b/include/classes/core.class.php @@ -11,10 +11,10 @@ * */ -namespace Slim\Extras\Middleware; +namespace FeatherBB; use DB; -class FeatherBBLoader extends \Slim\Middleware +class Core extends \Slim\Middleware { protected $forum_env, $forum_settings; @@ -31,7 +31,7 @@ public function __construct(array $data) 'cache_dir' => 'cache/', 'debug' => false), $data); // Define some core variables - $this->forum_env['FEATHER_ROOT'] = realpath(dirname(__FILE__).'/../../../').'/'; + $this->forum_env['FEATHER_ROOT'] = realpath(dirname(__FILE__).'/../../').'/'; $this->forum_env['FORUM_CACHE_DIR'] = is_writable($this->forum_env['FEATHER_ROOT'].$data['cache_dir']) ? realpath($this->forum_env['FEATHER_ROOT'].$data['cache_dir']).'/' : null; $this->forum_env['FORUM_CONFIG_FILE'] = $this->forum_env['FEATHER_ROOT'].$data['config_file']; $this->forum_env['FEATHER_DEBUG'] = $this->forum_env['FEATHER_SHOW_QUERIES'] = ($data['debug'] == 'all'); diff --git a/index.php b/index.php index 5b22fd16..6402f375 100644 --- a/index.php +++ b/index.php @@ -17,17 +17,19 @@ require 'Slim/Slim.php'; \Slim\Slim::registerAutoloader(); -// Instantiate Slim +// Instantiate Slim and add CSRF $feather = new \Slim\Slim(); +$feather->add(new \Slim\Extras\Middleware\CsrfGuard('featherbb_csrf')); + +// Load FeatherBB +require 'include/classes/autoload.class.php'; +\FeatherBB\Loader::registerAutoloader(); + $feather_settings = array('config_file' => 'include/config.php', 'cache_dir' => 'cache/', 'debug' => 'all'); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) - -// Load middlewares -$feather->add(new \Slim\Extras\Middleware\CsrfGuard('featherbb_csrf')); // CSRF -$feather->add(new \Slim\Extras\Middleware\FeatherBBAuth()); -$feather->add(new \Slim\Extras\Middleware\FeatherBBLoader($feather_settings)); // FeatherBB - // FeatherBB +$feather->add(new \FeatherBB\Auth()); +$feather->add(new \FeatherBB\Core($feather_settings)); // Load the routes require 'include/routes.php'; From aa143a3ee8da206b271b7aa0cc89504f3cc38f03 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 22 Aug 2015 22:05:08 +0200 Subject: [PATCH 131/353] Remove FluxBB logo --- img/test.png | Bin 2055 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 img/test.png diff --git a/img/test.png b/img/test.png deleted file mode 100644 index 4241f08ad3367a60d646ba679e2e163d4cfd14d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2055 zcmV+i2>ADjP)Px!jlJwWv2b3R2(Ib@eYai>IetZkXhM|rVKg1bmiSU*BV ze4)l_hNEGCr#?tjWQ@E+NK8#uUY?$wi@WOn{{DKg!qEcaQWQ470 zkiu?_t9F{dXNgt!5mr_zveSLjhU0slnkWF=?NpPA-W{Eyr zf>vvQI$?!%qRwD~t8I#>X^yghtk+|TyIp>$SZ<1Cf}M$piHW%7gRRy{R%F4!!F6?Y zd9UDnv*uoo!fBh$KW3O(gt0kchB{hzI#q2$V17hukxN->Tz8O5ZIot(r*xUUWqy@$ zmAZF#cUzlRuK)lANl8RORCwC$*lAZ2R~*OjzbM=gV>^UkG+k_^Sh0Xwn?S2tZ4v|! z1F0Y&pduiJC|wszOBX?QWOLtDtZS`X-D~%Ke?|S>naND1!yMAmlhSkYeR5~+Ig|4_ zHHm+%Z){6BEMfhM%m=@gw0qGf~xfkL}diWUSr+}TCw*V57> zhaD8TYFobkqJ_}oQ<3OAzww9fmypr{leVeY%Pm$^=uKP%IE=QvC5ChIv+wy6z8|3l%hI$)}&NI?pP#5(z$z$xUvr;(fQpT zIQNj!eA%hZ#hrx|p}vB1DT&TU&^#(I9E?Qy7|kye&^ z?ACF{*p@zjLpmE?>B6k{YydM=et!dFTknx^)vqJj`7V;3FQV}|DXE7`gHY=o6JO;@ z#w-HH4^ITxNF$*^015T>r?b9FW9M5)zdv6><8+d90WQ1kCb7e&6hZ^(%tB(v0?fi$ zUd9qhY@vlU7=HPMd-v}BGQ_z;(r-ZHbyDgbTvui#u zWKim^UAyu~cVEg!T4(*dV6($@k~<9--o!yyS=u}jo2EE-GBypv{i-vIv6F_*jEsz2 z`APpClASq7>r|@`+eugW7M)G@9#c1IoYF!Dw9eCvl^Z(a;^Hz$`#gek3L+(UM@PrC zlwh4CcWKe0MWPd9isHmcv$Cto0PUe}(-FJQiPg*2I)@lLF+OKeQPJxbP2}Id3ky5 ziW4VmDVY7p3p@w?#VMQ~W{GDg#5r)biZy{bF6XRSvksE39hjbpu?C|}apEK<a|AO@i4Dw>nDw7Ir?2JRAl?4-Ze`4$8L~fJjnf!w z3di{}TK4ZcT{~Lmw6?a!l<1t4iD&(g>O^O@FlMx(g>Zf@JC`HXnG?42N6=bEcNUv( zSdW^`=KXpnzcB?gP8u@4feLZRB{|Ee6(;G&K=34IV%K>vys0$8B_=7rJo2T zJc~r^SxksCr~Dkg z(+Arpg~XdVLv_}e_uGlr#-W=Pr}98z3pLJ4+(UcGpc(^b&Z_X8)Xt&4Li_Z#xgJl@ zS#s!Ts=Tl^4)qBkPG{C}mOjL}!S6bAu!>axZq&uA1+w#1Bsp`=U06YX!&$vQo(JOf znRh*s(|J(&;~}Bt5Z|M1PB>XrcGF3J6|#T3fL=qq)TDvmq-DKEXS2>)x?U5*xrNI@Rdi>7uby lo&Pwy5dEDtTC`~6=}$IXV*MH8r7{2j002ovPDHLkV1fe=2A==` From 3537eb029688ae64e549e6ecdcad2cad71909f00 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 22 Aug 2015 22:13:42 +0200 Subject: [PATCH 132/353] Update srand.php --- include/srand.php | 108 ++++++++++++++++++++++++---------------------- 1 file changed, 56 insertions(+), 52 deletions(-) diff --git a/include/srand.php b/include/srand.php index 04dc702e..82dc007a 100644 --- a/include/srand.php +++ b/include/srand.php @@ -37,7 +37,7 @@ */ function secure_random_bytes($len = 10) { - + /* * Our primary choice for a cryptographic strong randomness function is * openssl_random_pseudo_bytes. @@ -45,11 +45,12 @@ function secure_random_bytes($len = 10) $SSLstr = '4'; // http://xkcd.com/221/ if (function_exists('openssl_random_pseudo_bytes') && (version_compare(PHP_VERSION, '5.3.4') >= 0 || - substr(PHP_OS, 0, 3) !== 'WIN')) { - $SSLstr = openssl_random_pseudo_bytes($len, $strong); - if ($strong) { - return $SSLstr; - } + substr(PHP_OS, 0, 3) !== 'WIN')) + { + $SSLstr = openssl_random_pseudo_bytes($len, $strong); + if ($strong) { + return $SSLstr; + } } /* @@ -63,10 +64,10 @@ function secure_random_bytes($len = 10) if (function_exists('mcrypt_create_iv') && (version_compare(PHP_VERSION, '5.3.7') >= 0 || substr(PHP_OS, 0, 3) !== 'WIN')) { - $str = mcrypt_create_iv($len, MCRYPT_DEV_URANDOM); - if ($str !== false) { - return $str; - } + $str = mcrypt_create_iv($len, MCRYPT_DEV_URANDOM); + if ($str !== false) { + return $str; + } } @@ -78,43 +79,45 @@ function secure_random_bytes($len = 10) * time needed to compute a number of SHA-1 hashes. */ $str = ''; - $bits_per_round = 2; // bits of entropy collected in each clock drift round + $bits_per_round = 2; // bits of entropy collected in each clock drift round $msec_per_round = 400; // expected running time of each round in microseconds $hash_len = 20; // SHA-1 Hash length $total = $len; // total bytes of entropy to collect $handle = @fopen('/dev/urandom', 'rb'); - if ($handle && function_exists('stream_set_read_buffer')) { - @stream_set_read_buffer($handle, 0); - } + if ($handle && function_exists('stream_set_read_buffer')) { + @stream_set_read_buffer($handle, 0); + } - do { - $bytes = ($total > $hash_len)? $hash_len : $total; - $total -= $bytes; + do + { + $bytes = ($total > $hash_len)? $hash_len : $total; + $total -= $bytes; //collect any entropy available from the PHP system and filesystem $entropy = rand() . uniqid(mt_rand(), true) . $SSLstr; - $entropy .= implode('', @fstat(@fopen(__FILE__, 'r'))); - $entropy .= memory_get_usage() . getmypid(); - $entropy .= serialize($_ENV) . serialize($_SERVER); - if (function_exists('posix_times')) { - $entropy .= serialize(posix_times()); - } - if (function_exists('zend_thread_id')) { - $entropy .= zend_thread_id(); - } - if ($handle) { - $entropy .= @fread($handle, $bytes); - } else { - // Measure the time that the operations will take on average - for ($i = 0; $i < 3; $i++) { - $c1 = get_microtime(); - $var = sha1(mt_rand()); - for ($j = 0; $j < 50; $j++) { - $var = sha1($var); - } - $c2 = get_microtime(); - $entropy .= $c1 . $c2; + $entropy .= implode('', @fstat(@fopen( __FILE__, 'r'))); + $entropy .= memory_get_usage() . getmypid(); + $entropy .= serialize($_ENV) . serialize($_SERVER); + if (function_exists('posix_times')) { + $entropy .= serialize(posix_times()); + } + if (function_exists('zend_thread_id')) { + $entropy .= zend_thread_id(); + } + if ($handle) { + $entropy .= @fread($handle, $bytes); + } else { + // Measure the time that the operations will take on average + for ($i = 0; $i < 3; $i++) + { + $c1 = microtime(true); + $var = sha1(mt_rand()); + for ($j = 0; $j < 50; $j++) { + $var = sha1($var); + } + $c2 = microtime(true); + $entropy .= $c1 . $c2; } // Based on the above measurement determine the total rounds @@ -124,22 +127,23 @@ function secure_random_bytes($len = 10) // Take the additional measurements. On average we can expect // at least $bits_per_round bits of entropy from each measurement. $iter = $bytes * (int) (ceil(8 / $bits_per_round)); - for ($i = 0; $i < $iter; $i++) { - $c1 = get_microtime(); - $var = sha1(mt_rand()); - for ($j = 0; $j < $rounds; $j++) { - $var = sha1($var); - } - $c2 = get_microtime(); - $entropy .= $c1 . $c2; + for ($i = 0; $i < $iter; $i++) { + $c1 = microtime(); + $var = sha1(mt_rand()); + for ($j = 0; $j < $rounds; $j++) { + $var = sha1($var); } - } + $c2 = microtime(); + $entropy .= $c1 . $c2; + } + + } // We assume sha1 is a deterministic extractor for the $entropy variable. $str .= sha1($entropy, true); - } while ($len > strlen($str)); + } while ($len > strlen($str)); - if ($handle) { - @fclose($handle); - } - return substr($str, 0, $len); + if ($handle) { + @fclose($handle); + } + return substr($str, 0, $len); } From b8670979e21bbebf3d90db51c19981dceda8f01a Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sun, 23 Aug 2015 11:05:56 +0200 Subject: [PATCH 133/353] Add stopwords in cache Various bug fixes --- extern.php | 6 +++--- include/cache.php | 49 ------------------------------------------ include/functions.php | 18 ++++++++-------- include/search_idx.php | 17 ++++++--------- model/cache.php | 12 +++++++++++ 5 files changed, 30 insertions(+), 72 deletions(-) diff --git a/extern.php b/extern.php index 327693d0..065258fa 100644 --- a/extern.php +++ b/extern.php @@ -716,11 +716,11 @@ function output_html($feed) // Show board statistics elseif ($action == 'stats') { - if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \model\cache::get_users_info()); + if (!$feather->cache->isCached('users_info')) { + $feather->cache->store('users_info', \model\cache::get_users_info()); } - $stats = $this->feather->cache->retrieve('users_info'); + $stats = $feather->cache->retrieve('users_info'); $stats_query = \DB::for_table('forums') ->select_expr('SUM(num_topics)', 'total_topics') diff --git a/include/cache.php b/include/cache.php index db7add9a..7f7b0f4e 100644 --- a/include/cache.php +++ b/include/cache.php @@ -7,55 +7,6 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -// -// Generate a cache ID based on the last modification time for all stopwords files -// -function generate_stopwords_cache_id() -{ - $files = glob(FEATHER_ROOT.'lang/*/stopwords.txt'); - if ($files === false) { - return 'cache_id_error'; - } - - $hash = array(); - - foreach ($files as $file) { - $hash[] = $file; - $hash[] = filemtime($file); - } - - return sha1(implode('|', $hash)); -} - - -// -// Generate the stopwords cache PHP script -// -function generate_stopwords_cache() -{ - $stopwords = array(); - - $d = dir(FEATHER_ROOT.'lang'); - while (($entry = $d->read()) !== false) { - if ($entry{0} == '.') { - continue; - } - - if (is_dir(FEATHER_ROOT.'lang/'.$entry) && file_exists(FEATHER_ROOT.'lang/'.$entry.'/stopwords.txt')) { - $stopwords = array_merge($stopwords, file(FEATHER_ROOT.'lang/'.$entry.'/stopwords.txt')); - } - } - $d->close(); - - // Tidy up and filter the stopwords - $stopwords = array_map('feather_trim', $stopwords); - $stopwords = array_filter($stopwords); - - // Output stopwords as PHP code - $content = ''; - featherbb_write_cache_file('cache_stopwords.php', $content); -} - // // Safely write out a cache file. diff --git a/include/functions.php b/include/functions.php index cd8ccc1e..ad27e8d8 100644 --- a/include/functions.php +++ b/include/functions.php @@ -76,11 +76,11 @@ function get_admin_ids() { // Get Slim current session $feather = \Slim\Slim::getInstance(); - if (!$this->feather->cache->isCached('admin_ids')) { - $this->feather->cache->store('admin_ids', \model\cache::get_admin_ids()); + if (!$feather->cache->isCached('admin_ids')) { + $feather->cache->store('admin_ids', \model\cache::get_admin_ids()); } - return $this->feather->cache->retrieve('admin_ids'); + return $feather->cache->retrieve('admin_ids'); } @@ -421,14 +421,14 @@ function censor_words($text) $feather = \Slim\Slim::getInstance(); - if (!$this->feather->cache->isCached('search_for')) { - $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); - $search_for = $this->feather->cache->retrieve('search_for'); + if (!$feather->cache->isCached('search_for')) { + $feather->cache->store('search_for', \model\cache::get_censoring('search_for')); + $search_for = $feather->cache->retrieve('search_for'); } - if (!$this->feather->cache->isCached('replace_with')) { - $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); - $replace_with = $this->feather->cache->retrieve('replace_with'); + if (!$feather->cache->isCached('replace_with')) { + $feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); + $replace_with = $feather->cache->retrieve('replace_with'); } if (!empty($search_for) && !empty($replace_with)) { diff --git a/include/search_idx.php b/include/search_idx.php index 364ec00e..225c3571 100644 --- a/include/search_idx.php +++ b/include/search_idx.php @@ -83,24 +83,19 @@ function validate_search_word($word, $idx) { static $stopwords; + // Get Slim current session + $feather = \Slim\Slim::getInstance(); + // If the word is a keyword we don't want to index it, but we do want to be allowed to search it if (is_keyword($word)) { return !$idx; } if (!isset($stopwords)) { - if (file_exists(FORUM_CACHE_DIR.'cache_stopwords.php')) { - include FORUM_CACHE_DIR.'cache_stopwords.php'; - } - - if (!defined('FEATHER_STOPWORDS_LOADED')) { - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_stopwords_cache(); - require FORUM_CACHE_DIR.'cache_stopwords.php'; + if (!$feather->cache->isCached('stopwords')) { + $feather->cache->store('stopwords', \model\cache::get_config(), '+1 week'); } + $stopwords = $feather->cache->retrieve('stopwords'); } // If it is a stopword it isn't valid diff --git a/model/cache.php b/model/cache.php index 33d7906d..c0f485a3 100644 --- a/model/cache.php +++ b/model/cache.php @@ -114,4 +114,16 @@ public static function get_quickjump() } return $output; } + + public static function get_stopwords($lang_path) + { + $files = new \DirectoryIterator($lang_path); + $stopwords = array(); + foreach($files as $file) { + if(!$file->isDot() && $file->getBasename() != '.DS_Store' && $file->isDir() && file_exists($file->getPathName().'/stopwords.txt')) { + $stopwords = array_merge($stopwords, file($file->getPathName().'/stopwords.txt')); + } + } + return array_map('feather_trim', $stopwords); + } } From 435cb0e75e985da9d19026abbb2e447bfa830663 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sun, 23 Aug 2015 11:08:53 +0200 Subject: [PATCH 134/353] Remove legacy dblayer references --- model/admin/users.php | 2 +- model/profile.php | 2 +- model/search.php | 18 +++++------------- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/model/admin/users.php b/model/admin/users.php index 58ccea8a..738f2e4f 100644 --- a/model/admin/users.php +++ b/model/admin/users.php @@ -338,7 +338,7 @@ public function delete_users() ->order_by('posted') ->find_one_col('id'); - if ($this->db->result($result2) == $cur_post['id']) { + if ($result2 == $cur_post['id']) { delete_topic($cur_post['topic_id']); } else { delete_post($cur_post['id'], $cur_post['topic_id']); diff --git a/model/profile.php b/model/profile.php index 71c06b8c..581c314f 100644 --- a/model/profile.php +++ b/model/profile.php @@ -607,7 +607,7 @@ public function delete_user($id) ->order_by('posted') ->find_one_col('id'); - if ($this->db->result($result2) == $cur_post['id']) { + if ($result2 == $cur_post['id']) { delete_topic($cur_post['topic_id']); } else { delete_post($cur_post['id'], $cur_post['topic_id']); diff --git a/model/search.php b/model/search.php index ba8ba002..3bd0de2a 100644 --- a/model/search.php +++ b/model/search.php @@ -21,8 +21,8 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - - + + public function get_search_results() { global $lang_search; @@ -533,14 +533,6 @@ public function get_search_results() ->set($insert_cache) ->save(); - if ($search_type[0] != 'action') { - $this->db->end_transaction(); - $this->db->close(); - - // Redirect the user to the cached result page - header('Location: '.get_link('search/?search_id='.$search_id)); - exit; - } } // If we're on the new posts search, display a "mark all as read" link @@ -778,7 +770,7 @@ public function display_search_results($search) public function get_list_forums() { global $lang_search; - + $output = ''; $select_get_list_forums = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.redirect_url'); @@ -838,7 +830,7 @@ public function get_list_forums() $output .= "\t\t\t\t\t\t".''."\n"; $output .= "\t\t\t\t\t\t".'
      '."\n"; } - + return $output; } } From 3f04fb539acc880406b75f5c158acbfbb1500056 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sun, 23 Aug 2015 11:14:49 +0200 Subject: [PATCH 135/353] Add featherBB logo --- img/logo.png | Bin 0 -> 52011 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 img/logo.png diff --git a/img/logo.png b/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e3315969c11b563cbd0c96864d2795ec198086d4 GIT binary patch literal 52011 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 dDDlSS7xbu~d zM1UtmJx0k;&k=~=QUcu;9Mx4@Fb8{%j69i?;Qgj(D+PpUbRC5Zi|cIW@r}FIxGLyq zV3zE(#D5gY$gkPHb?3H&cc3-yzJ2gm_@>E<1OCr_pCTL^zaF{u`HTe$1!MF1j2&BW za_#yj<|yAreB*?^S((FEF<8OugLCB9uy?O)`1In7`SCDm{aDjli~g)+0m$!6TMmFj zX0TFln>LpWzxSR+pLFWPbeX|T6h1O63+2iED_Euu4Phz&|A3%@k_EH!7GEKZcJ%AEFP1 zK+}co+&h&kAgIrptuNCN?Udu4DvK@JGGX%R@K&2Ps9DwV->qM*&sV;OkAnHi_ks^U zgjiZKZT&Zg|IV*pz-nYW5b;mKS5sD2HOU<*c8Rj_-urwHYMF@n@+SogS44ver}$C( zyD;rI?sGhV_W*O3KUI{4@1`Y);DVvT;cS%L5Wosk(0f|8e<0tEWjVIN@;Eb&OCN}A z+$2nd@|}s&A=*2(`x#%!YxilIeTX#K$ri04GaS?T`*_&)uy>*WPQP9*oY<4$%MgaA z90|bi&%iS!z#&COk!i2k25SrWcAqvxmSmCl^H1|XkM~gWaOpSrzDgb{DuR<7X?>!V z?;^k7Yjg(mUN66C@m+t#CZog)hlx~exioFL(0D4SXi_b*{eW z_15EVx%QQ}QuOHX=}xr93@K{H%9ThiVDPA!A72c$Kkt# z55Vv_Q0WWGjh4m~csd}6&Og6P7nC4*=9y{J;OjWS2?=s934$-?yYEE!=)FY`LUXaD zfm!X0YK?pyHj(d9S?Tp+e9t7logu@LwX|TO8WJ^|HjR%*{}e=*K{G@#d*Q3G%TgwIZ+Kttyt8oO zQUH&Sd71B;Yw`}G(bN0y|M;7*=v*R81Noh3^G5KMSISTA+jqVYeBeNnCcS%)8B_aw zY9T8uHxHkAT;z?zL;gMLr3Ib{f|O=S5(J4#8FT z8DuI*lhxH%%ky#Hw*<+~c*xW~dbF?*nu?a9iBvgV3!Vkdj7edhVrWQq_)eTo09sg` zkdSKr+_rjrVx_R%`~480fIA3C&!np9p-+hGLs&iav;Z9RI>(B?YKpvv6xcxk#N=~} zmAtNi=hvVhpbP*pg*xE!z$lwfx{!()N~B2$}bdxoKLn2Xg_<59SAoAWq8v}LU2 z$d<1(>=Wcfzr?m$ZOPrb#e4Wb`lId6}N{Sq+?kILG zXCs16$QI1X%Vj1xvO9#pPPH|_N?*TTf0}ILFMQVXGoJBmFu*1ii;(UZVtVG*`SySB zv(CQv+VPH(Kk*JC*S_o+iUHRZN;q$|?mX^`UkU9^Z zbW_7db)IBw?tt8!o7ZzjG&6Y`s@87U2rxFkU`g)wCMe>#=R*;0Y($B1!Lv~MB>0SO zAtde%>3EzwTUkcNhW^^(H^^yWZn#`o>ieDwJ_gu)qpEsj@ zjUUn3BynoO6y&EQO-o*kAPWAezKm`}B^L<3&Ayi2)uN-|OjKh|o}M@b;l&v((`Tjr zld<&2($Z0DEIB!O8mjyvAr#SJA9tR2-XgByeb(*M`HQB_>mmimv}BPWI8x{!4mo5? zjtT1s)6YKvbLPlC9$eQ50k_<8>17W*@X^OunHQG){OgM^TCcnMr~dunl-_d3=FQu; z!!)&sQ|$c2ST4DwZ(mfi-7#>-j$QX~jpy2*e){>^$dzwI+3pyyw z42g@-P-Jg()u|Bk=W2rwAXco;w_WF-&IQ_fLFh#ef(hi?Zwm`0ql)aME*Pw4w2F;b ziBpCx%9i81eaYjKsRA=ZSo- zcpV8bpE-XVh7JRr>?}z4HBErB}v^pBCj6$d!Mck<3V@4ffcSB(Aiw_=qd7JPbd1hmK=%G>{`q;d_9KzhzGg7{)3QZ^i%2d-SloPBZ#G`2B&K1GiUx zALt?Qm6*<7#;#&NMV>(kf0Cb;KQ4S#MnFwN*r|i+>@k@Umo{O@%coV^Hi@F<S2-BWOaP-uZW#BauB(BJE@vcVhXFN5z0BD}j#FL4zW?9{qYhSN3t`Q_n zPd*3vG|9=boV(X6!>5z_CiO-wv*Z~`(-S+%=M}%3u-@DCN<Il;HKZR?iJyLS5hT;m8Z*Jvj((4m7O zM}Qn5TCoi1+gEo3C;vyIu+%WHZ=Vd`ZQk7Odi2%9$~tso==ae2%I{ZPTvPq@|8htEWM#3Hv1t-fy zKd^s14>5ecJrSlKE*PeGr>N2*=-ZJn877_NWF$&rMUVZ|;3=h3@;iwyF_tzfrK9Zo zAq5MLV#Erc`hj2@{}-mFfv)RC!XMHsbL3l!6d?L-x~{dy%AbpXvy{dZ_*8mWq{m6s ztRl}#ASpamn<9FU?}sT8Vbj>3KM1X$L=@H|5NHJj#l?8fs5ORd_N}%=`x);^Tcd4= z@PXvGN}%y9zHHHVE3fDC?%BO-|2}@DxNHCZTX!t{Zuld=eo*-@${~kh$q^ujmFmu2 zx(I08SPG68J_(Nt3tPIVbp$6hI<@IyCCK#QXP+$u$t|%nxpG_!MOf)1Z&S}kz5~XF zD`L+hlg|GA`yWQBkQ!R8t7={)j%4T=bdDHA)Rx{uWAG{X-DPEEVA#_=9^o_5S&wi? zl=r^6#$$Zp9DeAbzx;qkRE--$16h7Kz}UinEjjJ?&W!!=__}pqaME>egsaNC83}h` z;WiJCXI~-=IFO@%sS6X1WRd8yA)>E3l$W_X^5-bztQqy63=@o}t#?xS`~36o^Gx)9 zBN)Bt{70Gc-ut}&E#>6mo9u?S?CSOkB=-b5AyFf z+>vFWxMA6QT!j281i@J0zz>Gc7YUr@{(11Fl$S%q2n}OA@;J&L@OKS%td4fE*S|dlY?LUF@>OVsMS@Eg5^}<>4#GNqNCUn`zJVXAb;?I!CZi_S_^BvAQ;V+nqlEK>&a#_ zINwDJ+Hh`I3&UBQ7zh|)wqHWPJoRc$%^Po&34tkh%e(_bZN2mEN1eao4F3CbSAAc! zGtviOO~jKaaC}QMZZ6jATx>0jJWDv%wz@HV?o=lfr9|4vaz;{1NvRf6GWbIqm! z-~YMmVlCG&rE!L@b#;A39sS%_8>Y6OjCrpIo7SeeZ!|QfHGJ%)Eq2|+_b=whH;R@2 zukIFxujd|d-QOZhpz!y5nyWzUFEZ{kQX37yVU%7$wcp<2MafM09JauClcMGr7i@`e zuBWGGWWd>8zjfWZ2xX1!d zt3!W`diVZ^po|RZEI;*BVzA+GbSC-p|Nh^HKm9sv7|zlxA(oL88W$W#c>^}3Goq-p z6vhp4T`(|K=4;4Ic6mIakVlp(6Cyj~A$qIhhi%_(`4aksq^812Yi5!Qk`0vhJrp@p zOu=(AJKK6j#m^s`*=?3bx11Mmo=B&O_xr+M6e5Rq(u){i>u% z^!=>o&~a!=c<=S=*Q*DO@2t04w{Gq5vraKO5e|{( zNXD!!KsYM&0&FMF^i4+C>rHE~Jil{eE{OhKx)r9OFM0x8VOg-~QaEAP`*xlbnvQ2q znw)g8jE<6Fy3(hDqKDGt5)rio&EQg3FBiYgJ=1l8mT34!jI4N&E626e1Jlh6Em`Yr z6gd=Ox9+dpj|v7pUCzhn*Q9Smgva*Mmbx$H8cMftqCQy_BXm!9ErKa3=m~jXB7zt+ z1bDUxAYPy`XgrwN{gpIf;e7Z^WTKs0B-$Y?81s21x+lOimik=Ej6@Wjd`7E_O!TB_ zveXQ+b)e}a-0iy)VYQxbd@l>r*hJ|=@xASR(Dx#r|D%-mlJOoUx+lVU&ks(3sVw!P zw6Bvo@$081BqW@R4D{eQJa=JXNlGc-zhl_Wfq5T_{w$)8$L`&E_e0ZMwDbFSe*5>f zRw84(#o+(x%h?9D{_W4VHCVWH__M*%>i&)$a;Pfggz+9yy6L7H1_QHaKR5uWRf{x^ zWI=F#g3yr<#Ms?;Pnv|Py1RGp+b5%jWc6JuUGP<(J{NGtnm@R(5YFnQOTYgH znl^3mVyl;g?S3Sxt?u0`dyGe9War3?a2Q+QBp)&2`s*1x_x&?oYw{1q-fROf_R~*m z)*!R|+i!pUb^m@aJf9CMWQ=e!n@(H9gav(voZNDhPIPEOf{_|gP}mkxR9?xr6Q=kk z!|9zkHE}AUttgsGY;y*iG9!69oZ++|B^pKf^l8b-c%I}L$;o)0#6&r7%5=G%Jj3vP z7y`n)AHN%-yTHgJOfv0zdBo1llsT|KS4%@H-LZ)kDmzDold$_utp7L9MH8Teoi6vpXd6 z#aXy(*R8vd_~#Tsbm+*CW5PNl1S>RX>eN#|0DP0E(;t~sC<-Yw7Kpr7xtl8@s)CEk zOjSAGybhV>VTN5i1fvuBqsty`nK`>Cg*{Q8zV0Tkuiym{+Z2&|18!KlIb z1Y;cIAC0h3zrU;ujL+|v8Sqq_iHbVHAcmDPdZ8O7N5V22T#m%ZN#KZaQlx;8`+bvT zNe*nuC@PsBfyTW?RMlh%7*ze0*U8a0g#=Z!;GpO(AxCqS;2=g%Vgw8y`|!LN(eV#s zaGZ3C<5OZp&vcmnP$V7EQ)_SBczfRcj4fOC^UoVL;Qg&wv2Gp8@GtDO{7Qs9fArDU zUo-aQmtTLqd^rU4Z@;bP8q3amcHV>Q@V2PqWaRg`j1%UOf`h+tJa4#ve@AdQ^ktV_PgW?Q$3ijWB|Ba9L7^r+Szx4+g`{ndqJu(JDgDEWBwk;wNFI&zZ)>Pb; z{J&(lrKQqmq7wJySo}!Qu;NElEv!9z)Nzs5@mJpscpeCbgeg*Uk$D$fL%LDa?s`0J zqYB3*&Boi;x59T5AHViY^sH8S8?~RTSresJQfEp{WbfYmd@y)Q-1BsBe<9|7mwk$H z>sDFPL-kD|fi3ed_Uy^agN6_u&l&$5m*A zB{O$aYhFoIA;3FT3eMWKGc(}>`EBpYm0S387Z&6nC@$iYM=Lw_bY0^}e` zGQf@9}zx<`oq_fZFjC-xj zuUK~zz*okuB{SEqLnErqPwjs=c3wS8?*V3~aZx7T&}fY0MHb;SCc{vcaec0_ z*T`3pW56Hy5-WKwF24*7S3VSNs8)dYSELnfEt$ZgiY^)rmDU&;;Hy0Dh|(bojHss% z%}n$hBN{5#@Xe&5S~1`L0X`6_)=Qd+$c&$$wsEz%4kE3GSP0~b2S=$FQRSE;TYTys zqU6dn-y)dE5)dcg-d~BK4B4r6ob4gR-Ye`8?o{>C_v08m<_RN^iSosHh zp)rcFFBU9Z_`_cq`}Ngd&R+lNTWwe&`;PtNuI*b37A_w?4x-K>hyFZr1js>BrWd$> zcfB!y+db?tAe2p-1!*9uf+7US#{g$A%>cA|O`S>AUMmtH{?TQh_~-HYYNgCc%{Aux zA~veaN`W!{dFA{%Pm(vqD?2}AvrcUeSr|f8W(62#eFn! zK91o$H-F-6`T3c=P85}NPvSbn1&r0LSEnvCgqp8rybMhzy?uJSwAUG{x2WF5b)Vwz z`O@U?;IlC^?MJvj@H~V(AWaA~_KN!zXd?TkA2?9J1<3L%f4XM%^^Cng;k_B(q1M?Y z{I0+K```L9_9}b-uIsl=5l->3_TRWe4jnmi1js>B%9}v%-e(EoFVYM6d?+{~N{-wD zsPI=JE5j$7JxF8}+YmWZ$+v>i7cj|`mrLJ+9f{6?NK~6HO-+c+f(hrIdv3bv!V9HI z3k>mdL2&Apm4Tt{d#GRtiY!7uk|jXMRAmYj$zw^NXz~6PdEEXPm4jN2?rh_LEBY+b zWx_JikwunG*Hk$21lc&sxGKx&RG7>6Pl$dFS;|F)qe)T`ux<@=-AW21R`SA7A}x*XA2Th^5lm?m>e@jjB;kKFJ!`zdwf@`m@LpAO}U4 zTv9U(H2!Cw3juVk03{}p20{sUv`vhkoap*10HU#yldIBiA~+VJfR9gvGBJ{AtTF+D zzJVx)SW;3lv4}I=GtM~WlqO9WyWoOOom#bGY}=gx7Z@D@##XG@xw8RhR_=>jE@&jl z$*HL|YDC!Z$)}OdX6t+TylQ* zYz}0Y*K*hLOjMd1zwRjyzs_CHRa-_&krP~AU+c6Qr=&OI8r`|+XCohij@Q4u_O~@Z z7GbfM!RelyEQ=4KGL@&{9E3jynk18uGAIZmBe0&0$iwpxUDw1Krb`%_o0_}|5a6`YVx^`vkiYt2d zJo8MIF!<5OpUnHb2V?U(|8{ke*MO-H$Lik70)ySi3dgAZJ9g~ZgZIrf zvR8vb^C}!#_@+EAo#9kHmjoPD<29Y(t%YEm;C?^48n00W_)d=P;`&lonF(=FQfgv;v{pqJ!5n9A@jiUga{`{2|H~jS%piv{aHN?p5$<1wjCJ@=n(jkWq zA2|Y~O5}E@rvW)RCkbM#Nkbq!P6`6o1T$bm0M zf*}X^cF6&9R!2uuv7P*?ZJa@Fb>+G?$^DX%G8QRtsK+`vk^MdW7X+4w_wha~`H_s* z%uA7sIyW+^Nt?u<<3D2M{)9+8WEO_)lFup1q~|Klgq@{*8ZxTf*d@R6zqxgGtI4e%$r8W=J}{(kPgmj!@+{mwiGa0G`#N0yvCkSfu& z*S2U0v}uzeh%@F)z%_vc0SO2a7-YgC!9u1OI*+caQA1XH1yxky0|{!FhvuV|er0s- zxoz4sYpMhXX-dllp~dXJhbl6GRYtJ|Ork#r@;{`Br=URg@Gc)!`T9C~9!sEW+|nuJ zABo%>Um(YpI*BYv5;dpg`;et%OG#16}7mIsd7puRQsr;QOJ@okdZ@5zjpr@6Cc%ECHH6|5Fk$E%B#+0l)sr zIs(0OWcB8@Z?|a+EL&zbk3$X}335zWHk9!KaKm%$-T^Y7%-9Gpwy6kUtl^`8>jLt1 zP=X+78nkT+kVya+1ZM%9p?v}{=AG=Gh$tTKt?q37OPnA7c>;mpr$&Cn55gHA3W-c_ z-{izSiBlOXWkno{{^1(QklnBmZY-+t zX3H>NJtsQ67khP06)DV^m9{*sA7kka(`ThWV-z7gjgN_SFUUNPj~nVfjd0sq57)RG zjh#YU_*K{P_gORC7xRXCi^jdItSk@+@rA;He;jxYn%bJ3>(?WJvY;UUn!;6#<##QZ z4^2vRNaRnnzkUAuSP?JN1#t1x%KK&{d*v@l*;|<-vDi&Yb$8e^>*_(v&eqH{)PwLS4 zoO;j5C@#FWMn5)OTKjy)8sFF8jyiLdAgf=$P92yOS(d(Cw6uL#zYYS5O0Mv?)E)bg zKVI|*V;eSX*#b>0KfkC5C0Mq8y1jQ^9>SLQy^9Rei*e)nty|%o z5A62)%Z=a(T$h@XoW%5n3!myXX6;o2-@mu*`CM>xiWM9`eh-{J;YzjYj^eQz!x z5H?(BRP{B31*D+ZyZ68We6I-4B@>-6QI`8h7YyO=IS?9$-tlL)KJ}D_4OXnk&Kfwd z+j;N2bKd!#yPn%=enx<1@IN?&48|-`6iH&5n2RrHr5H?4C+RJ|LK1Yh!P^BQG?3= z9{^#f0N?HkL~JO;K8gH}al+g)8VtVE z>FwTb#u;ag>r%gmZGTrDz}U*tb=`OJ=iHRBbEm9^>zU}yMpfJN4A}mClYM$kH%-c$K#Xl`(=!xU6{dfB@H{@%)- zFCT^dMZ-#l!$gQ6X8(M~N`{w=Kv{E z((qW|>W<6{z-wZV5F}i1Tns$4ul)mnBRCv7y2&Z$9z|!I(Nxf{zxEM?Uf&?bL=aYs z_3JOW6ll>R2{nv3!z~^TFt%C{qHsXUS>0R^YEFR|o0ADJ)@vc4?)=U>UwwuAi+A4n z_+vyzfkj4YBgl-F32>R2i29*oi2L^K*#pgJ$dKDM^x%T4R;|=W-CQ&HNDzOnzwW#T znnd0M#g8CC4;}2F8BiE3f@Ni1gS-!EG!O`2l%9#`h=GJT*@K(%LP|%Jjwl-`s{L}r z4ae1}2w_wLVz#DHpAc&}u2It}$7tP}OUI3H+Z@ugta%r5UL!m=SBCG>{*vK-Ki(Sz z0|Xxtg-xU3R?#q_;f0_{SWSzFxkDNLi!SQYrDaRT`t|GDwP{l>D7z*;;9c=i$6gsd ze((HmN3H+>O6EyKK~z5Y^5yb=q0rI=02d4?z`O5C!9c!^I3zR=k$KK>`|TY%0WZCD z@V{Y)96EC3XdnhjU+~>`Hx#5Yy(xO>`T+o#cC@L=RSHCyune+>^O{a*gF&*M0w&e0 znU*H|YIwcS46xpf6d>X8d^$LnpWuw|NicNT7o=&^MvWj4>ej6>2sM|M2~zhxFsQUN zB|-X3{9%;N*tZWhf0G`vc_9z*|L%`?KU#FAxi&@{jTWqCUWh?V6Vk*0U&o&EZqe!4OVqGC;gPuB~F_zPIWtZeOHLU8n5vIywgS9B`Y9)DcU z)~Z#sX(|qdfIIIzw=>`f4u_5{as-H=x^tUM1n$1A$<+X7NYeq%aNh^^J=pZ-rfZw7 zZJwStFmGqxPBtkxAK(n>6M!?W6##l;1AMzJAWDdoz!pzoz525N=NsJt#h4p!r~u_a z8ozT-GG7UE4&|w7u%E5hswd>)<9zs3iiQ;}#)`RC&5XwqCo^`#Etf7snCZ?}Ieuqs z-GucMH}aMChFcE|LWaBFkIo%`{0&*7u=FqVFW46hodA2Y-YV>tAIp*9wnk!IjyZ#5 z{|opj3n37-T$F9cd59tt8Q_Szn$LRTxaQY2SBB7pM2)HN(4gN_6FtB6Qll864pS3p z5_*qtr^5E)xkd)}$gp5A{EX!Eixa5>X~S<1uI?b?0VgCN1Wy zzGb85aJ)u(Y7izk&rO~Sg&@k&n0LHB-hT_*>3RCqSMw(n&j>YsbXMaFGOtK{p+nK4 zvllH}boNWDWUu>EPo+dss)-gu^?)_cvU`E+8wi(L=O6z4$G;(m96IuJ!V3_e7r5~2 zX7hlgduwk87~8fV;Ed(gQ~%cb?%%G{#%d$9q20O#wj0q_Jpe8+x&d53ECKk0eFRwW zbwCLa3hSk4tkRJHoY2xV)i_jFPX=SWhslbwpoq?dT=(e~FFU(4 zzkZt68*ancibZQ0ty#p_mOBcEW`^PXMOnnd_~H=c+YA5DG-(?0OhRcDUDv!=!H36r zJR&+u(PaEj@5)&_YCet9wZKy{-7lDA_!!WsucHiu)jtT27cod9B4$8Y`N%r71&G?J zTNh!ur;cs@NW&W$JNN9A2TLJ#*{D3k|(%3{0V`=pO6^{Mm4{KKM*zWgVcSEmUEl(XaN(c0Y-Z6 zxh>bo*0S<`s{}E&@8!~VDVJh~)YR5(DlVTMNqn80qW_;5y}>%hK3&c)Tk-~jQV>uH z5Gl~ehfrA!FXY4Hd27|GT^sNBq>t;j%b3O3$u~E>vgQ*gpDy>;uAQEa_jU5gO%mV( zVzb%Mn8{vN|D^Z1Ul3zk?*RCF9R(;2B4s)tdZo`mmEO97a6b@UmjEjk#MrW>t5@yb zRaSOVllt}2(q4F>vB(lzJb~ z@!aH}0aZmeze{1~lJZcn)ys{W)ST`1xW3|=250D@wE$!O9{|Q`^auF#UsWCe-z9zI*n!Z@~cn3)^6b}Pblw1DU0AmN*0_uBmO>l{_ z=)O?^f)PN7Rs%6s?{t6*k~07`Kb4*-?*cGZu(NPy$vwK>VspJEzVm`Xt(AUx`Q-x# zLcc_`9SIJrz>qbmB0hi-j;lQZ4DHbU4dAg^fBd)VkV8iwo#0`-H{8(eQ{a_X+WZ$# zjQ*Q%7BBwkYR2ZwnKf&&Plj_s1NcRd+CEhfWB(DvSXV*tL4Yt1h_NdLsdDZs1)9z5<>I zsQVodq*lmeGO-ewgfJTzV2c(_nqVcJR>arAS&Xe%y{ymbK8msS5L5wUJ4%QI=lYug z#y0&8P#OXG5GZ4xOn|iCI}u>4)hhr@T_E*7Nh2Z6j!cK;g#Z^&TLHD71V!>B0F9>P z??Cya7-hh0asm>k|G;35u+#@ z32+9sF6pk6_e92cIQ$N0D9-{)P*4;V+1L~70kW17@-tdD22?c8&i?}#YqAzVMmE41 z+#*0RNKOd|i_M&q_9z6|rPsCl91Lw+!M1;G+s*~gwE$z63*v%hCSdqzkKh|5(^An; zKnVzXFI4)aXc(XvyyqrBiZ>^EU*k74*%57<)vJa@zJ6#Msk<80#zu;iw>Fl+T|1-FJ-La?6Dm!eo`6o|J_7 zmh=TsW*lIwi=e~zhIR^4rZ`&JlO{!<-%3_Z!WyNNG6P`jthWHhS_)FpP$Z!91u2ta z;ShieiU$Ccd;zKBzDa;`mXk)2F$-X<;okwJNz(I^V6!&*vgW;zMj|zhJ$qy$r?zkR z=?m-_c=)~vha5V3>4eijd>){8Z_+%h;g^vOpajD(LN=|8kj^8`g>3OV?gsday&X{d zNi(7Q5)lI=0n(|{>8B$BFfA=H5%(bmM<%ax1yv9(Y9(Xkd|)u37$pgU0}lgSP&@>v z=d8>mW)&1xqR-tz5M#{*F?Q;G0Ls_{>ivfpz;O|if)cdCQU`Ev$+cd9LaD+nu*D!Wr3CQ->1 zv-FCEXg{s&8wf&a6%b>xZ$+%2J1`vJ8pLWqeGVcrNm29~2~ckVfW}RLdVlnNkOo5| zeZGQWfbxZqz_4miOBCy zLSGChpG?}L0AtCQ0gTnU3Q&wReHy?S_D=v~Nz(yk5~}$Lz~9SSfWMCcfMWP-1gUUb z(lGYF1Mu-HKxtO=c}Sx{IeAnCPMHEQ*0?#q1(s2(ENvE`qNV(w0Q^4F05vZO3R!9- zHmZw0uR9k|=Y@X-e*BTu1iE&;>~BC-oAEm2(1}4Om;mY1CuthMKX?lug3*oz__z;1 zm07-hDkPlGTG2dyv_(fF=AqjaR&Q!gJ1j2d;Mf1wUJbS%*cBS2)> z?iptgqp~s(tMfE8E;v?XT#wa@L<1p1&=BLMm95nTL(cfUmjWu>lsX$y<}{hSNI=j$ zWU`{?pfKG=&jBi5flN5W5Xl!{GHOd}-9RxAyD}%Ahjl-@Mu4&P0w&S<+wKIoAh`oj z`>nnaTJf8jg(yD81x5m(OituXKjjWU%|kwrZJPkTy&X{d>ABs*0Io450TF_BCZGhA z)%PJ20rm0Hw{d^o6@LK`-r$f!4pl}ci~#YS2DEA8$p!e1X9Wx!w=!Mm!vN9fs2q)p zgbC{`&fw<&%7jw(F~G+$0B2;K0mkb82ViXV3jkwn2LOz9`U+rdGCphF1byfb<1ahI;5zfY0+O5aE-l4{+V31@KVwtDXT~oN$DHmJT^| zOw$Px#_O3Vqk;ls$kas6Z7NboBjqz}yKB!Lv@D(M%g!EEt{7u`L5vASgRh{^n-8G# z1BkIz*8zd=LD;T)jn9{TIDdr>Idr_y38H}@ zmm)gc)GSRw)m3G=Rg=($2nmJyRL)I%@)-(S0xB$)d?fiF0V-diu^?reC&57s ze1jlW8fAx|2q*bp0Y3f+L}(P2aAMOmLngT(pq|^Rq1Xuy3WGgEkn-`6ph%nvsQKvq z&~sBKM-s^NTwAUN_2%csgMOh}j6q61Hn6K*HmLV)mron3wh zX*TO_0{G{<7l;juC4orqg)|Tn2&B=GFNZXZq*;LSjnMmKwFS(1=>5|7LV|?e7YQWy z*}yw(`=1It_?vuRk-Z}wa>${Br4vMec+H;FrW4gL>6j~Y5q+Z=5ITP&ytkmBco`bfV4DMs<@Ev3b_w7N?@d5OTe+75su&CxB&IZ$tU2S4=9rk`8xc)0i{8Z6TjpUfD3>jfco6D zzwmv4kL>~3BfWG)M9C5=dp;3hEZGAvmU%V6-_u`#SkqL}B>;b(&H!WkM*;jkEdW0M zPJo#Sk`!G=@58$Y*nXE+2cB=1{xb0B9ok1g@Zlr=({sq7#cX+&DbfYprsLKe1eq5us{%F-32L=&)b63O1YaL#(uaGU~JX( zfHHBNF9?CgAhjYl6WWa8jTBWyWQ~3zBF%;bW@SVIf;5cnf|QTKF1m`Mz)XQ*j1*ng zT#(Wzs2>LjEYc`QQ?W*c(Rn0DsZ@!zDzAGH@Xdv7Zvy%*ZFM$KSSX*nN;&%uIpk0^ z=>*Y0>@&{o1PC$6{rmUrgCNoMX3by%BF07nh!`A=6xGzQKcF(I*9%f6Fv^!8Q_h)! zlwhLsOrOQ=0-Uo8RGCQQ*!M6HCx7B008wW^tkc{Y7Hkz16xK`vf=pm%35qo_k#B@D z=IQg%d!_sniY_BTY7NIF!66hbZQVMVAbRsHCu>0dXNT!$p-l4roJ9l9|#>M z&4vUA-H*zvlYk~cP89&i1StA8vAJ{W)d5D2K2HPk^Z(ed#UY0rstz6Z0wnD}O(*s2 zdHVl_LOUjZ@h!WRd>_G7AVP51FxY~E{CqHe3KJFiX8d@K0)W53zW@>C%L@U-1(#+{y%GR8^ZQK^=|rvMiS-vdfe zkbp>D0&q>^TR`1c9{{|xMf$38dR=`Tux?%aZ{1qG3&mUn^*lsBD~B9%h@AjFklMA* zIs2Z0g9n$Cty=x!OS5KCR1dY5B}PmF#2WQf{~3U>+XSh3&-yRG*!*q)W19sr*7+kq zF?yEAyo4#JsIHR zV*no?1-Jm21Mu@E1L}UoZvvsvp0U7Jy@M@*dGqztfcf*;TwrNyHbB6JkZK7+ODYiQ zNZ(#`5Wf$H9CGL&=@>C#!Po@KHjFPl7e*id@kcpQFKQb7{yMcgo;!GO-u(rIt5(1E zTIQ3<$!<3^1Tvk_O5U!96fw@>f)vB2mH#P%l&OlMj7V_&C`hfauMwn5aU5=<9__pC z1C%q{bZQ%>Itm)F3W&t1Ky0`!X-br#PDGj=ne^y$%c6z(`Lg%!tsCyT2YC1F>V2Af z@0BA0r9p!R$+0Sd$__c?(4nSdL<0dU22HCY$CXC4)a$O3jQox}WS++zcO2LctX->z zJf4(9&Z_I;JeisY+dISoR@%hqDACRIg&1TNC}iuWJO)!kF&Hrk7IJ#;zaLNxlzc9< zLf3PEL-&R#Z-smoB*2O;0l2{10I2iLJPxDpMnW>6_NSx*jI}%!P`(v1tU0h!D`MS*!&3=RfZr4AA#k8Igz`KVFVa{vpQ!PPJTz96Ac<7!e>uu)2f(`A-@p zBWvGYY7|SCN(R@e)s~bko40QH>Z@?Fe@s!4mhN)-214Tqg^G)jxJSMa*LXnP!ORD- zIM=PEN{A?ImV6(SPeDEpnvZH+vHk*;54DCnIqB!;aDW zhn#<0_jEuNAFT5vpq$tA`KjR&1qF~#Bqp!K@Tn9HEiJ`! zZtAytT-lsGd%T;xV_mN4$qoKe)8o7At+R%W7&P?$!Ryyo{AEGs19j_`^eE7+n`;1Y z-u$u$fwpgj-T|g1%ky4nF2@6d{@9PiA%`3~lyv+E5DO(Hq^H%Zo0pgRXu?#TWoCxP z)q5HOpr~l|YIFvqFj9&dBC^v!D6{%nLF#;3kyC!h);j^dLcbeetgj#yc5BUCr_q`q zC{1$eI!fT9qKITlqq6jr*AW^IsOO{kC`yb>O;%Hvl>&iK2=8I>;?=7mNLH*^w+`d3 zU3>S6s>ER~u)~)v-m`b{lE-F$)TwIUO7rF^F9I*VSZ6$d;x5K}+zW(41%{hXY=KkD^~1%5WbZI2Vjy@F9xC`H*LV4;&aibqO2?!#O%JwS`Jp`3Eu(yMf3vH z6X;(647tmInK3OAuK9Jv9|HUdngPmLzWREAvFrZ|a6vH_P)>Hwg#Z^E7XcB~e~s{6 zvw@VMNs!6QPGg}&KsyQqf}e%?=h(hu-&y{7sC`v96xZ$Dn?D%yZn$;VX$Uvou_Lby z<_(YM;xwC4%6$*{um26@|JRs4b*j)fp7`!N_9oEw;nZ7z3*0G}18v&)#sTfxHQEZa zYe$KLW{H!t1X^v`2IOAgZwtI?e7}W5|GZjeLi6=FcOgyrY z(S7&TsnPN5!4E83#=O9yMdhRR-2c-8@v;isKyA1U)f|Tip zqL5YzLM}AG*rkhr%2)n}ipoX=MnjYO`Pxl?gVTNO+HKn)&^FwkrS{aL6HtjszWJCagu5%CT#k@-pD9w`5VnR;{E{c<$V_zb{|$^xx;tuU+Sy z4)@-Nb3GoIgjCONpASxNcm}W{CKFanMz_&#!YTl$NFbS>ti=pZdJ^C(?sI@c{{{*R z%gXS)>(=eq0YSKN|&bVODSgovEcRH}nYdXS)@J{W&g^T^LHDS?37uwnOZtmJ>bX8n3R@21uzRjt)722oXC7xJO;i6zFeLqs=rQ6oEmAHml@I#g2UKm;{{BC zQ2srjI_B+O0;mp$pUeaJi~R?nTHl)C!da{*d@X#go~|!N$HPZtD^^Xz3Vz$R-S>$` zP&4%DaH8|Q6Cm)|UiKh-G2sz`^9s*L_^y0TvsG_6IHsrr`e=l+%DX@y!tcX1C6B9j zI0Vfh;bO1oqv7*GQ1~XN&V&Gf!KoRF9Jb<^7LizJ_=bG503~4Q{ZQiK_Q8NYe*f>l z_m>tV1FxRSt^?*cg2N$)j$=B;d?5Ceo(3#k+O0d#zCCFO3m1NOG4e6??#+7uD{j8R zP6Gp_@K#FDql|Pbk>H@{C@Mvg_W%GlKA=onG#@csYtciygg+v?^R11YViE+6=O+PR z_VF;bNq||eGfS8l=UMxJ(B~&-KAGw^H3W9tz4v|KvL*8AsicfU4morpkn7KWfI~$x ze_+xiszpU6tIW*wSzwgVG9t@`69ct|>)MUfK#I1_k{!lkfnSDuMr_{6C9KMdGw z1Qbgi=rbyIT5Mw6`Qi*xeNvxuch^zv^DmYAmFad}aFl0K45jZ3e z3{#c$xLvI)+D{`9X<`&bM&Zapkt_J_yI=^o#mKL58Z#YQIFR1!T){bA-A2tkmmx71$=Uhon5!JegwVt^BxZJ1mf@4^!VHUgzDbm zNCfi#Idt5Zu!s^8Yh|8t>VgIN`O;QTwtLD`09%dh0BAMg&`6BFr69GRqOPdl$H7Kh zS?_1vA44{#rpo4};*MluBa;+GOKocnY`RSf#-2T;;ON>_&gKY?s?p&wiDc$Qj~NFl z9!XFn7vuj)C1CZwa$h+F2FAUaax6@P_Tcpwq=R{S0>vq6bO+tR(xm9IJVB0_)fFmF zfItX(f*vqbjMyLW2E36Y?bpH~H_lU|WW-t+d+3bFk;@(<4Ba}i%Kpyu_}5i3>hYgL z3)3f%qbo#$))lfmSEY3Pn!=9pD6CjYEUH_lP17HLEDo<(3yp(T*kp=IOG{0KGn{-F zrVqsEc}^?)v_}Cx;pGCRAfg09DuP&5G8sQLRj=atb^^nCoCG30rx`W&Frb14%1VKq zJInpRYp=0)ff=95S)KfhXgWN9_-O@lG}q$BU7}a|TzteOYSYV6l7]>30I(z88g#6IBqnO<4%C=VT+eO_RpfC#GmWV zJ*(a3+xITtTW9ZsCp}+tHlXq}@&^O_E6oB_J_8AmMtK1Ls`CNHwr-WCFJjDAr#T5C znorLKm~x63qj}s7M3~NU1=Kub+A=gD|2#mISfS@2Cw}PS(8b{?TUvx0gd2obFHa8_ z0UK`*OaYc(5t<8pWfUpgu;EYmYK|mjSA4j7Hh(L#4qNng@&U;GT9_EVl`+#;5`8_f z?XW8xahAzqf-#I4+aVhkgu5CmXmOns9+JUFUQg^_%^mMwk)%E~=GV1YffM~4HUdkF zeShkR4IQi)kN1w^%w>7bnD=e{9xXG``I>P*U4D;D3Ch@e_B6%?ah~v)qT^Pzs+n=- z88_YV=%dN0`v-r~YsipBjT-&E(ccy0m!(fsSgLiU-{%`Z^)RQ7gLK|XK@lb|a>5&? zCTn6Mk)5-?q9`yNcexU$)_MZIjMSO<97rH%`oI2FTDEKV@*l<+NrVVgK9T6qXb6c$ zVy0CCkfS?DtkxTd+^<&B(TqhgPEBf@F$~CVg)H|It2fz_agff6zdnwfSJNvxOPw1} zvpJkp;eGyWPE-Y*AnJS6)b|@R6)hOe3uDe8Z)(rhgYAR__-GOmYSe(w#qCZ^ls+5mVfdlG&Q=G z`{tX6=k56nH>=-&c;>Gz{V_q2P$tLt0>TyY8{3|s+#Ah&Lnea_7|va>!qh7l2!=*t zvK{fSh;!p#X9y-e_C6KgjYw)9dZqWN9`djd&(DYdhCtT(&Rn0{?WA4l4NPR>QrWJAmz>lj6ZY!2Yb%{0LF^@0({lk z1W;wv_dT>_3##tAdi%cJyoqZveNy|?Zy+@Vn7Xta&xI+M;g3K3UEl`@BHv_DY;Z#2 z)EbXh;{ynZCKB|x=y>iqeH9mo#s3U5(N0&m_c_%wdV|-U>wXt#vDwofXnBV$=GdTq zuqn{06?+W`8>%x!SCPPY@<};DRQ@5#uG(o8`ygn^MvR>PG?hCy`g}6|gp93dhE9_h z0wT)s8*zQaesXTdw|$#i%h+?mmfb!)Fv^yFXjq2*EPvDiTOHP3@%0Bk$I(p{i_YkC zbn7uqkN(~2=EA1>;lD>e9k&96DEL{-zBJ7U+5)P*hx8Eb}_V@ok;31>s)x55M>}^)6AymsbEeV087-^->MX%vZ zCX*8VArfOJ6OZ{+dc=8}>AckGdC7DX&lz128S~hmHIR{}c6iySa&KoDTiJ*8eh$T> zXpMuZ1%@1@?@F`ys;~~MlBw?)rQ=?JgqO3i+P2?s^e6bku;^QBO|fh_wtT-;t5YJ3 zN~Ccp)0GSdCNdKOjSO#V!d^_qxh1Mf{NG@=D5i*`C{CD=(4b+h+C6*1LsPFo#C*d6 zE|_WoDqNSsbMxN;7B4O<2B-=yX&BX|!x6qpdCOs!JHnLY3I(;GCfR?ai3!_eQi}cq zwCDwz$>`tEUN>4{4T#ooDiIuUKI>tQ+t&^@jMMyFc5e9Nm{t90B#l*8!SROHAHO&4 zTJ}2sFFP{kE>e(SuxiZ56CIBVXfzdRVRtZfrn|mtnwGG8mpACm@pzM_n?8_UlA-rY z?YFewQgzv?`T%3wUIA1Bo;5Sv6dXooIgQquRFpyP{t8efN6gw-hG3zvT&nIH$^y1+ z3nl|gQ~kSu@23_O02^-$>Hy`!qh%H-Wc|rz$A38oQ^G=vHY}NB^&G^>Du|3q;_Tj~ z8_zW$>bf^+pWa_=576cD{#sVl^DfhKjO#my|37DaQvEq&e|yX4To$k904M8t11!f2 zE$=bS*nT7KYzIL$&!s5)Am>|P84s4M_ow-K+8jUJlzkZQ8=bEe6EvWkgi`QNY`7x0l?q{La}vF#3&fP zI!^OS(~_EB*4)x{>3iYZQ-Q!}d3@`gE3cH} zMPFp!98&!#_k}(ZEK^W^oauhkl5u<4$g1gWq&l9>^0<0c;~zUv4Lq$-kTA;^V(K<8k+aDyF`Dr2u&U zeKIMDQdw`H`#PuBRn^&Df{=2zX%n`6zM3^r3o9w9Zr!uak{*ou^((klq!V19HET~E zqNiSZ>5o1CMc+z6^Oql`VCvXWn$X&}w`QVCdhIniK2j{lt#`)G>5A);W^(P~)x*}aIo;gUJkAL+y=6~IO#;EW}VO*}_AKn&YMR$@_v$C%EDx0sWrXcG)hsuO> zu=5-(E8D|mO8bNFJI0H_;`%gbOVgvbqBGWMTWTDd9(KW0*O5bshEzk!bFb@Ob}x)V2M(-RgG9vr`(ZHB zH18x7WAu7!&W2#|dQwvwHrTt@lbd=;{fwNPy@Qs|dFI7AbE@`Sq-mUShVbcYH{YD# z1KPAnP667rlVehnVG`>?!2nc}CBFu+a3Na{+DCeATki~5s2gHBcF+ss(?1UDsMawBJtJi{350%Nm{XU(Dst9WNtz4H%N zFqzj^A|UL1BuAQI**!5u&R81w`@LC=b-_?>4;ABgr9JSpn4Y7im|`H%N+OxdbA=^c#Y56a`L zy*#eZF&I(4aehJcb*zbT99i$#{J;9fw$)=m)XX@q%sB4})=KPui2WY-{5kxHq;i8% zCK%(K7{*!IwjJ4>XEUFbahrmM&bRX=EilHOmg~QWzdz=FcJnQWf7qPYa$N6Wx!<2m zF@n$-EAh$AHa_3Omd{aqMF@g;#aB#;Yd;Qa{|&m11QhuyWOdwS%lrZ0z4zqVxw+Db4GOyq#srNa zn?KPq$#|nIv@k7gmB&pDfkhvW9IgAKwySBPs>*TtLpoZkkyiJ4s%wfmXhCw2g2nEB zw)_7K-%0$c)D^s`_};fjfuQRu8Y*JS2+@K6q+pOGU+~u@x7{IWnhLq;I0Qw=L*e9M zccM}MA-{(0M>@)W*N2}@FdqnG*W3%7aRwU*w0fza1HdNfuK@gnhQMdtLfwJuu9sIe z`KM(3BogY^4~zu3ND*PUX^%<)K_xQNRbD|Gn~CA}bzt__YK8F0XlHOt z;CtWKcZz`CT-G2;BWS^LV4h-m{M-o(NW4w8_1(xe=?r#c0>j~MG z(ID}@K|SKn8)Fiq{q%XQ3jul#>-S?fPbJT1Zfnfu!YUEzzBR@D?>4qlI2Q0vlFnv{ z_nK|JvsU4+LRPIN(ps@jY_a}@zLs6eK8!XA*$EcfFY_>{_$9m*^0*-wT=Kl22m8Zr zO)nQ=w;_+UVU`jchdey`n57d=1G(lZVD4Pz0`9$c=RE*QlmN_#p6b_cOWMypTb7UL)tEzd}%xg6v*_o88YibHtvA}9&^Hz0#WrD|g z+|IXDi6GJAo>!@hI#vUSoIk!#LPa@6M+X}J*Hzf8igv;l1O*8Oa&kjc!2e~VD=8>~ zUYF5d#h*Zef+`!thSgT|{0>z_c43Xj9bMfIXw!xS2kkE(1<=;#pI1$AM4Nh$U?jG} zlEH^pNew|aGzcS)0c#;B#o1bx+olwd zpl*OcZ_t|}vYz}2lmT99q|e$54y%dMp{mje;{(w>z~BQ^x4m2t|542c_z!RrFncz; z7BCsW0{l;FY1pzG8GoQRh~s_Pr`m;lyjFj~HJOj4`qg4(xJ*k#fG;c7?$EIR|MVxM z#$YDIjTOfkD-$;PyV=8H|HCX%j8DWeOfzc9u&G;Z`6lD&X?)rq(fe(E0Mjs?-@n=Ah>jZyBOX#5=V4c|zzq06R<^Rrly*h&!L&V$(~j%@z#e3s9jXCDi* zFhB2ER+A%}<*_{NZ+r}L)Z%{$0k(y0;>VkCydK9hv5ftu-K~G2{hPh6ea4@6Cx5E7 zhL-}ytM#k{o5t_6R6B>sQb5o08M3WWPyEL(J8^!@_G^9hFZ4^b$Mp|bPZ*#g1r5Z4 z=(uQBL?)-U%(sA#qC^OUkm$*dt~;b*lo@RmVtXCLXtLRrY&%p%I_^zam-Pgarui~} z!l6D^T4SBYY0-Xm?w=!T1v_D@Nth$TsG) zgw0mAa<49#3^m&_R&v~Abk*#IbGS@gM29W&+hY2$&QG<)s+!nlw{5-N=KYo;1Bg>% z1mhdbidhNYKZ_-EWQ*DKuxf%^0Py4KEL}^B5J-6ly5Re3bBNCwX;RW7bO_ZCF^)+p z%P1C@9hqPUABXTykp8Bt>$zCSl1~wuAjFc`FHKWqYC?mqfR9W~<%uK+D4)VU+R2U_ z4dO`Cac;uWG|ySU$*+*$pd*yQEotqI;_Pr#ZKc`zzmVwx(-U>*BU6$XXP|bj+)u|7 zWkk4(_8X&SJuhKO^mf$zEY?KzM{6dzjTLfbrWmULvornJUH3<8I$8HyKfl$qWj(LD zrZ4OJu`^xSz5mKSH_cdPLX4T(BXX}==}X3MH7QAFb)+duCu38#p#_jXLWd|J(~`VSUP&XrM-H6e$eO@J zlx7$5NX-Em+tQ>|o=ABVB`I>OTyR)@Iga4?v*>s;VP(r9!nE-=(D`Nk9DuQ+VF3RD z-wE)Q(nOBgKhdB(&e>BMewwP-KqgbJ~o$nv6 zKhF_nE^Vmx7XQ9V^+$D>oZOs~pUTgBPHV5V;MeK;JK8mRmbO{jqBr5Q-mG`kmht-~ zYY%Ek{Jf9YnR=eCyYAALBM?`suhn;L;UZuO%h7M;zmMBp*XpC$0)0UEO_8$NkPC?h z`2K<(SCB1$m_hg}OiWS)g**^2Ffmzu59Q2Ce>BY7p+Ad`6BCxb^YV&wfTwC}O@M(r zw+ccVC=mbo*XKBASkbzL9RGRsRC%4TG7Jh01PXz{cw(HexzS@~iF(ydsIwj?hGqAM zWp})~(LUyOB{uyk`%G+1IJW0kVp6h;uCkt2+4ETMXZ;*xVxrM{pU^nt`1ttqTTE1X zlxa{W(->(KVl3r?U>Kh-k4q53KH(|wR zNJ%AfzbD{w=`-{hY)y+6bc`A>5&6I3Sh?LuexmN?#^|+d$Bc%_$~0wJx9v<+hG4Qa zRoR+!CdS`ynp!4C&to;w*qMH8k57#MeCAl$aZ5Cr?fnmOe@xVwjfu<7v}N6{ENZMW z0chv5u?Rdr7Z4;E%u#p_!VnxF0Z&lZjV_NmMK6UW3fHzSqn98!D0+!ZOF^$=T5`yajxhmJ z@gKIYTvV$H`h9M<=r$4dc(i%iJa&JJ79=>VEp3Y*<#=_UZ277gfoowT@ZT*8Y1c^R5`t#cTVVX92@<~i$aVdPh@s9&eH_)AF2lwr3W7Kk`My zB&u0`C)t(EYaD0B=hi1$_FM07^Z9j4G@Hr5=zL>8@qeo+Du&_9&oSJ1f5h;8#(hhT zZI`i4`@01{72~C5_;mF577TSa=O4;}=&CR)VA*^=E-HkE!1Pq@CjL1Jv^i`v*F4T+ z?X+Ay#AjT_I_W{SlQm#p^7&q8*Sa=`L;5M&6YkymSp5;LTi_zDXq*#rdG6q%Xs*^b z_yNmeb3>j$uJk=5{*31gu)_DF-*1un+>Y##9Fm}IvCvlRrE(Hh2C*?g7xKq|Yws^^=>tpcNpz7)Ip zt?$toEm1{Gv%DWV9x|TCZDo9hPN~uRu{gI!8|P25`YK2lwF(xiz_B^6EGpbqw_LB; zf8WB?6oyI3__)T1|;!IL4~(I&{p_QD(x5pAnpK zKxDRF$%aC3xIES9B1=5qkA!%Yl16iM!!`Hn#l}oppu1ZRZi%Uw- zA__#NDLWrV+{|!hZ&I?FXzWZ;cBU>nQ9(R>4u#g^EKC9UeN$1V}Vx=E>3T(==Ci?G;ZhG>(v)1zaw%E(^Kch&9m@eLi6@ zPDn^_yFG~>Z(17UhsV>dT|iLm-1!Ic4-^!vT`RYerpYmep-+mx-(URj74mdfCw6zgdV-}Hdo@=nof*aesh{`j5$IO z=t>aKXfS#Y2?7!T#^^5_8NEMBFpOkAIj^RRHOx~ zU&~Q<(I}6H9+QGF$j5LS;5rvbI+AcWr^VWMWU8K$8 zxFtE6N|q1>UI*5!@wfH2Eo)mcT<%RY-a|~3jbU>SlkMGNBCwj2Ow)ZxT-C^UmEz&bf2GCbOXkZ+(8g^4e*CnXSQB zx#4q$X#8e+kI0Shm;H`$ZWr50Pz+fH`4h`{d()o@`wPjZ(=h=oHMRX9q9Qx~H8CK5 zoK`H|ES78cmoupPNyR6VR|Oc8d$s$!nNhd?YKi;M<~g0Zr>{-5qls(3Uwm3ac8foV zcMQ-o;*49bAo^VYE8@Fue^Sh&_xT4>xq<2*qxYLibb$Kb#@|z`%m%U<_nZBl`ONG6 zKgqK_v^_DD+w=znyr<|e8wjefW}bjA+wO~JuZJ()BrewM3FNT3MfMg7`s4D=bbqmE zKLaPLVxeHaUQL>Ib-{sT+)SHx=gK=)EWP8|XS=6#Pnp!cY}tr|5T_k1_jvcryJye5 z^wP-5k(2L?`~r=j^)G49NbU=WiK+_njJ0|FdGp)ZNW6K>$e;A)Yi8_3O`fiwXl8@( z;~f0wQop%GV7WL4=T&4|R7?T{zT^{W#6~*-f(U*050s9(U|n~u52n!r)lXTJ-52{7 zv&B^C%N_OuXRjT$4rhgaR$<|~r~(oLa)aB?4!zsoui)2evN>eG>d$e!zI&pK{c>$V z6YUQOxVq56Dy-4T?CKVEl^t;!T%Q; z5O8gw(@r2wjCT5BV6=r@;Mfp9kNc6_B`CR%~+E>`V;JO9p z=Pg{m{H7ywj(qs#@6YEI-~J*L%i6wG?Wy*hUUziG(bxa_#)d~lzvwrc@{G{g7k1qZ z6DfV6W|7IusZRaAsz>`OCQoH#n%f6GMkTZ7;rJ(A|9~8F^=)KJ(3$tqpk;`ggmQ5P zkZlWf@rhXC+)br8;AlUMPt8-VKNY>M{Tt>PdSCW-lIa0_JhjKvo_Gv5cJ;MtjiW|9 zW82rsRIan@*Tk6ogx&XE@q%2Whvi-Jq8ijo%@4(&#Hw_O{F3eOw&SOm+r`)I>0^PM zZGLZ`x8An@8dPtlM?D7bZMG(;diuORgujzMNV%V0#{HO!)c(^vFQitpL2!(UX}A4MwFN=>%{L@GUQ;&|nqEACpdbo+Lvx|+Ot zH81$*FF>*1%uhf$Z~&ZkkNth$KI~;9bQXX{sw`$W311E6eW5Z~#naBM)R7$4a4*4|PopJU08Yp^L?-hI0H!(XbtCTP+YZ{y1;_s3!MG7ZS zSC5d6l`h+z*t1;)1O!|ObeamQ++0P5@UL0Ut?@SXPhgx$VY~p>lPj%HC5ZudtaC}y zRq84gyKcUjXI35Dicmyt3<^Yo0DLbVW~fZ7bfo~ROgQ-o)6vn^?OA_c%kd^}9=0om z`GJ*cu1n*nF{y0_n}R_qVLqsOV87cejbY!?s2Jv3T5#hA-FT=AT92MVu~K(X&<8M-?`upl6TQ?TnKa-;0W=gOo(5E;2i_Mt#>HU|(m z5elGqlC4X#MSiX6y=9a-+rlgbt~|T)%$t9_51cp!C;iUuJ!ALS+NY3a0cR9HFy5&0sXupBcC*}a?52Hg z&fI0Gz4^;nE*3ukA`ThI!L`S!q#hApk*mQKS+0?L?0878_f^YKBXCPKkaSOqTharT zj>$vzxnCB~i-&Cc3sxZ9s)yxg#ZEbD$1}e#1kO7?wu`DcFTfLM6$H& ztF>}nav~iPyTxwVZ8pQb47eU7dvQi+RV%Vr8%0F3ZDBsHS2>;+S2EEr``~R95b%CN zhpMpJA@AlmVEq6v<7(%`srNyF2oOMnahXOVW!nS`AWp7G?W8gil2k#4Z4+E)imISX z>!=!{^}5J*AW>xo*;LVXf#aAe-AtolbpcdLN}~!%X>|(fQ5yZbR?~Z|=-8AD>PSau z%SmITM#&GM0GxUrRY;ZYW|dLpcy3%uxpjMRQw<0R=y(-YJJjPU^mm|)jEsH;$_+R0 z2y-ixk%zHXrIQBh*xB|m`Xi!`Qai^tyn-}&oaRwnLEEgeEfL*I^NOU}s(}i}D0c0V zT@=Z@9>&#qvfN3}Ic#8GPutmU-|`%;$4ry`v>bKXawJow<;k3xCtt(!JLdGST;pHJ~2bLS$RGY9F6=a629SJ#Se zx*@^Ob=5AA@N(%yFEE<$MMq^35D*X$&HN#<22IiZG*R0pO Date: Sun, 23 Aug 2015 15:52:04 +0200 Subject: [PATCH 136/353] Add more hooks --- model/profile.php | 166 ++++++++++++++++++++++++++++------------------ 1 file changed, 102 insertions(+), 64 deletions(-) diff --git a/model/profile.php b/model/profile.php index c28a9c20..e82f8a82 100644 --- a/model/profile.php +++ b/model/profile.php @@ -762,8 +762,12 @@ public function update_profile($id, $info, $section) { global $pd; + $info = $this->hook->fire('update_profile_start', $info, $id, $section); + $username_updated = false; + $section = $this->hook->fire('update_profile_section', $section, $id, $info); + // Validate input depending on section switch ($section) { case 'essentials': @@ -980,6 +984,7 @@ public function update_profile($id, $info, $section) message(__('Bad request'), '404'); } + $form = $this->hook->fire('update_profile_form', $form, $section, $id, $info); // Single quotes around non-empty values and nothing for empty values $temp = array(); @@ -991,55 +996,65 @@ public function update_profile($id, $info, $section) message(__('Bad request'), '404'); } - DB::for_table('users')->where('id', $id) - ->find_one() - ->set($temp) - ->save(); + $update_user = DB::for_table('users') + ->where('id', $id) + ->find_one() + ->set($temp); + $update_user = $this->hook->fireDB('update_profile_query', $update_user); + $update_user = $update_user->save(); // If we changed the username we have to update some stuff if ($username_updated) { - $bans_updated = DB::for_table('bans')->where('username', $info['old_username']) - ->update_many('username', $form['username']); - - DB::for_table('posts') - ->where('poster_id', $id) - ->update_many('poster', $form['username']); - - DB::for_table('posts') - ->where('edited_by', $info['old_username']) - ->update_many('edited_by', $form['username']); - - DB::for_table('topics') - ->where('poster', $info['old_username']) - ->update_many('poster', $form['username']); - - DB::for_table('topics') - ->where('last_poster', $info['old_username']) - ->update_many('last_poster', $form['username']); - - DB::for_table('forums') - ->where('last_poster', $info['old_username']) - ->update_many('last_poster', $form['username']); - - DB::for_table('online') - ->where('ident', $info['old_username']) - ->update_many('ident', $form['username']); + $bans_updated = DB::for_table('bans') + ->where('username', $info['old_username']); + $bans_updated = $this->hook->fireDB('update_profile_bans_updated', $bans_updated); + $bans_updated = $bans_updated->update_many('username', $form['username']); + + $update_poster_id = DB::for_table('posts') + ->where('poster_id', $id); + $update_poster_id = $this->hook->fireDB('update_profile_poster_id', $update_poster_id); + $update_poster_id = $update_poster_id->update_many('poster', $form['username']); + + $update_posts = DB::for_table('posts') + ->where('edited_by', $info['old_username']); + $update_posts = $this->hook->fireDB('update_profile_posts', $update_posts); + $update_posts = $update_posts->update_many('edited_by', $form['username']); + + $update_topics_poster = DB::for_table('topics') + ->where('poster', $info['old_username']); + $update_topics_poster = $this->hook->fireDB('update_profile_topics_poster', $update_topics_poster); + $update_topics_poster = $update_topics_poster->update_many('poster', $form['username']); + + $update_topics_last_poster = DB::for_table('topics') + ->where('last_poster', $info['old_username']); + $update_topics_last_poster = $this->hook->fireDB('update_profile_topics_last_poster', $update_topics_last_poster); + $update_topics_last_poster = $update_topics_last_poster->update_many('last_poster', $form['username']); + + $update_forums = DB::for_table('forums') + ->where('last_poster', $info['old_username']); + $update_forums = $this->hook->fireDB('update_profile_forums', $update_forums); + $update_forums = $update_forums->update_many('last_poster', $form['username']); + + $update_online = DB::for_table('online') + ->where('ident', $info['old_username']); + $update_online = $this->hook->fireDB('update_profile_online', $update_online); + $update_online = $update_online->update_many('ident', $form['username']); // If the user is a moderator or an administrator we have to update the moderator lists $group_id = DB::for_table('users') - ->where('id', $id) - ->find_one_col('group_id'); + ->where('id', $id); + $group_id = $this->hook->fireDB('update_profile_group_id', $update_online); + $group_id = $group_id->find_one_col('group_id'); $group_mod = DB::for_table('groups') - ->where('g_id', $group_id) - ->find_one_col('g_moderator'); + ->where('g_id', $group_id); + $group_mod = $this->hook->fireDB('update_profile_group_mod', $group_mod); + $group_mod = $group_mod->find_one_col('g_moderator'); if ($group_id == FEATHER_ADMIN || $group_mod == '1') { - $select_mods = array('id', 'moderators'); - $result = DB::for_table('forums') - ->select_many($select_mods) - ->find_many(); + // Loop through all forums + $result = $this->loop_mod_forums(); foreach($result as $cur_forum) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); @@ -1049,10 +1064,12 @@ public function update_profile($id, $info, $section) $cur_moderators[$form['username']] = $id; uksort($cur_moderators, 'utf8_strcasecmp'); - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + $update_mods = DB::for_table('forums') + ->where('id', $cur_forum['id']) + ->find_one() + ->set('moderators', serialize($cur_moderators)); + $update_mods = $this->hook->fireDB('update_profile_mods', $update_mods); + $update_mods = $update_mods->save(); } } } @@ -1070,21 +1087,22 @@ public function update_profile($id, $info, $section) } } + $section = $this->hook->fireDB('update_profile', $section, $id); + redirect(get_link('user/'.$id.'/section/'.$section.'/'), __('Profile redirect')); } public function get_user_info($id) { - - - $select_get_user_info = array('u.id', 'u.username', 'u.email', 'u.title', 'u.realname', 'u.url', 'u.jabber', 'u.icq', 'u.msn', 'u.aim', 'u.yahoo', 'u.location', 'u.signature', 'u.disp_topics', 'u.disp_posts', 'u.email_setting', 'u.notify_with_post', 'u.auto_notify', 'u.show_smilies', 'u.show_img', 'u.show_img_sig', 'u.show_avatars', 'u.show_sig', 'u.timezone', 'u.dst', 'u.language', 'u.style', 'u.num_posts', 'u.last_post', 'u.registered', 'u.registration_ip', 'u.admin_note', 'u.date_format', 'u.time_format', 'u.last_visit', 'g.g_id', 'g.g_user_title', 'g.g_moderator'); + $user['select'] = array('u.id', 'u.username', 'u.email', 'u.title', 'u.realname', 'u.url', 'u.jabber', 'u.icq', 'u.msn', 'u.aim', 'u.yahoo', 'u.location', 'u.signature', 'u.disp_topics', 'u.disp_posts', 'u.email_setting', 'u.notify_with_post', 'u.auto_notify', 'u.show_smilies', 'u.show_img', 'u.show_img_sig', 'u.show_avatars', 'u.show_sig', 'u.timezone', 'u.dst', 'u.language', 'u.style', 'u.num_posts', 'u.last_post', 'u.registered', 'u.registration_ip', 'u.admin_note', 'u.date_format', 'u.time_format', 'u.last_visit', 'g.g_id', 'g.g_user_title', 'g.g_moderator'); $user = DB::for_table('users') - ->table_alias('u') - ->select_many($select_get_user_info) - ->left_outer_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where('u.id', $id) - ->find_one(); + ->table_alias('u') + ->select_many($user['select']) + ->left_outer_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') + ->where('u.id', $id); + $user = $this->hook->fireDB('get_user_info', $user); + $user = $user->find_one(); if (!$user) { message(__('Bad request'), '404'); @@ -1097,6 +1115,8 @@ public function parse_user_info($user) { $user_info = array(); + $user_info = $this->hook->fire('parse_user_info_start', $user_info, $user); + $user_info['personal'][] = '
      '.__('Username').'
      '; $user_info['personal'][] = '
      '.feather_escape($user['username']).'
      '; @@ -1203,6 +1223,8 @@ public function parse_user_info($user) $user_info['activity'][] = '
      '.__('Registered').'
      '; $user_info['activity'][] = '
      '.format_time($user['registered'], true).'
      '; + $user_info = $this->hook->fire('parse_user_info', $user_info); + return $user_info; } @@ -1210,6 +1232,8 @@ public function edit_essentials($id, $user) { $user_disp = array(); + $user_disp = $this->hook->fire('edit_essentials_start', $user_disp, $id, $user); + if ($this->user->is_admmod) { if ($this->user->g_id == FEATHER_ADMIN || $this->user->g_mod_rename_users == '1') { $user_disp['username_field'] = ''."\n"; @@ -1248,6 +1272,8 @@ public function edit_essentials($id, $user) $user_disp['posts_field'] .= (!empty($posts_actions) ? '

      '.implode(' - ', $posts_actions).'

      ' : '')."\n"; + $user_disp = $this->hook->fire('edit_essentials', $user_disp); + return $user_disp; } @@ -1255,12 +1281,16 @@ public function get_group_list($user) { $output = ''; - $select_group_list = array('g_id', 'g_title'); + $user = $this->hook->fire('get_group_list_start', $user); - $result = DB::for_table('groups')->select_many($select_group_list) - ->where_not_equal('g_id', FEATHER_GUEST) - ->order_by('g_title') - ->find_many(); + $result['select'] = array('g_id', 'g_title'); + + $result = DB::for_table('groups') + ->select_many($result['select']) + ->where_not_equal('g_id', FEATHER_GUEST) + ->order_by('g_title'); + $result = $this->hook->fireDB('get_group_list_query', $result); + $result = $result->find_many(); foreach ($result as $cur_group) { if ($cur_group['g_id'] == $user['g_id'] || ($cur_group['g_id'] == $this->config['o_default_user_group'] && $user['g_id'] == '')) { @@ -1269,6 +1299,8 @@ public function get_group_list($user) $output .= "\t\t\t\t\t\t\t\t".''."\n"; } } + + $output = $this->hook->fire('get_group_list', $output); return $output; } @@ -1277,22 +1309,24 @@ public function get_forum_list($id) { $output = ''; - $select_get_forum_list = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.moderators'); - $order_by_get_forum_list = array('c.disp_position', 'c.id', 'f.disp_position'); + $id = $this->hook->fire('get_forum_list_start', $id); + + $result['select'] = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.moderators'); + $result['order_by'] = array('c.disp_position', 'c.id', 'f.disp_position'); $result = DB::for_table('categories') - ->table_alias('c') - ->select_many($select_get_forum_list) - ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') - ->where_null('f.redirect_url') - ->order_by_many($order_by_get_forum_list) - ->find_many(); + ->table_alias('c') + ->select_many($result['select']) + ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') + ->where_null('f.redirect_url') + ->order_by_many($result['order_by']); + $result = $this->hook->fireDB('get_forum_list', $result); + $result = $result->find_many(); $cur_category = 0; foreach($result as $cur_forum) { if ($cur_forum['cid'] != $cur_category) { // A new category since last iteration? - if ($cur_category) { $output .= "\n\t\t\t\t\t\t\t\t".'
    '; } @@ -1309,6 +1343,8 @@ public function get_forum_list($id) $output .= "\n\t\t\t\t\t\t\t\t\t".''."\n"; } + + $output = $this->hook->fire('get_forum_list', $output); return $output; } @@ -1318,6 +1354,8 @@ public function get_forum_list($id) // public function generate_profile_menu($page = '', $id) { + $page = $this->hook->fire('generate_profile_menu', $page, $id); + $this->feather->render('profile/menu.php', array( 'id' => $id, 'feather_config' => $this->config, From 6e35a321cfc4c4903335235961346ba096e990d5 Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 16:03:53 +0200 Subject: [PATCH 137/353] Get rid of get_remote_address --- Slim/Extras/Middleware/FeatherBB.php | 2 +- controller/header.php | 2 +- include/functions.php | 13 ------------- model/login.php | 4 ++-- model/post.php | 10 +++++----- model/register.php | 6 +++--- model/search.php | 6 +++--- 7 files changed, 15 insertions(+), 28 deletions(-) diff --git a/Slim/Extras/Middleware/FeatherBB.php b/Slim/Extras/Middleware/FeatherBB.php index f9e1b6b5..1bebe18a 100644 --- a/Slim/Extras/Middleware/FeatherBB.php +++ b/Slim/Extras/Middleware/FeatherBB.php @@ -393,7 +393,7 @@ public function check_bans() // Add a dot or a colon (depending on IPv4/IPv6) at the end of the IP address to prevent banned address // 192.168.0.5 from matching e.g. 192.168.0.50 - $user_ip = get_remote_address(); + $user_ip = $this->app->request->getIp(); $user_ip .= (strpos($user_ip, '.') !== false) ? '.' : ':'; $bans_altered = false; diff --git a/controller/header.php b/controller/header.php index edcbcb50..0036e4c5 100644 --- a/controller/header.php +++ b/controller/header.php @@ -143,7 +143,7 @@ private function getNavlinks() $links[] = ''; } - $links[] = ''; + $links[] = ''; } // Are there any additional navlinks we should insert into the array before imploding it? diff --git a/include/functions.php b/include/functions.php index c50c714b..7f582dcf 100644 --- a/include/functions.php +++ b/include/functions.php @@ -811,19 +811,6 @@ function feather_hash($str) } -// -// Try to determine the correct remote IP-address -// -function get_remote_address() -{ - $feather = \Slim\Slim::getInstance(); - - $remote_addr = $feather->request->getIp(); - - return $remote_addr; -} - - // // Calls htmlspecialchars with a few options already set // diff --git a/model/login.php b/model/login.php index 28631803..cf25dedd 100644 --- a/model/login.php +++ b/model/login.php @@ -67,7 +67,7 @@ public function login() } // Remove this user's guest entry from the online list - $delete_online = DB::for_table('online')->where('ident', get_remote_address()); + $delete_online = DB::for_table('online')->where('ident', $this->request->getIp()); $delete_online = $this->hook->fireDB('delete_online_login', $delete_online); $delete_online = $delete_online->delete_many(); @@ -89,7 +89,7 @@ public function logout($id, $token) { $token = $this->hook->fire('logout_start', $token, $id); - if ($this->user->is_guest || !isset($id) || $id != $this->user->id || !isset($token) || $token != feather_hash($this->user->id.feather_hash(get_remote_address()))) { + if ($this->user->is_guest || !isset($id) || $id != $this->user->id || !isset($token) || $token != feather_hash($this->user->id.feather_hash($this->request->getIp()))) { header('Location: '.get_base_url()); exit; } diff --git a/model/post.php b/model/post.php index 49fed8d0..f4f096cf 100644 --- a/model/post.php +++ b/model/post.php @@ -245,7 +245,7 @@ public function insert_reply($post, $tid, $cur_posting, $is_subscribed) $query['insert'] = array( 'poster' => $post['username'], 'poster_id' => $this->user->id, - 'poster_ip' => get_remote_address(), + 'poster_ip' => $this->request->getIp(), 'message' => $post['message'], 'hide_smilies' => $post['hide_smilies'], 'posted' => $post['time'], @@ -292,7 +292,7 @@ public function insert_reply($post, $tid, $cur_posting, $is_subscribed) // It's a guest. Insert the new post $query['insert'] = array( 'poster' => $post['username'], - 'poster_ip' => get_remote_address(), + 'poster_ip' => $this->request->getIp(), 'message' => $post['message'], 'hide_smilies' => $post['hide_smilies'], 'posted' => $post['time'], @@ -496,7 +496,7 @@ public function insert_topic($post, $fid) $query['insert'] = array( 'poster' => $post['username'], 'poster_id' => $this->user->id, - 'poster_ip' => get_remote_address(), + 'poster_ip' => $this->request->getIp(), 'message' => $post['message'], 'hide_smilies' => $post['hide_smilies'], 'posted' => $post['time'], @@ -513,7 +513,7 @@ public function insert_topic($post, $fid) // Create the post ("topic post") $query['insert'] = array( 'poster' => $post['username'], - 'poster_ip' => get_remote_address(), + 'poster_ip' => $this->request->getIp(), 'message' => $post['message'], 'hide_smilies' => $post['hide_smilies'], 'posted' => $post['time'], @@ -712,7 +712,7 @@ public function increment_post_count($post, $new_tid) } else { // Update the last_post field for guests $last_post = DB::for_table('online') - ->where('ident', get_remote_address()) + ->where('ident', $this->request->getIp()) ->find_one() ->set('last_post', $post['time']); $last_post = $this->hook->fireDB('increment_post_count_last_post', $last_post); diff --git a/model/register.php b/model/register.php index 53dd5e8d..c1dfba9e 100644 --- a/model/register.php +++ b/model/register.php @@ -24,14 +24,14 @@ public function __construct() public function check_for_errors() { - global $lang_register, $lang_antispam, $lang_antispam_questions; + global $lang_antispam, $lang_antispam_questions; $user = array(); $user['errors'] = ''; // Check that someone from this IP didn't register a user within the last hour (DoS prevention) $already_registered = DB::for_table('users') - ->where('registration_ip', get_remote_address()) + ->where('registration_ip', $this->request->getIp()) ->where_gt('registered', time() - 3600) ->find_one(); @@ -141,7 +141,7 @@ public function insert_user($user) 'language' => $user['language'], 'style' => $this->config['o_default_style'], 'registered' => $now, - 'registration_ip' => get_remote_address(), + 'registration_ip' => $this->request->getIp(), 'last_visit' => $now, ); diff --git a/model/search.php b/model/search.php index ba8ba002..555fa112 100644 --- a/model/search.php +++ b/model/search.php @@ -98,7 +98,7 @@ public function get_search_results() // If a valid search_id was supplied we attempt to fetch the search results from the db if (isset($search_id)) { - $ident = ($this->user->is_guest) ? get_remote_address() : $this->user->username; + $ident = ($this->user->is_guest) ? $this->request->getIp() : $this->user->username; $search_data = DB::for_table('search_cache') ->where('id', $search_id) @@ -135,7 +135,7 @@ public function get_search_results() DB::for_table('users')->where('id', $this->user->id) ->update_many('last_search', time()); } else { - DB::for_table('online')->where('ident', get_remote_address()) + DB::for_table('online')->where('ident', $this->request->getIp()) ->update_many('last_search', time()); } @@ -520,7 +520,7 @@ public function get_search_results() )); $search_id = mt_rand(1, 2147483647); - $ident = ($this->user->is_guest) ? get_remote_address() : $this->user->username; + $ident = ($this->user->is_guest) ? $this->request->getIp() : $this->user->username; $insert_cache = array( 'id' => $search_id, From 75d5f7556562a4237f47206d3e6f7c0ab5fa7a19 Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 16:35:07 +0200 Subject: [PATCH 138/353] Add more hooks --- model/register.php | 53 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/model/register.php b/model/register.php index c1dfba9e..fb190d64 100644 --- a/model/register.php +++ b/model/register.php @@ -20,6 +20,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function check_for_errors() @@ -29,11 +30,14 @@ public function check_for_errors() $user = array(); $user['errors'] = ''; + $user = $this->hook->fire('check_for_errors_start', $user); + // Check that someone from this IP didn't register a user within the last hour (DoS prevention) $already_registered = DB::for_table('users') ->where('registration_ip', $this->request->getIp()) - ->where_gt('registered', time() - 3600) - ->find_one(); + ->where_gt('registered', time() - 3600); + $already_registered = $this->hook->fireDB('check_for_errors_ip_query', $already_registered); + $already_registered = $already_registered->find_one(); if ($already_registered) { message(__('Registration flood')); @@ -94,9 +98,11 @@ public function check_for_errors() // Check if someone else already has registered with that email address $dupe_list = array(); - $dupe_mail = DB::for_table('users')->select('username') - ->where('email', $user['email1']) - ->find_many(); + $dupe_mail = DB::for_table('users') + ->select('username') + ->where('email', $user['email1']); + $dupe_mail = $this->hook->fireDB('check_for_errors_dupe', $dupe_mail); + $dupe_mail = $dupe_mail->find_many(); if ($dupe_mail) { if ($this->config['p_allow_dupe_email'] == '0') { @@ -118,11 +124,15 @@ public function check_for_errors() $user['language'] = $this->config['o_default_lang']; } + $user = $this->hook->fire('check_for_errors', $user); + return $user; } public function insert_user($user) { + $user = $this->hook->fire('insert_user_start', $user); + // Insert the new user into the database. We do this now to get the last inserted ID for later use $now = time(); @@ -130,7 +140,7 @@ public function insert_user($user) $password_hash = feather_hash($user['password1']); // Add the user - $insert_user = array( + $user['insert'] = array( 'username' => $user['username'], 'group_id' => $intial_group_id, 'password' => $password_hash, @@ -145,10 +155,11 @@ public function insert_user($user) 'last_visit' => $now, ); - DB::for_table('users') - ->create() - ->set($insert_user) - ->save(); + $user = DB::for_table('users') + ->create() + ->set($user['insert']); + $user = $this->hook->fireDB('insert_user_query', $user); + $user = $user->save(); $new_uid = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'users'); @@ -168,16 +179,19 @@ public function insert_user($user) if (isset($user['banned_email'])) { // Load the "banned email register" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/banned_email_register.tpl')); + $mail_tpl = $this->hook->fire('insert_user_banned_mail_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('insert_user_banned_mail_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', $user['email1'], $mail_message); $mail_message = str_replace('', get_link('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('insert_user_banned_mail_message', $mail_message); feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } @@ -186,16 +200,19 @@ public function insert_user($user) if (!empty($dupe_list)) { // Load the "dupe email register" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/dupe_email_register.tpl')); + $mail_tpl = $this->hook->fire('insert_user_dupe_mail_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('insert_user_dupe_mail_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', implode(', ', $dupe_list), $mail_message); $mail_message = str_replace('', get_link('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('insert_user_dupe_mail_message', $mail_message); feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } @@ -204,17 +221,20 @@ public function insert_user($user) if ($this->config['o_regs_report'] == '1') { // Load the "new user" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/new_user.tpl')); + $mail_tpl = $this->hook->fire('insert_user_new_mail_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('insert_user_new_mail_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', get_base_url().'/', $mail_message); $mail_message = str_replace('', get_link('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', get_link('user/'.$new_uid.'/section/admin/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('insert_user_new_mail_message', $mail_message); feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } @@ -224,18 +244,21 @@ public function insert_user($user) if ($this->config['o_regs_verify'] == '1') { // Load the "welcome" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/welcome.tpl')); + $mail_tpl = $this->hook->fire('insert_user_welcome_mail_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('insert_user_welcome_mail_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_subject = str_replace('', $this->config['o_board_title'], $mail_subject); $mail_message = str_replace('', get_base_url().'/', $mail_message); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', $user['password1'], $mail_message); $mail_message = str_replace('', get_link('login/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('insert_user_welcome_mail_message', $mail_message); feather_mail($user['email1'], $mail_subject, $mail_message); @@ -244,6 +267,8 @@ public function insert_user($user) feather_setcookie($new_uid, $password_hash, time() + $this->config['o_timeout_visit']); + $this->hook->fire('insert_user'); + redirect(get_base_url(), __('Reg complete')); } } From 1fbcafb3cc73baf634ce367d1df15b01c4eda6cc Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 16:35:30 +0200 Subject: [PATCH 139/353] Switch remaining $lang_ to gettext --- model/search.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/model/search.php b/model/search.php index 555fa112..18b6925b 100644 --- a/model/search.php +++ b/model/search.php @@ -25,8 +25,6 @@ public function __construct() public function get_search_results() { - global $lang_search; - $search = array(); $action = ($this->request->get('action')) ? $this->request->get('action') : null; @@ -635,20 +633,20 @@ public function get_search_results() $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_subscriptions'), feather_escape($subscriber_name)).''; } else { $search_url = str_replace('_', '/', $search_type[1]); - $search['crumbs_text']['search_type'] = ''.$lang_search['Quick search '.$search_type[1]].''; + $search['crumbs_text']['search_type'] = ''.__('Quick search '.$search_type[1]).''; } } else { $keywords = $author = ''; if ($search_type[0] == 'both') { list($keywords, $author) = $search_type[1]; - $search['crumbs_text']['search_type'] = sprintf($lang_search['By both show as '.$show_as], feather_escape($keywords), feather_escape($author)); + $search['crumbs_text']['search_type'] = sprintf(__('By both show as '.$show_as), feather_escape($keywords), feather_escape($author)); } elseif ($search_type[0] == 'keywords') { $keywords = $search_type[1]; - $search['crumbs_text']['search_type'] = sprintf($lang_search['By keywords show as '.$show_as], feather_escape($keywords)); + $search['crumbs_text']['search_type'] = sprintf(__('By keywords show as '.$show_as), feather_escape($keywords)); } elseif ($search_type[0] == 'author') { $author = $search_type[1]; - $search['crumbs_text']['search_type'] = sprintf($lang_search['By user show as '.$show_as], feather_escape($author)); + $search['crumbs_text']['search_type'] = sprintf(__('By user show as '.$show_as), feather_escape($author)); } $search['crumbs_text']['search_type'] = ''.$search['crumbs_text']['search_type'].''; @@ -662,7 +660,7 @@ public function get_search_results() public function display_search_results($search) { - global $lang_search, $pd; + global $pd; // Get topic/forum tracking data if (!$this->user->is_guest) { @@ -710,7 +708,6 @@ public function display_search_results($search) 'url_topic' => $url_topic, 'cur_search' => $cur_search, 'forum' => $forum, - 'lang_search' => $lang_search, ) ); } else { @@ -777,8 +774,6 @@ public function display_search_results($search) public function get_list_forums() { - global $lang_search; - $output = ''; $select_get_list_forums = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.redirect_url'); From c6a65e44974f0697e1a4cb66400ab10ea9ebf314 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sun, 23 Aug 2015 16:38:04 +0200 Subject: [PATCH 140/353] Delete .htaccess --- .htaccess | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .htaccess diff --git a/.htaccess b/.htaccess deleted file mode 100644 index 33353df3..00000000 --- a/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -RewriteEngine On -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^ index.php [QSA,L] -Options -Indexes From 972f280ebdfc4dc1200f68c89aa0bda3da442f9e Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 17:17:37 +0200 Subject: [PATCH 141/353] Merge branch 'hooks' into development --- include/cache.php | 236 --------------- include/classes/core.class.php | 10 +- include/classes/hooks.class.php | 4 +- model/admin/options.php | 14 +- model/index.php | 127 +++++--- model/login.php | 107 ++++--- model/profile.php | 508 ++++++++++++++++++++------------ 7 files changed, 487 insertions(+), 519 deletions(-) diff --git a/include/cache.php b/include/cache.php index b92c5ded..e862ed62 100644 --- a/include/cache.php +++ b/include/cache.php @@ -7,226 +7,6 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -// Make sure no one attempts to run this script "directly" -if (!defined('FEATHER')) { - exit; -} - - -// -// Generate the config cache PHP script -// -function generate_config_cache() -{ - // Get the forum config from the DB - $result = \DB::for_table('config')->find_array(); - - $output = array(); - foreach ($result as $cur_config_item) { - $output[$cur_config_item['conf_name']] = $cur_config_item['conf_value']; - } - - // Output config as PHP code - $content = ''; - featherbb_write_cache_file('cache_config.php', $content); -} - - -// -// Generate the bans cache PHP script -// -function generate_bans_cache() -{ - // Get the ban list from the DB - $result = \DB::for_table('bans')->find_array(); - - $output = array(); - foreach ($result as $cur_ban) { - $output[] = $cur_ban; - } - - // Output ban list as PHP code - $content = ''; - featherbb_write_cache_file('cache_bans.php', $content); -} - - -// -// Generate quick jump cache PHP scripts -// -function generate_quickjump_cache($group_id = false) -{ - - - $groups = array(); - - // If a group_id was supplied, we generate the quick jump cache for that group only - if ($group_id !== false) { - // Is this group even allowed to read forums? - $read_board = \DB::for_table('groups')->where('g_id', $group_id) - ->find_one_col('g_read_board'); - - $groups[$group_id] = $read_board; - } else { - // A group_id was not supplied, so we generate the quick jump cache for all groups - $select_quickjump_all_groups = array('g_id', 'g_read_board'); - $result = \DB::for_table('groups')->select_many($select_quickjump_all_groups) - ->find_many(); - - foreach ($result as $row) { - $groups[$row['g_id']] = $row['g_read_board']; - } - } - - // Loop through the groups in $groups and output the cache for each of them - foreach ($groups as $group_id => $read_board) { - // Output quick jump as PHP code - $output = ''; - - if ($read_board == '1') { - $select_generate_quickjump_cache = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.redirect_url'); - $where_generate_quickjump_cache = array( - array('fp.read_forum' => 'IS NULL'), - array('fp.read_forum' => '1') - ); - $order_by_generate_quickjump_cache = array('c.disp_position', 'c.id', 'f.disp_position'); - - $result = \DB::for_table('categories') - ->table_alias('c') - ->select_many($select_generate_quickjump_cache) - ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $group_id), null, true) - ->where_any_is($where_generate_quickjump_cache) - ->where_null('f.redirect_url') - ->order_by_many($order_by_generate_quickjump_cache) - ->find_many(); - - if ($result) { - $output .= "\t\t\t\t".'
    '."\n\t\t\t\t\t".'
    '."\n\t\t\t\t\t".''."\n\t\t\t\t\t".'
    '."\n\t\t\t\t".'
    '."\n"; - } - } - - featherbb_write_cache_file('cache_quickjump_'.$group_id.'.php', $output); - } -} - - -// -// Generate the censoring cache PHP script -// -function generate_censoring_cache() -{ - $select_generate_censoring_cache = array('search_for', 'replace_with'); - $result = \DB::for_table('censoring')->select_many($select_generate_censoring_cache) - ->find_many(); - - $search_for = $replace_with = array(); - $i = 0; - foreach ($result as $row) { - $replace_with[$i] = $row['replace_with']; - $search_for[$i] = '%(?<=[^\p{L}\p{N}])('.str_replace('\*', '[\p{L}\p{N}]*?', preg_quote($row['search_for'], '%')).')(?=[^\p{L}\p{N}])%iu'; - ++$i; - } - - // Output censored words as PHP code - $content = ''; - featherbb_write_cache_file('cache_censoring.php', $content); -} - - -// -// Generate the stopwords cache PHP script -// -function generate_stopwords_cache() -{ - $stopwords = array(); - - $d = dir(FEATHER_ROOT.'lang'); - while (($entry = $d->read()) !== false) { - if ($entry{0} == '.') { - continue; - } - - if (is_dir(FEATHER_ROOT.'lang/'.$entry) && file_exists(FEATHER_ROOT.'lang/'.$entry.'/stopwords.txt')) { - $stopwords = array_merge($stopwords, file(FEATHER_ROOT.'lang/'.$entry.'/stopwords.txt')); - } - } - $d->close(); - - // Tidy up and filter the stopwords - $stopwords = array_map('feather_trim', $stopwords); - $stopwords = array_filter($stopwords); - - // Output stopwords as PHP code - $content = ''; - featherbb_write_cache_file('cache_stopwords.php', $content); -} - - -// -// Load some information about the latest registered users -// -function generate_users_info_cache() -{ - $stats = array(); - - $stats['total_users'] = (\DB::for_table('users')->where_not_equal('group_id', FEATHER_UNVERIFIED) - ->count('id')) - 1; - - $select_generate_users_info_cache = array('id', 'username'); - $last_user = \DB::for_table('users')->select_many($select_generate_users_info_cache) - ->where_not_equal('group_id', FEATHER_UNVERIFIED) - ->order_by_desc('registered') - ->limit(1) - ->find_array(); - $stats['last_user'] = $last_user[0]; - - // Output users info as PHP code - $content = ''; - featherbb_write_cache_file('cache_users_info.php', $content); -} - - -// -// Generate the admins cache PHP script -// -function generate_admins_cache() -{ - // Get admins from the DB - $result = \DB::for_table('users')->select('id') - ->where('group_id', FEATHER_ADMIN) - ->find_array(); - - $output = array(); - foreach ($result as $row) { - $output[] = $row['id']; - } - - // Output admin list as PHP code - $content = ''; - featherbb_write_cache_file('cache_admins.php', $content); -} - // // Safely write out a cache file. @@ -250,22 +30,6 @@ function featherbb_write_cache_file($file, $content) } -// -// Delete all feed caches -// -function clear_feed_cache() -{ - $d = dir(FORUM_CACHE_DIR); - while (($entry = $d->read()) !== false) { - if (substr($entry, 0, 10) == 'cache_feed' && substr($entry, -4) == '.php') { - @unlink(FORUM_CACHE_DIR.$entry); - } - featherbb_invalidate_cached_file(FORUM_CACHE_DIR.$entry); - } - $d->close(); -} - - // // Invalidate updated php files that are cached by an opcache // diff --git a/include/classes/core.class.php b/include/classes/core.class.php index c3884a51..a35d4912 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -41,12 +41,14 @@ public function __construct(array $data) $this->env_to_globals($this->forum_env); // Legacy // Load files - require $this->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; // ? + require $this->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; require $this->forum_env['FEATHER_ROOT'].'include/functions.php'; require $this->forum_env['FEATHER_ROOT'].'include/pomo/MO.php'; require $this->forum_env['FEATHER_ROOT'].'include/l10n.php'; - require $this->forum_env['FEATHER_ROOT'].'include/idiorm.php'; + require $this->forum_env['FEATHER_ROOT'].'include/classes/database.class.php'; require $this->forum_env['FEATHER_ROOT'].'include/classes/cache.class.php'; + require $this->forum_env['FEATHER_ROOT'].'include/classes/hooks.class.php'; + require $this->forum_env['FEATHER_ROOT'].'plugins/test/plugintest.php'; // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); @@ -225,6 +227,10 @@ public function call() $this->app->config = $this->forum_settings; // Legacy extract($this->forum_settings); // Legacy + // Hooks + $this->app->hooks = new \FeatherBB\Hooks(); + new \plugin\plugintest(); + // Define time formats $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); $forum_date_formats = array($this->forum_settings['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); diff --git a/include/classes/hooks.class.php b/include/classes/hooks.class.php index c8ed4387..3976277b 100644 --- a/include/classes/hooks.class.php +++ b/include/classes/hooks.class.php @@ -7,7 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -class hooks extends \Slim\Slim +namespace FeatherBB; + +class Hooks extends \Slim\Slim { /** * Assign hook diff --git a/model/admin/options.php b/model/admin/options.php index a92ade18..ddfafbe6 100644 --- a/model/admin/options.php +++ b/model/admin/options.php @@ -231,11 +231,23 @@ public function update_options() } generate_config_cache(); - clear_feed_cache(); + $this->clear_feed_cache(); redirect(get_link('admin/options/'), __('Options updated redirect')); } + public function clear_feed_cache() + { + $d = dir(FORUM_CACHE_DIR); + while (($entry = $d->read()) !== false) { + if (substr($entry, 0, 10) == 'cache_feed' && substr($entry, -4) == '.php') { + @unlink(FORUM_CACHE_DIR.$entry); + } + featherbb_invalidate_cached_file(FORUM_CACHE_DIR.$entry); + } + $d->close(); + } + public function get_styles() { $styles = forum_list_styles(); diff --git a/model/index.php b/model/index.php index 0a7ac667..c5cf6066 100644 --- a/model/index.php +++ b/model/index.php @@ -21,23 +21,30 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } // Returns page head public function get_page_head() { + $this->hook->fire('get_page_head_start'); + if ($this->config['o_feed_type'] == '1') { $page_head = array('feed' => ''); } elseif ($this->config['o_feed_type'] == '2') { $page_head = array('feed' => ''); } + $page_head = $this->hook->fire('get_page_head', $page_head); + return $page_head; } // Returns forum action public function get_forum_actions() { + $this->hook->fire('get_forum_actions_start'); + $forum_actions = array(); // Display a "mark all as read" link @@ -45,31 +52,38 @@ public function get_forum_actions() $forum_actions[] = ''.__('Mark all as read').''; } + $forum_actions = $this->hook->fire('get_forum_actions', $forum_actions); + return $forum_actions; } // Detects if a "new" icon has to be displayed public function get_new_posts() { - $select_get_new_posts = array('f.id', 'f.last_post'); - $where_get_new_posts_any = array( + $this->hook->fire('get_new_posts_start'); + + $query['select'] = array('f.id', 'f.last_post'); + $query['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); - $result = DB::for_table('forums') + $query = DB::for_table('forums') ->table_alias('f') - ->select_many($select_get_new_posts) + ->select_many($query['select']) ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_new_posts_any) - ->where_gt('f.last_post', $this->user->last_visit) - ->find_result_set(); + ->where_any_is($query['where']) + ->where_gt('f.last_post', $this->user->last_visit); + + $query = $this->hook->fireDB('query_get_new_posts', $query); + + $query = $query->find_result_set(); $forums = $new_topics = array(); $tracked_topics = get_tracked_topics(); - foreach ($result as $cur_forum) { + foreach ($query as $cur_forum) { if (!isset($tracked_topics['forums'][$cur_forum->id]) || $tracked_topics['forums'][$cur_forum->id] < $cur_forum->last_post) { $forums[$cur_forum->id] = $cur_forum->last_post; } @@ -79,16 +93,19 @@ public function get_new_posts() if (empty($tracked_topics['topics'])) { $new_topics = $forums; } else { - $select_get_new_posts_tracked_topics = array('forum_id', 'id', 'last_post'); + $query['select'] = array('forum_id', 'id', 'last_post'); - $result = DB::for_table('topics') - ->select_many($select_get_new_posts_tracked_topics) + $query = DB::for_table('topics') + ->select_many($query['select']) ->where_in('forum_id', array_keys($forums)) ->where_gt('last_post', $this->user->last_visit) - ->where_null('moved_to') - ->find_result_set(); + ->where_null('moved_to'); + + $query = $this->hook->fireDB('get_new_posts_query', $query); + + $query = $query->find_result_set(); - foreach ($result as $cur_topic) { + foreach ($query as $cur_topic) { if (!isset($new_topics[$cur_topic->forum_id]) && (!isset($tracked_topics['forums'][$cur_topic->forum_id]) || $tracked_topics['forums'][$cur_topic->forum_id] < $forums[$cur_topic->forum_id]) && (!isset($tracked_topics['topics'][$cur_topic->id]) || $tracked_topics['topics'][$cur_topic->id] < $cur_topic->last_post)) { $new_topics[$cur_topic->forum_id] = $forums[$cur_topic->forum_id]; } @@ -96,37 +113,44 @@ public function get_new_posts() } } - return $new_topics; + $new_topics = $this->hook->fire('get_new_posts', $new_topics); + + return $new_topics; } // Returns the elements needed to display categories and their forums public function print_categories_forums() { + $this->hook->fire('print_categories_forums_start'); + // Get list of forums and topics with new posts since last visit if (!$this->user->is_guest) { $new_topics = $this->get_new_posts(); } - $select_print_categories_forums = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.forum_desc', 'f.redirect_url', 'f.moderators', 'f.num_topics', 'f.num_posts', 'f.last_post', 'f.last_post_id', 'f.last_poster'); - $where_print_categories_forums = array( + $query['select'] = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.forum_desc', 'f.redirect_url', 'f.moderators', 'f.num_topics', 'f.num_posts', 'f.last_post', 'f.last_post_id', 'f.last_poster'); + $query['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); - $order_by_print_categories_forums = array('c.disp_position', 'c.id', 'f.disp_position'); + $query['order_by'] = array('c.disp_position', 'c.id', 'f.disp_position'); - $result = DB::for_table('categories') + $query = DB::for_table('categories') ->table_alias('c') - ->select_many($select_print_categories_forums) + ->select_many($query['select']) ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_print_categories_forums) - ->order_by_many($order_by_print_categories_forums) - ->find_result_set(); + ->where_any_is($query['where']) + ->order_by_many($query['order_by']); + + $query = $this->hook->fireDB('query_print_categories_forums', $query); + + $query = $query->find_result_set(); $index_data = array(); $i = 0; - foreach ($result as $cur_forum) { + foreach ($query as $cur_forum) { if ($i == 0) { $cur_forum->cur_category = 0; $cur_forum->forum_count_formatted = 0; @@ -140,7 +164,6 @@ public function print_categories_forums() if ($cur_forum->cid != $cur_cat) { // A new category since last iteration? - $cur_forum->forum_count_formatted = 0; $cur_forum->cur_category = $cur_forum->cid; } @@ -204,25 +227,33 @@ public function print_categories_forums() ++$i; } + $index_data = $this->hook->fire('print_categories_forums', $index_data); + return $index_data; } // Returns the elements needed to display stats public function collect_stats() { + $this->hook->fire('collect_stats_start'); + + // Collect some statistics from the database if (!$this->feather->cache->isCached('users_info')) { $this->feather->cache->store('users_info', \model\cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); - $stats_query = DB::for_table('forums') - ->select_expr('SUM(num_topics)', 'total_topics') - ->select_expr('SUM(num_posts)', 'total_posts') - ->find_one(); + $query = DB::for_table('forums') + ->select_expr('SUM(num_topics)', 'total_topics') + ->select_expr('SUM(num_posts)', 'total_posts'); + + $query = $this->hook->fireDB('collect_stats_query', $query); + + $query = $query->find_one(); - $stats['total_topics'] = intval($stats_query['total_topics']); - $stats['total_posts'] = intval($stats_query['total_posts']); + $stats['total_topics'] = intval($query['total_topics']); + $stats['total_posts'] = intval($query['total_posts']); if ($this->user->g_view_users == '1') { $stats['newest_user'] = ''.feather_escape($stats['last_user']['username']).''; @@ -230,27 +261,34 @@ public function collect_stats() $stats['newest_user'] = feather_escape($stats['last_user']['username']); } + $stats = $this->hook->fire('collect_stats', $stats); + return $stats; } // Returns the elements needed to display users online public function fetch_users_online() { + $this->hook->fire('fetch_users_online_start'); + // Fetch users online info and generate strings for output - $num_guests = 0; $online = array(); + $online['num_guests'] = 0; + + $query['select'] = array('user_id', 'ident'); + $query['where'] = array('idle' => '0'); + $query['order_by'] = array('ident'); - $select_fetch_users_online = array('user_id', 'ident'); - $where_fetch_users_online = array('idle' => '0'); - $order_by_fetch_users_online = array('ident'); + $query = DB::for_table('online') + ->select_many($query['select']) + ->where($query['where']) + ->order_by_many($query['order_by']); - $result = DB::for_table('online') - ->select_many($select_fetch_users_online) - ->where($where_fetch_users_online) - ->order_by_many($order_by_fetch_users_online) - ->find_result_set(); + $query = $this->hook->fireDB('query_fetch_users_online', $query); - foreach($result as $user_online) { + $query = $query->find_result_set(); + + foreach($query as $user_online) { if ($user_online->user_id > 1) { if ($this->user->g_view_users == '1') { $online['users'][] = "\n\t\t\t\t".'
    '.feather_escape($user_online->ident).''; @@ -258,7 +296,7 @@ public function fetch_users_online() $online['users'][] = "\n\t\t\t\t".'
    '.feather_escape($user_online->ident); } } else { - ++$num_guests; + ++$online['num_guests']; } } @@ -267,8 +305,9 @@ public function fetch_users_online() } else { $online['num_users'] = 0; } - $online['num_guests'] = $num_guests; + + $online = $this->hook->fire('fetch_users_online', $online); return $online; } -} +} \ No newline at end of file diff --git a/model/login.php b/model/login.php index f3234e59..a2660698 100644 --- a/model/login.php +++ b/model/login.php @@ -20,49 +20,43 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function login() { + $this->hook->fire('login_start'); + $form_username = feather_trim($this->request->post('req_username')); $form_password = feather_trim($this->request->post('req_password')); $save_pass = $this->request->post('save_pass'); - $user = DB::for_table('users')->where('username', $form_username)->find_one(); + $user = DB::for_table('users')->where('username', $form_username); + + $user = $this->hook->fireDB('find_user_login', $user); + + $user = $user->find_one(); $authorized = false; if (!empty($user->password)) { $form_password_hash = feather_hash($form_password); // Will result in a SHA-1 hash - - // If the length isn't 40 then the password isn't using sha1, so it must be md5 from 1.2 - // Maybe this should be removed - if (strlen($user->password) != 40) { - if (md5($form_password) == $user->password) { - $authorized = true; - - DB::for_table('users')->where('id', $user->id) - ->find_one() - ->set('password', $form_password_hash) - ->save(); - } - } - // Otherwise we should have a normal sha1 password - else { - $authorized = ($user->password == $form_password_hash); - } + $authorized = ($user->password == $form_password_hash); } + $authorized = $this->hook->fire('authorized_login', $authorized); + if (!$authorized) { message(__('Wrong user/pass').' '.__('Forgotten pass').''); } // Update the status if this is the first time the user logged in if ($user->group_id == FEATHER_UNVERIFIED) { - DB::for_table('users')->where('id', $user->id) - ->find_one() - ->set('group_id', $this->config['o_default_user_group']) - ->save(); + $update_usergroup = DB::for_table('users')->where('id', $user->id) + ->find_one() + ->set('group_id', $this->config['o_default_user_group']); + $update_usergroup = $this->hook->fireDB('update_usergroup_login', $update_usergroup); + $update_usergroup = $update_usergroup->save(); // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { @@ -73,10 +67,12 @@ public function login() } // Remove this user's guest entry from the online list - DB::for_table('online')->where('ident', get_remote_address()) - ->delete_many(); + $delete_online = DB::for_table('online')->where('ident', $this->request->getIp()); + $delete_online = $this->hook->fireDB('delete_online_login', $delete_online); + $delete_online = $delete_online->delete_many(); $expire = ($save_pass == '1') ? time() + 1209600 : time() + $this->config['o_timeout_visit']; + $expire = $this->hook->fire('expire_login', $expire); feather_setcookie($user->id, $form_password_hash, $expire); // Reset tracked topics @@ -84,29 +80,36 @@ public function login() // Try to determine if the data in redirect_url is valid (if not, we redirect to index.php after login) $redirect_url = validate_redirect($this->request->post('redirect_url'), get_base_url()); + $redirect_url = $this->hook->fire('redirect_url_login', $redirect_url); redirect(feather_escape($redirect_url), __('Login redirect')); } public function logout($id, $token) { - if ($this->user->is_guest || !isset($id) || $id != $this->user->id || !isset($token) || $token != feather_hash($this->user->id.feather_hash(get_remote_address()))) { + $token = $this->hook->fire('logout_start', $token, $id); + + if ($this->user->is_guest || !isset($id) || $id != $this->user->id || !isset($token) || $token != feather_hash($this->user->id.feather_hash($this->request->getIp()))) { header('Location: '.get_base_url()); exit; } // Remove user from "users online" list - DB::for_table('online')->where('user_id', $this->user->id) - ->delete_many(); + $delete_online = DB::for_table('online')->where('user_id', $this->user->id); + $delete_online = $this->hook->fireDB('delete_online_logout', $delete_online); + $delete_online = $delete_online->delete_many(); // Update last_visit (make sure there's something to update it with) if (isset($this->user->logged)) { - DB::for_table('users')->where('id', $this->user->id) - ->find_one() - ->set('last_visit', $this->user->logged) - ->save(); + $update_last_visit = DB::for_table('users')->where('id', $this->user->id) + ->find_one() + ->set('last_visit', $this->user->logged); + $update_last_visit = $this->hook->fireDB('update_online_logout', $update_last_visit); + $update_last_visit = $update_last_visit->save(); } + $this->hook->fire('logout_end'); + feather_setcookie(1, feather_hash(uniqid(rand(), true)), time() + 31536000); redirect(get_base_url(), __('Logout redirect')); @@ -114,6 +117,8 @@ public function logout($id, $token) public function password_forgotten() { + $this->hook->fire('password_forgotten_start'); + if (!$this->user->is_guest) { header('Location: '.get_base_url()); exit; @@ -132,16 +137,18 @@ public function password_forgotten() // Did everything go according to plan? if (empty($errors)) { - $select_password_forgotten = array('id', 'username', 'last_email_sent'); + $result['select'] = array('id', 'username', 'last_email_sent'); $result = DB::for_table('users') - ->select_many($select_password_forgotten) - ->where('email', $email) - ->find_many(); + ->select_many($result['select']) + ->where('email', $email); + $result = $this->hook->fireDB('password_forgotten_query', $result); + $result = $result->find_many(); if ($result) { // Load the "activate password" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/activate_password.tpl')); + $mail_tpl = $this->hook->fire('mail_tpl_password_forgotten', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); @@ -152,6 +159,8 @@ public function password_forgotten() $mail_message = str_replace('', get_base_url().'/', $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('mail_message_password_forgotten', $mail_message); + // Loop through users we found foreach($result as $cur_hit) { if ($cur_hit->last_email_sent != '' && (time() - $cur_hit->last_email_sent) < 3600 && (time() - $cur_hit->last_email_sent) >= 0) { @@ -162,23 +171,25 @@ public function password_forgotten() $new_password = random_pass(12); $new_password_key = random_pass(8); - $update_password = array( + $query['update'] = array( 'activate_string' => feather_hash($new_password), 'activate_key' => $new_password_key, 'last_email_sent' => time() ); - DB::for_table('users')->where('id', $cur_hit->id) - ->find_one() - ->set($update_password) - ->save(); + $query = DB::for_table('users')->where('id', $cur_hit->id) + ->find_one() + ->set($query['update']); + $query = $this->hook->fireDB('password_forgotten_mail_query', $query); + $query = $query->save(); // Do the user specific replacements to the template $cur_mail_message = str_replace('', $cur_hit->username, $mail_message); $cur_mail_message = str_replace('', get_link('user/'.$cur_hit->id.'/action/change_pass/?key='.$new_password_key), $cur_mail_message); $cur_mail_message = str_replace('', $new_password, $cur_mail_message); + $cur_mail_message = $this->hook->fire('cur_mail_message_password_forgotten', $cur_mail_message); - pun_mail($email, $mail_subject, $cur_mail_message); + feather_mail($email, $mail_subject, $cur_mail_message); } message(__('Forget mail').' '.feather_escape($this->config['o_admin_email']).'.', true); @@ -188,13 +199,17 @@ public function password_forgotten() } } + $errors = $this->hook->fire('password_forgotten', $errors); + return $errors; } - public function get_redirect_url($server_data) + public function get_redirect_url() { - if (!empty($server_data['HTTP_REFERER'])) { - $redirect_url = validate_redirect($server_data['HTTP_REFERER'], null); + $this->hook->fire('get_redirect_url_start'); + + if (!empty($this->request->getReferrer())) { + $redirect_url = validate_redirect($this->request->getReferrer(), null); } if (!isset($redirect_url)) { @@ -203,6 +218,8 @@ public function get_redirect_url($server_data) $redirect_url .= '#p'.$matches[1]; } + $redirect_url = $this->hook->fire('get_redirect_url', $redirect_url); + return $redirect_url; } -} +} \ No newline at end of file diff --git a/model/profile.php b/model/profile.php index 581c314f..62a5809b 100644 --- a/model/profile.php +++ b/model/profile.php @@ -20,33 +20,40 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function change_pass($id) { + $id = $this->hook->fire('change_pass_start', $id); + if ($this->request->get('key')) { + + $key = $this->request->get('key'); + $key = $this->hook->fire('change_pass_key', $key); + // If the user is already logged in we shouldn't be here :) if (!$this->user->is_guest) { header('Location: '.get_base_url()); exit; } - $key = $this->request->get('key'); - $cur_user = DB::for_table('users') - ->where('id', $id) - ->find_one(); + ->where('id', $id); + $cur_user = $this->hook->fireDB('change_pass_user_query', $cur_user); + $cur_user = $cur_user->find_one(); if ($key == '' || $key != $cur_user['activate_key']) { message(__('Pass key bad').' '.feather_escape($this->config['o_admin_email']).'.'); } else { - DB::for_table('users') + $query = DB::for_table('users') ->where('id', $id) ->find_one() ->set('password', $cur_user['activate_string']) ->set_expr('activate_string', 'NULL') - ->set_expr('activate_key', 'NULL') - ->save(); + ->set_expr('activate_key', 'NULL'); + $query = $this->hook->fireDB('change_pass_activate_query', $query); + $query = $query->save(); message(__('Pass updated'), true); } @@ -54,19 +61,22 @@ public function change_pass($id) // Make sure we are allowed to change this user's password if ($this->user->id != $id) { + $id = $this->hook->fire('change_pass_key_not_id', $id); + if (!$this->user->is_admmod) { // A regular user trying to change another user's password? message(__('No permission'), '403'); } elseif ($this->user->g_moderator == '1') { // A moderator trying to change a user's password? - $select_change_password = array('u.group_id', 'g.g_moderator'); + $user['select'] = array('u.group_id', 'g.g_moderator'); $user = DB::for_table('users') ->table_alias('u') - ->select_many($select_change_password) + ->select_many($user['select']) ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where('u.id', $id) - ->find_one(); + ->where('u.id', $id); + $user = $this->hook->fireDB('change_pass_user_query', $user); + $user = $user->find_one(); if (!$user) { message(__('Bad request'), '404'); @@ -91,8 +101,9 @@ public function change_pass($id) } $cur_user = DB::for_table('users') - ->where('id', $id) - ->find_one(); + ->where('id', $id); + $cur_user = $this->hook->fireDB('change_pass_find_user', $cur_user); + $cur_user = $cur_user->find_one(); $authorized = false; @@ -110,36 +121,44 @@ public function change_pass($id) $new_password_hash = feather_hash($new_password1); - DB::for_table('users')->where('id', $id) + $update_password = DB::for_table('users') + ->where('id', $id) ->find_one() - ->set('password', $new_password_hash) - ->save(); + ->set('password', $new_password_hash); + $update_password = $this->hook->fireDB('change_pass_query', $update_password); + $update_password = $update_password->save(); if ($this->user->id == $id) { feather_setcookie($this->user->id, $new_password_hash, time() + $this->config['o_timeout_visit']); } + $this->hook->fire('change_pass'); + redirect(get_link('user/'.$id.'/section/essentials/'), __('Pass updated redirect')); } } public function change_email($id) { + $id = $this->hook->fire('change_email_start', $id); + // Make sure we are allowed to change this user's email if ($this->user->id != $id) { + $id = $this->hook->fire('change_email_not_id', $id); + if (!$this->user->is_admmod) { // A regular user trying to change another user's email? message(__('No permission'), '403'); } elseif ($this->user->g_moderator == '1') { // A moderator trying to change a user's email? - - $select_change_mail = array('u.group_id', 'g.g_moderator'); + $user['select'] = array('u.group_id', 'g.g_moderator'); $user = DB::for_table('users') ->table_alias('u') - ->select_many($select_change_mail) + ->select_many($user['select']) ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where('u.id', $id) - ->find_one(); + ->where('u.id', $id); + $user = $this->hook->fireDB('change_email_not_id_query', $user); + $user = $user->find_one(); if (!$user) { message(__('Bad request'), '404'); @@ -153,25 +172,30 @@ public function change_email($id) if ($this->request->get('key')) { $key = $this->request->get('key'); + $key = $this->hook->fire('change_email_key', $key); $new_email_key = DB::for_table('users') - ->where('id', $id) - ->find_one_col('activate_key'); + ->where('id', $id); + $new_email_key = $this->hook->fireDB('change_email_key_query', $new_email_key); + $new_email_key = $new_email_key->find_one_col('activate_key'); if ($key == '' || $key != $new_email_key) { message(__('Email key bad').' '.feather_escape($this->config['o_admin_email']).'.'); } else { - DB::for_table('users') + $update_mail = DB::for_table('users') ->where('id', $id) ->find_one() ->set_expr('email', 'activate_string') ->set_expr('activate_string', 'NULL') - ->set_expr('activate_key', 'NULL') - ->save(); + ->set_expr('activate_key', 'NULL'); + $update_mail = $this->hook->fireDB('change_email_query', $update_mail); + $update_mail = $update_mail->save(); message(__('Email updated'), true); } } elseif ($this->request->isPost()) { + $this->hook->fire('change_email_post'); + if (feather_hash($this->request->post('req_password')) !== $this->user->password) { message(__('Wrong pass')); } @@ -180,6 +204,7 @@ public function change_email($id) // Validate the email address $new_email = strtolower(feather_trim($this->request->post('req_new_email'))); + $new_email = $this->hook->fire('change_email_new_email', $new_email); if (!is_valid_email($new_email)) { message(__('Invalid email')); } @@ -191,28 +216,32 @@ public function change_email($id) } elseif ($this->config['o_mailing_list'] != '') { // Load the "banned email change" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/banned_email_change.tpl')); + $mail_tpl = $this->hook->fire('change_email_mail_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('change_email_mail_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', $new_email, $mail_message); $mail_message = str_replace('', get_link('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('change_email_mail_message', $mail_message); - pun_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } // Check if someone else already has registered with that email address - $select_change_mail = array('id', 'username'); + $result['select'] = array('id', 'username'); $result = DB::for_table('users') - ->select_many($select_change_mail) - ->where('email', $new_email) - ->find_many(); + ->select_many($result['select']) + ->where('email', $new_email); + $result = $this->hook->fireDB('change_email_check_mail', $result); + $result = $result->find_many(); if ($result) { if ($this->config['p_allow_dupe_email'] == '0') { @@ -224,56 +253,70 @@ public function change_email($id) // Load the "dupe email change" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/dupe_email_change.tpl')); + $mail_tpl = $this->hook->fire('change_email_mail_dupe_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('change_email_mail_dupe_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', implode(', ', $dupe_list), $mail_message); $mail_message = str_replace('', get_link('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('change_email_mail_dupe_message', $mail_message); - pun_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } $new_email_key = random_pass(8); + $new_email_key = $this->hook->fire('change_email_new_email_key', $new_email_key); // Update the user - $update_user = array( + unset($user); + $user['update'] = array( 'activate_string' => $new_email, 'activate_key' => $new_email_key, ); - - DB::for_table('users')->where('id', tid) + $user = DB::for_table('users') + ->where('id', tid) ->find_one() - ->set($update_user) - ->save(); + ->set($user['update']); + $user = $this->hook->fireDB('change_email_user_query', $user); + $user = $user->save(); // Load the "activate email" template $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/activate_email.tpl')); + $mail_tpl = $this->hook->fire('change_email_mail_activate_tpl', $mail_tpl); // The first row contains the subject $first_crlf = strpos($mail_tpl, "\n"); $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); + $mail_subject = $this->hook->fire('change_email_mail_activate_subject', $mail_subject); + $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', get_base_url(), $mail_message); $mail_message = str_replace('', get_link('user/'.$id.'/action/change_email/?key='.$new_email_key), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); + $mail_message = $this->hook->fire('change_email_mail_activate_message', $mail_message); + + feather_mail($new_email, $mail_subject, $mail_message); - pun_mail($new_email, $mail_subject, $mail_message); + $this->hook->fire('change_email_sent'); message(__('Activate email sent').' '.feather_escape($this->config['o_admin_email']).'.', true); } + $this->hook->fire('change_email'); } public function upload_avatar($id, $files_data) { + $files_data = $this->hook->fire('upload_avatar_start', $files_data, $id); + if (!isset($files_data['req_file'])) { message(__('No file')); } @@ -310,6 +353,8 @@ public function upload_avatar($id, $files_data) } if (is_uploaded_file($uploaded_file['tmp_name'])) { + $uploaded_file = $this->hook->fire('upload_avatar_is_uploaded_file', $uploaded_file); + // Preliminary file check, adequate in most cases $allowed_types = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png'); if (!in_array($uploaded_file['type'], $allowed_types)) { @@ -355,21 +400,28 @@ public function upload_avatar($id, $files_data) message(__('Unknown failure')); } + $uploaded_file = $this->hook->fire('upload_avatar', $uploaded_file); + redirect(get_link('user/'.$id.'/section/personality/'), __('Avatar upload redirect')); } public function update_group_membership($id) { + $id = $this->hook->fire('update_group_membership_start', $id); + $new_group_id = intval($this->request->post('group_id')); $old_group_id = DB::for_table('users') - ->where('id', $id) - ->find_one_col('group_id'); + ->where('id', $id); + $old_group_id = $this->hook->fireDB('update_group_membership_old_group', $old_group_id); + $old_group_id = $old_group_id->find_one_col('group_id'); - DB::for_table('users')->where('id', $id) + $update_group = DB::for_table('users') + ->where('id', $id) ->find_one() - ->set('group_id', $new_group_id) - ->save(); + ->set('group_id', $new_group_id); + $update_group = $this->hook->fireDB('update_group_membership_update_group', $update_group); + $update_group = $update_group->save(); // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { @@ -383,17 +435,15 @@ public function update_group_membership($id) } $new_group_mod = DB::for_table('groups') - ->where('g_id', $new_group_id) - ->find_one_col('g_moderator'); + ->where('g_id', $new_group_id); + $new_group_mod = $this->hook->fireDB('update_group_membership_new_mod', $new_group_mod); + $new_group_mod = $new_group_mod->find_one_col('g_moderator'); // If the user was a moderator or an administrator, we remove him/her from the moderator list in all forums as well if ($new_group_id != FEATHER_ADMIN && $new_group_mod != '1') { - $select_mods = array('id', 'moderators'); - - $result = DB::for_table('forums') - ->select_many($select_mods) - ->find_many(); + // Loop through all forums + $result = $this->loop_mod_forums(); foreach($result as $cur_forum) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); @@ -402,21 +452,23 @@ public function update_group_membership($id) $username = array_search($id, $cur_moderators); unset($cur_moderators[$username]); + $update_forums = DB::for_table('forums') + ->where('id', $cur_forum['id']) + ->find_one(); + if (!empty($cur_moderators)) { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + $update_forums = $update_forums->set('moderators', serialize($cur_moderators)); } else { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set_expr('moderators', 'NULL') - ->save(); + $update_forums = $update_forums->set_expr('moderators', 'NULL'); } + $update_forums = $this->hook->fireDB('update_group_membership_mod_forums', $update_forums); + $update_forums = $update_forums->save(); } } } + $id = $this->hook->fire('update_group_membership', $id); + redirect(get_link('user/'.$id.'/section/admin/'), __('Group membership redirect')); } @@ -427,9 +479,23 @@ public function get_username($id) ->where('id', $id) ->find_one_col('username'); + $username = $this->hook->fire('get_username', $username); + return $username; } + public function loop_mod_forums() + { + $result['select'] = array('id', 'moderators'); + + $result = DB::for_table('forums') + ->select_many($result['select']); + $result = $this->hook->fireDB('loop_mod_forums', $result); + $result = $result->find_many(); + + return $result; + } + public function update_mod_forums($id) { $username = $this->get_username($id); @@ -437,11 +503,7 @@ public function update_mod_forums($id) $moderator_in = ($this->request->post('moderator_in')) ? array_keys($this->request->post('moderator_in')) : array(); // Loop through all forums - $select_mods = array('id', 'moderators'); - - $result = DB::for_table('forums') - ->select_many($select_mods) - ->find_many(); + $result = $this->loop_mod_forums(); foreach($result as $cur_forum) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); @@ -450,34 +512,40 @@ public function update_mod_forums($id) $cur_moderators[$username] = $id; uksort($cur_moderators, 'utf8_strcasecmp'); - DB::for_table('forums')->where('id', $cur_forum['id']) + $update_forums = DB::for_table('forums') + ->where('id', $cur_forum['id']) ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + ->set('moderators', serialize($cur_moderators)); + $update_forums = $this->hook->fireDB('update_mod_forums_query', $update_forums); + $update_forums = $update_forums->save(); } // If the user shouldn't have moderator access (and he/she already has it) elseif (!in_array($cur_forum['id'], $moderator_in) && in_array($id, $cur_moderators)) { unset($cur_moderators[$username]); + $update_forums = DB::for_table('forums') + ->where('id', $cur_forum['id']) + ->find_one(); + if (!empty($cur_moderators)) { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + $update_forums = $update_forums->set('moderators', serialize($cur_moderators)); } else { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set_expr('moderators', 'NULL') - ->save(); + $update_forums = $update_forums->set_expr('moderators', 'NULL'); } + $update_forums = $this->hook->fireDB('update_mod_forums_query', $update_forums); + $update_forums = $update_forums->save(); } } + $id = $this->hook->fire('update_mod_forums', $id); + redirect(get_link('user/'.$id.'/section/admin/'), __('Update forums redirect')); } public function ban_user($id) { + $id = $this->hook->fire('ban_user_start', $id); + // Get the username of the user we are banning $username = $this->get_username($id); @@ -485,8 +553,9 @@ public function ban_user($id) $ban_id = DB::for_table('bans') ->where('username', $username) ->order_by_expr('expire IS NULL DESC') - ->order_by_desc('expire') - ->find_one_col('id'); + ->order_by_desc('expire'); + $ban_id = $this->hook->fireDB('ban_user_query', $ban_id); + $ban_id = $ban_id->find_one_col('id'); if ($ban_id) { redirect(get_link('admin/bans/edit/'.$ban_id.'/'), __('Ban redirect')); @@ -497,36 +566,47 @@ public function ban_user($id) public function promote_user($id) { + $id = $this->hook->fire('promote_user_start', $id); + $pid = $this->request->get('pid') ? intval($this->request->get('pid')) : 0; // Find the group ID to promote the user to $next_group_id = DB::for_table('groups') ->table_alias('g') ->inner_join('users', array('u.group_id', '=', 'g.g_id'), 'u') - ->where('u.id', $id) - ->find_one_col('g.g_promote_next_group'); + ->where('u.id', $id); + $next_group_id = $this->hook->fireDB('promote_user_group_id', $next_group_id); + $next_group_id = $next_group_id->find_one_col('g.g_promote_next_group'); if (!$next_group_id) { message(__('Bad request'), '404'); } // Update the user - DB::for_table('users')->where('id', $id) + $update_user = DB::for_table('users') + ->where('id', $id) ->find_one() - ->set('group_id', $next_group_id) - ->save(); + ->set('group_id', $next_group_id); + $update_user = $this->hook->fireDB('promote_user_query', $update_user); + $update_user = $update_user->save(); + + $pid = $this->hook->fire('promote_user', $pid); redirect(get_link('post/'.$pid.'/#p'.$pid), __('User promote redirect')); } public function delete_user($id) { + $id = $this->hook->fire('delete_user_start', $id); + // Get the username and group of the user we are deleting - $select_info_delete_user = array('group_id', 'username'); + $result['select'] = array('group_id', 'username'); - $result = DB::for_table('users')->where('id', $id) - ->select_many($select_info_delete_user) - ->find_one(); + $result = DB::for_table('users') + ->where('id', $id) + ->select_many($result['select']); + $result = $this->hook->fireDB('delete_user_username', $result); + $result = $result->find_one(); $group_id = $result['group_id']; $username = $result['username']; @@ -538,15 +618,14 @@ public function delete_user($id) if ($this->request->post('delete_user_comply')) { // If the user is a moderator or an administrator, we remove him/her from the moderator list in all forums as well $group_mod = DB::for_table('groups') - ->where('g_id', $group_id) - ->find_one_col('g_moderator'); + ->where('g_id', $group_id); + $group_mod = $this->hook->fireDB('delete_user_group_mod', $group_mod); + $group_mod = $group_mod->find_one_col('g_moderator'); if ($group_id == FEATHER_ADMIN || $group_mod == '1') { - $select_info_delete_moderators = array('id', 'moderators'); - $result = DB::for_table('forums') - ->select_many($select_info_delete_moderators) - ->find_many(); + // Loop through all forums + $result = $this->loop_mod_forums(); foreach($result as $cur_forum) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); @@ -554,33 +633,37 @@ public function delete_user($id) if (in_array($id, $cur_moderators)) { unset($cur_moderators[$username]); + $update_forums = DB::for_table('forums') + ->where('id', $cur_forum['id']) + ->find_one(); + if (!empty($cur_moderators)) { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + $update_forums = $update_forums->set('moderators', serialize($cur_moderators)); } else { - DB::for_table('forums')->where('id', $cur_forum['id']) - ->find_one() - ->set_expr('moderators', 'NULL') - ->save(); + $update_forums = $update_forums->set_expr('moderators', 'NULL'); } + $update_forums = $this->hook->fireDB('update_mod_forums_query', $update_forums); + $update_forums = $update_forums->save(); } } } // Delete any subscriptions - DB::for_table('topic_subscriptions') - ->where('user_id', $id) - ->delete_many(); - DB::for_table('forum_subscriptions') - ->where('user_id', $id) - ->delete_many(); + $delete_subscriptions = DB::for_table('topic_subscriptions') + ->where('user_id', $id); + $delete_subscriptions = $this->hook->fireDB('delete_user_subscriptions_topic', $delete_subscriptions); + $delete_subscriptions = $delete_subscriptions->delete_many(); + unset($delete_subscriptions); + $delete_subscriptions = DB::for_table('forum_subscriptions') + ->where('user_id', $id); + $delete_subscriptions = $this->hook->fireDB('delete_user_subscriptions_forum', $delete_subscriptions); + $delete_subscriptions = $delete_subscriptions->delete_many(); // Remove him/her from the online list (if they happen to be logged in) - DB::for_table('online') - ->where('user_id', $id) - ->delete_many(); + $delete_online = DB::for_table('online') + ->where('user_id', $id); + $delete_online = $this->hook->fireDB('delete_user_online', $delete_online); + $delete_online = $delete_online->delete_many(); // Should we delete all posts made by this user? if ($this->request->post('delete_posts')) { @@ -588,24 +671,29 @@ public function delete_user($id) // Hold on, this could take some time! @set_time_limit(0); + $this->hook->fire('delete_user_posts'); + // Find all posts made by this user - $select_user_posts = array('p.id', 'p.topic_id', 't.forum_id'); + unset($result); + $result['select'] = array('p.id', 'p.topic_id', 't.forum_id'); $result = DB::for_table('posts') ->table_alias('p') - ->select_many($select_user_posts) + ->select_many($result['select']) ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') - ->where('p.poster_id', $id) - ->find_many(); + ->where('p.poster_id', $id); + $result = $this->hook->fireDB('delete_user_posts_first_query', $result); + $result = $result->find_many(); if ($result) { foreach($result as $cur_post) { // Determine whether this post is the "topic post" or not $result2 = DB::for_table('posts') ->where('topic_id', $cur_post['topic_id']) - ->order_by('posted') - ->find_one_col('id'); + ->order_by('posted'); + $result2 = $this->hook->fireDB('delete_user_posts_second_query', $result2); + $result2 = $result2->find_one_col('id'); if ($result2 == $cur_post['id']) { delete_topic($cur_post['topic_id']); @@ -618,15 +706,16 @@ public function delete_user($id) } } else { // Set all his/her posts to guest - DB::for_table('posts') - ->where_in('poster_id', '1') - ->update_many('poster_id', $id); + $update_guest = DB::for_table('posts') + ->where_in('poster_id', '1'); + $update_guest = $this->hook->fireDB('delete_user_posts_guest_query', $update_guest); + $update_guest = $update_guest->update_many('poster_id', $id); } // Delete the user - DB::for_table('users') - ->where('id', $id) - ->delete_many(); + $delete_user = DB::for_table('users') + ->where('id', $id); + $delete_user = $delete_user->delete_many(); // Delete user avatar delete_avatar($id); @@ -642,24 +731,25 @@ public function delete_user($id) $this->feather->cache->store('admin_ids', \model\cache::get_admin_ids()); } + $this->hook->fire('delete_user'); + redirect(get_base_url(), __('User delete redirect')); } } public function fetch_user_group($id) { - - $info = array(); - $select_fetch_user_group = array('old_username' => 'u.username', 'group_id' => 'u.group_id', 'is_moderator' => 'g.g_moderator'); + $info['select'] = array('old_username' => 'u.username', 'group_id' => 'u.group_id', 'is_moderator' => 'g.g_moderator'); $info = DB::for_table('users') ->table_alias('u') - ->select_many($select_fetch_user_group) + ->select_many($info['select']) ->left_outer_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where('u.id', $id) - ->find_one(); + ->where('u.id', $id); + $info = $this->hook->fireDB('fetch_user_group', $info); + $info = $info->find_one(); if (!$info) { message(__('Bad request'), '404'); @@ -672,8 +762,12 @@ public function update_profile($id, $info, $section) { global $pd; + $info = $this->hook->fire('update_profile_start', $info, $id, $section); + $username_updated = false; + $section = $this->hook->fire('update_profile_section', $section, $id, $info); + // Validate input depending on section switch ($section) { case 'essentials': @@ -890,6 +984,7 @@ public function update_profile($id, $info, $section) message(__('Bad request'), '404'); } + $form = $this->hook->fire('update_profile_form', $form, $section, $id, $info); // Single quotes around non-empty values and nothing for empty values $temp = array(); @@ -901,55 +996,65 @@ public function update_profile($id, $info, $section) message(__('Bad request'), '404'); } - DB::for_table('users')->where('id', $id) + $update_user = DB::for_table('users') + ->where('id', $id) ->find_one() - ->set($temp) - ->save(); + ->set($temp); + $update_user = $this->hook->fireDB('update_profile_query', $update_user); + $update_user = $update_user->save(); // If we changed the username we have to update some stuff if ($username_updated) { - $bans_updated = DB::for_table('bans')->where('username', $info['old_username']) - ->update_many('username', $form['username']); - - DB::for_table('posts') - ->where('poster_id', $id) - ->update_many('poster', $form['username']); - - DB::for_table('posts') - ->where('edited_by', $info['old_username']) - ->update_many('edited_by', $form['username']); - - DB::for_table('topics') - ->where('poster', $info['old_username']) - ->update_many('poster', $form['username']); - - DB::for_table('topics') - ->where('last_poster', $info['old_username']) - ->update_many('last_poster', $form['username']); - - DB::for_table('forums') - ->where('last_poster', $info['old_username']) - ->update_many('last_poster', $form['username']); - - DB::for_table('online') - ->where('ident', $info['old_username']) - ->update_many('ident', $form['username']); + $bans_updated = DB::for_table('bans') + ->where('username', $info['old_username']); + $bans_updated = $this->hook->fireDB('update_profile_bans_updated', $bans_updated); + $bans_updated = $bans_updated->update_many('username', $form['username']); + + $update_poster_id = DB::for_table('posts') + ->where('poster_id', $id); + $update_poster_id = $this->hook->fireDB('update_profile_poster_id', $update_poster_id); + $update_poster_id = $update_poster_id->update_many('poster', $form['username']); + + $update_posts = DB::for_table('posts') + ->where('edited_by', $info['old_username']); + $update_posts = $this->hook->fireDB('update_profile_posts', $update_posts); + $update_posts = $update_posts->update_many('edited_by', $form['username']); + + $update_topics_poster = DB::for_table('topics') + ->where('poster', $info['old_username']); + $update_topics_poster = $this->hook->fireDB('update_profile_topics_poster', $update_topics_poster); + $update_topics_poster = $update_topics_poster->update_many('poster', $form['username']); + + $update_topics_last_poster = DB::for_table('topics') + ->where('last_poster', $info['old_username']); + $update_topics_last_poster = $this->hook->fireDB('update_profile_topics_last_poster', $update_topics_last_poster); + $update_topics_last_poster = $update_topics_last_poster->update_many('last_poster', $form['username']); + + $update_forums = DB::for_table('forums') + ->where('last_poster', $info['old_username']); + $update_forums = $this->hook->fireDB('update_profile_forums', $update_forums); + $update_forums = $update_forums->update_many('last_poster', $form['username']); + + $update_online = DB::for_table('online') + ->where('ident', $info['old_username']); + $update_online = $this->hook->fireDB('update_profile_online', $update_online); + $update_online = $update_online->update_many('ident', $form['username']); // If the user is a moderator or an administrator we have to update the moderator lists $group_id = DB::for_table('users') - ->where('id', $id) - ->find_one_col('group_id'); + ->where('id', $id); + $group_id = $this->hook->fireDB('update_profile_group_id', $update_online); + $group_id = $group_id->find_one_col('group_id'); $group_mod = DB::for_table('groups') - ->where('g_id', $group_id) - ->find_one_col('g_moderator'); + ->where('g_id', $group_id); + $group_mod = $this->hook->fireDB('update_profile_group_mod', $group_mod); + $group_mod = $group_mod->find_one_col('g_moderator'); if ($group_id == FEATHER_ADMIN || $group_mod == '1') { - $select_mods = array('id', 'moderators'); - $result = DB::for_table('forums') - ->select_many($select_mods) - ->find_many(); + // Loop through all forums + $result = $this->loop_mod_forums(); foreach($result as $cur_forum) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); @@ -959,10 +1064,12 @@ public function update_profile($id, $info, $section) $cur_moderators[$form['username']] = $id; uksort($cur_moderators, 'utf8_strcasecmp'); - DB::for_table('forums')->where('id', $cur_forum['id']) + $update_mods = DB::for_table('forums') + ->where('id', $cur_forum['id']) ->find_one() - ->set('moderators', serialize($cur_moderators)) - ->save(); + ->set('moderators', serialize($cur_moderators)); + $update_mods = $this->hook->fireDB('update_profile_mods', $update_mods); + $update_mods = $update_mods->save(); } } } @@ -980,21 +1087,22 @@ public function update_profile($id, $info, $section) } } + $section = $this->hook->fireDB('update_profile', $section, $id); + redirect(get_link('user/'.$id.'/section/'.$section.'/'), __('Profile redirect')); } public function get_user_info($id) { - - - $select_get_user_info = array('u.id', 'u.username', 'u.email', 'u.title', 'u.realname', 'u.url', 'u.jabber', 'u.icq', 'u.msn', 'u.aim', 'u.yahoo', 'u.location', 'u.signature', 'u.disp_topics', 'u.disp_posts', 'u.email_setting', 'u.notify_with_post', 'u.auto_notify', 'u.show_smilies', 'u.show_img', 'u.show_img_sig', 'u.show_avatars', 'u.show_sig', 'u.timezone', 'u.dst', 'u.language', 'u.style', 'u.num_posts', 'u.last_post', 'u.registered', 'u.registration_ip', 'u.admin_note', 'u.date_format', 'u.time_format', 'u.last_visit', 'g.g_id', 'g.g_user_title', 'g.g_moderator'); + $user['select'] = array('u.id', 'u.username', 'u.email', 'u.title', 'u.realname', 'u.url', 'u.jabber', 'u.icq', 'u.msn', 'u.aim', 'u.yahoo', 'u.location', 'u.signature', 'u.disp_topics', 'u.disp_posts', 'u.email_setting', 'u.notify_with_post', 'u.auto_notify', 'u.show_smilies', 'u.show_img', 'u.show_img_sig', 'u.show_avatars', 'u.show_sig', 'u.timezone', 'u.dst', 'u.language', 'u.style', 'u.num_posts', 'u.last_post', 'u.registered', 'u.registration_ip', 'u.admin_note', 'u.date_format', 'u.time_format', 'u.last_visit', 'g.g_id', 'g.g_user_title', 'g.g_moderator'); $user = DB::for_table('users') ->table_alias('u') - ->select_many($select_get_user_info) + ->select_many($user['select']) ->left_outer_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where('u.id', $id) - ->find_one(); + ->where('u.id', $id); + $user = $this->hook->fireDB('get_user_info', $user); + $user = $user->find_one(); if (!$user) { message(__('Bad request'), '404'); @@ -1007,6 +1115,8 @@ public function parse_user_info($user) { $user_info = array(); + $user_info = $this->hook->fire('parse_user_info_start', $user_info, $user); + $user_info['personal'][] = '
    '.__('Username').'
    '; $user_info['personal'][] = '
    '.feather_escape($user['username']).'
    '; @@ -1113,6 +1223,8 @@ public function parse_user_info($user) $user_info['activity'][] = '
    '.__('Registered').'
    '; $user_info['activity'][] = '
    '.format_time($user['registered'], true).'
    '; + $user_info = $this->hook->fire('parse_user_info', $user_info); + return $user_info; } @@ -1120,6 +1232,8 @@ public function edit_essentials($id, $user) { $user_disp = array(); + $user_disp = $this->hook->fire('edit_essentials_start', $user_disp, $id, $user); + if ($this->user->is_admmod) { if ($this->user->g_id == FEATHER_ADMIN || $this->user->g_mod_rename_users == '1') { $user_disp['username_field'] = ''."\n"; @@ -1158,6 +1272,8 @@ public function edit_essentials($id, $user) $user_disp['posts_field'] .= (!empty($posts_actions) ? '

    '.implode(' - ', $posts_actions).'

    ' : '')."\n"; + $user_disp = $this->hook->fire('edit_essentials', $user_disp); + return $user_disp; } @@ -1165,12 +1281,16 @@ public function get_group_list($user) { $output = ''; - $select_group_list = array('g_id', 'g_title'); + $user = $this->hook->fire('get_group_list_start', $user); + + $result['select'] = array('g_id', 'g_title'); - $result = DB::for_table('groups')->select_many($select_group_list) - ->where_not_equal('g_id', FEATHER_GUEST) - ->order_by('g_title') - ->find_many(); + $result = DB::for_table('groups') + ->select_many($result['select']) + ->where_not_equal('g_id', FEATHER_GUEST) + ->order_by('g_title'); + $result = $this->hook->fireDB('get_group_list_query', $result); + $result = $result->find_many(); foreach ($result as $cur_group) { if ($cur_group['g_id'] == $user['g_id'] || ($cur_group['g_id'] == $this->config['o_default_user_group'] && $user['g_id'] == '')) { @@ -1180,6 +1300,8 @@ public function get_group_list($user) } } + $output = $this->hook->fire('get_group_list', $output); + return $output; } @@ -1187,22 +1309,24 @@ public function get_forum_list($id) { $output = ''; - $select_get_forum_list = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.moderators'); - $order_by_get_forum_list = array('c.disp_position', 'c.id', 'f.disp_position'); + $id = $this->hook->fire('get_forum_list_start', $id); + + $result['select'] = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.moderators'); + $result['order_by'] = array('c.disp_position', 'c.id', 'f.disp_position'); $result = DB::for_table('categories') ->table_alias('c') - ->select_many($select_get_forum_list) + ->select_many($result['select']) ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') ->where_null('f.redirect_url') - ->order_by_many($order_by_get_forum_list) - ->find_many(); + ->order_by_many($result['order_by']); + $result = $this->hook->fireDB('get_forum_list', $result); + $result = $result->find_many(); $cur_category = 0; foreach($result as $cur_forum) { if ($cur_forum['cid'] != $cur_category) { // A new category since last iteration? - if ($cur_category) { $output .= "\n\t\t\t\t\t\t\t\t".'
    '; } @@ -1220,6 +1344,8 @@ public function get_forum_list($id) $output .= "\n\t\t\t\t\t\t\t\t\t".''."\n"; } + $output = $this->hook->fire('get_forum_list', $output); + return $output; } @@ -1228,11 +1354,13 @@ public function get_forum_list($id) // public function generate_profile_menu($page = '', $id) { + $page = $this->hook->fire('generate_profile_menu', $page, $id); + $this->feather->render('profile/menu.php', array( - 'id' => $id, - 'feather_config' => $this->config, - 'feather_user' => $this->user, - 'page' => $page, + 'id' => $id, + 'feather_config' => $this->config, + 'feather_user' => $this->user, + 'page' => $page, ) ); } From 822fa6ef0a57b46290e04491243eb7a214bae6b1 Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 17:18:44 +0200 Subject: [PATCH 142/353] Coding style --- model/login.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/model/login.php b/model/login.php index a2660698..d845dcce 100644 --- a/model/login.php +++ b/model/login.php @@ -177,9 +177,10 @@ public function password_forgotten() 'last_email_sent' => time() ); - $query = DB::for_table('users')->where('id', $cur_hit->id) - ->find_one() - ->set($query['update']); + $query = DB::for_table('users') + ->where('id', $cur_hit->id) + ->find_one() + ->set($query['update']); $query = $this->hook->fireDB('password_forgotten_mail_query', $query); $query = $query->save(); From c7d4f5622ce60ff579c02a6482587810d9257fd1 Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 17:21:10 +0200 Subject: [PATCH 143/353] Coding style --- include/classes/autoload.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/include/classes/autoload.class.php b/include/classes/autoload.class.php index a8bf8e35..9349d336 100644 --- a/include/classes/autoload.class.php +++ b/include/classes/autoload.class.php @@ -28,4 +28,3 @@ public static function registerAutoloader() spl_autoload_register(__NAMESPACE__ . '\Loader::autoload'); } } - ?> From 838142f4eb3c9822a2b5a4fdac9d8dc88d600e95 Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 17:22:12 +0200 Subject: [PATCH 144/353] Coding style --- include/classes/core.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/classes/core.class.php b/include/classes/core.class.php index a35d4912..35a94725 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -229,7 +229,7 @@ public function call() // Hooks $this->app->hooks = new \FeatherBB\Hooks(); - new \plugin\plugintest(); + new \plugin\plugintest(); // TODO: remove // Define time formats $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); From cc0ba1c978499044807805746c028785b9d70042 Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 17:31:04 +0200 Subject: [PATCH 145/353] Coding style --- include/classes/auth.class.php | 10 ++++++---- model/auth.php | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index d26f871b..6b7e5232 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -97,9 +97,10 @@ public function update_users_online() // Fetch all online list entries that are older than "o_timeout_online" $select_update_users_online = array('user_id', 'ident', 'logged', 'idle'); - $result = \DB::for_table('online')->select_many($select_update_users_online) - ->where_lt('logged', $this->app->now-$this->app->forum_settings['o_timeout_online']) - ->find_many(); + $result = \DB::for_table('online') + ->select_many($select_update_users_online) + ->where_lt('logged', $this->app->now-$this->app->forum_settings['o_timeout_online']) + ->find_many(); foreach ($result as $cur_user) { // If the entry is a guest, delete it @@ -173,7 +174,8 @@ public function check_bans() } if ($is_banned) { - \DB::for_table('online')->where('ident', $this->app->user->username) + \DB::for_table('online') + ->where('ident', $this->app->user->username) ->delete_many(); message(__('Ban message').' '.(($cur_ban['expire'] != '') ? __('Ban message 2').' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? __('Ban message 3').'

    '.feather_escape($cur_ban['message']).'

    ' : '

    ').__('Ban message 4').' '.feather_escape($this->app->forum_settings['o_admin_email']).'.', true, true, true); } diff --git a/model/auth.php b/model/auth.php index 15b896a2..2b11849e 100644 --- a/model/auth.php +++ b/model/auth.php @@ -15,23 +15,25 @@ class auth public function __construct() { $this->feather = \Slim\Slim::getInstance(); + $this->hook = $this->feather->hooks; } public function load_user($user_id) { $user_id = (int) $user_id; - $select_load_user = array('u.*', 'g.*', 'o.logged', 'o.idle'); - $where_load_user = array('u.id' => $user_id); - $left_outer_join_load_user = ($user_id == 1) ? $this->feather->request->getIp() : 'u.id'; + $result['select'] = array('u.*', 'g.*', 'o.logged', 'o.idle'); + $result['where'] = array('u.id' => $user_id); + $result['join'] = ($user_id == 1) ? $this->feather->request->getIp() : 'u.id'; $escape = ($user_id == 1) ? true : false; $result = DB::for_table('users') - ->table_alias('u') - ->select_many($select_load_user) - ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') - ->left_outer_join('online', array('o.user_id', '=', $left_outer_join_load_user), 'o', $escape) - ->where($where_load_user) - ->find_result_set(); + ->table_alias('u') + ->select_many($result['select']) + ->inner_join('groups', array('u.group_id', '=', 'g.g_id'), 'g') + ->left_outer_join('online', array('o.user_id', '=', $result['join']), 'o', $escape) + ->where($result['where']); + //$result = $this->hook->fireDB('load_user_query', $result); + $result = $result->find_result_set(); foreach ($result as $user) { return $user; From 50ecd79dd975b422db9ff860044abac69e96b1b4 Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 17:33:45 +0200 Subject: [PATCH 146/353] Fix minor issues --- include/classes/auth.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index 6b7e5232..06324b40 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -135,7 +135,7 @@ public function check_bans() // Add a dot or a colon (depending on IPv4/IPv6) at the end of the IP address to prevent banned address // 192.168.0.5 from matching e.g. 192.168.0.50 - $user_ip = get_remote_address(); + $user_ip = $this->app->request->getIp(); $user_ip .= (strpos($user_ip, '.') !== false) ? '.' : ':'; $bans_altered = false; @@ -292,7 +292,7 @@ public function call() $this->update_users_online(); // Configure Slim - $this->app->config('templates.path', $this->app->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); + $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? $this->app->forum_env['FEATHER_ROOT'].'style/'.$this->app->user->style.'/view' : $this->app->forum_env['FEATHER_ROOT'].'view'); $this->next->call(); } } From 76235137bc793770d2b8cbb685144db41f6fc32e Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 17:39:52 +0200 Subject: [PATCH 147/353] Fix image link and rebrand variable --- lang/English/help.mo | Bin 4255 -> 4261 bytes lang/English/help.po | 4 ++-- style/FeatherBB/view/help.php | 2 +- view/help.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/English/help.mo b/lang/English/help.mo index 2d7673164737d5e1eb6a7b3ff25813f9d4072fa3..0cc4462a25c7bd1f4e0b9612a952aefa7842a618 100644 GIT binary patch delta 773 zcmXZZODKd<6u|K_d^4V7yo<#!sL3O;kx&#C8Y1OUN-U<3g=8VAZ^6n+W+7Rykz}Dr zu~KZL?69IN!~!*GW@W+uaO(E`?z!K6oO|w0XfL$B>=ud0ha-}WDP9q}62L4hL_d~W zT#vcLEtrWB%)nv$KVi?*9Qx4Csa{n1`FFl{r97MJ@sk2@Dh7bD;eMx+(9Z)D^YK8v&EhN@u2k4X=K7E>f5X#O}6;x0S8!(#~8#% zEWvNHi0sRV8*m8wV?C*d9*HGWM?C&mpR?T0t_li A`Tzg` delta 767 zcmXZZODIKA6oBD%y3X}D-jAX@I+Dl;N%F|VYoK%`CQKxesTin3DH8*A3}ixiOeg~x zCD&6t6`n2v+?f7F~ZXOSjLbh>WE#y2e9btU-Q=!AhN6V7eICF;Sqn1)Z7im#}N zCa?g1P!lO&u_jWE8rN9dXmLB{Fy4#VIAZZ+H26PYjse|p5%X{zi*O$`ku%gvU7;TE zfCG-m3(};8EWfZ5Pq2+_G@*p~jk;fy#aiJ~JVHO;c!>=9}5MyDnI#9{PUG=}3?h!^I)8ApmIfx|AkFco#9V(h{y^l=*XhO5|$Ax_{m z>eDn)PkovWyufbMN~UuQ?jU8Tm8h|}!Q%G+I3_)O)H5N5`Zmi*laNji*uh#n#B#jD v5=@#oWM4sCi$mBK_C*eytS}iFb|mai*^bQ2&WD~?d0gbayBZvO-lqEtl!8cE diff --git a/lang/English/help.po b/lang/English/help.po index 8947956a..2d7c7c52 100644 --- a/lang/English/help.po +++ b/lang/English/help.po @@ -80,8 +80,8 @@ msgstr "My email address" msgid "Images info" msgstr "If you want to display an image you can use the img tag. The text appearing after the \"=\" sign in the opening tag is used for the alt attribute and should be included whenever possible." -msgid "FluxBB bbcode test" -msgstr "FluxBB bbcode test" +msgid "FeatherBB bbcode test" +msgstr "FeatherBB bbcode test" msgid "Test topic" msgstr "Test topic" diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php index b5477db4..2ecf9e36 100644 --- a/style/FeatherBB/view/help.php +++ b/style/FeatherBB/view/help.php @@ -57,7 +57,7 @@

    -

    [img=]/img/test.png[/img] <?php _e('FluxBB bbcode test') ?>

    +

    [img=]/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

    diff --git a/view/help.php b/view/help.php index b5477db4..2ecf9e36 100644 --- a/view/help.php +++ b/view/help.php @@ -57,7 +57,7 @@

    -

    [img=]/img/test.png[/img] <?php _e('FluxBB bbcode test') ?>

    +

    [img=]/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

    From b7376973daaa387f3a136f6a8ee14e9b07c7bdb1 Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 18:13:47 +0200 Subject: [PATCH 148/353] Switch remaining $lang_ to gettext --- model/search.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/model/search.php b/model/search.php index 3bd0de2a..c1f97531 100644 --- a/model/search.php +++ b/model/search.php @@ -25,8 +25,6 @@ public function __construct() public function get_search_results() { - global $lang_search; - $search = array(); $action = ($this->request->get('action')) ? $this->request->get('action') : null; @@ -627,20 +625,20 @@ public function get_search_results() $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_subscriptions'), feather_escape($subscriber_name)).''; } else { $search_url = str_replace('_', '/', $search_type[1]); - $search['crumbs_text']['search_type'] = ''.$lang_search['Quick search '.$search_type[1]].''; + $search['crumbs_text']['search_type'] = ''.__('Quick search '.$search_type[1]).''; } } else { $keywords = $author = ''; if ($search_type[0] == 'both') { list($keywords, $author) = $search_type[1]; - $search['crumbs_text']['search_type'] = sprintf($lang_search['By both show as '.$show_as], feather_escape($keywords), feather_escape($author)); + $search['crumbs_text']['search_type'] = sprintf(__('By both show as '.$show_as), feather_escape($keywords), feather_escape($author)); } elseif ($search_type[0] == 'keywords') { $keywords = $search_type[1]; - $search['crumbs_text']['search_type'] = sprintf($lang_search['By keywords show as '.$show_as], feather_escape($keywords)); + $search['crumbs_text']['search_type'] = sprintf(__('By keywords show as '.$show_as), feather_escape($keywords)); } elseif ($search_type[0] == 'author') { $author = $search_type[1]; - $search['crumbs_text']['search_type'] = sprintf($lang_search['By user show as '.$show_as], feather_escape($author)); + $search['crumbs_text']['search_type'] = sprintf(__('By user show as '.$show_as), feather_escape($author)); } $search['crumbs_text']['search_type'] = ''.$search['crumbs_text']['search_type'].''; @@ -654,7 +652,7 @@ public function get_search_results() public function display_search_results($search) { - global $lang_search, $pd; + global $pd; // Get topic/forum tracking data if (!$this->user->is_guest) { @@ -702,7 +700,6 @@ public function display_search_results($search) 'url_topic' => $url_topic, 'cur_search' => $cur_search, 'forum' => $forum, - 'lang_search' => $lang_search, ) ); } else { @@ -769,8 +766,6 @@ public function display_search_results($search) public function get_list_forums() { - global $lang_search; - $output = ''; $select_get_list_forums = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.redirect_url'); From bc389df3c4270b147122b8760c089cd6f5a0e096 Mon Sep 17 00:00:00 2001 From: adaur Date: Sun, 23 Aug 2015 18:26:58 +0200 Subject: [PATCH 149/353] Minor fixes --- model/install.php | 6 ++++-- model/search.php | 1 - model/viewtopic.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/model/install.php b/model/install.php index 30d1c2ad..3590b585 100644 --- a/model/install.php +++ b/model/install.php @@ -388,6 +388,7 @@ public static function load_default_user() public static function load_admin_user(array $data) { + $feather = \Slim\Slim::getInstance(); $now = time(); return $user = array( 'group_id' => 1, @@ -399,19 +400,20 @@ public static function load_admin_user(array $data) 'num_posts' => 1, 'last_post' => $now, 'registered' => $now, - 'registration_ip' => get_remote_address(), + 'registration_ip' => $feather->request->getIp(), 'last_visit' => $now); } public static function load_mock_forum_data(array $data) { + $feather = \Slim\Slim::getInstance(); $cat_name = __('Test category'); $subject = __('Test post'); $message = __('Message'); $forum_name = __('Test forum'); $forum_desc = __('This is just a test forum'); $now = time(); - $ip = get_remote_address(); + $ip = $feather->request->getIp(); return $mock_data = array( 'categories' => array('cat_name' => $cat_name, diff --git a/model/search.php b/model/search.php index c1f97531..cc0f027a 100644 --- a/model/search.php +++ b/model/search.php @@ -22,7 +22,6 @@ public function __construct() $this->request = $this->feather->request; } - public function get_search_results() { $search = array(); diff --git a/model/viewtopic.php b/model/viewtopic.php index 1f32514a..b4776ff1 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -241,7 +241,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) } if (empty($post_ids)) { - error('The post table and topic table seem to be out of sync!', __FILE__, __LINE__); + message('The post table and topic table seem to be out of sync!'); } // Retrieve the posts (and their respective poster/online status) From 8cb913c485f20c478456e824f0427bdd9e059026 Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 24 Aug 2015 02:00:40 +0200 Subject: [PATCH 150/353] Half of model/admin folder hooks --- controller/admin/forums.php | 10 +-- controller/admin/groups.php | 3 +- model/admin/bans.php | 53 +++++++++--- model/admin/categories.php | 28 ++++--- model/admin/censoring.php | 23 ++++-- model/admin/forums.php | 76 ++++++++++++------ model/admin/groups.php | 80 ++++++++++++++----- model/admin/maintenance.php | 10 +-- .../view/admin/groups/delete_group.php | 6 +- 9 files changed, 202 insertions(+), 87 deletions(-) diff --git a/controller/admin/forums.php b/controller/admin/forums.php index e71517f5..e54c624e 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -100,8 +100,8 @@ public function edit_forum($forum_id) $permissions_data['post_replies'] = (isset($this->request->post('post_replies_new')[$perm_group['g_id']])) ? '1' : '0'; $permissions_data['post_topics'] = (isset($this->request->post('post_topics_new')[$perm_group['g_id']])) ? '1' : '0'; // Check if the new settings differ from the old - if ($permissions_data['read_forum'] != $this->request->post('read_forum_old')[$perm_group['g_id']] || - $permissions_data['post_replies'] != $this->request->post('post_replies_old')[$perm_group['g_id']] || + if ($permissions_data['read_forum'] != $this->request->post('read_forum_old')[$perm_group['g_id']] || + $permissions_data['post_replies'] != $this->request->post('post_replies_old')[$perm_group['g_id']] || $permissions_data['post_topics'] != $this->request->post('post_topics_old')[$perm_group['g_id']]) { // If there is no group permissions override for this forum if ($permissions_data['read_forum'] == '1' && $permissions_data['post_replies'] == $perm_group['g_post_replies'] && $permissions_data['post_topics'] == $perm_group['g_post_topics']) { @@ -120,7 +120,7 @@ public function edit_forum($forum_id) generate_quickjump_cache(); redirect(get_link('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); - + } elseif ($this->request->post('revert_perms')) { $this->model->delete_permissions($forum_id); @@ -195,7 +195,7 @@ public function delete_forum($forum_id) $this->footer->display(); } } - + // -- // public function edit_positions() @@ -214,7 +214,7 @@ public function edit_positions() redirect(get_link('admin/forums/'), __('Forums updated redirect')); } - + public function display() { if ($this->user->g_id != FEATHER_ADMIN) { diff --git a/controller/admin/groups.php b/controller/admin/groups.php index ec69692b..e803beee 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -29,7 +29,7 @@ public function __autoload($class_name) { require FEATHER_ROOT . $class_name . '.php'; } - + public function display() { if ($this->user->g_id != FEATHER_ADMIN) { @@ -119,6 +119,7 @@ public function delete($id) $this->feather->render('admin/groups/delete_group.php', array( 'id' => $id, 'group_info' => $this->model->get_title_members($id), + 'group_list_delete' => $this->model->get_group_list_delete($id), ) ); diff --git a/model/admin/bans.php b/model/admin/bans.php index c0a85f60..fcfb6a91 100644 --- a/model/admin/bans.php +++ b/model/admin/bans.php @@ -20,12 +20,15 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } - + public function add_ban_info($id = null) { $ban = array(); + $id = $this->hook->fire('add_ban_info_start', $id); + // If the ID of the user to ban was provided through GET (a link from profile.php) if (is_numeric($id)) { $ban['user_id'] = $id; @@ -35,8 +38,10 @@ public function add_ban_info($id = null) $select_add_ban_info = array('group_id', 'username', 'email'); $result = DB::for_table('users')->select_many($select_add_ban_info) - ->where('id', $ban['user_id']) - ->find_one(); + ->where('id', $ban['user_id']); + + $result = $this->hook->fireDB('add_ban_info_query', $result); + $result = $result->find_one(); if ($result) { $group_id = $result['group_id']; @@ -54,8 +59,11 @@ public function add_ban_info($id = null) $select_add_ban_info = array('id', 'group_id', 'username', 'email'); $result = DB::for_table('users')->select_many($select_add_ban_info) ->where('username', $ban['ban_user']) - ->where_gt('id', 1) - ->find_one(); + ->where_gt('id', 1); + + $result = $this->hook->fireDB('add_ban_info_query', $result); + $result = $result->find_one(); + if ($result) { $ban['user_id'] = $result['id']; $group_id = $result['group_id']; @@ -95,6 +103,8 @@ public function add_ban_info($id = null) $ban['mode'] = 'add'; + $ban = $this->hook->fire('add_ban_info', $ban); + return $ban; } @@ -102,12 +112,16 @@ public function edit_ban_info($id) { $ban = array(); + $id = $this->hook->fire('edit_ban_info_start', $id); + $ban['id'] = $id; $select_edit_ban_info = array('username', 'ip', 'email', 'message', 'expire'); $result = DB::for_table('bans')->select_many($select_edit_ban_info) - ->where('id', $ban['id']) - ->find_one(); + ->where('id', $ban['id']); + + $result = $this->hook->fireDB('edit_ban_info_query', $result); + $result = $result->find_one(); if ($result) { $ban['ban_user'] = $result['username']; @@ -124,6 +138,8 @@ public function edit_ban_info($id) $ban['mode'] = 'edit'; + $ban = $this->hook->fire('edit_ban_info', $ban); + return $ban; } @@ -135,6 +151,8 @@ public function insert_ban() $ban_message = feather_trim($this->request->post('ban_message')); $ban_expire = feather_trim($this->request->post('ban_expire')); + $this->hook->fire('insert_ban_start', $ban_user, $ban_ip, $ban_email, $ban_message, $ban_expire); + if ($ban_user == '' && $ban_ip == '' && $ban_email == '') { message(__('Must enter message')); } elseif (strtolower($ban_user) == 'guest') { @@ -238,16 +256,18 @@ public function insert_ban() 'expire' => $ban_expire, ); + $insert_update_ban = $this->hook->fire('insert_ban_data', $insert_update_ban); + if ($this->request->post('mode') == 'add') { $insert_update_ban['ban_creator'] = $this->user->id; - DB::for_table('bans') + $result = DB::for_table('bans') ->create() ->set($insert_update_ban) ->save(); } else { - DB::for_table('bans') + $result = DB::for_table('bans') ->where('id', $this->request->post('ban_id')) ->find_one() ->set($insert_update_ban) @@ -266,9 +286,12 @@ public function insert_ban() public function remove_ban($ban_id) { - DB::for_table('bans')->where('id', $ban_id) - ->find_one() - ->delete(); + $ban_id = $this->hook->fire('remove_ban', $ban_id); + + $result = DB::for_table('bans')->where('id', $ban_id) + ->find_one(); + $result = $this->hook->fireDB('remove_ban_query', $result); + $result = $result->delete(); // Regenerate the bans cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { @@ -284,6 +307,8 @@ public function find_ban($start_from = false) { $ban_info = array(); + $this->hook->fire('find_ban_start'); + // trim() all elements in $form $ban_info['conditions'] = $ban_info['query_str'] = array(); @@ -351,7 +376,7 @@ public function find_ban($start_from = false) ->order_by($ban_info['order_by'], $ban_info['direction']) ->offset($start_from) ->limit(50) - ->find_many(); + ->find_many(); foreach ($result as $cur_ban) { $ban_info['data'][] = $cur_ban; @@ -361,6 +386,8 @@ public function find_ban($start_from = false) $ban_info['num_bans'] = $result->count('id'); } + $this->hook->fire('find_ban', $ban_info); + return $ban_info; } } diff --git a/model/admin/categories.php b/model/admin/categories.php index 7e8010c1..d2ac4352 100644 --- a/model/admin/categories.php +++ b/model/admin/categories.php @@ -20,10 +20,13 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function add_category($cat_name) { + $cat_name = $this->hook->fire('add_category', $cat_name); + $set_add_category = array('cat_name' => $cat_name); return DB::for_table('categories') @@ -34,6 +37,8 @@ public function add_category($cat_name) public function update_category(array $category) { + $category = $this->hook->fire('update_category', $category); + $set_update_category = array('cat_name' => $category['name'], 'disp_position' => $category['order']); @@ -45,10 +50,13 @@ public function update_category(array $category) public function delete_category($cat_to_delete) { + $cat_to_delete = $this->hook->fire('delete_category_start', $cat_to_delete); + $forums_in_cat = DB::for_table('forums') ->select('id') - ->where('cat_id', $cat_to_delete) - ->find_many(); + ->where('cat_id', $cat_to_delete); + $forums_in_cat = $this->hook->fireDB('delete_forums_in_cat_query', $forums_in_cat); + $forums_in_cat = $forums_in_cat->find_many(); foreach ($forums_in_cat as $forum) { // Prune all posts and topics @@ -66,17 +74,18 @@ public function delete_category($cat_to_delete) ->table_alias('t1') ->left_outer_join('topics', array('t1.moved_to', '=', 't2.id'), 't2') ->where_null('t2.id') - ->where_not_null('t1.moved_to') - ->find_many(); + ->where_not_null('t1.moved_to'); + $orphans = $this->hook->fireDB('delete_orphan_forums_query', $orphans); + $orphans = $orphans->find_many(); if (count($orphans) > 0) { $orphans->delete_many(); } // Delete category - DB::for_table('categories') - ->find_one($cat_to_delete) - ->delete(); + $result = DB::for_table('categories'); + $result = $this->hook->fireDB('find_forums_in_cat', $result); + $result = $result->find_one($cat_to_delete)->delete(); return true; } @@ -88,8 +97,9 @@ public function get_cat_list() $cat_list = DB::for_table('categories') ->select($select_get_cat_list) - ->order_by_asc('disp_position') - ->find_array(); + ->order_by_asc('disp_position'); + $cat_list = $this->hook->fireDB('get_cat_list', $cat_list); + $cat_list = $cat_list->find_array(); return $cat_list; } diff --git a/model/admin/censoring.php b/model/admin/censoring.php index 473769ca..fb134562 100644 --- a/model/admin/censoring.php +++ b/model/admin/censoring.php @@ -20,6 +20,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function add_word() @@ -34,7 +35,9 @@ public function add_word() $set_search_word = array('search_for' => $search_for, 'replace_with' => $replace_with); - DB::for_table('censoring') + $set_search_word = $this->hook->fire('add_censoring_word_data', $set_search_word); + + $result = DB::for_table('censoring') ->create() ->set($set_search_word) ->save(); @@ -63,7 +66,9 @@ public function update_word() $set_search_word = array('search_for' => $search_for, 'replace_with' => $replace_with); - DB::for_table('censoring') + $set_search_word = $this->hook->fire('update_censoring_word_start', $set_search_word); + + $result = DB::for_table('censoring') ->find_one($id) ->set($set_search_word) ->save(); @@ -81,10 +86,11 @@ public function update_word() public function remove_word() { $id = intval(key($this->request->post('remove'))); + $id = $this->hook->fire('remove_censoring_word_start', $id); - DB::for_table('censoring') - ->find_one($id) - ->delete(); + $result = DB::for_table('censoring')->find_one($id); + $result = $this->hook->fireDB('remove_censoring_word', $result); + $result = $result->delete(); // Regenerate the censoring cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { @@ -101,9 +107,10 @@ public function get_words() $word_data = array(); $word_data = DB::for_table('censoring') - ->order_by_asc('id') - ->find_array(); + ->order_by_asc('id'); + $word_data = $this->hook->fireDB('update_censoring_word_query', $word_data); + $word_data = $word_data->find_array(); return $word_data; } -} \ No newline at end of file +} diff --git a/model/admin/forums.php b/model/admin/forums.php index e5c62007..67bfeb69 100644 --- a/model/admin/forums.php +++ b/model/admin/forums.php @@ -20,10 +20,11 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } - + // - // Forum + // Forum // public function add_forum($cat_id, $forum_name) @@ -31,6 +32,8 @@ public function add_forum($cat_id, $forum_name) $set_add_forum = array('forum_name' => $forum_name, 'cat_id' => $cat_id); + $set_add_forum = $this->hook->fire('add_forum', $set_add_forum); + $forum = DB::for_table('forums') ->create() ->set($set_add_forum); @@ -41,10 +44,13 @@ public function add_forum($cat_id, $forum_name) public function update_forum($forum_id, array $forum_data) { - return DB::for_table('forums') + $update_forum = DB::for_table('forums') ->find_one($forum_id) - ->set($forum_data) - ->save(); + ->set($forum_data); + $update_forum = $this->hook->fireDB('update_forum_query', $update_forum); + $update_forum = $update_forum->save(); + + return $update_forum; } public function delete_forum($forum_id) @@ -52,31 +58,34 @@ public function delete_forum($forum_id) // Load the maintenance.php model file for prune public function require FEATHER_ROOT . 'model/admin/maintenance.php'; + $forum_id = $this->hook->fire('delete_forum_start', $forum_id); + // Prune all posts and topics $this->maintenance = new \model\admin\maintenance(); $this->maintenance->prune($forum_id, 1, -1); // Delete the forum - DB::for_table('forums') - ->find_one($forum_id) - ->delete(); + $delete_forum = DB::for_table('forums')->find_one($forum_id); + $delete_forum = $this->hook->fireDB('delete_forum_query', $delete_forum); + $delete_forum->delete(); // Delete forum specific group permissions and subscriptions - DB::for_table('forum_perms') - ->where('forum_id', $forum_id) - ->delete_many(); + $delete_forum_perms = DB::for_table('forum_perms')->where('forum_id', $forum_id); + $delete_forum_perms = $this->hook->fireDB('delete_forum_perms_query', $delete_forum_perms); + $delete_forum_perms->delete_many(); - DB::for_table('forum_subscriptions') - ->where('forum_id', $forum_id) - ->delete_many(); + $delete_forum_subs = DB::for_table('forum_subscriptions')->where('forum_id', $forum_id); + $delete_forum_subs = $this->hook->fireDB('delete_forum_subs_query', $delete_forum_subs); + $delete_forum_subs->delete_many(); // Delete orphaned redirect topics $orphans = DB::for_table('topics') ->table_alias('t1') ->left_outer_join('topics', array('t1.moved_to', '=', 't2.id'), 't2') ->where_null('t2.id') - ->where_not_null('t1.moved_to') - ->find_many(); + ->where_not_null('t1.moved_to'); + $orphans = $this->hook->fireDB('delete_orphan_redirect_topics_query', $orphans); + $orphans = $orphans->find_many(); if (count($orphans) > 0) { $orphans->delete_many(); @@ -88,14 +97,17 @@ public function delete_forum($forum_id) public function get_forum_info($forum_id) { $result = DB::for_table('forums') - ->where('id', $forum_id) - ->find_array(); + ->where('id', $forum_id); + $result = $this->hook->fireDB('get_forum_infos', $result); + $result = $result->find_array(); + return $result[0]; } public function get_forums() { $forum_data = array(); + $forum_data = $this->hook->fire('get_forums_start', $forum_data); $select_get_forums = array('cid' => 'c.id', 'c.cat_name', 'cat_position' => 'c.disp_position', 'fid' => 'f.id', 'f.forum_name', 'forum_position' => 'f.disp_position'); @@ -104,8 +116,9 @@ public function get_forums() ->select_many($select_get_forums) ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') ->order_by_asc('f.disp_position') - ->order_by_asc('c.disp_position') - ->find_array(); + ->order_by_asc('c.disp_position'); + $result = $this->hook->fireDB('get_forums_query', $result); + $result = $result->find_array(); foreach ($result as $forum) { if (!isset($forum_data[$forum['cid']])) { @@ -117,11 +130,15 @@ public function get_forums() 'forum_name' => $forum['forum_name'], 'position' => $forum['forum_position']); } + + $forum_data = $this->hook->fire('get_forums', $forum_data); return $forum_data; } public function update_positions($forum_id, $position) { + $this->hook->fire('update_positions_start', $forum_id, $position); + return DB::for_table('forums') ->find_one($forum_id) ->set('disp_position', $position) @@ -135,6 +152,7 @@ public function update_positions($forum_id, $position) public function get_permissions($forum_id) { $perm_data = array(); + $forum_id = $this->hook->fire('get_permissions_start', $forum_id); $select_permissions = array('g.g_id', 'g.g_title', 'g.g_read_board', 'g.g_post_replies', 'g.g_post_topics', 'fp.read_forum', 'fp.post_replies', 'fp.post_topics'); @@ -143,8 +161,9 @@ public function get_permissions($forum_id) ->select_many($select_permissions) ->left_outer_join('forum_perms', 'g.g_id=fp.group_id AND fp.forum_id='.$forum_id, 'fp') // Workaround ->where_not_equal('g.g_id', FEATHER_ADMIN) - ->order_by_asc('g.g_id') - ->find_many(); + ->order_by_asc('g.g_id'); + $permissions = $this->hook->fireDB('get_permissions_query', $permissions); + $permissions = $permissions->find_many(); foreach($permissions as $cur_perm) { $cur_perm['read_forum'] = ($cur_perm['read_forum'] != '0') ? true : false; @@ -159,6 +178,7 @@ public function get_permissions($forum_id) $perm_data[] = $cur_perm; } + $perm_data = $this->hook->fire('get_permissions', $perm_data); return $perm_data; } @@ -173,11 +193,17 @@ public function get_default_group_permissions($fetch_admin = true) $result->where_not_equal('g_id', FEATHER_ADMIN); } - return $result->order_by_asc('g_id')->find_array(); + $result = $result->order_by_asc('g_id'); + $result = $this->hook->fireDB('get_default_group_permissions_query', $result); + $result = $result->find_array(); + + return $result; } public function update_permissions(array $permissions_data) { + $permissions_data = $this->hook->fire('update_permissions_start', $permissions_data); + $permissions = DB::for_table('forum_perms') ->where('forum_id', $permissions_data['forum_id']) ->where('group_id', $permissions_data['group_id']) @@ -192,7 +218,7 @@ public function update_permissions(array $permissions_data) } - public function delete_permissions($forum_id, $group_id = null) + public function delete_permissions($forum_id, $group_id = null) { $result = DB::for_table('forum_perms') ->where('forum_id', $forum_id); @@ -201,6 +227,8 @@ public function delete_permissions($forum_id, $group_id = null) $result->where('group_id', $group_id); } + $result = $this->hook->fireDB('delete_permissions_query', $result); + return $result->delete_many(); } } diff --git a/model/admin/groups.php b/model/admin/groups.php index bf3cd7df..0ec9abe7 100644 --- a/model/admin/groups.php +++ b/model/admin/groups.php @@ -20,16 +20,20 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } - + public function fetch_groups() { $result = DB::for_table('groups')->order_by('g_id')->find_many(); + $this->hook->fireDB('fetch_groups_query', $result); $groups = array(); foreach ($result as $cur_group) { $groups[$cur_group['g_id']] = $cur_group; } + $groups = $this->hook->fire('fetch_groups', $groups); + return $groups; } @@ -39,6 +43,7 @@ public function info_add_group($groups, $id) if ($this->request->post('add_group')) { $group['base_group'] = intval($this->request->post('base_group')); + $group['base_group'] = $this->hook->fire('add_user_group', $group['base_group']); $group['info'] = $groups[$group['base_group']]; $group['mode'] = 'add'; @@ -48,11 +53,14 @@ public function info_add_group($groups, $id) message(__('Bad request'), '404'); } + $groups[$id] = $this->hook->fire('update_user_group', $groups[$id]); + $group['info'] = $groups[$id]; $group['mode'] = 'edit'; } + $group = $this->hook->fire('info_add_group', $group); return $group; } @@ -70,26 +78,35 @@ public function get_group_list($groups, $group) } } + $output = $this->hook->fire('get_group_list', $output); return $output; } public function get_group_list_delete($group_id) { + $group_id = $this->hook->fire('get_group_list_delete_start', $group_id); + $select_get_group_list_delete = array('g_id', 'g_title'); $result = DB::for_table('groups')->select_many($select_get_group_list_delete) ->where_not_equal('g_id', FEATHER_GUEST) ->where_not_equal('g_id', $group_id) - ->order_by('g_title') - ->find_many(); + ->order_by('g_title'); + $result = $this->hook->fireDB('get_group_list_delete', $result); + $result = $result->find_many(); + + $output = ''; foreach ($result as $cur_group) { if ($cur_group['g_id'] == FEATHER_MEMBER) { // Pre-select the pre-defined Members group - echo "\t\t\t\t\t\t\t\t\t\t".''."\n"; + $output .= "\t\t\t\t\t\t\t\t\t\t".''."\n"; } else { - echo "\t\t\t\t\t\t\t\t\t\t".''."\n"; + $output .= "\t\t\t\t\t\t\t\t\t\t".''."\n"; } } + + $output = $this->hook->fire('get_group_list.output', $output); + return $output; } public function add_edit_group($groups) @@ -100,11 +117,21 @@ public function add_edit_group($groups) $group_id = 0; } + $group_id = $this->hook->fire('add_edit_group_start', $group_id); + // Is this the admin group? (special rules apply) $is_admin_group = ($this->request->post('group_id') && $this->request->post('group_id') == FEATHER_ADMIN) ? true : false; + // Set group title $title = feather_trim($this->request->post('req_title')); + if ($title == '') { + message(__('Must enter title message')); + } + $title = $this->hook->fire('add_edit_group_set_title', $title); + // Set user title $user_title = feather_trim($this->request->post('user_title')); + $user_title = ($user_title != '') ? $user_title : 'NULL'; + $user_title = $this->hook->fire('add_edit_group_set_user_title', $user_title); $promote_min_posts = $this->request->post('promote_min_posts') ? intval($this->request->post('promote_min_posts')) : '0'; if ($this->request->post('promote_next_group') && @@ -139,12 +166,6 @@ public function add_edit_group($groups) $email_flood = ($this->request->post('email_flood') && $this->request->post('email_flood') >= 0) ? $this->request->post('email_flood') : '0'; $report_flood = ($this->request->post('report_flood') >= 0) ? $this->request->post('report_flood') : '0'; - if ($title == '') { - message(__('Must enter title message')); - } - - $user_title = ($user_title != '') ? $user_title : 'NULL'; - $insert_update_group = array( 'g_title' => $title, 'g_user_title' => $user_title, @@ -174,7 +195,10 @@ public function add_edit_group($groups) 'g_report_flood' => $report_flood, ); + $insert_update_group = $this->hook->fire('add_edit_group_data', $insert_update_group); + if ($this->request->post('mode') == 'add') { + // Creating a new group $title_exists = DB::for_table('groups')->where('g_title', $title)->find_one(); if ($title_exists) { message(sprintf(__('Title already exists message'), feather_escape($title))); @@ -185,12 +209,14 @@ public function add_edit_group($groups) ->set($insert_update_group) ->save(); $new_group_id = DB::get_db()->lastInsertId($this->feather->forum_settings['db_prefix'].'groups'); + $new_group_id = $this->hook->fire('add_edit_group.new_group_id', $new_group_id); // Now lets copy the forum specific permissions from the group which this group is based on $select_forum_perms = array('forum_id', 'read_forum', 'post_replies', 'post_topics'); $result = DB::for_table('forum_perms')->select_many($select_forum_perms) - ->where('group_id', $this->request->post('base_group')) - ->find_many(); + ->where('group_id', $this->request->post('base_group')); + $result = $this->hook->fireDB('add_edit_group.select_forum_perms_query', $result); + $result = $result->find_many(); foreach ($result as $cur_forum_perm) { $insert_perms = array( @@ -207,6 +233,7 @@ public function add_edit_group($groups) ->save(); } } else { + // We are editing an existing group $title_exists = DB::for_table('groups')->where('g_title', $title)->where_not_equal('g_id', $this->request->post('group_id'))->find_one(); if ($title_exists) { message(sprintf(__('Title already exists message'), feather_escape($title))); @@ -230,6 +257,7 @@ public function add_edit_group($groups) } $group_id = $this->request->post('mode') == 'add' ? $new_group_id : $this->request->post('group_id'); + $group_id = $this->hook->fire('add_edit_group.group_id', $group_id); generate_quickjump_cache($group_id); @@ -243,6 +271,7 @@ public function add_edit_group($groups) public function set_default_group($groups) { $group_id = intval($this->request->post('default_group')); + $group_id = $this->hook->fire('set_default_group.group_id', $group_id); // Make sure it's not the admin or guest groups if ($group_id == FEATHER_ADMIN || $group_id == FEATHER_GUEST) { @@ -269,22 +298,28 @@ public function set_default_group($groups) public function check_members($group_id) { + $group_id = $this->hook->fire('check_members_start', $group_id); + $is_member = DB::for_table('groups')->table_alias('g') ->select('g.g_title') ->select_expr('COUNT(u.id)', 'members') ->inner_join('users', array('g.g_id', '=', 'u.group_id'), 'u') ->where('g.g_id', $group_id) ->group_by('g.g_id') - ->group_by('g_title') - ->find_one(); + ->group_by('g_title'); + $is_member = $this->hook->fireDB('check_members', $is_member); + $is_member = $is_member->find_one(); return (bool) $is_member; } public function delete_group($group_id) { + $group_id = $this->hook->fire('delete_group.group_id', $group_id); + if ($this->request->post('del_group')) { $move_to_group = intval($this->request->post('move_to_group')); + $move_to_group = $this->hook->fire('delete_group.move_to_group', $move_to_group); DB::for_table('users')->where('group_id', $group_id) ->update_many('group_id', $move_to_group); } @@ -306,26 +341,33 @@ public function delete_group($group_id) public function get_group_title($group_id) { - $group_title = DB::for_table('groups')->where('g_id', $group_id) - ->find_one_col('g_title'); + $group_id = $this->hook->fireDB('get_group_title.group_id', $group_id); + + $group_title = DB::for_table('groups')->where('g_id', $group_id); + $group_title = $this->hook->fireDB('get_group_title.query', $group_title); + $group_title = $group_title->find_one_col('g_title'); return $group_title; } public function get_title_members($group_id) { + $group_id = $this->hook->fire('get_title_members.group_id', $group_id); + $group = DB::for_table('groups')->table_alias('g') ->select('g.g_title') ->select_expr('COUNT(u.id)', 'members') ->inner_join('users', array('g.g_id', '=', 'u.group_id'), 'u') ->where('g.g_id', $group_id) ->group_by('g.g_id') - ->group_by('g_title') - ->find_one(); + ->group_by('g_title'); + $group = $this->hook->fireDB('get_title_members.query', $group); + $group = $group->find_one(); $group_info['title'] = $group['g_title']; $group_info['members'] = $group['members']; + $group_info = $this->hook->fire('get_title_members.group_info', $group_info); return $group_info; } } diff --git a/model/admin/maintenance.php b/model/admin/maintenance.php index d05fb7ec..b61e0434 100644 --- a/model/admin/maintenance.php +++ b/model/admin/maintenance.php @@ -21,7 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; } - + public function rebuild() { $per_page = $this->request->get('i_per_page') ? intval($this->request->get('i_per_page')) : 0; @@ -272,10 +272,10 @@ public function get_categories() $output .= "\t\t\t\t\t\t\t\t\t\t\t\t".''."\n"; } - + return $output; } - + public function get_first_id() { $first_id = ''; @@ -284,7 +284,7 @@ public function get_first_id() if ($first_id_sql) { $first_id = $first_id_sql; } - + return $first_id; } -} \ No newline at end of file +} diff --git a/style/FeatherBB/view/admin/groups/delete_group.php b/style/FeatherBB/view/admin/groups/delete_group.php index 693baab1..aea315d0 100644 --- a/style/FeatherBB/view/admin/groups/delete_group.php +++ b/style/FeatherBB/view/admin/groups/delete_group.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -25,7 +25,7 @@

    @@ -36,4 +36,4 @@
    -
    \ No newline at end of file +
    From f3ed0c573e241a10c120b7eaccfd12837dfcebac Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 24 Aug 2015 11:24:23 +0200 Subject: [PATCH 151/353] Fix deleting group view --- view/admin/groups/delete_group.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/view/admin/groups/delete_group.php b/view/admin/groups/delete_group.php index 693baab1..aea315d0 100644 --- a/view/admin/groups/delete_group.php +++ b/view/admin/groups/delete_group.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -25,7 +25,7 @@

    @@ -36,4 +36,4 @@
    -
    \ No newline at end of file +
    From b253dbb66213a4ba001707f1f72521ce9cea8dd1 Mon Sep 17 00:00:00 2001 From: adaur Date: Mon, 24 Aug 2015 15:04:50 +0200 Subject: [PATCH 152/353] Add more hooks --- model/search.php | 162 ++++++++++++++++++++++++++++++----------------- 1 file changed, 104 insertions(+), 58 deletions(-) diff --git a/model/search.php b/model/search.php index cc0f027a..da5f93a0 100644 --- a/model/search.php +++ b/model/search.php @@ -20,12 +20,15 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function get_search_results() { $search = array(); + $search = $this->hook->fire('get_search_results_start', $search); + $action = ($this->request->get('action')) ? $this->request->get('action') : null; $forums = $this->request->get('forums') ? (is_array($this->request->get('forums')) ? $this->request->get('forums') : array_filter(explode(',', $this->request->get('forums')))) : ($this->request->get('forums') ? array($this->request->get('forums')) : array()); $sort_dir = ($this->request->get('sort_dir') && $this->request->get('sort_dir') == 'DESC') ? 'DESC' : 'ASC'; @@ -95,15 +98,17 @@ public function get_search_results() // If a valid search_id was supplied we attempt to fetch the search results from the db if (isset($search_id)) { - $ident = ($this->user->is_guest) ? get_remote_address() : $this->user->username; + $ident = ($this->user->is_guest) ? $this->request->getIp() : $this->user->username; $search_data = DB::for_table('search_cache') ->where('id', $search_id) - ->where('ident', $ident) - ->find_one_col('search_data'); + ->where('ident', $ident); + $search_data = $this->hook->fireDB('get_search_results_search_data_query', $search_data); + $search_data = $search_data->find_one_col('search_data'); if ($search_data) { $temp = unserialize($search_data); + $temp = $this->hook->fire('get_search_results_temp', $temp); $search_ids = unserialize($temp['search_ids']); $num_hits = $temp['num_hits']; @@ -129,12 +134,14 @@ public function get_search_results() } if (!$this->user->is_guest) { - DB::for_table('users')->where('id', $this->user->id) - ->update_many('last_search', time()); + $update_last_search = DB::for_table('users') + ->where('id', $this->user->id); } else { - DB::for_table('online')->where('ident', get_remote_address()) - ->update_many('last_search', time()); + $update_last_search = DB::for_table('online') + ->where('ident', $this->request->getIp()); } + $update_last_search = $this->hook->fireDB('get_search_results_update_last_search', $update_last_search); + $update_last_search = $update_last_search->update_many('last_search', time()); switch ($sort_by) { case 1: @@ -163,10 +170,13 @@ public function get_search_results() break; } + $sort_by = $this->hook->fire('get_search_results_sort_by', $sort_by); + // If it's a search for keywords if ($keywords) { // split the keywords into words $keywords_array = split_words($keywords, false); + $keywords_array = $this->hook->fire('get_search_results_keywords_array', $keywords_array); if (empty($keywords_array)) { message(__('No hits')); @@ -174,6 +184,7 @@ public function get_search_results() // Should we search in message body or topic subject specifically? $search_in_cond = ($search_in) ? (($search_in > 0) ? ' AND m.subject_match = 0' : ' AND m.subject_match = 1') : ''; + $search_in_cond = $this->hook->fire('get_search_results_search_cond', $search_in_cond); $word_count = 0; $match_type = 'and'; @@ -193,11 +204,14 @@ public function get_search_results() $where_cond = str_replace('*', '%', $cur_word); $where_cond_cjk = ($search_in ? (($search_in > 0) ? 'p.message LIKE %:where_cond%' : 't.subject LIKE %:where_cond%') : 'p.message LIKE %:where_cond% OR t.subject LIKE %:where_cond%'); - $result = DB::for_table('posts')->raw_query('SELECT p.id AS post_id, p.topic_id, '.$sort_by_sql.' AS sort_by FROM '.$this->feather->forum_settings['db_prefix'].'posts AS p INNER JOIN '.$this->feather->forum_settings['db_prefix'].'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->forum_settings['db_prefix'].'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE ('.$where_cond_cjk.') AND (fp.read_forum IS NULL OR fp.read_forum=1)'.$forum_sql, array(':where_cond' => $where_cond))->find_many(); + $result = DB::for_table('posts')->raw_query('SELECT p.id AS post_id, p.topic_id, '.$sort_by_sql.' AS sort_by FROM '.$this->feather->forum_settings['db_prefix'].'posts AS p INNER JOIN '.$this->feather->forum_settings['db_prefix'].'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->forum_settings['db_prefix'].'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE ('.$where_cond_cjk.') AND (fp.read_forum IS NULL OR fp.read_forum=1)'.$forum_sql, array(':where_cond' => $where_cond)); } else { - $result = DB::for_table('posts')->raw_query('SELECT m.post_id, p.topic_id, '.$sort_by_sql.' AS sort_by FROM '.$this->feather->forum_settings['db_prefix'].'search_words AS w INNER JOIN '.$this->feather->forum_settings['db_prefix'].'search_matches AS m ON m.word_id = w.id INNER JOIN '.$this->feather->forum_settings['db_prefix'].'posts AS p ON p.id=m.post_id INNER JOIN '.$this->feather->forum_settings['db_prefix'].'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->forum_settings['db_prefix'].'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE w.word LIKE :where_cond'.$search_in_cond.' AND (fp.read_forum IS NULL OR fp.read_forum=1)'.$forum_sql, array(':where_cond' => str_replace('*', '%', $cur_word)))->find_many(); + $result = DB::for_table('posts')->raw_query('SELECT m.post_id, p.topic_id, '.$sort_by_sql.' AS sort_by FROM '.$this->feather->forum_settings['db_prefix'].'search_words AS w INNER JOIN '.$this->feather->forum_settings['db_prefix'].'search_matches AS m ON m.word_id = w.id INNER JOIN '.$this->feather->forum_settings['db_prefix'].'posts AS p ON p.id=m.post_id INNER JOIN '.$this->feather->forum_settings['db_prefix'].'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->forum_settings['db_prefix'].'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE w.word LIKE :where_cond'.$search_in_cond.' AND (fp.read_forum IS NULL OR fp.read_forum=1)'.$forum_sql, array(':where_cond' => str_replace('*', '%', $cur_word))); } + $result = $this->hook->fireDB('get_search_results_search_first_query', $result); + $result = $result->find_many(); + $row = array(); foreach($result as $temp) { $row[$temp['post_id']] = $temp['topic_id']; @@ -232,25 +246,26 @@ public function get_search_results() } } + $keyword_results = $this->hook->fire('get_search_results_search_keyword_results', $keyword_results); // Sort the results - annoyingly array_multisort re-indexes arrays with numeric keys, so we need to split the keys out into a separate array then combine them again after $post_ids = array_keys($keyword_results); $topic_ids = array_values($keyword_results); array_multisort(array_values($sort_data), $sort_dir == 'DESC' ? SORT_DESC : SORT_ASC, $sort_type, $post_ids, $topic_ids); - // combine the arrays back into a key=>value array (array_combine is PHP5 only unfortunately) - $num_results = count($keyword_results); - $keyword_results = array(); - for ($i = 0;$i < $num_results;$i++) { - $keyword_results[$post_ids[$i]] = $topic_ids[$i]; - } + // combine the arrays back into a key => value array + $keyword_results = array_combine($post_ids, $topic_ids); unset($sort_data, $post_ids, $topic_ids); } // If it's a search for author name (and that author name isn't Guest) if ($author && $author != 'guest' && $author != utf8_strtolower(__('Guest'))) { - $username_exists = DB::for_table('users')->select('id')->where_like('username', $author)->find_many(); + $username_exists = DB::for_table('users') + ->select('id') + ->where_like('username', $author); + $username_exists = $this->hook->fireDB('get_search_results_username_exists', $username_exists); + $username_exists = $username_exists->find_many(); if ($username_exists) { $user_ids = array(); @@ -258,7 +273,9 @@ public function get_search_results() $user_ids[] = $row['id']; } - $result = DB::for_table('posts')->raw_query('SELECT p.id AS post_id, p.topic_id FROM '.$this->feather->forum_settings['db_prefix'].'posts AS p INNER JOIN '.$this->feather->forum_settings['db_prefix'].'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->forum_settings['db_prefix'].'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.poster_id IN('.implode(',', $user_ids).')'.$forum_sql.' ORDER BY '.$sort_by_sql.' '.$sort_dir)->find_many(); + $result = DB::for_table('posts')->raw_query('SELECT p.id AS post_id, p.topic_id FROM '.$this->feather->forum_settings['db_prefix'].'posts AS p INNER JOIN '.$this->feather->forum_settings['db_prefix'].'topics AS t ON t.id=p.topic_id LEFT JOIN '.$this->feather->forum_settings['db_prefix'].'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$this->user->g_id.') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.poster_id IN('.implode(',', $user_ids).')'.$forum_sql.' ORDER BY '.$sort_by_sql.' '.$sort_dir); + $result = $this->hook->fireDB('get_search_results_search_second_query', $result); + $result = $result->find_many(); foreach($result as $temp) { $author_results[$temp['post_id']] = $temp['topic_id']; @@ -281,6 +298,9 @@ public function get_search_results() $search_type = array('author', feather_trim($this->request->get('author')), implode(',', $forums), $search_in); } + $search_ids = $this->hook->fire('get_search_results_search_ids', $search_ids); + $search_type = $this->hook->fire('get_search_results_search_type', $search_type); + unset($keyword_results, $author_results); if ($show_as == 'topics') { @@ -291,6 +311,9 @@ public function get_search_results() $search_ids = array_unique($search_ids); + $search_ids = $this->hook->fire('get_search_results_search_ids', $search_ids); + $search_type = $this->hook->fire('get_search_results_search_type', $search_type); + $num_hits = count($search_ids); if (!$num_hits) { message(__('No hits')); @@ -302,7 +325,7 @@ public function get_search_results() $sort_by = 0; $sort_dir = 'DESC'; - $where_search_action = array( + $result['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); @@ -318,7 +341,7 @@ public function get_search_results() ->select('t.id') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 't.forum_id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_search_action) + ->where_any_is($result['where']) ->where_gt('t.last_post', $this->user->last_visit) ->where_null('t.moved_to') ->order_by_desc('t.last_post'); @@ -328,6 +351,7 @@ public function get_search_results() $result = $result->where('t.forum_id', intval($this->request->get('fid'))); } + $result = $this->hook->fire('get_search_results_topic_query', $result); $result = $result->find_many(); $num_hits = count($result); @@ -343,7 +367,7 @@ public function get_search_results() ->select('t.id') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 't.forum_id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_search_action) + ->where_any_is($result['where']) ->where_gt('t.last_post', time() - $interval) ->where_null('t.moved_to') ->order_by_desc('t.last_post'); @@ -352,6 +376,7 @@ public function get_search_results() $result = $result->where('t.forum_id', intval($this->request->get('fid'))); } + $result = $this->hook->fire('get_search_results_topic_query', $result); $result = $result->find_many(); $num_hits = count($result); @@ -368,16 +393,15 @@ public function get_search_results() ->inner_join('posts', array('t.id', '=', 'p.topic_id'), 'p') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 't.forum_id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_search_action) + ->where_any_is($result['where']) ->where('p.poster_id', $this->user->id) ->group_by('t.id'); - $feather = \Slim\Slim::getInstance(); - - if ($feather->forum_settings['db_type'] == 'pgsql') { + if ($this->feather->forum_settings['db_type'] == 'pgsql') { $result = $result->group_by('t.last_post'); } + $result = $this->hook->fire('get_search_results_topic_query', $result); $result = $result->find_many(); $num_hits = count($result); @@ -396,10 +420,11 @@ public function get_search_results() ->inner_join('topics', array('p.topic_id', '=', 't.id'), 't') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 't.forum_id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_search_action) + ->where_any_is($result['where']) ->where('p.poster_id', $user_id) ->order_by_desc('p.posted'); + $result = $this->hook->fire('get_search_results_post_query', $result); $result = $result->find_many(); $num_hits = count($result); @@ -419,10 +444,11 @@ public function get_search_results() ->inner_join('posts', array('t.first_post_id', '=', 'p.id'), 'p') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 't.forum_id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_search_action) + ->where_any_is($result['where']) ->where('p.poster_id', $user_id) ->order_by_desc('t.last_post'); + $result = $this->hook->fire('get_search_results_topic_query', $result); $result = $result->find_many(); $num_hits = count($result); @@ -447,9 +473,10 @@ public function get_search_results() ->inner_join('topic_subscriptions', array('s.user_id', '=', $user_id), null, true) ->left_outer_join('forum_perms', array('fp.forum_id', '=', 't.forum_id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_search_action) + ->where_any_is($result['where']) ->order_by_desc('t.last_post'); + $result = $this->hook->fire('get_search_results_topic_query', $result); $result = $result->find_many(); $num_hits = count($result); @@ -470,9 +497,10 @@ public function get_search_results() ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) ->where('t.num_replies', 0) ->where_null('t.moved_to') - ->where_any_is($where_search_action) + ->where_any_is($result['where']) ->order_by_desc('t.last_post'); + $result = $this->hook->fire('get_search_results_topic_query', $result); $result = $result->find_many(); $num_hits = count($result); @@ -496,14 +524,20 @@ public function get_search_results() // Prune "old" search results $old_searches = array(); - $result = DB::for_table('online')->select('ident')->find_many(); + $result = DB::for_table('online') + ->select('ident'); + $result = $this->hook->fireDB('get_search_results_prune_search', $result); + $result = $result->find_many(); if ($result) { foreach($result as $row) { $old_searches[] = $row['ident']; } - DB::for_table('search_cache')->where_not_in('ident', $old_searches)->delete_many(); + $delete_cache = DB::for_table('search_cache') + ->where_not_in('ident', $old_searches); + $delete_cache = $this->hook->fireDB('get_search_results_delete_cache', $delete_cache); + $delete_cache = $delete_cache->delete_many(); } // Fill an array with our results and search properties @@ -517,19 +551,19 @@ public function get_search_results() )); $search_id = mt_rand(1, 2147483647); - $ident = ($this->user->is_guest) ? get_remote_address() : $this->user->username; + $ident = ($this->user->is_guest) ? $this->request->getIp() : $this->user->username; - $insert_cache = array( + $cache['insert'] = array( 'id' => $search_id, 'ident' => $ident, 'search_data' => $temp, ); - DB::for_table('search_cache') - ->create() - ->set($insert_cache) - ->save(); - + $cache = DB::for_table('search_cache') + ->create() + ->set($cache['insert']); + $cache = $this->hook->fireDB('get_search_results_update_cache', $cache); + $cache = $cache->save(); } // If we're on the new posts search, display a "mark all as read" link @@ -576,29 +610,28 @@ public function get_search_results() // Run the query and fetch the results if ($show_as == 'posts') { - $select_search_post = array('pid' => 'p.id', 'pposter' => 'p.poster', 'pposted' => 'p.posted', 'p.poster_id', 'p.message', 'p.hide_smilies', 'tid' => 't.id', 't.poster', 't.subject', 't.first_post_id', 't.last_post', 't.last_post_id', 't.last_poster', 't.num_replies', 't.forum_id', 'f.forum_name'); + $result['select'] = array('pid' => 'p.id', 'pposter' => 'p.poster', 'pposted' => 'p.posted', 'p.poster_id', 'p.message', 'p.hide_smilies', 'tid' => 't.id', 't.poster', 't.subject', 't.first_post_id', 't.last_post', 't.last_post_id', 't.last_poster', 't.num_replies', 't.forum_id', 'f.forum_name'); $result = DB::for_table('posts') ->table_alias('p') - ->select_many($select_search_post) + ->select_many($result['select']) ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') ->where_in('p.id', $search_ids) - ->order_by($sort_by_sql, $sort_dir) - ->find_many(); - + ->order_by($sort_by_sql, $sort_dir); + $result = $this->hook->fireDB('get_search_results_select_posts_query', $result); } else { - - $select_search_topic = array('tid' => 't.id', 't.poster', 't.subject', 't.last_post', 't.last_post_id', 't.last_poster', 't.num_replies', 't.closed', 't.sticky', 't.forum_id', 'f.forum_name'); + $result['select'] = array('tid' => 't.id', 't.poster', 't.subject', 't.last_post', 't.last_post_id', 't.last_poster', 't.num_replies', 't.closed', 't.sticky', 't.forum_id', 'f.forum_name'); $result = DB::for_table('topics') - ->table_alias('t') - ->select_many($select_search_topic) - ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') - ->where_in('t.id', $search_ids) - ->order_by($sort_by_sql, $sort_dir) - ->find_many(); + ->table_alias('t') + ->select_many($result['select']) + ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') + ->where_in('t.id', $search_ids) + ->order_by($sort_by_sql, $sort_dir); + $result = $this->hook->fireDB('get_search_results_select_topics_query', $result); } + $result = $result->find_many(); $search['search_set'] = array(); foreach($result as $row) { @@ -615,7 +648,10 @@ public function get_search_results() } elseif ($search_type[1] == 'show_subscriptions') { // Fetch username of subscriber $subscriber_id = $search_type[2]; - $subscriber_name = DB::for_table('users')->where('id', $subscriber_id)->find_one_col('username'); + $subscriber_name = DB::for_table('users') + ->where('id', $subscriber_id); + $subscriber_name = $this->hook->fireDB('get_search_results_subscriber_name', $result); + $subscriber_name = $subscriber_name->find_one_col('username'); if (!$subscriber_name) { message(__('Bad request'), '404'); @@ -646,6 +682,8 @@ public function get_search_results() $search['show_as'] = $show_as; + $search = $this->hook->fire('get_search_results', $search); + return $search; } @@ -653,6 +691,8 @@ public function display_search_results($search) { global $pd; + $search = $this->hook->fire('display_search_results_start', $search); + // Get topic/forum tracking data if (!$this->user->is_guest) { $tracked_topics = get_tracked_topics(); @@ -761,29 +801,33 @@ public function display_search_results($search) ); } } + $search = $this->hook->fire('display_search_results', $search); } public function get_list_forums() { $output = ''; - $select_get_list_forums = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.redirect_url'); - $where_get_list_forums = array( + $output = $this->hook->fire('get_list_forums_start', $output); + + $result['select'] = array('cid' => 'c.id', 'c.cat_name', 'fid' => 'f.id', 'f.forum_name', 'f.redirect_url'); + $result['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); - $order_by_get_list_forums = array('c.disp_position', 'c.id', 'f.disp_position'); + $result['order_by'] = array('c.disp_position', 'c.id', 'f.disp_position'); $result = DB::for_table('categories') ->table_alias('c') - ->select_many($select_get_list_forums) + ->select_many($result['select']) ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_list_forums) + ->where_any_is($result['where']) ->where_null('f.redirect_url') - ->order_by_many($order_by_get_list_forums) - ->find_many(); + ->order_by_many($result['order_by']); + $result = $this->hook->fireDB('get_list_forums_query', $result); + $result = $result->find_many(); // We either show a list of forums of which multiple can be selected if ($this->config['o_search_all_forums'] == '1' || $this->user->is_admmod) { @@ -844,6 +888,8 @@ public function get_list_forums() $output .= "\t\t\t\t\t\t".'
    '."\n"; } + $output = $this->hook->fire('get_list_forums', $output); + return $output; } } From 1677f66068fdf0527b1a55a720f3226c8a5bb9b2 Mon Sep 17 00:00:00 2001 From: adaur Date: Mon, 24 Aug 2015 15:05:14 +0200 Subject: [PATCH 153/353] Add support for strings --- include/classes/hooks.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/classes/hooks.class.php b/include/classes/hooks.class.php index 3976277b..cf30078b 100644 --- a/include/classes/hooks.class.php +++ b/include/classes/hooks.class.php @@ -64,7 +64,9 @@ public function fire($name) } } - if ($count == 1) { + // If we only have one hook binded or the argument is not an array, + // let's return the first output + if ($count == 1 || !is_array($args[0])) { return $output[0]; } else { From 0c1d0e658a66e6d24a544da5785c71fd2890b529 Mon Sep 17 00:00:00 2001 From: adaur Date: Mon, 24 Aug 2015 15:05:32 +0200 Subject: [PATCH 154/353] Get rid of get_remote_address --- extern.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern.php b/extern.php index 065258fa..705bedd3 100644 --- a/extern.php +++ b/extern.php @@ -122,7 +122,7 @@ function set_default_user() // Get Slim current session $feather = \Slim\Slim::getInstance(); - $remote_addr = get_remote_address(); + $remote_addr = $feather->request->getIp(); // Fetch guest user $select_set_default_user = array('u.*', 'g.*', 'o.logged', 'o.last_post', 'o.last_search'); From f88f9cf702e52dd866b7dcb401def6e0557474da Mon Sep 17 00:00:00 2001 From: adaur Date: Mon, 24 Aug 2015 15:47:32 +0200 Subject: [PATCH 155/353] Add more hooks --- include/classes/hooks.class.php | 2 +- model/userlist.php | 42 ++++++++++---- model/viewforum.php | 95 +++++++++++++++++++------------ model/viewtopic.php | 99 +++++++++++++++++++++++---------- 4 files changed, 160 insertions(+), 78 deletions(-) diff --git a/include/classes/hooks.class.php b/include/classes/hooks.class.php index cf30078b..e524099f 100644 --- a/include/classes/hooks.class.php +++ b/include/classes/hooks.class.php @@ -38,7 +38,7 @@ public function fire($name) array_shift($args); if (!isset($this->hooks[$name])) { - $this->hooks[$name] = array(array()); + //$this->hooks[$name] = array(array()); if (isset ($args[0])) { return $args[0]; } diff --git a/model/userlist.php b/model/userlist.php index ce586eb5..e0ed9d95 100644 --- a/model/userlist.php +++ b/model/userlist.php @@ -21,6 +21,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } // Counts the numeber of user for a specific query @@ -40,20 +41,26 @@ public function fetch_user_count($username, $show_group) $num_users = $num_users->count('id'); + $num_users = $this->hook->fire('fetch_user_count', $num_users); + return $num_users; } // Generates the dropdown menu containing groups public function generate_dropdown_menu($show_group) { + $show_group = $this->hook->fire('generate_dropdown_menu_start', $show_group); + $dropdown_menu = ''; - $select_dropdown_menu = array('g_id', 'g_title'); + $result['select'] = array('g_id', 'g_title'); - $result = DB::for_table('groups')->select_many($select_dropdown_menu) + $result = DB::for_table('groups') + ->select_many($result['select']) ->where_not_equal('g_id', FEATHER_GUEST) - ->order_by('g_id') - ->find_many(); + ->order_by('g_id'); + $result = $this->hook->fireDB('generate_dropdown_menu_query', $result); + $result = $result->find_many(); foreach($result as $cur_group) { if ($cur_group['g_id'] == $show_group) { @@ -62,6 +69,8 @@ public function generate_dropdown_menu($show_group) $dropdown_menu .= "\t\t\t\t\t\t\t".''."\n"; } } + + $dropdown_menu = $this->hook->fire('generate_dropdown_menu', $dropdown_menu); return $dropdown_menu; } @@ -71,8 +80,11 @@ public function print_users($username, $start_from, $sort_by, $sort_dir, $show_g { $userlist_data = array(); + $username = $this->hook->fire('print_users_start', $username, $start_from, $sort_by, $sort_dir, $show_group); + // Retrieve a list of user IDs, LIMIT is (really) expensive so we only fetch the IDs here then later fetch the remaining data - $result = DB::for_table('users')->select('u.id') + $result = DB::for_table('users') + ->select('u.id') ->table_alias('u') ->where_gt('u.id', 1) ->where_not_equal('u.group_id', FEATHER_UNVERIFIED); @@ -87,8 +99,10 @@ public function print_users($username, $start_from, $sort_by, $sort_dir, $show_g $result = $result->order_by($sort_by, $sort_dir) ->order_by_asc('u.id') ->limit(50) - ->offset($start_from) - ->find_many(); + ->offset($start_from); + + $result = $this->hook->fireDB('print_users_query', $result); + $result = $result->find_many(); if ($result) { $user_ids = array(); @@ -97,21 +111,25 @@ public function print_users($username, $start_from, $sort_by, $sort_dir, $show_g } // Grab the users - $select_users = array('u.id', 'u.username', 'u.title', 'u.num_posts', 'u.registered', 'g.g_id', 'g.g_user_title'); + $result['select'] = array('u.id', 'u.username', 'u.title', 'u.num_posts', 'u.registered', 'g.g_id', 'g.g_user_title'); - $result = DB::for_table('users')->table_alias('u') - ->select_many($select_users) + $result = DB::for_table('users') + ->table_alias('u') + ->select_many($result['select']) ->left_outer_join('groups' ,array('g.g_id', '=', 'u.group_id'), 'g') ->where_in('u.id', $user_ids) ->order_by($sort_by, $sort_dir) - ->order_by_asc('u.id') - ->find_many(); + ->order_by_asc('u.id'); + $result = $this->hook->fireDB('print_users_grab_query', $result); + $result = $result->find_many(); foreach($result as $user_data) { $userlist_data[] = $user_data; } } + $userlist_data = $this->hook->fire('print_users', $userlist_data); + return $userlist_data; } } \ No newline at end of file diff --git a/model/viewforum.php b/model/viewforum.php index 7eee1586..6579c292 100644 --- a/model/viewforum.php +++ b/model/viewforum.php @@ -20,53 +20,59 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } // Returns basic informations about the forum public function get_info_forum($id) { + $id = $this->hook->fire('get_info_forum_start', $id); - - $where_get_info_forum = array( + $cur_forum['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); if (!$this->user->is_guest) { - $select_get_info_forum = array('f.forum_name', 'f.redirect_url', 'f.moderators', 'f.num_topics', 'f.sort_by', 'fp.post_topics', 'is_subscribed' => 's.user_id'); + $cur_forum['select'] = array('f.forum_name', 'f.redirect_url', 'f.moderators', 'f.num_topics', 'f.sort_by', 'fp.post_topics', 'is_subscribed' => 's.user_id'); $cur_forum = DB::for_table('forums')->table_alias('f') - ->select_many($select_get_info_forum) + ->select_many($cur_forum['select']) ->left_outer_join('forum_subscriptions', array('f.id', '=', 's.forum_id'), 's') ->left_outer_join('forum_subscriptions', array('s.user_id', '=', $this->user->id), null, true) ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_info_forum) - ->where('f.id', $id) - ->find_one(); + ->where_any_is($cur_forum['where']) + ->where('f.id', $id); } else { - $select_get_info_forum = array('f.forum_name', 'f.redirect_url', 'f.moderators', 'f.num_topics', 'f.sort_by', 'fp.post_topics'); + $cur_forum['select'] = array('f.forum_name', 'f.redirect_url', 'f.moderators', 'f.num_topics', 'f.sort_by', 'fp.post_topics'); $cur_forum = DB::for_table('forums')->table_alias('f') - ->select_many($select_get_info_forum) - ->select_expr(0, 'is_subscribed') - ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') - ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_info_forum) - ->where('f.id', $id) - ->find_one(); + ->select_many($cur_forum['select']) + ->select_expr(0, 'is_subscribed') + ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') + ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) + ->where_any_is($cur_forum['where']) + ->where('f.id', $id); } + $cur_forum = $this->hook->fireDB('get_info_forum_query', $cur_forum); + $cur_forum = $cur_forum->find_one(); + if (!$cur_forum) { message(__('Bad request'), '404'); } + $cur_forum = $this->hook->fire('get_info_forum', $cur_forum); + return $cur_forum; } // Returns the text required by the query to sort the forum public function sort_forum_by($sort_by_sql) { + $sort_by_sql = $this->hook->fire('sort_forum_by_start', $sort_by_sql); + switch ($sort_by_sql) { case 0: $sort_by = 'last_post DESC'; @@ -81,15 +87,19 @@ public function sort_forum_by($sort_by_sql) $sort_by = 'last_post DESC'; break; } + + $sort_by = $this->hook->fire('sort_forum_by', $sort_by); + return $sort_by; } // Adds relationship meta tags public function get_page_head($forum_id, $num_pages, $p, $url_forum) { + $page_head = array(); + $page_head = $this->hook->fire('get_page_head_start', $page_head, $forum_id, $num_pages, $p, $url_forum); - $page_head = array(); $page_head['canonical'] = "\t".''; if ($num_pages > 1) { @@ -107,6 +117,8 @@ public function get_page_head($forum_id, $num_pages, $p, $url_forum) $page_head['feed'] = ''; } + $page_head = $this->hook->fire('get_page_head', $page_head); + return $page_head; } @@ -115,6 +127,8 @@ public function get_forum_actions($forum_id, $subscriptions, $is_subscribed) { $forum_actions = array(); + $forum_actions = $this->hook->fire('get_page_head_start', $forum_actions, $forum_id, $subscriptions, $is_subscribed); + if (!$this->user->is_guest) { if ($subscriptions == 1) { if ($is_subscribed) { @@ -127,26 +141,32 @@ public function get_forum_actions($forum_id, $subscriptions, $is_subscribed) $forum_actions[] = ''.__('Mark forum read').''; } + $forum_actions = $this->hook->fire('get_page_head', $forum_actions); + return $forum_actions; } // Returns the elements needed to display topics public function print_topics($forum_id, $sort_by, $start_from) { + $forum_id = $this->hook->fire('print_topics_start', $forum_id, $sort_by, $start_from); + // Get topic/forum tracking data if (!$this->user->is_guest) { $tracked_topics = get_tracked_topics(); } // Retrieve a list of topic IDs, LIMIT is (really) expensive so we only fetch the IDs here then later fetch the remaining data - $result = DB::for_table('topics')->select('id') + $result = DB::for_table('topics') + ->select('id') ->where('forum_id', $forum_id) ->order_by_desc('sticky') ->order_by_expr($sort_by) ->order_by_desc('id') ->limit($this->user->disp_topics) - ->offset($start_from) - ->find_many(); + ->offset($start_from); + $result = $this->hook->fire('print_topics_ids_query', $result); + $result = $result->find_many(); $forum_data = array(); @@ -160,30 +180,33 @@ public function print_topics($forum_id, $sort_by, $start_from) // Fetch list of topics to display on this page if ($this->user->is_guest || $this->config['o_show_dot'] == '0') { // Without "the dot" - $select_print_topics = array('id', 'poster', 'subject', 'posted', 'last_post', 'last_post_id', 'last_poster', 'num_views', 'num_replies', 'closed', 'sticky', 'moved_to'); + $result['select'] = array('id', 'poster', 'subject', 'posted', 'last_post', 'last_post_id', 'last_poster', 'num_views', 'num_replies', 'closed', 'sticky', 'moved_to'); - $result = DB::for_table('topics')->select_many($select_print_topics) + $result = DB::for_table('topics') + ->select_many($result['select']) ->where_in('id', $topic_ids) ->order_by_desc('sticky') ->order_by_expr($sort_by) - ->order_by_desc('id') - ->find_many(); + ->order_by_desc('id'); } else { // With "the dot" - $select_print_topics = array('has_posted' => 'p.poster_id', 't.id', 't.subject', 't.poster', 't.posted', 't.last_post', 't.last_post_id', 't.last_poster', 't.num_views', 't.num_replies', 't.closed', 't.sticky', 't.moved_to'); - - $result = DB::for_table('topics')->table_alias('t') - ->select_many($select_print_topics) - ->left_outer_join('posts', array('t.id', '=', 'p.topic_id'), 'p') - ->left_outer_join('posts', array('p.poster_id', '=', $this->user->id), null, true) - ->where_in('t.id', $topic_ids) - ->group_by('t.id') - ->order_by_desc('sticky') - ->order_by_expr($sort_by) - ->order_by_desc('id') - ->find_many(); + $result['select'] = array('has_posted' => 'p.poster_id', 't.id', 't.subject', 't.poster', 't.posted', 't.last_post', 't.last_post_id', 't.last_poster', 't.num_views', 't.num_replies', 't.closed', 't.sticky', 't.moved_to'); + + $result = DB::for_table('topics') + ->table_alias('t') + ->select_many($result['select']) + ->left_outer_join('posts', array('t.id', '=', 'p.topic_id'), 'p') + ->left_outer_join('posts', array('p.poster_id', '=', $this->user->id), null, true) + ->where_in('t.id', $topic_ids) + ->group_by('t.id') + ->order_by_desc('sticky') + ->order_by_expr($sort_by) + ->order_by_desc('id'); } + $result = $this->hook->fireDB('print_topics_query', $result); + $result = $result->find_many(); + $topic_count = 0; foreach ($result as $cur_topic) { ++$topic_count; @@ -257,6 +280,8 @@ public function print_topics($forum_id, $sort_by, $start_from) } } + $forum_data = $this->hook->fire('print_topics', $forum_data); + return $forum_data; } } diff --git a/model/viewtopic.php b/model/viewtopic.php index b4776ff1..444b23ef 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -20,17 +20,21 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } - // Redirects to a post in particular + // Redirect to a post in particular public function redirect_to_post($post_id) { - $select_info_topic = array('topic_id', 'posted'); + $post_id = $this->hook->fire('redirect_to_post', $post_id); + + $result['select'] = array('topic_id', 'posted'); $result = DB::for_table('posts') - ->select_many($select_info_topic) - ->where('id', $post_id) - ->find_one(); + ->select_many($result['select']) + ->where('id', $post_id); + $result = $this->hook->fireDB('redirect_to_post_query', $result); + $result = $result->find_one(); if (!$result) { message(__('Bad request'), '404'); @@ -45,14 +49,20 @@ public function redirect_to_post($post_id) ->where_lt('posted', $posted) ->count('id'); + $num_posts = $this->hook->fire('redirect_to_post_num', $num_posts); + $post['get_p'] = ceil(($num_posts + 1) / $this->user->disp_posts); + $post = $this->hook->fire('redirect_to_post', $post); + return $post; } - // Redirects to new posts or last post + // Redirect to new posts or last post public function handle_actions($topic_id, $action) { + $action = $this->hook->fire('handle_actions_start', $action, $topic_id); + // If action=new, we redirect to the first new post (if any) if ($action == 'new') { if (!$this->user->is_guest) { @@ -65,6 +75,8 @@ public function handle_actions($topic_id, $action) ->where_gt('posted', $last_viewed) ->min('id'); + $first_new_post_id = $this->hook->fire('handle_actions_first_new', $first_new_post_id); + if ($first_new_post_id) { header('Location: '.get_base_url().'/post/'.$first_new_post_id.'/#p'.$first_new_post_id); exit; @@ -81,17 +93,21 @@ public function handle_actions($topic_id, $action) ->where('topic_id', $topic_id) ->max('id'); + $last_post_id = $this->hook->fire('handle_actions_last_post', $last_post_id); + if ($last_post_id) { header('Location: '.get_base_url().'/post/'.$last_post_id.'/#p'.$last_post_id); exit; } } + + $this->hook->fire('handle_actions', $action, $topic_id); } // Gets some info about the topic public function get_info_topic($id) { - $where_get_info_topic = array( + $cur_topic['where'] = array( array('fp.read_forum' => 'IS NULL'), array('fp.read_forum' => '1') ); @@ -107,10 +123,9 @@ public function get_info_topic($id) ->left_outer_join('topic_subscriptions', array('s.user_id', '=', $this->user->id), null, true) ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_info_topic) + ->where_any_is($cur_topic['where']) ->where('t.id', $id) - ->where_null('t.moved_to') - ->find_one(); + ->where_null('t.moved_to'); } else { $select_get_info_topic = array('t.subject', 't.closed', 't.num_replies', 't.sticky', 't.first_post_id', 'forum_id' => 'f.id', 'f.forum_name', 'f.moderators', 'fp.post_replies'); @@ -121,22 +136,28 @@ public function get_info_topic($id) ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') ->left_outer_join('forum_perms', array('fp.forum_id', '=', 'f.id'), 'fp') ->left_outer_join('forum_perms', array('fp.group_id', '=', $this->user->g_id), null, true) - ->where_any_is($where_get_info_topic) + ->where_any_is($cur_topic['where']) ->where('t.id', $id) - ->where_null('t.moved_to') - ->find_one(); + ->where_null('t.moved_to'); } + $cur_topic = $this->hook->fireDB('get_info_topic_query', $cur_topic); + $cur_topic = $cur_topic->find_one(); + if (!$cur_topic) { message(__('Bad request'), '404'); } + $cur_topic = $this->hook->fire('get_info_topic', $cur_topic); + return $cur_topic; } // Generates the post link public function get_post_link($topic_id, $closed, $post_replies, $is_admmod) { + $closed = $this->hook->fire('get_post_link_start', $closed, $topic_id, $post_replies, $is_admmod); + if ($closed == '0') { if (($post_replies == '' && $this->user->g_post_replies == '1') || $post_replies == '1' || $is_admmod) { $post_link = "\t\t\t".''."\n"; @@ -153,6 +174,8 @@ public function get_post_link($topic_id, $closed, $post_replies, $is_admmod) $post_link = "\t\t\t".''."\n"; } + $post_link = $this->hook->fire('get_post_link_start', $post_link, $topic_id, $closed, $post_replies, $is_admmod); + return $post_link; } @@ -172,6 +195,8 @@ public function is_quickpost($post_replies, $closed, $is_admmod) $quickpost = true; } + $quickpost = $this->hook->fire('is_quickpost', $quickpost, $post_replies, $closed, $is_admmod); + return $quickpost; } @@ -189,15 +214,18 @@ public function get_subscraction($is_subscribed, $topic_id) $subscraction = ''; } + $subscraction = $this->hook->fire('get_subscraction', $subscraction, $is_subscribed, $topic_id); + return $subscraction; } // Adds relationship meta tags public function get_page_head($topic_id, $num_pages, $p, $url_topic) { + $page_head = array(); + $page_head = $this->hook->fire('get_page_head_start', $page_head, $topic_id, $num_pages, $p, $url_topic); - $page_head = array(); $page_head['canonical'] = "\t".''; if ($num_pages > 1) { @@ -215,6 +243,8 @@ public function get_page_head($topic_id, $num_pages, $p, $url_topic) $page_head['feed'] = ''; } + $page_head = $this->hook->fire('get_page_head', $page_head, $topic_id, $num_pages, $p, $url_topic); + return $page_head; } @@ -225,15 +255,19 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) $post_data = array(); + $post_data = $this->hook->fire('print_posts_start', $post_data, $topic_id, $start_from, $cur_topic, $is_admmod); + $post_count = 0; // Keep track of post numbers // Retrieve a list of post IDs, LIMIT is (really) expensive so we only fetch the IDs here then later fetch the remaining data - $result = DB::for_table('posts')->select('id') + $result = DB::for_table('posts') + ->select('id') ->where('topic_id', $topic_id) ->order_by('id') ->limit($this->user->disp_topics) - ->offset($start_from) - ->find_many(); + ->offset($start_from); + $result = $this->hook->fireDB('print_posts_ids_query', $result); + $result = $result->find_many(); $post_ids = array(); foreach ($result as $cur_post_id) { @@ -245,17 +279,18 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) } // Retrieve the posts (and their respective poster/online status) - $select_print_posts = array('u.email', 'u.title', 'u.url', 'u.location', 'u.signature', 'u.email_setting', 'u.num_posts', 'u.registered', 'u.admin_note', 'p.id','username' => 'p.poster', 'p.poster_id', 'p.poster_ip', 'p.poster_email', 'p.message', 'p.hide_smilies', 'p.posted', 'p.edited', 'p.edited_by', 'g.g_id', 'g.g_user_title', 'g.g_promote_next_group', 'is_online' => 'o.user_id'); + $result['select'] = array('u.email', 'u.title', 'u.url', 'u.location', 'u.signature', 'u.email_setting', 'u.num_posts', 'u.registered', 'u.admin_note', 'p.id','username' => 'p.poster', 'p.poster_id', 'p.poster_ip', 'p.poster_email', 'p.message', 'p.hide_smilies', 'p.posted', 'p.edited', 'p.edited_by', 'g.g_id', 'g.g_user_title', 'g.g_promote_next_group', 'is_online' => 'o.user_id'); $result = DB::for_table('posts') - ->table_alias('p') - ->select_many($select_print_posts) - ->inner_join('users', array('u.id', '=', 'p.poster_id'), 'u') - ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->raw_join('LEFT OUTER JOIN '.$this->feather->forum_settings['db_prefix'].'online', "o.user_id!=1 AND o.idle=0 AND o.user_id=u.id", 'o') - ->where_in('p.id', $post_ids) - ->order_by('p.id') - ->find_array(); + ->table_alias('p') + ->select_many($result['select']) + ->inner_join('users', array('u.id', '=', 'p.poster_id'), 'u') + ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') + ->raw_join('LEFT OUTER JOIN '.$this->feather->forum_settings['db_prefix'].'online', "o.user_id!=1 AND o.idle=0 AND o.user_id=u.id", 'o') + ->where_in('p.id', $post_ids) + ->order_by('p.id'); + $result = $this->hook->fireDB('print_posts_query', $result); + $result = $result->find_array(); foreach($result as $cur_post) { $post_count++; @@ -396,16 +431,20 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) $post_data[] = $cur_post; } + $post_data = $this->hook->fire('print_posts', $post_data); + return $post_data; } public function increment_views($id) { if ($this->config['o_topic_views'] == '1') { - DB::for_table('topics')->where('id', $id) - ->find_one() - ->set_expr('num_views', 'num_views+1') - ->save(); + $query = DB::for_table('topics') + ->where('id', $id) + ->find_one() + ->set_expr('num_views', 'num_views+1'); + $query = $this->hook->fire('increment_views', $query); + $query = $query->save(); } } } From c0396b6b82994b81aa21579d7eedd81a88da498a Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 24 Aug 2015 16:28:20 +0200 Subject: [PATCH 156/353] Complete hooks in model/admin folder --- model/admin/maintenance.php | 39 ++++++++++--- model/admin/options.php | 18 ++++-- model/admin/parser.php | 7 ++- model/admin/permissions.php | 6 +- model/admin/reports.php | 30 ++++++---- model/admin/statistics.php | 12 +++- model/admin/users.php | 113 +++++++++++++++++++++++++----------- 7 files changed, 159 insertions(+), 66 deletions(-) diff --git a/model/admin/maintenance.php b/model/admin/maintenance.php index b61e0434..92f92461 100644 --- a/model/admin/maintenance.php +++ b/model/admin/maintenance.php @@ -20,11 +20,13 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function rebuild() { $per_page = $this->request->get('i_per_page') ? intval($this->request->get('i_per_page')) : 0; + $per_page = $this->hook->fire('maintenance.rebuild.per_page', $per_page); // Check per page is > 0 if ($per_page < 1) { @@ -58,7 +60,9 @@ public function get_query_str() $query_str = ''; $per_page = $this->request->get('i_per_page') ? intval($this->request->get('i_per_page')) : 0; + $per_page = $this->hook->fire('maintenance.get_query_str.per_page', $per_page); $start_at = $this->request->get('i_start_at') ? intval($this->request->get('i_start_at')) : 0; + $start_at = $this->hook->fire('maintenance.get_query_str.start_at', $start_at); require FEATHER_ROOT.'include/search_idx.php'; @@ -70,8 +74,9 @@ public function get_query_str() ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') ->where_gte('p.id', $start_at) ->order_by_asc('p.id') - ->limit($per_page) - ->find_many(); + ->limit($per_page); + $result = $this->hook->fireDB('maintenance.get_query_str.query', $result); + $result = $result->find_many(); $end_at = 0; foreach ($result as $cur_item) { @@ -100,6 +105,7 @@ public function get_query_str() $pdo = DB::get_db(); $pdo = null; + $query_str = $this->hook->fire('maintenance.get_query_str', $query_str); return $query_str; } @@ -126,6 +132,7 @@ public function prune($forum_id, $prune_sticky, $prune_date) foreach ($topics_id as $row) { $topic_ids[] = $row['id']; } + $topic_ids = $this->hook->fire('maintenance.prune.topic_ids', $topic_ids); if (!empty($topic_ids)) { // Fetch posts to prune @@ -137,6 +144,7 @@ public function prune($forum_id, $prune_sticky, $prune_date) foreach ($posts_id as $row) { $post_ids[] = $row['id']; } + $post_ids = $this->hook->fire('maintenance.prune.post_ids', $post_ids); if ($post_ids != '') { // Delete topics @@ -162,12 +170,15 @@ public function prune($forum_id, $prune_sticky, $prune_date) public function prune_comply($prune_from, $prune_sticky) { $prune_days = intval($this->request->post('prune_days')); + $prune_days = $this->hook->fire('maintenance.prune_comply.prune_days', $prune_days); $prune_date = ($prune_days) ? time() - ($prune_days * 86400) : -1; @set_time_limit(0); if ($prune_from == 'all') { - $result = DB::for_table('forums')->select('id')->find_array(); + $result = DB::for_table('forums')->select('id'); + $result = $this->hook->fireDB('maintenance.prune_comply.query', $result); + $result = $result->find_array(); if (!empty($result)) { foreach ($result as $row) { @@ -186,14 +197,16 @@ public function prune_comply($prune_from, $prune_sticky) ->select('t1.id') ->left_outer_join('topics', array('t1.moved_to', '=', 't2.id'), 't2') ->where_null('t2.id') - ->where_not_null('t1.moved_to') - ->find_array(); + ->where_not_null('t1.moved_to'); + $result = $this->hook->fireDB('maintenance.prune_comply.orphans_query', $result); + $result = $result->find_array(); $orphans = array(); if (!empty($result)) { foreach ($result as $row) { $orphans[] = $row['id']; } + $orphans = $this->hook->fire('maintenance.prune_comply.orphans', $orphans); DB::for_table('topics') ->where_in('id', $orphans) @@ -214,6 +227,8 @@ public function get_info_prune($prune_sticky, $prune_from) $prune['date'] = time() - ($prune['days'] * 86400); + $prune = $this->hook->fire('maintenance.get_info_prune.prune_dates', $prune); + // Concatenate together the query for counting number of topics to prune $query = DB::for_table('topics')->where_lt('last_post', $prune['date']) ->where_null('moved_to'); @@ -226,8 +241,10 @@ public function get_info_prune($prune_sticky, $prune_from) $query = $query->where('forum_id', intval($prune_from)); // Fetch the forum name (just for cosmetic reasons) - $forum = DB::for_table('forums')->where('id', $prune_from) - ->find_one_col('forum_name'); + $forum = DB::for_table('forums')->where('id', $prune_from); + $forum = $this->hook->fireDB('maintenance.get_info_prune.forum_query', $forum); + $forum = $forum->find_one_col('forum_name'); + $prune['forum'] = '"'.feather_escape($forum).'"'; } else { $prune['forum'] = __('All forums'); @@ -239,6 +256,7 @@ public function get_info_prune($prune_sticky, $prune_from) message(sprintf(__('No old topics message'), $prune['days'])); } + $prune = $this->hook->fire('maintenance.get_info_prune.prune', $prune); return $prune; } @@ -254,8 +272,9 @@ public function get_categories() ->select_many($select_get_categories) ->inner_join('forums', array('c.id', '=', 'f.cat_id'), 'f') ->where_null('f.redirect_url') - ->order_by_many($order_by_get_categories) - ->find_many(); + ->order_by_many($order_by_get_categories); + $result = $this->hook->fireDB('maintenance.get_categories.query', $result); + $result = $result->find_many(); $cur_category = 0; foreach ($result as $forum) { @@ -273,6 +292,7 @@ public function get_categories() $output .= "\t\t\t\t\t\t\t\t\t\t\t\t".''."\n"; } + $output = $this->hook->fire('maintenance.get_categories.output', $output); return $output; } @@ -285,6 +305,7 @@ public function get_first_id() $first_id = $first_id_sql; } + $first_id = $this->hook->fire('maintenance.get_first_id', $first_id); return $first_id; } } diff --git a/model/admin/options.php b/model/admin/options.php index ddfafbe6..d1734ac0 100644 --- a/model/admin/options.php +++ b/model/admin/options.php @@ -20,8 +20,9 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } - + public function update_options() { $form = array( @@ -86,6 +87,8 @@ public function update_options() 'maintenance_message' => feather_trim($this->request->post('form_maintenance_message')), ); + $form = $this->hook->fire('options.update_options.form', $form); + if ($form['board_title'] == '') { message(__('Must enter title message')); } @@ -239,6 +242,7 @@ public function update_options() public function clear_feed_cache() { $d = dir(FORUM_CACHE_DIR); + $d = $this->hook->fire('options.clear_feed_cache.directory', $d); while (($entry = $d->read()) !== false) { if (substr($entry, 0, 10) == 'cache_feed' && substr($entry, -4) == '.php') { @unlink(FORUM_CACHE_DIR.$entry); @@ -251,7 +255,8 @@ public function clear_feed_cache() public function get_styles() { $styles = forum_list_styles(); - + $styles = $this->hook->fire('options.get_styles.styles', $styles); + $output = ''; foreach ($styles as $temp) { @@ -261,20 +266,23 @@ public function get_styles() $output .= "\t\t\t\t\t\t\t\t\t\t\t".''."\n"; } } - + + $output = $this->hook->fire('options.get_styles.output', $output); return $output; } public function get_times() { $times = array(5, 15, 30, 60); - + $times = $this->hook->fire('options.get_times.times', $times); + $output = ''; foreach ($times as $time) { $output .= "\t\t\t\t\t\t\t\t\t\t\t".''."\n"; } - + + $output = $this->hook->fire('options.get_times.output', $output); return $output; } } diff --git a/model/admin/parser.php b/model/admin/parser.php index 260b6f09..71c8b6d9 100644 --- a/model/admin/parser.php +++ b/model/admin/parser.php @@ -21,19 +21,22 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } - + // Helper public function returns array of smiley image files // stored in the img/smilies directory. public function get_smiley_files() { $imgfiles = array(); $filelist = scandir(FEATHER_ROOT.'img/smilies'); + $filelist = $this->hook->fire('parser.get_smiley_files.filelist', $filelist); foreach ($filelist as $file) { if (preg_match('/\.(?:png|gif|jpe?g)$/', $file)) { $imgfiles[] = $file; } } + $imgfiles = $this->hook->fire('parser.get_smiley_files.imgfiles', $imgfiles); return $imgfiles; } -} \ No newline at end of file +} diff --git a/model/admin/permissions.php b/model/admin/permissions.php index 2666f587..19d409fd 100644 --- a/model/admin/permissions.php +++ b/model/admin/permissions.php @@ -20,11 +20,13 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } - + public function update_permissions() { $form = array_map('intval', $this->request->post('form')); + $form = $this->hook->fire('permissions.update_permissions.form', $form); foreach ($form as $key => $input) { // Make sure the input is never a negative value @@ -48,4 +50,4 @@ public function update_permissions() redirect(get_link('admin/permissions/'), __('Perms updated redirect')); } -} \ No newline at end of file +} diff --git a/model/admin/reports.php b/model/admin/reports.php index a6a653a2..d0500dc1 100644 --- a/model/admin/reports.php +++ b/model/admin/reports.php @@ -20,19 +20,22 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function zap_report() { $zap_id = intval(key($this->request->post('zap_id'))); + $zap_id = $this->hook->fire('reports.zap_report.zap_id', $zap_id); - $result = DB::for_table('reports') - ->where('id', $zap_id) - ->find_one_col('zapped'); + $result = DB::for_table('reports')->where('id', $zap_id); + $result = $this->hook->fireDB('reports.zap_report.query', $result); + $result = $result->find_one_col('zapped'); - $set_zap_report = array('zapped' => time(), - 'zapped_by' => $this->user->id); + $set_zap_report = array('zapped' => time(), 'zapped_by' => $this->user->id); + $set_zap_report = $this->hook->fire('reports.zap_report.set_zap_report', $set_zap_report); + // Update report to indicate it has been zapped if (!$result) { DB::for_table('reports') ->where('id', $zap_id) @@ -41,6 +44,7 @@ public function zap_report() ->save(); } + // Remove zapped reports to keep only last 10 $threshold = DB::for_table('reports') ->where_not_null('zapped') ->order_by_desc('zapped') @@ -69,16 +73,16 @@ public function get_reports() ->left_outer_join('forums', array('r.forum_id', '=', 'f.id'), 'f') ->left_outer_join('users', array('r.reported_by', '=', 'u.id'), 'u') ->where_null('r.zapped') - ->order_by_desc('created') - ->find_array(); + ->order_by_desc('created'); + $reports = $this->hook->fireDB('reports.get_reports.query', $reports); + $reports = $reports->find_array(); + $reports = $this->hook->fire('reports.get_reports', $reports); return $reports; } public function get_zapped_reports() { - global $lang_admin_reports; - $zapped_reports = array(); $select_zapped_reports = array('r.id', 'r.topic_id', 'r.forum_id', 'r.reported_by', 'r.message', 'r.zapped', 'zapped_by_id' => 'r.zapped_by', 'pid' => 'p.id', 't.subject', 'f.forum_name', 'reporter' => 'u.username', 'zapped_by' => 'u2.username'); $zapped_reports = DB::for_table('reports') @@ -91,9 +95,11 @@ public function get_zapped_reports() ->left_outer_join('users', array('r.zapped_by', '=', 'u2.id'), 'u2') ->where_not_null('r.zapped') ->order_by_desc('zapped') - ->limit(10) - ->find_array(); + ->limit(10); + $zapped_reports = $this->hook->fireDB('reports.get_zapped_reports.query', $zapped_reports); + $zapped_reports = $zapped_reports->find_array(); + $zapped_reports = $this->hook->fire('reports.get_zapped_reports', $zapped_reports); return $zapped_reports; } -} \ No newline at end of file +} diff --git a/model/admin/statistics.php b/model/admin/statistics.php index 225392e0..64417069 100644 --- a/model/admin/statistics.php +++ b/model/admin/statistics.php @@ -20,8 +20,9 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } - + public function get_server_load() { if (@file_exists('/proc/loadavg') && is_readable('/proc/loadavg')) { @@ -38,6 +39,8 @@ public function get_server_load() } $load_averages = @explode(' ', $load_averages); + $load_averages = $this->hook->fire('model.statistics.get_server_load.load_averages', $load_averages); + $server_load = isset($load_averages[2]) ? $load_averages[0].' '.$load_averages[1].' '.$load_averages[2] : __('Not available'); } elseif (!in_array(PHP_OS, array('WINNT', 'WIN32')) && preg_match('%averages?: ([0-9\.]+),?\s+([0-9\.]+),?\s+([0-9\.]+)%i', @exec('uptime'), $load_averages)) { $server_load = $load_averages[1].' '.$load_averages[2].' '.$load_averages[3]; @@ -45,6 +48,7 @@ public function get_server_load() $server_load = __('Not available'); } + $server_load = $this->hook->fire('model.statistics.get_server_load.server_load', $server_load); return $server_load; } @@ -53,6 +57,7 @@ public function get_num_online() $num_online = DB::for_table('online')->where('idle', 0) ->count('user_id'); + $num_online = $this->hook->fire('model.statistics.get_num_online.num_online', $num_online); return $num_online; } @@ -63,6 +68,7 @@ public function get_total_size() if ($this->feather->forum_settings['db_type'] == 'mysql' || $this->feather->forum_settings['db_type'] == 'mysqli' || $this->feather->forum_settings['db_type'] == 'mysql_innodb' || $this->feather->forum_settings['db_type'] == 'mysqli_innodb') { // Calculate total db size/row count $result = DB::for_table('users')->raw_query('SHOW TABLE STATUS LIKE \''.$this->feather->forum_settings['db_prefix'].'%\'')->find_many(); + $result = $this->hook->fire('model.statistics.get_total_size.raw_data', $result); $total['size'] = $total['records'] = 0; foreach ($result as $status) { @@ -73,6 +79,7 @@ public function get_total_size() $total['size'] = file_size($total['size']); } + $total = $this->hook->fire('model.statistics.get_total_size.total', $total); return $total; } @@ -94,6 +101,7 @@ public function get_php_accelerator() $php_accelerator = __('NA'); } + $php_accelerator = $this->hook->fire('model.statistics.get_php_accelerator', $php_accelerator); return $php_accelerator; } -} \ No newline at end of file +} diff --git a/model/admin/users.php b/model/admin/users.php index 738f2e4f..2d5da7f8 100644 --- a/model/admin/users.php +++ b/model/admin/users.php @@ -20,13 +20,14 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; + $this->hook = $this->feather->hooks; } public function get_num_ip($ip_stats) { - $num_ips = DB::for_table('posts')->where('poster_id', $ip_stats) - ->group_by('poster_ip') - ->count('poster_ip'); + $num_ips = DB::for_table('posts')->where('poster_id', $ip_stats)->group_by('poster_ip'); + $num_ips = $this->hook->fireDB('model.users.get_num_ip', $num_ips); + $num_ips = $num_ips->count('poster_ip'); return $num_ips; } @@ -43,38 +44,46 @@ public function get_ip_stats($ip_stats, $start_from) ->group_by('poster_ip') ->order_by_desc('last_used') ->offset($start_from) - ->limit(50) - ->find_many(); + ->limit(50); + $result = $this->hook->fireDB('model.users.get_ip_stats.query', $result); + $result = $result->find_many(); + if ($result) { foreach ($result as $cur_ip) { $ip_data[] = $cur_ip; } } + $ip_data = $this->hook->fire('model.users.get_ip_stats.ip_data', $ip_data); return $ip_data; } public function get_num_users_ip($ip) { - $num_users = DB::for_table('posts')->where('poster_ip', $ip) - ->distinct() - ->count('poster_id'); + $num_users = DB::for_table('posts')->where('poster_ip', $ip)->distinct(); + $num_users = $this->hook->fireDB('model.users.get_num_users_ip.query', $num_users); + $num_users = $num_users->count('poster_id'); return $num_users; } public function get_num_users_search($conditions) { + $conditions = $this->hook->fire('model.users.get_num_users_search.conditions', $conditions); + $num_users = DB::for_table('users')->table_alias('u') ->left_outer_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where_raw('u.id>1'.(!empty($conditions) ? ' AND '.implode(' AND ', $conditions) : '')) - ->count('id'); + ->where_raw('u.id>1'.(!empty($conditions) ? ' AND '.implode(' AND ', $conditions) : '')); + $num_users = $this->hook->fireDB('model.users.get_num_users_search.query', $num_users); + $num_users = $num_users->count('id'); return $num_users; } public function get_info_poster($ip, $start_from) { + $ip = $this->hook->fire('model.users.get_info_poster.ip', $ip); + $info = array(); $select_info_get_info_poster = array('poster_id', 'poster'); @@ -84,8 +93,9 @@ public function get_info_poster($ip, $start_from) ->where('poster_ip', $ip) ->order_by_asc('poster') ->offset($start_from) - ->limit(50) - ->find_many(); + ->limit(50); + $result = $this->hook->fireDB('model.users.get_info_poster.select_info_get_info_poster', $result); + $result = $result->find_many(); $info['num_posts'] = count($result); @@ -102,14 +112,16 @@ public function get_info_poster($ip, $start_from) ->select_many($select_get_info_poster) ->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') ->where_gt('u.id', 1) - ->where_in('u.id', $poster_ids) - ->find_many(); + ->where_in('u.id', $poster_ids); + $result = $this->hook->fireDB('model.users.get_info_poster.select_get_info_poster', $result); + $result = $result->find_many(); foreach ($result as $cur_user) { $info['user_data'][$cur_user['id']] = $cur_user; } } + $info = $this->hook->fire('model.users.get_info_poster.info', $info); return $info; } @@ -127,6 +139,8 @@ public function move_users() $move['user_ids'] = array(); } + $move['user_ids'] = $this->hook->fire('model.users.move_users.user_ids', $move['user_ids']); + if (empty($move['user_ids'])) { message(__('No users selected')); } @@ -145,8 +159,9 @@ public function move_users() $result = DB::for_table('groups')->select_many($select_user_groups) ->where_not_in('g_id', $where_not_in) - ->order_by_asc('g_title') - ->find_many(); + ->order_by_asc('g_title'); + $result = $this->hook->fireDB('model.users.move_users.all_user_groups_query', $result); + $result = $result->find_many(); foreach ($result as $row) { $move['all_groups'][$row['g_id']] = $row['g_title']; @@ -154,6 +169,7 @@ public function move_users() if ($this->request->post('move_users_comply')) { $new_group = $this->request->post('new_group') && isset($move['all_groups'][$this->request->post('new_group')]) ? $this->request->post('new_group') : message(__('Invalid group message')); + $new_group = $this->hook->fire('model.users.move_users.new_group', $new_group); // Is the new group a moderator group? $new_group_mod = DB::for_table('groups')->where('g_id', $new_group) @@ -163,8 +179,10 @@ public function move_users() $user_groups = array(); $select_fetch_user_groups = array('id', 'group_id'); $result = DB::for_table('users')->select_many($select_fetch_user_groups) - ->where_in('id', $move['user_ids']) - ->find_many(); + ->where_in('id', $move['user_ids']); + $result = $this->hook->fireDB('model.users.move_users.user_groups_query', $result); + $result = $result->find_many(); + foreach($result as $cur_user) { if (!isset($user_groups[$cur_user['group_id']])) { $user_groups[$cur_user['group_id']] = array(); @@ -185,6 +203,8 @@ public function move_users() } } + $user_groups = $this->hook->fire('model.users.move_users.user_groups', $user_groups); + if (!empty($user_groups) && $new_group != FEATHER_ADMIN && $new_group_mod != '1') { // Fetch forum list and clean up their moderator list $select_mods = array('id', 'moderators'); @@ -220,6 +240,7 @@ public function move_users() redirect(get_link('admin/users/'), __('Users move redirect')); } + $move = $this->hook->fire('model.users.move_users.move', $move); return $move; } @@ -235,6 +256,8 @@ public function delete_users() $user_ids = array(); } + $user_ids = $this->hook->fire('model.users.delete_users.user_ids', $user_ids); + if (empty($user_ids)) { message(__('No users selected')); } @@ -253,7 +276,9 @@ public function delete_users() $select_fetch_user_groups = array('id', 'group_id'); $result = DB::for_table('users')->select_many($select_fetch_user_groups) ->where_in('id', $user_ids) - ->find_many(); + $result = $this->hook->fireDB('model.users.delete_users.user_groups_query', $result); + $result = $result->find_many(); + foreach($result as $cur_user) { if (!isset($user_groups[$cur_user['group_id']])) { @@ -275,6 +300,8 @@ public function delete_users() } } + $user_groups = $this->hook->fire('model.users.delete_users.user_groups', $user_groups); + // Fetch forum list and clean up their moderator list $select_mods = array('id', 'moderators'); $result = DB::for_table('forums') @@ -324,12 +351,14 @@ public function delete_users() $select_user_posts = array('p.id', 'p.topic_id', 't.forum_id'); $result = DB::for_table('posts') - ->table_alias('p') - ->select_many($select_user_posts) - ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') - ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') - ->where('p.poster_id', $user_ids) - ->find_many(); + ->table_alias('p') + ->select_many($select_user_posts) + ->inner_join('topics', array('t.id', '=', 'p.topic_id'), 't') + ->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f') + ->where('p.poster_id', $user_ids); + $result = $this->hook->fireDB('model.users.delete_users.user_posts_query', $result); + $result = $result->find_many(); + if ($result) { foreach($result as $cur_post) { // Determine whether this post is the "topic post" or not @@ -349,6 +378,7 @@ public function delete_users() } } else { // Set all their posts to guest + // TODO: invert where_in and update_many values ? To test. DB::for_table('posts') ->where_in('poster_id', '1') ->update_many('poster_id', $user_ids); @@ -390,6 +420,8 @@ public function ban_users() $user_ids = array(); } + $user_ids = $this->hook->fire('model.users.ban_users.user_ids', $user_ids); + if (empty($user_ids)) { message(__('No users selected')); } @@ -417,6 +449,8 @@ public function ban_users() $ban_expire = feather_trim($this->request->post('ban_expire')); $ban_the_ip = $this->request->post('ban_the_ip') ? intval($this->request->post('ban_the_ip')) : 0; + $this->hook->fire('model.users.ban_users.comply', $ban_message, $ban_expire, $ban_the_ip); + if ($ban_expire != '' && $ban_expire != 'Never') { $ban_expire = strtotime($ban_expire . ' GMT'); @@ -440,8 +474,10 @@ public function ban_users() $user_info = array(); $select_fetch_user_information = array('id', 'username', 'email', 'registration_ip'); $result = DB::for_table('users')->select_many($select_fetch_user_information) - ->where_in('id', $user_ids) - ->find_many(); + ->where_in('id', $user_ids); + $result = $this->hook->fireDB('model.users.ban_users.user_info_query', $result); + $result = $result->find_many(); + foreach ($result as $cur_user) { $user_info[$cur_user['id']] = array('username' => $cur_user['username'], 'email' => $cur_user['email'], 'ip' => $cur_user['registration_ip']); } @@ -454,6 +490,8 @@ public function ban_users() } } + $user_info = $this->hook->fire('model.users.ban_users.user_info', $user_info); + // And insert the bans! foreach ($user_ids as $user_id) { $ban_username = $user_info[$user_id]['username']; @@ -469,6 +507,8 @@ public function ban_users() 'ban_creator' => $this->user->id, ); + $insert_update_ban = $this->hook->fire('model.users.ban_users.ban_data', $insert_update_ban); + if ($this->request->post('mode') == 'add') { $insert_update_ban['ban_creator'] = $this->user->id; @@ -490,6 +530,7 @@ public function ban_users() public function get_user_search() { $form = $this->request->get('form') ? $this->request->get('form') : array(); + $form = $this->hook->fire('model.users.get_user_search.form', $form); $search = array(); @@ -601,6 +642,7 @@ public function get_user_search() $search['conditions'][] = 'u.group_id='.$user_group; } + $search = $this->hook->fire('model.users.get_user_search.search', $search); return $search; } @@ -610,13 +652,14 @@ public function print_users($conditions, $order_by, $direction, $start_from) $select_print_users = array('u.id', 'u.username', 'u.email', 'u.title', 'u.num_posts', 'u.admin_note', 'g.g_id', 'g.g_user_title'); $result = DB::for_table('users')->table_alias('u') - ->select_many($select_print_users) - ->left_outer_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') - ->where_raw('u.id>1'.(!empty($conditions) ? ' AND '.implode(' AND ', $conditions) : '')) - ->offset($start_from) - ->limit(50) - ->order_by($order_by, $direction) - ->find_many(); + ->select_many($select_print_users) + ->left_outer_join('groups', array('g.g_id', '=', 'u.group_id'), 'g') + ->where_raw('u.id>1'.(!empty($conditions) ? ' AND '.implode(' AND ', $conditions) : '')) + ->offset($start_from) + ->limit(50) + ->order_by($order_by, $direction); + $result = $this->hook->fireDB('model.users.print_users.query', $result); + $result = $result->find_many(); if ($result) { foreach ($result as $cur_user) { @@ -631,6 +674,7 @@ public function print_users($conditions, $order_by, $direction, $start_from) } } + $user_data = $this->hook->fire('model.users.print_users.user_data', $user_data); return $user_data; } @@ -647,6 +691,7 @@ public function get_group_list() $output .= "\t\t\t\t\t\t\t\t\t\t\t".''."\n"; } + $output = $this->hook->fire('model.users.get_group_list.output', $output); return $output; } } From bbde09ae2a2bc994d0511aa6b06f1aa05edb4fa3 Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 24 Aug 2015 16:34:29 +0200 Subject: [PATCH 157/353] Small bug fix Wrong parameter passed to hook in moderate.php model, function display_ip_address_post() --- model/moderate.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/model/moderate.php b/model/moderate.php index ebb24753..1b1949f5 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; } - + public function display_ip_info($ip) { $ip = $this->hook->fire('display_ip_info', $ip); @@ -35,7 +35,7 @@ public function display_ip_address_post($pid) $ip = DB::for_table('posts') ->where('id', $pid); - $ip = $this->hook->fireDB('display_ip_address_post_query', $pid); + $ip = $this->hook->fireDB('display_ip_address_post_query', $ip); $ip = $ip->find_one_col('poster_ip'); if (!$ip) { @@ -493,7 +493,7 @@ public function display_posts_view($tid, $start_from) public function move_topics_to($fid, $tfid = null, $param = null) { $fid = $this->hook->fire('move_topics_to_start', $fid); - + if (@preg_match('%[^0-9,]%', $this->request->post('topics'))) { message(__('Bad request'), '404'); } @@ -983,7 +983,7 @@ public function display_topics($fid, $sort_by, $start_from) return $topic_data; } - + public function stick_topic($id, $fid) { $stick_topic = DB::for_table('topics') @@ -1005,7 +1005,7 @@ public function unstick_topic($id, $fid) $unstick_topic = $this->hook->fireDB('unstick_topic', $unstick_topic); $unstick_topic = $unstick_topic->save(); } - + public function open_topic($id, $fid) { $open_topic = DB::for_table('topics') @@ -1016,7 +1016,7 @@ public function open_topic($id, $fid) $open_topic = $this->hook->fireDB('open_topic', $open_topic); $open_topic = $open_topic->save(); } - + public function close_topic($id, $fid) { $close_topic = DB::for_table('topics') @@ -1027,7 +1027,7 @@ public function close_topic($id, $fid) $close_topic = $this->hook->fireDB('close_topic', $close_topic); $close_topic = $close_topic->save(); } - + public function close_multiple_topics($action, $topics, $fid) { $close_multiple_topics = DB::for_table('topics') @@ -1035,7 +1035,7 @@ public function close_multiple_topics($action, $topics, $fid) $close_multiple_topics = $this->hook->fireDB('open_topic', $close_multiple_topics); $close_multiple_topics = $close_multiple_topics->update_many('closed', $action); } - + public function get_subject_tid($id) { $subject = DB::for_table('topics') From c723af68473bacaa9c1b77e8cb59f0e88ddfe475 Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 24 Aug 2015 17:56:56 +0200 Subject: [PATCH 158/353] Prettier notifications display --- js/common.js | 1 + style/FeatherBB.css | 54 +++++++++++++++++++++++++-------- style/FeatherBB/view/header.php | 21 ++++++++----- 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/js/common.js b/js/common.js index a915c4e5..226c1374 100644 --- a/js/common.js +++ b/js/common.js @@ -33,6 +33,7 @@ function unselect_checkboxes(curFormId, link, new_string) { return false; } +// Useless functions (former flash message show/hide, maybe to use later) function fadeOut(id, val) { if (isNaN(val)) { val = 9; diff --git a/style/FeatherBB.css b/style/FeatherBB.css index b2646697..be3f9568 100644 --- a/style/FeatherBB.css +++ b/style/FeatherBB.css @@ -28,7 +28,6 @@ th { } #announce, #msg, -#msgflash, #posterror { text-shadow: 0 1px 0 rgba(255, 255, 255, .5) } @@ -1239,16 +1238,7 @@ footer .footer-link a { #viewprofile .fakeform .inform fieldset dd { margin: 0 0 15px } -#msgflash { - opacity: 0; - position: fixed; - top: 40px; - right: 40px; - min-width: 230px; - max-width: 400px; -} #msg, -#msgflash, #posterror { margin: 15px 0; padding: 8px 35px 8px 14px; @@ -1258,13 +1248,11 @@ footer .footer-link a { border-radius: 4px } #msg h2, -#msgflash h2, #posterror h2 { margin: 0 0 4px; font-size: 18px } #msg p, -#msgflash p, #posterror p { margin: 0 0 2px } @@ -1273,6 +1261,48 @@ footer .footer-link a { border: 1px solid #ebccd1; color: #a94442 } +.flashmsg { + position: fixed; + min-width: 220px; + max-width: 500px; + top: 5%; + right: 5%; + margin-left: -250px; + padding: 1em; + z-index: 100; + opacity: 0; + pointer-events: none; + box-shadow: 0 3px 6px rgba(0,0,0,0.25); + border: 1px solid #bbb; + color: #147880; + background: #d2ecea; + background: -webkit-linear-gradient(top, #d2ecea, #b3e1e4); + background: -moz-linear-gradient(top, #d2ecea, #b3e1e4); + background: linear-gradient(top, #d2ecea, #b3e1e4); + -webkit-transform: translateY(-100%); + -moz-transform: translateY(-100%); + -ms-transform: translateY(-100%); + -o-transform: translateY(-100%); + transform: translateY(-100%); + -webkit-transition: all 0.75s ease-out; + -moz-transition: all 0.75s ease-out; + -ms-transition: all 0.75s ease-out; + -o-transition: all 0.75s ease-out; + transition: all 0.75s ease-out; +} +.flashmsg.show { + opacity: 1; + pointer-events: auto; + -webkit-transform: translateY(0%); + -moz-transform: translateY(0%); + -ms-transform: translateY(0%); + -o-transform: translateY(0%); + transform: translateY(0%); +} +.flashmsg h2 { + margin: 0 0 4px; + font-size: 18px +} input[type=submit] { border-radius: 3px; border: 2px solid #00acc1; diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php index 9da121c2..9b662b3a 100644 --- a/style/FeatherBB/view/header.php +++ b/style/FeatherBB/view/header.php @@ -113,15 +113,20 @@ function process_form(the_form) -
    -

    ×

    -
    -
    -

    -
    -
    + +
    +

    ×

    +

    -
    From a3269eee2ed8594932d40d0a0c2e325da6107a76 Mon Sep 17 00:00:00 2001 From: adaur Date: Mon, 24 Aug 2015 21:15:27 +0200 Subject: [PATCH 159/353] Cleanup caching system --- extern.php | 22 ++++++++++++++++++++ include/cache.php | 46 ----------------------------------------- model/admin/options.php | 12 +++++------ 3 files changed, 28 insertions(+), 52 deletions(-) delete mode 100644 include/cache.php diff --git a/extern.php b/extern.php index 705bedd3..cd24d1a6 100644 --- a/extern.php +++ b/extern.php @@ -86,6 +86,28 @@ define('FORUM_EXTERN_MAX_SUBJECT_LENGTH', 30); } +function featherbb_write_cache_file($file, $content) +{ + $fh = @fopen(FORUM_CACHE_DIR.$file, 'wb'); + if (!$fh) { + error('Unable to write cache file '.feather_escape($file).' to cache directory. Please make sure PHP has write access to the directory \''.feather_escape(FORUM_CACHE_DIR).'\'', __FILE__, __LINE__); + } + + flock($fh, LOCK_EX); + ftruncate($fh, 0); + + fwrite($fh, $content); + + flock($fh, LOCK_UN); + fclose($fh); + + if (function_exists('opcache_invalidate')) { + opcache_invalidate(FORUM_CACHE_DIR.$file, true); + } elseif (function_exists('apc_delete_file')) { + @apc_delete_file(FORUM_CACHE_DIR.$file); + } +} + // // Converts the CDATA end sequence ]]> into ]]> // diff --git a/include/cache.php b/include/cache.php deleted file mode 100644 index e862ed62..00000000 --- a/include/cache.php +++ /dev/null @@ -1,46 +0,0 @@ -feather->cache->store('config', \model\cache::get_config()); $this->clear_feed_cache(); redirect(get_link('admin/options/'), __('Options updated redirect')); @@ -247,7 +243,11 @@ public function clear_feed_cache() if (substr($entry, 0, 10) == 'cache_feed' && substr($entry, -4) == '.php') { @unlink(FORUM_CACHE_DIR.$entry); } - featherbb_invalidate_cached_file(FORUM_CACHE_DIR.$entry); + if (function_exists('opcache_invalidate')) { + opcache_invalidate(FORUM_CACHE_DIR.$entry, true); + } elseif (function_exists('apc_delete_file')) { + @apc_delete_file(FORUM_CACHE_DIR.$entry); + } } $d->close(); } From 739c2daac867c15847f2923e8f785bf84b2bf898 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 11:45:53 +0200 Subject: [PATCH 160/353] Initial commit of FeatherBB view (from Slim/View) --- include/classes/view.class.php | 245 +++++++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 include/classes/view.class.php diff --git a/include/classes/view.class.php b/include/classes/view.class.php new file mode 100644 index 00000000..0b35ac14 --- /dev/null +++ b/include/classes/view.class.php @@ -0,0 +1,245 @@ +data = new \Slim\Helper\Set(); + } + + /******************************************************************************** + * Data methods + *******************************************************************************/ + + /** + * Does view data have value with key? + * @param string $key + * @return boolean + */ + public function has($key) + { + return $this->data->has($key); + } + + /** + * Return view data value with key + * @param string $key + * @return mixed + */ + public function get($key) + { + return $this->data->get($key); + } + + /** + * Set view data value with key + * @param string $key + * @param mixed $value + */ + public function set($key, $value) + { + $this->data->set($key, $value); + } + + /** + * Set view data value as Closure with key + * @param string $key + * @param mixed $value + */ + public function keep($key, \Closure $value) + { + $this->data->keep($key, $value); + } + + /** + * Return view data + * @return array + */ + public function all() + { + return $this->data->all(); + } + + /** + * Replace view data + * @param array $data + */ + public function replace(array $data) + { + $this->data->replace($data); + } + + /** + * Clear view data + */ + public function clear() + { + $this->data->clear(); + } + + /******************************************************************************** + * Legacy data methods + *******************************************************************************/ + + /** + * DEPRECATION WARNING! This method will be removed in the next major point release + * + * Get data from view + */ + public function getData($key = null) + { + if (!is_null($key)) { + return isset($this->data[$key]) ? $this->data[$key] : null; + } + + return $this->data->all(); + } + + /** + * DEPRECATION WARNING! This method will be removed in the next major point release + * + * Set data for view + */ + public function setData() + { + $args = func_get_args(); + if (count($args) === 1 && is_array($args[0])) { + $this->data->replace($args[0]); + } elseif (count($args) === 2) { + // Ensure original behavior is maintained. DO NOT invoke stored Closures. + if (is_object($args[1]) && method_exists($args[1], '__invoke')) { + $this->data->set($args[0], $this->data->protect($args[1])); + } else { + $this->data->set($args[0], $args[1]); + } + } else { + throw new \InvalidArgumentException('Cannot set View data with provided arguments. Usage: `View::setData( $key, $value );` or `View::setData([ key => value, ... ]);`'); + } + } + + /** + * DEPRECATION WARNING! This method will be removed in the next major point release + * + * Append data to view + * @param array $data + */ + public function appendData($data) + { + if (!is_array($data)) { + throw new \InvalidArgumentException('Cannot append view data. Expected array argument.'); + } + $this->data->replace($data); + } + + /******************************************************************************** + * Resolve template paths + *******************************************************************************/ + + /** + * Set the base directory that contains view templates + * @param string $directory + * @throws \InvalidArgumentException If directory is not a directory + */ + public function setTemplatesDirectory($directory) + { + $this->templatesDirectory = rtrim($directory, DIRECTORY_SEPARATOR); + } + + /** + * Get templates base directory + * @return string + */ + public function getTemplatesDirectory() + { + return $this->templatesDirectory; + } + + /** + * Get fully qualified path to template file using templates base directory + * @param string $file The template file pathname relative to templates base directory + * @return string + */ + public function getTemplatePathname($file) + { + return $this->templatesDirectory . DIRECTORY_SEPARATOR . ltrim($file, DIRECTORY_SEPARATOR); + } + + /******************************************************************************** + * Rendering + *******************************************************************************/ + + /** + * Display template + * + * This method echoes the rendered template to the current output buffer + * + * @param string $template Pathname of template file relative to templates directory + * @param array $data Any additonal data to be passed to the template. + */ + public function display($template, $data = null) + { + echo $this->fetch($template, $data); + } + + /** + * Return the contents of a rendered template file + * + * @param string $template The template pathname, relative to the template base directory + * @param array $data Any additonal data to be passed to the template. + * @return string The rendered template + */ + public function fetch($template, $data = null) + { + return $this->render($template, $data); + } + + /** + * Render a template file + * + * NOTE: This method should be overridden by custom view subclasses + * + * @param string $template The template pathname, relative to the template base directory + * @param array $data Any additonal data to be passed to the template. + * @return string The rendered template + * @throws \RuntimeException If resolved template pathname is not a valid file + */ + protected function render($template, $data = null) + { + $templatePathname = $this->getTemplatePathname($template); + if (!is_file($templatePathname)) { + throw new \RuntimeException("View cannot render `$template` because the template does not exist"); + } + + $data = array_merge($this->data->all(), (array) $data); + extract($data); + ob_start(); + require $templatePathname; + + return ob_get_clean(); + } + } + ?> From 94fc0a09c7208ecbae27bd708c5bfd2829e5fbd4 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 11:46:59 +0200 Subject: [PATCH 161/353] Cleaning stuff and register new view as singleton --- include/classes/core.class.php | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 35a94725..0d6fa290 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -52,6 +52,7 @@ public function __construct(array $data) // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); + opcache_reset(); } public static function load_default_forum_env() @@ -174,7 +175,12 @@ public function call() // Set headers $this->set_headers(); - // Populate FeatherBB Slim object with forum_env vars + // Block prefetch requests + if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { + return $this->app->response->setStatus(403); // Send forbidden header + } + + // Populate Slim object with forum_env vars $this->hydrate('forum_env', $this->forum_env); // Record start time $this->app->start = get_microtime(); @@ -182,17 +188,21 @@ public function call() $this->app->now = function () { return time(); }; - // Load cache feature + // Load FeatherBB cache $this->app->container->singleton('cache', function ($container) { $path = $container->forum_env['FORUM_CACHE_DIR']; return new \FeatherBB\Cache(array('name' => 'feather', 'path' => $path, 'extension' => '.cache')); }); - - if ((isset($this->app->environment['HTTP_X_MOZ'])) && ($this->app->environment['HTTP_X_MOZ'] == 'prefetch')) { // Block prefetch requests - return $this->app->response->setStatus(403); // Send forbidden header - } + // Load FeatherBB view + $this->app->container->singleton('view2', function($container) { + return new \FeatherBB\View(); + }); + // Load FeatherBB hooks + $this->app->container->singleton('hooks', function () { + return new \FeatherBB\Hooks(); + }); if (!is_file($this->forum_env['FORUM_CONFIG_FILE'])) { $installer = new \controller\install; @@ -200,6 +210,7 @@ public function call() return; } + // Load config from disk $config_file = json_decode(file_get_contents($this->forum_env['FORUM_CONFIG_FILE']), true); if (!is_null($config_file)) { $this->forum_settings = array_merge(self::load_default_forum_settings(), $config_file); @@ -222,14 +233,15 @@ public function call() // Finalize forum_settings array $this->forum_settings = array_merge($feather_config, $this->forum_settings); + // Set default style + $this->app->view->setStyle($this->forum_settings['o_default_style']); + // Populate FeatherBB Slim object with forum_settings vars $this->hydrate('forum_settings', $this->forum_settings); $this->app->config = $this->forum_settings; // Legacy extract($this->forum_settings); // Legacy - // Hooks - $this->app->hooks = new \FeatherBB\Hooks(); - new \plugin\plugintest(); // TODO: remove + new \plugin\plugintest(); // Define time formats $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); From a98fcd47c6e11fd15e09fe46b1b27704b7453000 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 11:49:04 +0200 Subject: [PATCH 162/353] Implement view fallback --- include/classes/auth.class.php | 2 -- include/classes/view.class.php | 22 ++++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index 06324b40..48fa5c39 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -291,8 +291,6 @@ public function call() // Update online list $this->update_users_online(); - // Configure Slim - $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? $this->app->forum_env['FEATHER_ROOT'].'style/'.$this->app->user->style.'/view' : $this->app->forum_env['FEATHER_ROOT'].'view'); $this->next->call(); } } diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 0b35ac14..e3ea7935 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -21,7 +21,8 @@ class View * Path to templates base directory (without trailing slash) * @var string */ - protected $templatesDirectory; + protected $templatesDirectory, + $app; /** * Constructor @@ -29,6 +30,7 @@ class View public function __construct() { $this->data = new \Slim\Helper\Set(); + $this->app = \Slim\Slim::getInstance(); } /******************************************************************************** @@ -183,10 +185,17 @@ public function getTemplatesDirectory() * @param string $file The template file pathname relative to templates base directory * @return string */ - public function getTemplatePathname($file) - { - return $this->templatesDirectory . DIRECTORY_SEPARATOR . ltrim($file, DIRECTORY_SEPARATOR); - } + public function getTemplatePathname($file) + { + $pathname = $this->templatesDirectory . DIRECTORY_SEPARATOR . ltrim($file, DIRECTORY_SEPARATOR); + if (!is_file($pathname)) { + $pathname = $this->app->forum_env['FEATHER_ROOT'] . 'view/' . ltrim($file, DIRECTORY_SEPARATOR); // Fallback on default view + if (!is_file($pathname)) { + throw new \RuntimeException("View cannot render `$file` because the template does not exist"); + } + } + return $pathname; + } /******************************************************************************** * Rendering @@ -230,9 +239,6 @@ public function fetch($template, $data = null) protected function render($template, $data = null) { $templatePathname = $this->getTemplatePathname($template); - if (!is_file($templatePathname)) { - throw new \RuntimeException("View cannot render `$template` because the template does not exist"); - } $data = array_merge($this->data->all(), (array) $data); extract($data); From a4aa1b5c68fff85e028f9bf255b79343f4c812ef Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 11:53:37 +0200 Subject: [PATCH 163/353] Implement setStyle method --- include/classes/core.class.php | 3 ++- include/classes/view.class.php | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 0d6fa290..b73e3e3b 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -234,7 +234,7 @@ public function call() $this->forum_settings = array_merge($feather_config, $this->forum_settings); // Set default style - $this->app->view->setStyle($this->forum_settings['o_default_style']); + $this->app->view2->setStyle($this->forum_settings['o_default_style']); // Populate FeatherBB Slim object with forum_settings vars $this->hydrate('forum_settings', $this->forum_settings); @@ -247,6 +247,7 @@ public function call() $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); $forum_date_formats = array($this->forum_settings['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); + $this->app->config('templates.path', $this->app->forum_env['FEATHER_ROOT'].'style/FeatherBB/view/'); // Call FeatherBBAuth middleware $this->next->call(); } diff --git a/include/classes/view.class.php b/include/classes/view.class.php index e3ea7935..1dbb720f 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -247,5 +247,23 @@ protected function render($template, $data = null) return ob_get_clean(); } + + // Getters & Setters + + public function setStyle($style) + { + if (!is_dir($this->app->forum_env['FEATHER_ROOT'].'style/'.$style.'/view/')) { + throw new \InvalidArgumentException('The style '.$style.' doesn\'t exist'); + } + $this->data->set('style', (string) $style); + $this->setTemplatesDirectory($this->app->forum_env['FEATHER_ROOT'].'style/'.$style.'/view'); + return $this; + } + + public function getStyle() + { + return $this->data['style']; + } + } ?> From 1b0f05d60d8401de9a23b46c683f0092e8d1e0ce Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 12:23:48 +0200 Subject: [PATCH 164/353] Add setPageInfo method --- include/classes/core.class.php | 3 +++ include/classes/view.class.php | 42 +++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/include/classes/core.class.php b/include/classes/core.class.php index b73e3e3b..d88511e2 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -247,6 +247,9 @@ public function call() $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); $forum_date_formats = array($this->forum_settings['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); + // test + $this->app->view2->setPageInfo(array('title' => 'C\'est un test')); + $this->app->config('templates.path', $this->app->forum_env['FEATHER_ROOT'].'style/FeatherBB/view/'); // Call FeatherBBAuth middleware $this->next->call(); diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 1dbb720f..50e51b96 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -11,25 +11,20 @@ class View { - /** - * Data available to the view templates - * @var \Slim\Helper\Set - */ - protected $data; - - /** - * Path to templates base directory (without trailing slash) - * @var string - */ - protected $templatesDirectory, - $app; + protected $data, + $templatesDirectory, + $app, + $page, + $validation = array( + 'title' => 'strval', + 'page_number' => 'intval'); /** * Constructor */ public function __construct() { - $this->data = new \Slim\Helper\Set(); + $this->data = $this->page = new \Slim\Helper\Set(); $this->app = \Slim\Slim::getInstance(); } @@ -265,5 +260,26 @@ public function getStyle() return $this->data['style']; } + public function setPageInfo(array $data) + { + foreach ($data as $key => $value) { + list($key, $value) = $this->validate($key, $value); + $this->page->set($key, $value); + } + } + + public function getPageInfo() + { + return $this->page->all(); + } + + protected function validate($key, $value) + { + $key = (string) $key; + if (function_exists($this->validation[$key])) { + $value = $this->validation[$key]($value); + } + return array($key, $value); + } } ?> From 9046f9b81205b02c8250f8905a98ea4e7853ca49 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 12:27:02 +0200 Subject: [PATCH 165/353] Add default page info --- include/classes/view.class.php | 37 +++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 50e51b96..416c20f8 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -17,7 +17,18 @@ class View $page, $validation = array( 'title' => 'strval', - 'page_number' => 'intval'); + 'page_number' => 'intval', + 'active_page' => 'strval', + 'focus_element' => 'strval', + 'is_indexed' => 'boolval', + 'page_head' => 'strval', + 'paging_links' => 'strval', + 'required_fields' => 'strval', + 'has_reports' => 'boolval', + 'footer_style' => 'strval', + 'fid' => 'intval', + 'pid' => 'intval', + 'tid' => 'intval'); /** * Constructor @@ -281,5 +292,29 @@ protected function validate($key, $value) } return array($key, $value); } + + protected function getDefaultPageInfo() + { + if (!$this->app->cache->isCached('quickjump')) { + $this->app->cache->store('quickjump', \model\cache::get_quickjump()); + } + + return array( + 'title' => $this->app->forum_settings['o_board_title'], + 'page_number' => null, + 'active_page' => 'index', + 'focus_element' => null, + 'is_indexed' => true, + 'page_head' => null, + 'paging_links' => null, + 'required_fields' => null, + 'has_reports' => \model\header::get_reports(), + 'footer_style' => null, + 'quickjump' => $this->app->cache->retrieve('quickjump'), + 'fid' => null, + 'pid' => null, + 'tid' => null, + ); + } } ?> From f88e42dea9f3dca590be8ee0c32a11ecea9409d9 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 12:28:40 +0200 Subject: [PATCH 166/353] Fix undefined field in validation --- include/classes/view.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 416c20f8..327418ad 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -16,7 +16,6 @@ class View $app, $page, $validation = array( - 'title' => 'strval', 'page_number' => 'intval', 'active_page' => 'strval', 'focus_element' => 'strval', @@ -287,8 +286,10 @@ public function getPageInfo() protected function validate($key, $value) { $key = (string) $key; - if (function_exists($this->validation[$key])) { - $value = $this->validation[$key]($value); + if (isset($this->validation[$key])) { + if (function_exists($this->validation[$key])) { + $value = $this->validation[$key]($value); + } } return array($key, $value); } From 31b49019113197cd1d5e0f22f864b070148f7e05 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 12:43:18 +0200 Subject: [PATCH 167/353] Merge new data into existing data array --- include/classes/view.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 327418ad..0ee2238b 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -243,12 +243,10 @@ public function fetch($template, $data = null) */ protected function render($template, $data = null) { - $templatePathname = $this->getTemplatePathname($template); - - $data = array_merge($this->data->all(), (array) $data); + $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), (array) $data); extract($data); ob_start(); - require $templatePathname; + require $this->getTemplatePathname($template); return ob_get_clean(); } From 31b0e9162848971244d9427b652b523886a3be5f Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 12:44:59 +0200 Subject: [PATCH 168/353] Add view.alter_data hook --- include/classes/view.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 0ee2238b..017110dd 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -244,6 +244,7 @@ public function fetch($template, $data = null) protected function render($template, $data = null) { $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), (array) $data); + $data = $this->app->hooks('view.alter_data', $data); extract($data); ob_start(); require $this->getTemplatePathname($template); From 54c2ecdf50900884dada8fb98e252e0cbe61e5d3 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 13:03:59 +0200 Subject: [PATCH 169/353] Add admin_console and fix typo in hooks --- include/classes/view.class.php | 6 +- model/header.php | 28 ++---- style/FeatherBB/view/header.new.php | 143 ++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+), 22 deletions(-) create mode 100644 style/FeatherBB/view/header.new.php diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 017110dd..387c7760 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -20,6 +20,7 @@ class View 'active_page' => 'strval', 'focus_element' => 'strval', 'is_indexed' => 'boolval', + 'admin_console' => 'boolval', 'page_head' => 'strval', 'paging_links' => 'strval', 'required_fields' => 'strval', @@ -243,8 +244,8 @@ public function fetch($template, $data = null) */ protected function render($template, $data = null) { - $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), (array) $data); - $data = $this->app->hooks('view.alter_data', $data); + $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), array('feather', \Slim\Slim::getInstance()), (array) $data); + $data = $this->app->hooks->fire('view.alter_data', $data); extract($data); ob_start(); require $this->getTemplatePathname($template); @@ -305,6 +306,7 @@ protected function getDefaultPageInfo() 'active_page' => 'index', 'focus_element' => null, 'is_indexed' => true, + 'admin_console' => false, 'page_head' => null, 'paging_links' => null, 'required_fields' => null, diff --git a/model/header.php b/model/header.php index 8a254fa5..56192f72 100644 --- a/model/header.php +++ b/model/header.php @@ -13,30 +13,18 @@ class header { - public function __construct() - { - $this->feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->hook = $this->feather->hooks; - } + protected static $app; - public function get_reports() + public static function get_reports() { - $this->hook->fire('get_reports_start'); + self::$app = \Slim\Slim::getInstance(); - $result_header = DB::for_table('reports')->where_null('zapped'); + self::$app->hooks->fire('get_reports_start'); - $result_header = $this->hook->fireDB('get_reports_query', $result_header); - - $result_header = $result_header->find_one(); + $result_header = DB::for_table('reports')->where_null('zapped'); - if ($result_header) { - return true; - } + $result_header = self::$app->hooks->fireDB('get_reports_query', $result_header); - return false; + return (bool) $result_header->find_one(); } -} \ No newline at end of file +} diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php new file mode 100644 index 00000000..60742ffb --- /dev/null +++ b/style/FeatherBB/view/header.new.php @@ -0,0 +1,143 @@ + + + + + + + + +'."\n"; +} ?> + <?php echo generate_page_title($title, $page_number) ?> + +forum_env['FEATHER_ROOT'].'style/'.$feather->user->style.'/base_admin.css')) { + echo "\t".''."\n"; + } else { + echo "\t".''."\n"; + } +} + +if (isset($required_fields)) : + // Output JavaScript to validate form (make sure required fields are filled out) + + ?> + + + + +> + +
    + + + +
    +
    +

    + +

    +
    +
    +

    +
    + +
    +
    +
    + user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?> +
    +

    +
    +
    +
    +
    +
    +
    + + + + +
    +

    ×

    +

    +
    + +
    + +
    + +
    +
    From 5f885a4cda5ad064a9df911b43766a4d5a35d7bc Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 13:06:42 +0200 Subject: [PATCH 170/353] Fix feather object injection in view --- include/classes/view.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 387c7760..3613c622 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -244,7 +244,7 @@ public function fetch($template, $data = null) */ protected function render($template, $data = null) { - $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), array('feather', \Slim\Slim::getInstance()), (array) $data); + $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), array('feather' => \Slim\Slim::getInstance()), (array) $data); $data = $this->app->hooks->fire('view.alter_data', $data); extract($data); ob_start(); From 0d1f2d933dc4ee522edb6786bd796c43e3f996cb Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 13:13:28 +0200 Subject: [PATCH 171/353] Add focus_element and nav links in view --- include/classes/view.class.php | 1 - style/FeatherBB/view/header.new.php | 48 ++++++++++++++++++++++++++--- 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 3613c622..8dc57d74 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -21,7 +21,6 @@ class View 'focus_element' => 'strval', 'is_indexed' => 'boolval', 'admin_console' => 'boolval', - 'page_head' => 'strval', 'paging_links' => 'strval', 'required_fields' => 'strval', 'has_reports' => 'boolval', diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php index 60742ffb..3066b926 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/FeatherBB/view/header.new.php @@ -74,17 +74,57 @@ function process_form(the_form) ?> -> - +>
    -
    + + + + + From a1095263b6acc623b2d5194b91da2d5daa710c86 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 13:41:30 +0200 Subject: [PATCH 175/353] Fix typos in footer.php --- style/FeatherBB/view/footer.new.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/style/FeatherBB/view/footer.new.php b/style/FeatherBB/view/footer.new.php index ace935f3..7a7bf6f2 100644 --- a/style/FeatherBB/view/footer.new.php +++ b/style/FeatherBB/view/footer.new.php @@ -100,9 +100,9 @@ } } elseif ($footer_style == 'viewtopic') { if ($feather->forum_settings['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } From c5ee908cee671d30be1e75339f87806cbec04c0e Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 13:47:04 +0200 Subject: [PATCH 176/353] Fix indendation and render header/footer in view class --- include/classes/view.class.php | 2 ++ style/FeatherBB/view/header.new.php | 43 ++++++++++++++--------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index c240e44c..0463f988 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -248,7 +248,9 @@ protected function render($template, $data = null) $data = $this->app->hooks->fire('view.alter_data', $data); extract($data); ob_start(); + require $this->getTemplatePathname('header.new.php'); require $this->getTemplatePathname($template); + require $this->getTemplatePathname('footer.new.php'); return ob_get_clean(); } diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php index 70b8da63..262af7fb 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/FeatherBB/view/header.new.php @@ -186,34 +186,33 @@ function process_form(the_form)
    user->g_read_board == '1' && $feather->forum_settings['o_announcement'] == '1') : ?> -
    -

    -
    -
    -
    forum_settings['o_announcement_message'] ?>
    -
    +
    +

    +
    +
    +
    forum_settings['o_announcement_message'] ?>
    +
    - - -
    -

    ×

    -

    -
    + + +
    +

    ×

    +

    +
    -
    From 9f151bbb2a6f86b8d93bc3f5ae4c42f5d1faa826 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 14:03:43 +0200 Subject: [PATCH 177/353] First draft of asset manager --- include/classes/view.class.php | 23 ++++++++++++++++++++--- style/FeatherBB/view/header.new.php | 6 ++++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 0463f988..8b801cf1 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -11,10 +11,11 @@ class View { - protected $data, - $templatesDirectory, + protected $templatesDirectory, $app, + $data, $page, + $assets, $validation = array( 'page_number' => 'intval', 'active_page' => 'strval', @@ -244,7 +245,7 @@ public function fetch($template, $data = null) */ protected function render($template, $data = null) { - $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), array('feather' => \Slim\Slim::getInstance()), (array) $data); + $data = array_merge($this->getDefaultPageInfo(), array('assets' => $this->assets), $this->page->all(), $this->data->all(), array('feather' => \Slim\Slim::getInstance()), (array) $data); $data = $this->app->hooks->fire('view.alter_data', $data); extract($data); ob_start(); @@ -264,6 +265,7 @@ public function setStyle($style) } $this->data->set('style', (string) $style); $this->setTemplatesDirectory($this->app->forum_env['FEATHER_ROOT'].'style/'.$style.'/view'); + $this->addAsset('css', 'style/'.$style.'.css'); return $this; } @@ -320,5 +322,20 @@ protected function getDefaultPageInfo() 'tid' => null, ); } + + public function addAsset($type, $asset, $params = null) + { + $type = (string) $type; + if (!in_array($type, array('js', 'css'))) { + throw new \Exception('Invalid asset type : ' . $type); + } + if (!is_file($this->app->forum_env['FEATHER_ROOT'].$asset)) { + throw new \Exception('The asset file ' . $asset . ' does not exist'); + } + $this->assets[$type][] = array( + 'file' => $asset, + 'params' => $params + ); + } } ?> diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php index 262af7fb..0761df89 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/FeatherBB/view/header.new.php @@ -19,8 +19,10 @@ echo "\t".''."\n"; } ?> <?php echo generate_page_title($title, $page_number) ?> - -'."\n"; +} +if ($admin_console) { if (file_exists($feather->forum_env['FEATHER_ROOT'].'style/'.$feather->user->style.'/base_admin.css')) { echo "\t".''."\n"; } else { From 13446be85115fb133244420c7940a0041e4342cb Mon Sep 17 00:00:00 2001 From: adaur Date: Wed, 26 Aug 2015 16:11:51 +0200 Subject: [PATCH 178/353] Email class --- include/classes/core.class.php | 4 + include/classes/email.class.php | 404 +++++++++++++++++++++++++++++++ include/email.php | 406 -------------------------------- include/utf8/utf8.php | 2 +- model/admin/bans.php | 5 +- model/admin/options.php | 8 +- model/login.php | 7 +- model/misc.php | 9 +- model/post.php | 29 +-- model/profile.php | 17 +- model/register.php | 15 +- 11 files changed, 446 insertions(+), 460 deletions(-) create mode 100644 include/classes/email.class.php delete mode 100644 include/email.php diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 35a94725..47de4a4c 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -48,6 +48,7 @@ public function __construct(array $data) require $this->forum_env['FEATHER_ROOT'].'include/classes/database.class.php'; require $this->forum_env['FEATHER_ROOT'].'include/classes/cache.class.php'; require $this->forum_env['FEATHER_ROOT'].'include/classes/hooks.class.php'; + require $this->forum_env['FEATHER_ROOT'].'include/classes/email.class.php'; require $this->forum_env['FEATHER_ROOT'].'plugins/test/plugintest.php'; // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) @@ -231,6 +232,9 @@ public function call() $this->app->hooks = new \FeatherBB\Hooks(); new \plugin\plugintest(); // TODO: remove + // Email + $this->app->email = new \FeatherBB\Email(); + // Define time formats $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); $forum_date_formats = array($this->forum_settings['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); diff --git a/include/classes/email.class.php b/include/classes/email.class.php new file mode 100644 index 00000000..4c6b7869 --- /dev/null +++ b/include/classes/email.class.php @@ -0,0 +1,404 @@ +feather = \Slim\Slim::getInstance(); + $this->config = $this->feather->config; + require FEATHER_ROOT . 'include/utf8/utils/ascii.php'; + } + + // + // Validate an email address + // + public function is_valid_email($email) + { + if (strlen($email) > 80) { + return false; + } + + return preg_match('%^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|("[^"]+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$%', $email); + } + + + // + // Check if $email is banned + // + public function is_banned_email($email) + { + global $feather_bans; + + foreach ($feather_bans as $cur_ban) { + if ($cur_ban['email'] != '' && + ($email == $cur_ban['email'] || + (strpos($cur_ban['email'], '@') === false && stristr($email, '@' . $cur_ban['email']))) + ) { + return true; + } + } + + return false; + } + + + // + // Only encode with base64, if there is at least one unicode character in the string + // + public function encode_mail_text($str) + { + if (utf8_is_ascii($str)) { + return $str; + } + + return '=?UTF-8?B?' . base64_encode($str) . '?='; + } + + // + // Extract blocks from a text with a starting and ending string + // This public function always matches the most outer block so nesting is possible + // + public function extract_blocks($text, $start, $end, $retab = true) + { + $code = array(); + $start_len = strlen($start); + $end_len = strlen($end); + $regex = '%(?:' . preg_quote($start, '%') . '|' . preg_quote($end, '%') . ')%'; + $matches = array(); + + if (preg_match_all($regex, $text, $matches)) { + $counter = $offset = 0; + $start_pos = $end_pos = false; + + foreach ($matches[0] as $match) { + if ($match == $start) { + if ($counter == 0) { + $start_pos = strpos($text, $start); + } + $counter++; + } elseif ($match == $end) { + $counter--; + if ($counter == 0) { + $end_pos = strpos($text, $end, $offset + 1); + } + $offset = strpos($text, $end, $offset + 1); + } + + if ($start_pos !== false && $end_pos !== false) { + $code[] = substr($text, $start_pos + $start_len, + $end_pos - $start_pos - $start_len); + $text = substr_replace($text, "\1", $start_pos, + $end_pos - $start_pos + $end_len); + $start_pos = $end_pos = false; + $offset = 0; + } + } + } + + if ($this->config['o_indent_num_spaces'] != 8 && $retab) { + $spaces = str_repeat(' ', $this->config['o_indent_num_spaces']); + $text = str_replace("\t", $spaces, $text); + } + + return array($code, $text); + } + + + // + // Make a post email safe + // + public function bbcode2email($text, $wrap_length = 72) + { + static $base_url; + + if (!isset($base_url)) { + $base_url = get_base_url(); + } + + $text = feather_trim($text, "\t\n "); + + $shortcut_urls = array( + 'topic' => '/topic/$1/', + 'post' => '/post/$1/#p$1', + 'forum' => '/forum/$1/', + 'user' => '/user/$1/', + ); + + // Split code blocks and text so BBcode in codeblocks won't be touched + list($code, $text) = $this->extract_blocks($text, '[code]', '[/code]'); + + // Strip all bbcodes, except the quote, url, img, email, code and list items bbcodes + $text = preg_replace(array( + '%\[/?(?!(?:quote|url|topic|post|user|forum|img|email|code|list|\*))[a-z]+(?:=[^\]]+)?\]%i', + '%\n\[/?list(?:=[^\]]+)?\]%i' // A separate regex for the list tags to get rid of some whitespace + ), '', $text); + + // Match the deepest nested bbcode + // An adapted example from Mastering Regular Expressions + $match_quote_regex = '% + \[(quote|\*|url|img|email|topic|post|user|forum)(?:=([^\]]+))?\] + ( + (?>[^\[]*) + (?> + (?!\[/?\1(?:=[^\]]+)?\]) + \[ + [^\[]* + )* + ) + \[/\1\] + %ix'; + + $url_index = 1; + $url_stack = array(); + while (preg_match($match_quote_regex, $text, $matches)) { + // Quotes + if ($matches[1] == 'quote') { + // Put '>' or '> ' at the start of a line + $replacement = preg_replace( + array('%^(?=\>)%m', '%^(?!\>)%m'), + array('>', '> '), + $matches[2] . " said:\n" . $matches[3]); + } // List items + elseif ($matches[1] == '*') { + $replacement = ' * ' . $matches[3]; + } // URLs and emails + elseif (in_array($matches[1], array('url', 'email'))) { + if (!empty($matches[2])) { + $replacement = '[' . $matches[3] . '][' . $url_index . ']'; + $url_stack[$url_index] = $matches[2]; + $url_index++; + } else { + $replacement = '[' . $matches[3] . ']'; + } + } // Images + elseif ($matches[1] == 'img') { + if (!empty($matches[2])) { + $replacement = '[' . $matches[2] . '][' . $url_index . ']'; + } else { + $replacement = '[' . basename($matches[3]) . '][' . $url_index . ']'; + } + + $url_stack[$url_index] = $matches[3]; + $url_index++; + } // Topic, post, forum and user URLs + elseif (in_array($matches[1], array('topic', 'post', 'forum', 'user'))) { + $url = isset($shortcut_urls[$matches[1]]) ? $base_url . $shortcut_urls[$matches[1]] : ''; + + if (!empty($matches[2])) { + $replacement = '[' . $matches[3] . '][' . $url_index . ']'; + $url_stack[$url_index] = str_replace('$1', $matches[2], $url); + $url_index++; + } else { + $replacement = '[' . str_replace('$1', $matches[3], $url) . ']'; + } + } + + // Update the main text if there is a replacement + if (!is_null($replacement)) { + $text = str_replace($matches[0], $replacement, $text); + $replacement = null; + } + } + + // Put code blocks and text together + if (isset($code)) { + $parts = explode("\1", $text); + $text = ''; + foreach ($parts as $i => $part) { + $text .= $part; + if (isset($code[$i])) { + $text .= trim($code[$i], "\n\r"); + } + } + } + + // Put URLs at the bottom + if ($url_stack) { + $text .= "\n\n"; + foreach ($url_stack as $i => $url) { + $text .= "\n" . ' [' . $i . ']: ' . $url; + } + } + + // Wrap lines if $wrap_length is higher than -1 + if ($wrap_length > -1) { + // Split all lines and wrap them individually + $parts = explode("\n", $text); + foreach ($parts as $k => $part) { + preg_match('%^(>+ )?(.*)%', $part, $matches); + $parts[$k] = wordwrap($matches[1] . $matches[2], $wrap_length - + strlen($matches[1]), "\n" . $matches[1]); + } + + return implode("\n", $parts); + } else { + return $text; + } + } + + + // + // Wrapper for PHP's mail() + // + public function feather_mail($to, $subject, $message, $reply_to_email = '', $reply_to_name = '') + { + // Define line breaks in mail headers; possible values can be PHP_EOL, "\r\n", "\n" or "\r" + if (!defined('FORUM_EOL')) + { + define('FORUM_EOL', PHP_EOL); + } + + // Use \r\n for SMTP servers, the system's line ending for local mailers + $smtp = $this->config['o_smtp_host'] != ''; + $EOL = $smtp ? "\r\n" : FORUM_EOL; + + // Default sender/return address + $from_name = sprintf(__('Mailer'), $this->config['o_board_title']); + $from_email = $this->config['o_webmaster_email']; + + // Do a little spring cleaning + $to = feather_trim(preg_replace('%[\n\r]+%s', '', $to)); + $subject = feather_trim(preg_replace('%[\n\r]+%s', '', $subject)); + $from_email = feather_trim(preg_replace('%[\n\r:]+%s', '', $from_email)); + $from_name = feather_trim(preg_replace('%[\n\r:]+%s', '', str_replace('"', '', $from_name))); + $reply_to_email = feather_trim(preg_replace('%[\n\r:]+%s', '', $reply_to_email)); + $reply_to_name = feather_trim(preg_replace('%[\n\r:]+%s', '', str_replace('"', '', $reply_to_name))); + + // Set up some headers to take advantage of UTF-8 + $from = '"' . $this->encode_mail_text($from_name) . '" <' . $from_email . '>'; + $subject = $this->encode_mail_text($subject); + + $headers = 'From: ' . $from . $EOL . 'Date: ' . gmdate('r') . $EOL . 'MIME-Version: 1.0' . $EOL . 'Content-transfer-encoding: 8bit' . $EOL . 'Content-type: text/plain; charset=utf-8' . $EOL . 'X-Mailer: FeatherBB Mailer'; + + // If we specified a reply-to email, we deal with it here + if (!empty($reply_to_email)) { + $reply_to = '"' . $this->encode_mail_text($reply_to_name) . '" <' . $reply_to_email . '>'; + + $headers .= $EOL . 'Reply-To: ' . $reply_to; + } + + // Make sure all linebreaks are LF in message (and strip out any NULL bytes) + $message = str_replace("\0", '', feather_linebreaks($message)); + $message = str_replace("\n", $EOL, $message); + + if ($smtp) { + $this->smtp_mail($to, $subject, $message, $headers); + } + else { + mail($to, $subject, $message, $headers); + } + } + + + // + // This public function was originally a part of the phpBB Group forum software phpBB2 (http://www.phpbb.com) + // They deserve all the credit for writing it. I made small modifications for it to suit PunBB and its coding standards + // + public function server_parse($socket, $expected_response) + { + $server_response = ''; + while (substr($server_response, 3, 1) != ' ') { + if (!($server_response = fgets($socket, 256))) { + message('Couldn\'t get mail server response codes. Please contact the forum administrator.', __FILE__, __LINE__); + } + } + + if (!(substr($server_response, 0, 3) == $expected_response)) { + message('Unable to send email. Please contact the forum administrator with the following error message reported by the SMTP server: "' . $server_response . '"', __FILE__, __LINE__); + } + } + + + // + // This public function was originally a part of the phpBB Group forum software phpBB2 (http://www.phpbb.com) + // They deserve all the credit for writing it. I made small modifications for it to suit PunBB and its coding standards. + // + public function smtp_mail($to, $subject, $message, $headers = '') + { + static $local_host; + + $recipients = explode(',', $to); + + // Sanitize the message + $message = str_replace("\r\n.", "\r\n..", $message); + $message = (substr($message, 0, 1) == '.' ? '.' . $message : $message); + + // Are we using port 25 or a custom port? + if (strpos($this->config['o_smtp_host'], ':') !== false) { + list($smtp_host, $smtp_port) = explode(':', $this->config['o_smtp_host']); + } else { + $smtp_host = $this->config['o_smtp_host']; + $smtp_port = 25; + } + + if ($this->config['o_smtp_ssl'] == '1') { + $smtp_host = 'ssl://' . $smtp_host; + } + + if (!($socket = fsockopen($smtp_host, $smtp_port, $errno, $errstr, 15))) { + message('Could not connect to smtp host "' . $this->config['o_smtp_host'] . '" (' . $errno . ') (' . $errstr . ')', __FILE__, __LINE__); + } + + $this->server_parse($socket, '220'); + + if (!isset($local_host)) { + // Here we try to determine the *real* hostname (reverse DNS entry preferably) + $local_host = php_uname('n'); + + // Able to resolve name to IP + if (($local_addr = @gethostbyname($local_host)) !== $local_host) { + // Able to resolve IP back to name + if (($local_name = @gethostbyaddr($local_addr)) !== $local_addr) { + $local_host = $local_name; + } + } + } + + if ($this->config['o_smtp_user'] != '' && $this->config['o_smtp_pass'] != '') { + fwrite($socket, 'EHLO ' . $local_host . "\r\n"); + $this->server_parse($socket, '250'); + + fwrite($socket, 'AUTH LOGIN' . "\r\n"); + $this->server_parse($socket, '334'); + + fwrite($socket, base64_encode($this->config['o_smtp_user']) . "\r\n"); + $this->server_parse($socket, '334'); + + fwrite($socket, base64_encode($this->config['o_smtp_pass']) . "\r\n"); + $this->server_parse($socket, '235'); + } else { + fwrite($socket, 'HELO ' . $local_host . "\r\n"); + $this->server_parse($socket, '250'); + } + + fwrite($socket, 'MAIL FROM: <' . $this->config['o_webmaster_email'] . '>' . "\r\n"); + $this->server_parse($socket, '250'); + + foreach ($recipients as $email) { + fwrite($socket, 'RCPT TO: <' . $email . '>' . "\r\n"); + $this->server_parse($socket, '250'); + } + + fwrite($socket, 'DATA' . "\r\n"); + $this->server_parse($socket, '354'); + + fwrite($socket, 'Subject: ' . $subject . "\r\n" . 'To: <' . implode('>, <', $recipients) . '>' . "\r\n" . $headers . "\r\n\r\n" . $message . "\r\n"); + + fwrite($socket, '.' . "\r\n"); + $this->server_parse($socket, '250'); + + fwrite($socket, 'QUIT' . "\r\n"); + fclose($socket); + + return true; + } +} \ No newline at end of file diff --git a/include/email.php b/include/email.php deleted file mode 100644 index 3281d9eb..00000000 --- a/include/email.php +++ /dev/null @@ -1,406 +0,0 @@ - 80) { - return false; - } - - return preg_match('%^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|("[^"]+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$%', $email); -} - - -// -// Check if $email is banned -// -function is_banned_email($email) -{ - global $feather_bans; - - foreach ($feather_bans as $cur_ban) { - if ($cur_ban['email'] != '' && - ($email == $cur_ban['email'] || - (strpos($cur_ban['email'], '@') === false && stristr($email, '@'.$cur_ban['email'])))) { - return true; - } - } - - return false; -} - - -// -// Only encode with base64, if there is at least one unicode character in the string -// -function encode_mail_text($str) -{ - if (utf8_is_ascii($str)) { - return $str; - } - - return '=?UTF-8?B?'.base64_encode($str).'?='; -} - -// -// Extract blocks from a text with a starting and ending string -// This function always matches the most outer block so nesting is possible -// -function extract_blocks($text, $start, $end, $retab = true) -{ - global $feather_config; - - $code = array(); - $start_len = strlen($start); - $end_len = strlen($end); - $regex = '%(?:'.preg_quote($start, '%').'|'.preg_quote($end, '%').')%'; - $matches = array(); - - if (preg_match_all($regex, $text, $matches)) { - $counter = $offset = 0; - $start_pos = $end_pos = false; - - foreach ($matches[0] as $match) { - if ($match == $start) { - if ($counter == 0) { - $start_pos = strpos($text, $start); - } - $counter++; - } elseif ($match == $end) { - $counter--; - if ($counter == 0) { - $end_pos = strpos($text, $end, $offset + 1); - } - $offset = strpos($text, $end, $offset + 1); - } - - if ($start_pos !== false && $end_pos !== false) { - $code[] = substr($text, $start_pos + $start_len, - $end_pos - $start_pos - $start_len); - $text = substr_replace($text, "\1", $start_pos, - $end_pos - $start_pos + $end_len); - $start_pos = $end_pos = false; - $offset = 0; - } - } - } - - if ($feather_config['o_indent_num_spaces'] != 8 && $retab) { - $spaces = str_repeat(' ', $feather_config['o_indent_num_spaces']); - $text = str_replace("\t", $spaces, $text); - } - - return array($code, $text); -} - - -// -// Make a post email safe -// -function bbcode2email($text, $wrap_length = 72) -{ - static $base_url; - - if (!isset($base_url)) { - $base_url = get_base_url(); - } - - $text = feather_trim($text, "\t\n "); - - $shortcut_urls = array( - 'topic' => '/topic/$1/', - 'post' => '/post/$1/#p$1', - 'forum' => '/forum/$1/', - 'user' => '/user/$1/', - ); - - // Split code blocks and text so BBcode in codeblocks won't be touched - list($code, $text) = extract_blocks($text, '[code]', '[/code]'); - - // Strip all bbcodes, except the quote, url, img, email, code and list items bbcodes - $text = preg_replace(array( - '%\[/?(?!(?:quote|url|topic|post|user|forum|img|email|code|list|\*))[a-z]+(?:=[^\]]+)?\]%i', - '%\n\[/?list(?:=[^\]]+)?\]%i' // A separate regex for the list tags to get rid of some whitespace - ), '', $text); - - // Match the deepest nested bbcode - // An adapted example from Mastering Regular Expressions - $match_quote_regex = '% - \[(quote|\*|url|img|email|topic|post|user|forum)(?:=([^\]]+))?\] - ( - (?>[^\[]*) - (?> - (?!\[/?\1(?:=[^\]]+)?\]) - \[ - [^\[]* - )* - ) - \[/\1\] - %ix'; - - $url_index = 1; - $url_stack = array(); - while (preg_match($match_quote_regex, $text, $matches)) { - // Quotes - if ($matches[1] == 'quote') { - // Put '>' or '> ' at the start of a line - $replacement = preg_replace( - array('%^(?=\>)%m', '%^(?!\>)%m'), - array('>', '> '), - $matches[2]." said:\n".$matches[3]); - } - - // List items - elseif ($matches[1] == '*') { - $replacement = ' * '.$matches[3]; - } - - // URLs and emails - elseif (in_array($matches[1], array('url', 'email'))) { - if (!empty($matches[2])) { - $replacement = '['.$matches[3].']['.$url_index.']'; - $url_stack[$url_index] = $matches[2]; - $url_index++; - } else { - $replacement = '['.$matches[3].']'; - } - } - - // Images - elseif ($matches[1] == 'img') { - if (!empty($matches[2])) { - $replacement = '['.$matches[2].']['.$url_index.']'; - } else { - $replacement = '['.basename($matches[3]).']['.$url_index.']'; - } - - $url_stack[$url_index] = $matches[3]; - $url_index++; - } - - // Topic, post, forum and user URLs - elseif (in_array($matches[1], array('topic', 'post', 'forum', 'user'))) { - $url = isset($shortcut_urls[$matches[1]]) ? $base_url.$shortcut_urls[$matches[1]] : ''; - - if (!empty($matches[2])) { - $replacement = '['.$matches[3].']['.$url_index.']'; - $url_stack[$url_index] = str_replace('$1', $matches[2], $url); - $url_index++; - } else { - $replacement = '['.str_replace('$1', $matches[3], $url).']'; - } - } - - // Update the main text if there is a replacement - if (!is_null($replacement)) { - $text = str_replace($matches[0], $replacement, $text); - $replacement = null; - } - } - - // Put code blocks and text together - if (isset($code)) { - $parts = explode("\1", $text); - $text = ''; - foreach ($parts as $i => $part) { - $text .= $part; - if (isset($code[$i])) { - $text .= trim($code[$i], "\n\r"); - } - } - } - - // Put URLs at the bottom - if ($url_stack) { - $text .= "\n\n"; - foreach ($url_stack as $i => $url) { - $text .= "\n".' ['.$i.']: '.$url; - } - } - - // Wrap lines if $wrap_length is higher than -1 - if ($wrap_length > -1) { - // Split all lines and wrap them individually - $parts = explode("\n", $text); - foreach ($parts as $k => $part) { - preg_match('%^(>+ )?(.*)%', $part, $matches); - $parts[$k] = wordwrap($matches[1].$matches[2], $wrap_length - - strlen($matches[1]), "\n".$matches[1]); - } - - return implode("\n", $parts); - } else { - return $text; - } -} - - -// -// Wrapper for PHP's mail() -// -function feather_mail($to, $subject, $message, $reply_to_email = '', $reply_to_name = '') -{ - global $feather_config; - - // Use \r\n for SMTP servers, the system's line ending for local mailers - $smtp = $feather_config['o_smtp_host'] != ''; - $EOL = $smtp ? "\r\n" : FORUM_EOL; - - // Default sender/return address - $from_name = sprintf(__('Mailer'), $feather_config['o_board_title']); - $from_email = $feather_config['o_webmaster_email']; - - // Do a little spring cleaning - $to = feather_trim(preg_replace('%[\n\r]+%s', '', $to)); - $subject = feather_trim(preg_replace('%[\n\r]+%s', '', $subject)); - $from_email = feather_trim(preg_replace('%[\n\r:]+%s', '', $from_email)); - $from_name = feather_trim(preg_replace('%[\n\r:]+%s', '', str_replace('"', '', $from_name))); - $reply_to_email = feather_trim(preg_replace('%[\n\r:]+%s', '', $reply_to_email)); - $reply_to_name = feather_trim(preg_replace('%[\n\r:]+%s', '', str_replace('"', '', $reply_to_name))); - - // Set up some headers to take advantage of UTF-8 - $from = '"'.encode_mail_text($from_name).'" <'.$from_email.'>'; - $subject = encode_mail_text($subject); - - $headers = 'From: '.$from.$EOL.'Date: '.gmdate('r').$EOL.'MIME-Version: 1.0'.$EOL.'Content-transfer-encoding: 8bit'.$EOL.'Content-type: text/plain; charset=utf-8'.$EOL.'X-Mailer: FeatherBB Mailer'; - - // If we specified a reply-to email, we deal with it here - if (!empty($reply_to_email)) { - $reply_to = '"'.encode_mail_text($reply_to_name).'" <'.$reply_to_email.'>'; - - $headers .= $EOL.'Reply-To: '.$reply_to; - } - - // Make sure all linebreaks are LF in message (and strip out any NULL bytes) - $message = str_replace("\0", '', feather_linebreaks($message)); - $message = str_replace("\n", $EOL, $message); - - $mailer = $smtp ? 'smtp_mail' : 'mail'; - $mailer($to, $subject, $message, $headers); -} - - -// -// This function was originally a part of the phpBB Group forum software phpBB2 (http://www.phpbb.com) -// They deserve all the credit for writing it. I made small modifications for it to suit PunBB and its coding standards -// -function server_parse($socket, $expected_response) -{ - $server_response = ''; - while (substr($server_response, 3, 1) != ' ') { - if (!($server_response = fgets($socket, 256))) { - error('Couldn\'t get mail server response codes. Please contact the forum administrator.', __FILE__, __LINE__); - } - } - - if (!(substr($server_response, 0, 3) == $expected_response)) { - error('Unable to send email. Please contact the forum administrator with the following error message reported by the SMTP server: "'.$server_response.'"', __FILE__, __LINE__); - } -} - - -// -// This function was originally a part of the phpBB Group forum software phpBB2 (http://www.phpbb.com) -// They deserve all the credit for writing it. I made small modifications for it to suit PunBB and its coding standards. -// -function smtp_mail($to, $subject, $message, $headers = '') -{ - global $feather_config; - static $local_host; - - $recipients = explode(',', $to); - - // Sanitize the message - $message = str_replace("\r\n.", "\r\n..", $message); - $message = (substr($message, 0, 1) == '.' ? '.'.$message : $message); - - // Are we using port 25 or a custom port? - if (strpos($feather_config['o_smtp_host'], ':') !== false) { - list($smtp_host, $smtp_port) = explode(':', $feather_config['o_smtp_host']); - } else { - $smtp_host = $feather_config['o_smtp_host']; - $smtp_port = 25; - } - - if ($feather_config['o_smtp_ssl'] == '1') { - $smtp_host = 'ssl://'.$smtp_host; - } - - if (!($socket = fsockopen($smtp_host, $smtp_port, $errno, $errstr, 15))) { - error('Could not connect to smtp host "'.$feather_config['o_smtp_host'].'" ('.$errno.') ('.$errstr.')', __FILE__, __LINE__); - } - - server_parse($socket, '220'); - - if (!isset($local_host)) { - // Here we try to determine the *real* hostname (reverse DNS entry preferably) - $local_host = php_uname('n'); - - // Able to resolve name to IP - if (($local_addr = @gethostbyname($local_host)) !== $local_host) { - // Able to resolve IP back to name - if (($local_name = @gethostbyaddr($local_addr)) !== $local_addr) { - $local_host = $local_name; - } - } - } - - if ($feather_config['o_smtp_user'] != '' && $feather_config['o_smtp_pass'] != '') { - fwrite($socket, 'EHLO '.$local_host."\r\n"); - server_parse($socket, '250'); - - fwrite($socket, 'AUTH LOGIN'."\r\n"); - server_parse($socket, '334'); - - fwrite($socket, base64_encode($feather_config['o_smtp_user'])."\r\n"); - server_parse($socket, '334'); - - fwrite($socket, base64_encode($feather_config['o_smtp_pass'])."\r\n"); - server_parse($socket, '235'); - } else { - fwrite($socket, 'HELO '.$local_host."\r\n"); - server_parse($socket, '250'); - } - - fwrite($socket, 'MAIL FROM: <'.$feather_config['o_webmaster_email'].'>'."\r\n"); - server_parse($socket, '250'); - - foreach ($recipients as $email) { - fwrite($socket, 'RCPT TO: <'.$email.'>'."\r\n"); - server_parse($socket, '250'); - } - - fwrite($socket, 'DATA'."\r\n"); - server_parse($socket, '354'); - - fwrite($socket, 'Subject: '.$subject."\r\n".'To: <'.implode('>, <', $recipients).'>'."\r\n".$headers."\r\n\r\n".$message."\r\n"); - - fwrite($socket, '.'."\r\n"); - server_parse($socket, '250'); - - fwrite($socket, 'QUIT'."\r\n"); - fclose($socket); - - return true; -} diff --git a/include/utf8/utf8.php b/include/utf8/utf8.php index c80a0dce..7f0a2b45 100644 --- a/include/utf8/utf8.php +++ b/include/utf8/utf8.php @@ -4,7 +4,7 @@ * This is the dynamic loader for the library. It checks whether you have * the mbstring extension available and includes relevant files * on that basis, falling back to the native (as in written in PHP) version -* if mbstring is unavailabe. +* if mbstring is unavailable. * * It's probably easiest to use this, if you don't want to understand * the dependencies involved, in conjunction with PHP versions etc. At diff --git a/model/admin/bans.php b/model/admin/bans.php index b7b8fa11..1fd0a997 100644 --- a/model/admin/bans.php +++ b/model/admin/bans.php @@ -21,6 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->hook = $this->feather->hooks; + $this->email = $this->feather->email; } public function add_ban_info($id = null) @@ -218,9 +219,7 @@ public function insert_ban() $ban_ip = implode(' ', $addresses); } - require FEATHER_ROOT.'include/email.php'; - - if ($ban_email != '' && !is_valid_email($ban_email)) { + if ($ban_email != '' && !$this->email->is_valid_email($ban_email)) { if (!preg_match('%^[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,63})$%', $ban_email)) { message(__('Invalid e-mail message')); } diff --git a/model/admin/options.php b/model/admin/options.php index 0ba912ed..18749061 100644 --- a/model/admin/options.php +++ b/model/admin/options.php @@ -21,6 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->hook = $this->feather->hooks; + $this->email = $this->feather->email; } public function update_options() @@ -125,14 +126,11 @@ public function update_options() $form['date_format'] = 'Y-m-d'; } - - require FEATHER_ROOT.'include/email.php'; - - if (!is_valid_email($form['admin_email'])) { + if (!$this->email->is_valid_email($form['admin_email'])) { message(__('Invalid e-mail message')); } - if (!is_valid_email($form['webmaster_email'])) { + if (!$this->email->is_valid_email($form['webmaster_email'])) { message(__('Invalid webmaster e-mail message')); } diff --git a/model/login.php b/model/login.php index d845dcce..0aa32a04 100644 --- a/model/login.php +++ b/model/login.php @@ -21,6 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->hook = $this->feather->hooks; + $this->email = $this->feather->email; } public function login() @@ -127,11 +128,9 @@ public function password_forgotten() $errors = array(); if ($this->feather->request()->isPost()) { - require FEATHER_ROOT.'include/email.php'; - // Validate the email address $email = strtolower(feather_trim($this->request->post('req_email'))); - if (!is_valid_email($email)) { + if (!$this->email->is_valid_email($email)) { $errors[] = __('Invalid email'); } @@ -190,7 +189,7 @@ public function password_forgotten() $cur_mail_message = str_replace('', $new_password, $cur_mail_message); $cur_mail_message = $this->hook->fire('cur_mail_message_password_forgotten', $cur_mail_message); - feather_mail($email, $mail_subject, $cur_mail_message); + $this->email->feather_mail($email, $mail_subject, $cur_mail_message); } message(__('Forget mail').' '.feather_escape($this->config['o_admin_email']).'.', true); diff --git a/model/misc.php b/model/misc.php index e24ccd93..96479d42 100644 --- a/model/misc.php +++ b/model/misc.php @@ -21,6 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->hook = $this->feather->hooks; + $this->email = $this->feather->email; } public function update_last_visit() @@ -97,9 +98,7 @@ public function send_email($mail) $mail_message = $this->hook->fire('send_email_mail_message', $mail_message); - require_once FEATHER_ROOT.'include/email.php'; - - feather_mail($mail['recipient_email'], $mail_subject, $mail_message, $this->user->email, $this->user->username); + $this->email->feather_mail($mail['recipient_email'], $mail_subject, $mail_message, $this->user->email, $this->user->username); $update_last_mail_sent = DB::for_table('users')->where('id', $this->user->id) ->find_one() @@ -212,9 +211,7 @@ public function insert_report($post_id) $mail_message = $this->hook->fire('insert_report_mail_message', $mail_message); - require FEATHER_ROOT.'include/email.php'; - - feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + $this->email->feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } diff --git a/model/post.php b/model/post.php index f4f096cf..2e8d2737 100644 --- a/model/post.php +++ b/model/post.php @@ -21,6 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->hook = $this->feather->hooks; + $this->email = $this->feather->email; } // Get some info about the post @@ -131,17 +132,15 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) $email = strtolower(feather_trim(($this->config['p_force_guest_email'] == '1') ? $this->request->post('req_email') : $this->request->post('email'))); if ($this->config['p_force_guest_email'] == '1' || $email != '') { - require FEATHER_ROOT.'include/email.php'; - $errors = $this->hook->fire('check_errors_before_post_email', $errors, $email); - if (!is_valid_email($email)) { + if (!$this->email->is_valid_email($email)) { $errors[] = __('Invalid email'); } // Check if it's a banned email address // we should only check guests because members' addresses are already verified - if ($this->user->is_guest && is_banned_email($email)) { + if ($this->user->is_guest && $this->email->is_banned_email($email)) { if ($this->config['p_allow_banned_email'] == '0') { $errors[] = __('Banned email'); } @@ -372,16 +371,14 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) $result = $result->find_many(); if ($result) { - require_once FEATHER_ROOT.'include/email.php'; - $notification_emails = array(); $censored_message = feather_trim(censor_words($post['message'])); if ($this->config['o_censoring'] == '1') { - $cleaned_message = bbcode2email($censored_message, -1); + $cleaned_message = $this->email->bbcode2email($censored_message, -1); } else { - $cleaned_message = bbcode2email($post['message'], -1); + $cleaned_message = $this->email->bbcode2email($post['message'], -1); } // Loop through subscribed users and send emails @@ -436,9 +433,9 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) // We have to double check here because the templates could be missing if (isset($notification_emails[$cur_subscriber['language']])) { if ($cur_subscriber['notify_with_post'] == '0') { - feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]); + $this->email->feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]); } else { - feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][2], $notification_emails[$cur_subscriber['language']][3]); + $this->email->feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][2], $notification_emails[$cur_subscriber['language']][3]); } } } @@ -581,17 +578,15 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) $result = $result->find_many(); if ($result) { - require_once FEATHER_ROOT.'include/email.php'; - $notification_emails = array(); $censored_message = feather_trim(censor_words($post['message'])); $censored_subject = feather_trim(censor_words($post['subject'])); if ($this->config['o_censoring'] == '1') { - $cleaned_message = bbcode2email($censored_message, -1); + $cleaned_message = $this->email->bbcode2email($censored_message, -1); } else { - $cleaned_message = bbcode2email($post['message'], -1); + $cleaned_message = $this->email->bbcode2email($post['message'], -1); } // Loop through subscribed users and send emails @@ -644,9 +639,9 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) // We have to double check here because the templates could be missing if (isset($notification_emails[$cur_subscriber['language']])) { if ($cur_subscriber['notify_with_post'] == '0') { - feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]); + $this->email->feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]); } else { - feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][2], $notification_emails[$cur_subscriber['language']][3]); + $this->email->feather_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][2], $notification_emails[$cur_subscriber['language']][3]); } } } @@ -677,7 +672,7 @@ public function warn_banned_user($post, $new_pid) $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('warn_banned_user_mail_message', $mail_message); - feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + $this->email->feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } // Increment post count, change group if needed diff --git a/model/profile.php b/model/profile.php index 62a5809b..e4a1aae6 100644 --- a/model/profile.php +++ b/model/profile.php @@ -21,6 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->hook = $this->feather->hooks; + $this->email = $this->feather->email; } public function change_pass($id) @@ -200,17 +201,15 @@ public function change_email($id) message(__('Wrong pass')); } - require FEATHER_ROOT.'include/email.php'; - // Validate the email address $new_email = strtolower(feather_trim($this->request->post('req_new_email'))); $new_email = $this->hook->fire('change_email_new_email', $new_email); - if (!is_valid_email($new_email)) { + if (!$this->email->is_valid_email($new_email)) { message(__('Invalid email')); } // Check if it's a banned email address - if (is_banned_email($new_email)) { + if ($this->email->is_banned_email($new_email)) { if ($this->config['p_allow_banned_email'] == '0') { message(__('Banned email')); } elseif ($this->config['o_mailing_list'] != '') { @@ -230,7 +229,7 @@ public function change_email($id) $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_message', $mail_message); - feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + $this->email->feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } @@ -267,7 +266,7 @@ public function change_email($id) $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_dupe_message', $mail_message); - feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + $this->email->feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } @@ -304,7 +303,7 @@ public function change_email($id) $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_activate_message', $mail_message); - feather_mail($new_email, $mail_subject, $mail_message); + $this->email->feather_mail($new_email, $mail_subject, $mail_message); $this->hook->fire('change_email_sent'); @@ -813,11 +812,9 @@ public function update_profile($id, $info, $section) } if ($this->config['o_regs_verify'] == '0' || $this->user->is_admmod) { - require FEATHER_ROOT.'include/email.php'; - // Validate the email address $form['email'] = strtolower(feather_trim($this->request->post('req_email'))); - if (!is_valid_email($form['email'])) { + if (!$this->email->is_valid_email($form['email'])) { message(__('Invalid email')); } } diff --git a/model/register.php b/model/register.php index 21c18b6e..5dfa5282 100644 --- a/model/register.php +++ b/model/register.php @@ -21,6 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->hook = $this->feather->hooks; + $this->email = $this->feather->email; } public function check_for_errors() @@ -79,16 +80,14 @@ public function check_for_errors() } // Validate email - require FEATHER_ROOT.'include/email.php'; - - if (!is_valid_email($user['email1'])) { + if (!$this->email->is_valid_email($user['email1'])) { $user['errors'][] = __('Invalid email'); } elseif ($this->config['o_regs_verify'] == '1' && $user['email1'] != $email2) { $user['errors'][] = __('Email not match'); } // Check if it's a banned email address - if (is_banned_email($user['email1'])) { + if ($this->email->is_banned_email($user['email1'])) { if ($this->config['p_allow_banned_email'] == '0') { $user['errors'][] = __('Banned email'); } @@ -193,7 +192,7 @@ public function insert_user($user) $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_banned_mail_message', $mail_message); - feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + $this->email->feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } // If we previously found out that the email was a dupe @@ -214,7 +213,7 @@ public function insert_user($user) $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_dupe_mail_message', $mail_message); - feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + $this->email->feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } // Should we alert people on the admin mailing list that a new user has registered? @@ -236,7 +235,7 @@ public function insert_user($user) $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_new_mail_message', $mail_message); - feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); + $this->email->feather_mail($this->config['o_mailing_list'], $mail_subject, $mail_message); } } @@ -260,7 +259,7 @@ public function insert_user($user) $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_welcome_mail_message', $mail_message); - feather_mail($user['email1'], $mail_subject, $mail_message); + $this->email->feather_mail($user['email1'], $mail_subject, $mail_message); message(__('Reg email').' '.feather_escape($this->config['o_admin_email']).'.', true); } From 8b1fa0bddcb24020d38eb1c619b060b99ad1a1c5 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Wed, 26 Aug 2015 16:32:30 +0200 Subject: [PATCH 179/353] Finish asset manager + various fixes --- include/classes/core.class.php | 3 +++ include/classes/view.class.php | 15 +++++++++++++-- style/FeatherBB/view/footer.new.php | 7 ++++--- style/FeatherBB/view/header.new.php | 7 +++---- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/include/classes/core.class.php b/include/classes/core.class.php index b73e3e3b..fbbd8861 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -235,6 +235,9 @@ public function call() // Set default style $this->app->view2->setStyle($this->forum_settings['o_default_style']); + // Set defaults assets + $this->app->view2->addAsset('js', 'style/FeatherBB/phone.min.js'); + $this->app->view2->addAsset('js', 'js/common.js'); // Populate FeatherBB Slim object with forum_settings vars $this->hydrate('forum_settings', $this->forum_settings); diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 8b801cf1..a886e37b 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -230,6 +230,14 @@ public function display($template, $data = null) */ public function fetch($template, $data = null) { + // Force flash messages + if (isset($this->app->environment['slim.flash'])) { + $this->data->set('flash', $this->app->environment['slim.flash']); + } + $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), (array) $data); + $data['feather'] = \Slim\Slim::getInstance(); + $data['assets'] = $this->getAssets(); + $data = $this->app->hooks->fire('view.alter_data', $data); return $this->render($template, $data); } @@ -245,8 +253,6 @@ public function fetch($template, $data = null) */ protected function render($template, $data = null) { - $data = array_merge($this->getDefaultPageInfo(), array('assets' => $this->assets), $this->page->all(), $this->data->all(), array('feather' => \Slim\Slim::getInstance()), (array) $data); - $data = $this->app->hooks->fire('view.alter_data', $data); extract($data); ob_start(); require $this->getTemplatePathname('header.new.php'); @@ -337,5 +343,10 @@ public function addAsset($type, $asset, $params = null) 'params' => $params ); } + + public function getAssets() + { + return $this->assets; + } } ?> diff --git a/style/FeatherBB/view/footer.new.php b/style/FeatherBB/view/footer.new.php index 7a7bf6f2..26d09007 100644 --- a/style/FeatherBB/view/footer.new.php +++ b/style/FeatherBB/view/footer.new.php @@ -140,8 +140,9 @@ ?>
    - - - + +'."\n"; +} ?> diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php index 0761df89..539d17ba 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/FeatherBB/view/header.new.php @@ -19,6 +19,7 @@ echo "\t".''."\n"; } ?> <?php echo generate_page_title($title, $page_number) ?> + '."\n"; } @@ -28,8 +29,7 @@ } else { echo "\t".''."\n"; } -} - +} if (isset($required_fields)) : // Output JavaScript to validate form (make sure required fields are filled out) @@ -76,7 +76,7 @@ function process_form(the_form) ?> -> +>
    @@ -172,7 +172,7 @@ forum_settings['o_topic_review'] != '0') : ?>

    From 8320676987ec0bf84c2af7fd906f0a83d2c4970f Mon Sep 17 00:00:00 2001 From: capkokoon Date: Thu, 27 Aug 2015 17:11:51 +0200 Subject: [PATCH 213/353] Update misc controller and views --- controller/misc.php | 103 ++++++++++------------------ style/FeatherBB/view/misc/email.php | 4 +- style/FeatherBB/view/misc/rules.php | 6 +- 3 files changed, 43 insertions(+), 70 deletions(-) diff --git a/controller/misc.php b/controller/misc.php index 8ca7d4eb..914b0561 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -1,11 +1,11 @@ feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\misc(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/misc.mo'); - } - - public function __autoload($class_name) - { - require FEATHER_ROOT . $class_name . '.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/register.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/misc.mo'); } public function rules() { - if ($this->config['o_rules'] == '0' || ($this->user->is_guest && $this->user->g_read_board == '0' && $this->config['o_regs_allow'] == '0')) { + if ($this->feather->forum_settings['o_rules'] == '0' || ($this->feather->user->is_guest && $this->feather->user->g_read_board == '0' && $this->feather->forum_settings['o_regs_allow'] == '0')) { message(__('Bad request'), '404'); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Forum rules')); - - $this->header->setTitle($page_title)->setActivePage('rules')->display(); - - $this->feather->render('misc/rules.php', array( - 'feather_config' => $this->config, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Forum rules')), + 'active_page' => 'rules' + ))->addTemplate('misc/rules.php')->display(); } public function markread() { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -64,7 +47,7 @@ public function markread() public function markforumread($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -77,7 +60,7 @@ public function markforumread($id) public function subscribeforum($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -86,7 +69,7 @@ public function subscribeforum($id) public function subscribetopic($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -95,7 +78,7 @@ public function subscribetopic($id) public function unsubscribeforum($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -104,7 +87,7 @@ public function unsubscribeforum($id) public function unsubscribetopic($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -113,7 +96,7 @@ public function unsubscribetopic($id) public function email($id) { - if ($this->user->is_guest || $this->user->g_send_email == '0') { + if ($this->feather->user->is_guest || $this->feather->user->g_send_email == '0') { message(__('No permission'), '403'); } @@ -123,7 +106,7 @@ public function email($id) $mail = $this->model->get_info_mail($id); - if ($mail['email_setting'] == 2 && !$this->user->is_admmod) { + if ($mail['email_setting'] == 2 && !$this->feather->user->is_admmod) { message(__('Form email disabled')); } @@ -132,24 +115,19 @@ public function email($id) $this->model->send_email($mail); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Send email to').' '.feather_escape($mail['recipient'])); - $required_fields = array('req_subject' => __('Email subject'), 'req_message' => __('Email message')); - $focus_element = array('email', 'req_subject'); - - $this->header->setTitle($page_title)->setActivePage('email')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - - $this->feather->render('misc/email.php', array( - 'id' => $id, - 'mail' => $mail, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Send email to').' '.feather_escape($mail['recipient'])), + 'active_page' => 'email', + 'required_fields' => array('req_subject' => __('Email subject'), 'req_message' => __('Email message')), + 'focus_element' => array('email', 'req_subject'), + 'id' => $id, + 'mail' => $mail + ))->addTemplate('misc/email.php')->display(); } public function report($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -160,22 +138,17 @@ public function report($id) // Fetch some info about the post, the topic and the forum $cur_post = $this->model->get_info_report($id); - if ($this->config['o_censoring'] == '1') { + if ($this->feather->forum_settings['o_censoring'] == '1') { $cur_post['subject'] = censor_words($cur_post['subject']); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Report post')); - $required_fields = array('req_reason' => __('Reason')); - $focus_element = array('report', 'req_reason'); - - $this->header->setTitle($page_title)->setActivePage('report')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - - $this->feather->render('misc/report.php', array( - 'id' => $id, - 'cur_post' => $cur_post, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Report post')), + 'active_page' => 'report', + 'required_fields' => array('req_reason' => __('Reason')), + 'focus_element' => array('report', 'req_reason'), + 'id' => $id, + 'cur_post' => $cur_post + ))->addTemplate('misc/report.php')->display(); } } diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php index eb44dafb..06f96f55 100644 --- a/style/FeatherBB/view/misc/email.php +++ b/style/FeatherBB/view/misc/email.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -34,4 +34,4 @@

    -
    \ No newline at end of file +
    diff --git a/style/FeatherBB/view/misc/rules.php b/style/FeatherBB/view/misc/rules.php index 366880ee..feb662ad 100644 --- a/style/FeatherBB/view/misc/rules.php +++ b/style/FeatherBB/view/misc/rules.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -17,7 +17,7 @@

    -
    +
    forum_settings['o_rules_message'] ?>
    -
    \ No newline at end of file +
    From 64ed94d138375e05837696d51ed8fed8cda76406 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Thu, 27 Aug 2015 17:17:26 +0200 Subject: [PATCH 214/353] Update delete controller --- controller/delete.php | 52 ++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/controller/delete.php b/controller/delete.php index e6dc453d..a1eb2a45 100644 --- a/controller/delete.php +++ b/controller/delete.php @@ -14,76 +14,58 @@ class delete public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\delete(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/delete.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); - } - - public function __autoload($class_name) - { - require FEATHER_ROOT . $class_name . '.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/delete.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/post.mo'); } public function deletepost($id) { global $pd; - if ($this->user->g_read_board == '0') { + if ($this->feather->user->g_read_board == '0') { message(__('No view'), '403'); } // Fetch some informations about the post, the topic and the forum $cur_post = $this->model->get_info_delete($id); - if ($this->config['o_censoring'] == '1') { + if ($this->feather->forum_settings['o_censoring'] == '1') { $cur_post['subject'] = censor_words($cur_post['subject']); } // Sort out who the moderators are and if we are currently a moderator (or an admin) $mods_array = ($cur_post['moderators'] != '') ? unserialize($cur_post['moderators']) : array(); - $is_admmod = ($this->user->g_id == FEATHER_ADMIN || ($this->user->g_moderator == '1' && array_key_exists($this->user->username, $mods_array))) ? true : false; + $is_admmod = ($this->feather->user->g_id == FEATHER_ADMIN || ($this->feather->user->g_moderator == '1' && array_key_exists($this->feather->user->username, $mods_array))) ? true : false; $is_topic_post = ($id == $cur_post['first_post_id']) ? true : false; // Do we have permission to edit this post? - if (($this->user->g_delete_posts == '0' || - ($this->user->g_delete_topics == '0' && $is_topic_post) || - $cur_post['poster_id'] != $this->user->id || + if (($this->feather->user->g_delete_posts == '0' || + ($this->feather->user->g_delete_topics == '0' && $is_topic_post) || + $cur_post['poster_id'] != $this->feather->user->id || $cur_post['closed'] == '1') && !$is_admmod) { message(__('No permission'), '403'); } - if ($is_admmod && $this->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) { + if ($is_admmod && $this->feather->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) { message(__('No permission'), '403'); } - if ($this->feather->request()->isPost()) { $this->model->handle_deletion($is_topic_post, $id, $cur_post['tid'], $cur_post['fid']); } - - $page_title = array(feather_escape($this->config['o_board_title']), __('Delete post')); - - $this->header->setTitle($page_title)->setActivePage('delete')->display(); - - require FEATHER_ROOT.'include/parser.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'include/parser.php'; $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); - $this->feather->render('delete.php', array( - 'cur_post' => $cur_post, - 'id' => $id, - 'is_topic_post' => $is_topic_post, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Delete post')), + 'active_page' => 'delete', + 'cur_post' => $cur_post, + 'id' => $id, + 'is_topic_post' => $is_topic_post + ))->addTemplate('delete.php')->display(); } } From a697647ac153d91bd975765f581e258e91ed8ecb Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 27 Aug 2015 17:33:06 +0200 Subject: [PATCH 215/353] Clean views --- style/FeatherBB/view/admin/censoring.php | 2 +- .../view/admin/groups/add_edit_group.php | 2 +- .../view/admin/groups/admin_groups.php | 4 +- style/FeatherBB/view/admin/index.php | 2 +- style/FeatherBB/view/admin/menu.php | 2 +- style/FeatherBB/view/admin/options.php | 264 +++++++++--------- style/FeatherBB/view/admin/parser.php | 2 +- style/FeatherBB/view/admin/permissions.php | 44 +-- style/FeatherBB/view/edit.php | 8 +- style/FeatherBB/view/footer.php | 16 +- style/FeatherBB/view/header.php | 8 +- style/FeatherBB/view/help.php | 2 +- .../view/moderate/moderator_forum.php | 6 +- .../view/profile/section_display.php | 12 +- .../view/profile/section_personality.php | 14 +- .../view/profile/section_privacy.php | 4 +- style/FeatherBB/view/register/form.php | 10 +- style/FeatherBB/view/register/rules.php | 2 +- style/FeatherBB/view/search/form.php | 2 +- 19 files changed, 203 insertions(+), 203 deletions(-) diff --git a/style/FeatherBB/view/admin/censoring.php b/style/FeatherBB/view/admin/censoring.php index 71c253f7..cf080869 100644 --- a/style/FeatherBB/view/admin/censoring.php +++ b/style/FeatherBB/view/admin/censoring.php @@ -22,7 +22,7 @@
    -

    '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    +

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    diff --git a/style/FeatherBB/view/admin/groups/add_edit_group.php b/style/FeatherBB/view/admin/groups/add_edit_group.php index bc2bc244..ae278dce 100644 --- a/style/FeatherBB/view/admin/groups/add_edit_group.php +++ b/style/FeatherBB/view/admin/groups/add_edit_group.php @@ -54,7 +54,7 @@ - +forum_settings['o_default_user_group'] != $group['info']['g_id']): ?> @@ -50,124 +50,124 @@ @@ -275,10 +275,10 @@ @@ -391,10 +391,10 @@ @@ -515,13 +515,13 @@ @@ -582,10 +582,10 @@ @@ -631,24 +631,24 @@ @@ -684,7 +684,7 @@ @@ -770,13 +770,13 @@ @@ -793,10 +793,10 @@ @@ -821,10 +821,10 @@ diff --git a/style/FeatherBB/view/admin/parser.php b/style/FeatherBB/view/admin/parser.php index aec1f767..e32369b6 100644 --- a/style/FeatherBB/view/admin/parser.php +++ b/style/FeatherBB/view/admin/parser.php @@ -208,7 +208,7 @@ - diff --git a/style/FeatherBB/view/admin/permissions.php b/style/FeatherBB/view/admin/permissions.php index a70328ae..2b1bf413 100644 --- a/style/FeatherBB/view/admin/permissions.php +++ b/style/FeatherBB/view/admin/permissions.php @@ -28,10 +28,10 @@ @@ -156,10 +156,10 @@ - +forum_settings['o_topic_views'] == '1'): ?> @@ -63,7 +63,7 @@ - +forum_settings['o_topic_views'] == '1'): ?> @@ -72,7 +72,7 @@ } if (empty($topic_data)): - $colspan = ($feather_config['o_topic_views'] == '1') ? 5 : 4; + $colspan = ($feather->forum_settings['o_topic_views'] == '1') ? 5 : 4; $button_status = ' disabled="disabled"'; echo "\t\t\t\t\t".''."\n"; endif; diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php index 5da0f4b4..ced4459f 100644 --- a/style/FeatherBB/view/profile/section_display.php +++ b/style/FeatherBB/view/profile/section_display.php @@ -55,26 +55,26 @@ } ?> - +forum_settings['o_smilies'] == '1' || $feather->forum_settings['o_smilies_sig'] == '1' || $feather->forum_settings['o_signatures'] == '1' || $feather->forum_settings['o_avatars'] == '1' || ($feather->forum_settings['p_message_bbcode'] == '1' && $feather->forum_settings['p_message_img_tag'] == '1')): ?>

    -
    -
    +forum_settings['o_forum_subscriptions'] == '1' || $feather->forum_settings['o_topic_subscriptions'] == '1'): ?>
    @@ -46,7 +46,7 @@ -
    -
    +forum_settings['o_regs_verify'] == '0'): ?>
    @@ -75,14 +75,14 @@
    - + forum_settings['o_regs_verify'] == '1') ? __('Email legend 2') : __('Email legend') ?>
    -

    +forum_settings['o_regs_verify'] == '1'): ?>

    -
    diff --git a/style/FeatherBB/view/search/form.php b/style/FeatherBB/view/search/form.php index 4731b068..16cd788a 100644 --- a/style/FeatherBB/view/search/form.php +++ b/style/FeatherBB/view/search/form.php @@ -41,7 +41,7 @@

    -user->is_admmod ? '

    '.__('Search multiple forums info').'

    ' : '') ?> +forum_settings['o_search_all_forums'] == '1' || $feather->user->is_admmod ? '

    '.__('Search multiple forums info').'

    ' : '') ?>
    From 9ba8e584512bfad3c83d0300f159982340076c75 Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 27 Aug 2015 17:33:24 +0200 Subject: [PATCH 216/353] Clean controllers --- controller/admin/censoring.php | 1 - controller/admin/forums.php | 2 - controller/admin/groups.php | 2 - controller/admin/index.php | 20 ++--- controller/admin/options.php | 3 - controller/admin/parser.php | 2 - controller/admin/permissions.php | 5 +- controller/admin/statistics.php | 2 - controller/edit.php | 3 - controller/footer.php | 4 - controller/header.php | 3 - controller/index.php | 1 - controller/install.php | 2 - controller/login.php | 38 ++++----- controller/moderate.php | 136 +++++++++++-------------------- controller/register.php | 39 ++++----- controller/search.php | 1 - controller/viewforum.php | 8 +- controller/viewtopic.php | 2 + include/common_admin.php | 7 +- model/moderate.php | 8 +- 21 files changed, 102 insertions(+), 187 deletions(-) diff --git a/controller/admin/censoring.php b/controller/admin/censoring.php index 6406b9eb..850b4492 100644 --- a/controller/admin/censoring.php +++ b/controller/admin/censoring.php @@ -59,7 +59,6 @@ public function display() generate_admin_menu('censoring'); $this->feather->render('admin/censoring.php', array( - 'feather_config' => $this->config, 'word_data' => $this->model->get_words(), ) ); diff --git a/controller/admin/forums.php b/controller/admin/forums.php index b1718ed8..b57c096e 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -131,7 +131,6 @@ public function edit_forum($forum_id) generate_admin_menu('forums'); $this->feather->render('admin/forums/permissions.php', array( - 'feather_config' => $this->config, 'perm_data' => $this->model->get_permissions($forum_id), 'cur_index' => 7, 'cur_forum' => $this->model->get_forum_info($forum_id), @@ -206,7 +205,6 @@ public function display() $categories_model = new \model\admin\categories(); $this->feather->render('admin/forums/admin_forums.php', array( - 'feather_config' => $this->config, 'cat_list' => $categories_model->get_cat_list(), 'forum_data' => $this->model->get_forums(), 'cur_index' => 4, diff --git a/controller/admin/groups.php b/controller/admin/groups.php index f2682dc8..7a48234f 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -50,7 +50,6 @@ public function display() generate_admin_menu('groups'); $this->feather->render('admin/groups/admin_groups.php', array( - 'feather_config' => $this->config, 'groups' => $groups, 'cur_index' => 5, ) @@ -142,7 +141,6 @@ public function addedit($id = '') $group = $this->model->info_add_group($groups, $id); $this->feather->render('admin/groups/add_edit_group.php', array( - 'feather_config' => $this->config, 'group' => $group, 'groups' => $groups, 'id' => $id, diff --git a/controller/admin/index.php b/controller/admin/index.php index e48cad10..ccafe51c 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/index.mo'); require FEATHER_ROOT . 'include/common_admin.php'; } @@ -78,20 +76,14 @@ public function display($action = null) } } - $install_folder_exists = is_dir(FEATHER_ROOT.'install'); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Index')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('index'); - $this->feather->render('admin/index.php', array( - 'install_file_exists' => $install_folder_exists, - 'feather_config' => $this->config, + $this->feather->view2->setPageInfo(array( + 'page_title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Index')), + 'active_page' => 'admin', + 'admin_console' => true, + 'install_file_exists' => is_dir(FEATHER_ROOT.'install'), ) - ); - - $this->footer->display(); + )->addTemplate('admin/index.php')->display(); } } diff --git a/controller/admin/options.php b/controller/admin/options.php index 230a9dbf..2a640c18 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -47,12 +47,9 @@ public function display() generate_admin_menu('options'); $this->feather->render('admin/options.php', array( - 'feather_config' => $this->config, - 'feather_user' => $this->user, 'languages' => forum_list_langs(), 'styles' => $this->model->get_styles(), 'times' => $this->model->get_times(), - 'feather' => $this->feather, ) ); diff --git a/controller/admin/parser.php b/controller/admin/parser.php index e2c42f34..81db5407 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -218,11 +218,9 @@ public function display() $this->feather->render('admin/parser.php', array( 'lang_admin_parser' => $lang_admin_parser, - 'smiley_files' => $this->model->get_smiley_files(), 'bbcd' => $bbcd, 'config' => $config, - 'feather_config' => $this->config, 'smilies' => $smilies, 'i' => -1, ) diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index 78133649..9abbabe6 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -47,10 +47,7 @@ public function display() generate_admin_menu('permissions'); - $this->feather->render('admin/permissions.php', array( - 'feather_config' => $this->config, - ) - ); + $this->feather->render('admin/permissions.php'); $this->footer->display(); } diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 65dae86d..a7c29d0d 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -45,13 +45,11 @@ public function display() $total = $this->model->get_total_size(); $this->feather->render('admin/statistics.php', array( - 'feather_config' => $this->config, 'server_load' => $this->model->get_server_load(), 'num_online' => $this->model->get_num_online(), 'total_size' => $total['size'], 'total_records' => $total['records'], 'php_accelerator' => $this->model->get_php_accelerator(), - 'feather' => $this->feather, ) ); diff --git a/controller/edit.php b/controller/edit.php index 27e7f445..0065a307 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -120,10 +120,7 @@ public function editpost($id) 'errors' => $errors, 'preview_message' => $preview_message, 'id' => $id, - 'feather_config' => $this->config, - 'feather_user' => $this->user, 'checkboxes' => $this->model->get_checkboxes($can_edit_subject, $is_admmod, $cur_post, 1), - 'feather' => $this->feather, 'can_edit_subject' => $can_edit_subject, 'lang_bbeditor' => $lang_bbeditor, 'post' => $post, diff --git a/controller/footer.php b/controller/footer.php index a05ffdd2..60a4f6c9 100644 --- a/controller/footer.php +++ b/controller/footer.php @@ -47,14 +47,10 @@ public function display($footer_style = null, $id = null, $p = null, $pid = null 'id' => $id, 'p' => $p, 'pid' => $pid, - 'feather_user' => $this->user, - 'feather_config' => $this->config, 'feather_start' => $this->start, - 'footer_style' => $footer_style, 'quickjump' => $this->feather->cache->retrieve('quickjump'), 'forum_id' => $forum_id, 'num_pages' => $num_pages, - 'feather' => $this->feather, ) ); diff --git a/controller/header.php b/controller/header.php index ebc8c550..df89879b 100644 --- a/controller/header.php +++ b/controller/header.php @@ -131,14 +131,11 @@ public function display() $this->feather->render('header.php', array( 'page_title' => $this->title, 'p' => $this->page, - 'feather_user' => $this->user, - 'feather_config' => $this->config, '_SERVER' => $_SERVER, 'page_head' => $this->page_head, 'active_page' => $this->active_page, 'paging_links' => $this->paging_links, 'required_fields' => $this->required_fields, - 'feather' => $this->feather, 'focus_element' => $focus_element, 'navlinks' => $navlinks, 'page_info' => $page_info, diff --git a/controller/index.php b/controller/index.php index 40b06c76..df1c4c8d 100644 --- a/controller/index.php +++ b/controller/index.php @@ -30,7 +30,6 @@ public function display() 'is_indexed' => true, 'index_data' => $this->model->print_categories_forums(), 'stats' => $this->model->collect_stats(), - 'feather_config' => $this->feather->forum_settings, 'online' => $this->model->fetch_users_online(), 'forum_actions' => $this->model->get_forum_actions(), 'cur_cat' => 0 diff --git a/controller/install.php b/controller/install.php index a083113e..0f1133be 100644 --- a/controller/install.php +++ b/controller/install.php @@ -115,7 +115,6 @@ public function run() if (!empty($this->errors)) { $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); $this->feather->view()->display('install.php', array( - 'feather' => $this->feather, 'languages' => $this->available_langs, 'supported_dbs' => $this->supported_dbs, 'data' => $data, @@ -137,7 +136,6 @@ public function run() } $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); $this->feather->view()->display('install.php', array( - 'feather' => $this->feather, 'languages' => $this->available_langs, 'supported_dbs' => $this->supported_dbs, 'data' => $data, diff --git a/controller/login.php b/controller/login.php index 669c6cd8..a6aab50a 100644 --- a/controller/login.php +++ b/controller/login.php @@ -39,18 +39,14 @@ public function display() // TODO?: Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login) $redirect_url = $this->model->get_redirect_url(); - $page_title = array(feather_escape($this->config['o_board_title']), __('Login')); - $required_fields = array('req_username' => __('Username'), 'req_password' => __('Password')); - $focus_element = array('login', 'req_username'); - - $this->header->setTitle($page_title)->setActivePage('login')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - - $this->feather->render('login/form.php', array( + $this->feather->view2->setPageInfo(array( 'redirect_url' => $redirect_url, + 'active_page' => 'login', + 'title' => array(feather_escape($this->config['o_board_title']), __('Login')), + 'required_fields' => array('req_username' => __('Username'), 'req_password' => __('Password')), + 'focus_element' => array('login', 'req_username'), ) - ); - - $this->footer->display(); + )->addTemplate('login/form.php')->display(); } public function logmein() @@ -81,19 +77,13 @@ public function forget() exit; } - $errors = $this->model->password_forgotten(); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Request pass')); - $required_fields = array('req_email' => __('Email')); - $focus_element = array('request_pass', 'req_email'); - - $this->header->setTitle($page_title)->setActivePage('login')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - - $this->feather->render('login/password_forgotten.php', array( - 'errors' => $errors, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'errors' => $this->model->password_forgotten(), + 'active_page' => 'login', + 'title' => array(feather_escape($this->config['o_board_title']), __('Request pass')), + 'required_fields' => array('req_email' => __('Email')), + 'focus_element' => array('request_pass', 'req_email'), + ) + )->addTemplate('login/password_forgotten.php')->display(); } } diff --git a/controller/moderate.php b/controller/moderate.php index 84d81727..c20ec362 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -105,19 +105,15 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // Check if there are enough forums to move the topic $this->model->check_move_possible(); - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->display(); - - $this->feather->render('moderate/move_topics.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', 'action' => 'multi', 'id' => $fid, 'topics' => $topics, 'list_forums' => $this->model->get_forum_list_move($fid), ) - ); - - $this->footer->display(); + )->addTemplate('moderate/move_topics.php')->display(); } // Stick a topic @@ -163,19 +159,16 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // Check if there are enough forums to move the topic $this->model->check_move_possible(); - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->display(); - - $this->feather->render('moderate/move_topics.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', + 'page' => $p, 'action' => 'single', 'id' => $id, 'topics' => $id, 'list_forums' => $this->model->get_forum_list_move($fid), ) - ); - - $this->footer->display(); + )->addTemplate('moderate/move_topics.php')->display(); } // Moderate a topic @@ -185,34 +178,28 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = if ($this->request->post('delete_posts') || $this->request->post('delete_posts_comply')) { $posts = $this->model->delete_posts($id, $fid, $p); - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->display(); - - $this->feather->render('moderate/delete_posts.php', array( - 'id' => $id, - 'posts' => $posts, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', + 'page' => $p, + 'id' => $id, + 'posts' => $posts, + )) + ->addTemplate('moderate/delete_posts.php')->display(); } if ($this->request->post('split_posts') || $this->request->post('split_posts_comply')) { - $posts = $this->model->split_posts($id, $fid, $p); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - $focus_element = array('subject','new_subject'); - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->setFocusElement($focus_element)->display(); - - $this->feather->render('moderate/split_posts.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'focus_element' => array('subject','new_subject'), + 'page' => $p, + 'active_page' => 'moderate', 'id' => $id, - 'posts' => $posts, + 'posts' => $this->model->split_posts($id, $fid, $p), 'list_forums' => $this->model->get_forum_list_split($id), ) - ); + )->addTemplate('moderate/split_posts.php')->display(); - $this->footer->display(); } // Show the moderate posts view @@ -224,31 +211,25 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->user->disp_posts = $cur_topic['num_replies'] + 1; }*/ - // Generate paging links - $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/topic/'.$id.'/forum/'.$fid.'/action/moderate/#'); - if ($this->config['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); } - $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_topic['forum_name']), feather_escape($cur_topic['subject'])); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->setPagingLinks($paging_links)->display(); - - $this->feather->render('moderate/posts_view.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), feather_escape($cur_topic['forum_name']), feather_escape($cur_topic['subject'])), + 'page' => $p, + 'active_page' => 'moderate', 'cur_topic' => $cur_topic, 'url_topic' => url_friendly($cur_topic['subject']), 'url_forum' => url_friendly($cur_topic['forum_name']), 'fid' => $fid, 'id' => $id, - 'paging_links' => $paging_links, + 'paging_links' => ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/topic/'.$id.'/forum/'.$fid.'/action/moderate/#'), 'post_data' => $this->model->display_posts_view($id, $start_from), 'button_status' => $button_status, 'start_from' => $start_from, ) - ); - - $this->footer->display(); + )->addTemplate('moderate/posts_view.php')->display(); } } @@ -284,24 +265,19 @@ public function display($id, $name = null, $page = null) $start_from = $this->user->disp_topics * ($p - 1); $url_forum = url_friendly($cur_forum['forum_name']); - // Generate paging links - $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/forum/'.$id.'/#'); - - $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->setPagingLinks($paging_links)->display(); - - $this->feather->render('moderate/moderator_forum.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])), + 'active_page' => 'moderate', + 'page' => $p, 'id' => $id, 'p' => $p, 'url_forum' => $url_forum, 'cur_forum' => $cur_forum, - 'paging_links' => $paging_links, - 'feather_config' => $this->config, + 'paging_links' => ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/forum/'.$id.'/#'), 'topic_data' => $this->model->display_topics($id, $sort_by, $start_from), 'start_from' => $start_from, ) - ); + )->addTemplate('moderate/moderator_forum.php')->display(); $this->footer->display(); } @@ -331,24 +307,18 @@ public function dealposts($fid) message(__('No topics selected')); } - $topics = implode(',', array_map('intval', array_keys($topics))); - // Check if there are enough forums to move the topic $this->model->check_move_possible(); - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - - $this->feather->render('moderate/move_topics.php', array( + $this->feather->view2->setPageInfo(array( 'action' => 'multi', + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', 'id' => $fid, - 'topics' => $topics, + 'topics' => implode(',', array_map('intval', array_keys($topics))), 'list_forums' => $this->model->get_forum_list_move($fid), ) - ); - - $this->footer->display(); + )->addTemplate('moderate/move_topics.php')->display(); } // Merge two or more topics @@ -362,17 +332,13 @@ public function dealposts($fid) message(__('Not enough topics selected')); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - - $this->feather->render('moderate/merge_topics.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', 'id' => $fid, 'topics' => $topics, ) - ); - - $this->footer->display(); + )->addTemplate('moderate/merge_topics.php')->display(); } // Delete one or more topics @@ -386,17 +352,13 @@ public function dealposts($fid) $this->model->delete_topics($topics, $fid); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - - $this->feather->render('moderate/delete_topics.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', 'id' => $fid, 'topics' => $topics, ) - ); - - $this->footer->display(); + )->addTemplate('moderate/delete_topics.php')->display(); } diff --git a/controller/register.php b/controller/register.php index ef580e88..5258ec6f 100644 --- a/controller/register.php +++ b/controller/register.php @@ -62,24 +62,19 @@ public function display() } } - $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), __('Register')), - 'focus_element' => array('register', 'req_user'), - 'required_fields' => array('req_user' => __('Username'), 'req_password1' => __('Password'), 'req_password2' => __('Confirm pass'), 'req_email1' => __('Email'), 'req_email2' => __('Email').' 2', 'captcha' => __('Robot title')), - 'active_page' => 'register', - 'is_indexed' => true, - )); - - $this->feather->view2->display('register/form.php', array( - 'errors' => $user['errors'], - 'feather_config' => $this->config, - 'index_questions' => $index_questions, - 'feather' => $this->feather, - 'languages' => forum_list_langs(), - 'question' => array_keys($lang_antispam_questions), - 'qencoded' => md5(array_keys($lang_antispam_questions)[$index_questions]), + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Register')), + 'focus_element' => array('register', 'req_user'), + 'required_fields' => array('req_user' => __('Username'), 'req_password1' => __('Password'), 'req_password2' => __('Confirm pass'), 'req_email1' => __('Email'), 'req_email2' => __('Email').' 2', 'captcha' => __('Robot title')), + 'active_page' => 'register', + 'is_indexed' => true, + 'errors' => $user['errors'], + 'index_questions' => $index_questions, + 'languages' => forum_list_langs(), + 'question' => array_keys($lang_antispam_questions), + 'qencoded' => md5(array_keys($lang_antispam_questions)[$index_questions]), ) - ); + )->addTemplate('register/form.php')->display(); } public function cancel() @@ -107,13 +102,9 @@ public function rules() } $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), __('Register'), __('Forum rules')), - 'active_page' => 'register', - )); - - $this->feather->view2->display('register/rules.php', array( - 'feather_config' => $this->config, + 'title' => array(feather_escape($this->config['o_board_title']), __('Register'), __('Forum rules')), + 'active_page' => 'register', ) - ); + )->addTemplate('register/rules.php')->display(); } } diff --git a/controller/search.php b/controller/search.php index 5a6e5319..c692c862 100644 --- a/controller/search.php +++ b/controller/search.php @@ -85,7 +85,6 @@ public function display() 'active_page' => 'search', 'focus_element' => array('search', 'keywords'), 'is_indexed' => true, - 'feather' => $this->feather, 'forums' => $this->model->get_list_forums(), ))->addTemplate('search/form.php')->display(); } diff --git a/controller/viewforum.php b/controller/viewforum.php index ff661f89..7206f604 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -15,7 +15,12 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\viewforum(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/forum.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); + } + + public function __autoload($class_name) + { + require FEATHER_ROOT . $class_name . '.php'; } public function display($id, $name = null, $page = null) @@ -85,6 +90,7 @@ public function display($id, $name = null, $page = null) 'paging_links' => $paging_links, 'is_indexed' => true, 'id' => $id, + 'fid' => $id, 'forum_data' => $this->model->print_topics($id, $sort_by, $start_from), 'cur_forum' => $cur_forum, 'post_link' => $post_link, diff --git a/controller/viewtopic.php b/controller/viewtopic.php index a37d1f3c..6abdf274 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -115,6 +115,8 @@ public function display($id = null, $name = null, $page = null, $pid = null) 'is_indexed' => true, 'id' => $id, 'pid' => $pid, + 'tid' => $id, + 'fid' => $cur_topic['forum_id'], 'post_data' => $this->model->print_posts($id, $start_from, $cur_topic, $is_admmod), 'cur_topic' => $cur_topic, 'subscraction' => $subscraction, diff --git a/include/common_admin.php b/include/common_admin.php index 228b2fa2..c1778f08 100644 --- a/include/common_admin.php +++ b/include/common_admin.php @@ -37,14 +37,13 @@ function generate_admin_menu($page = '') // See if there are any plugins $plugins = forum_list_plugins($is_admin); - $feather->render('admin/menu.php', array( + $feather->view2->setPageInfo(array( 'page' => $page, 'is_admin' => $is_admin, 'feather_config' => $feather->config, - 'feather_user' => $feather->user, 'plugins' => $plugins, - ) - ); + ), 1 + )->addTemplate('admin/menu.php'); } // diff --git a/model/moderate.php b/model/moderate.php index 36a02d82..d2f53fc8 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -561,7 +561,7 @@ public function move_topics_to($fid, $tfid = null, $param = null) $moved_to = $moved_to->find_one(); // Create the redirect topic - $move_topics_to['insert'] = array( + $insert_move_topics_to = array( 'poster' => $moved_to['poster'], 'subject' => $moved_to['subject'], 'posted' => $moved_to['posted'], @@ -573,7 +573,7 @@ public function move_topics_to($fid, $tfid = null, $param = null) // Insert the report $move_topics_to = DB::for_table('topics') ->create() - ->set($move_topics_to['insert']); + ->set($insert_move_topics_to); $move_topics_to = $this->hook->fireDB('move_topics_to_redirect', $move_topics_to); $move_topics_to = $move_topics_to->save(); @@ -608,7 +608,7 @@ public function check_move_possible() ->where_any_is($result['where']) ->where_null('f.redirect_url') ->order_by_many($result['order_by']); - $result = $this->hook->fireDB('check_move_possible'); + $result = $this->hook->fireDB('check_move_possible', $result); $result = $result->find_many(); if (count($result) < 2) { @@ -798,6 +798,8 @@ public function delete_topics($topics, $fid) $find_ids = $this->hook->fireDB('delete_topics_find_ids', $find_ids); $find_ids = $find_ids->find_many(); + $ids_post = array(); + foreach ($find_ids as $id) { $ids_post[] = $id['id']; } From 9b2f85dd7a805051c4d9c0bc4a76f205c21fe4e0 Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 27 Aug 2015 18:12:13 +0200 Subject: [PATCH 217/353] Update more views --- controller/admin/bans.php | 66 +++----- controller/admin/categories.php | 15 +- controller/admin/censoring.php | 17 +- controller/admin/forums.php | 8 +- controller/admin/groups.php | 12 +- controller/admin/maintenance.php | 8 +- controller/admin/options.php | 6 +- controller/admin/parser.php | 6 +- controller/admin/permissions.php | 6 +- controller/admin/plugins.php | 6 +- controller/admin/reports.php | 6 +- controller/admin/statistics.php | 6 +- controller/admin/users.php | 18 +-- controller/edit.php | 6 +- controller/footer.php | 69 -------- controller/header.php | 266 ------------------------------- controller/help.php | 13 +- controller/login.php | 4 +- controller/moderate.php | 6 +- controller/register.php | 4 +- controller/search.php | 4 +- include/classes/auth.class.php | 28 ++-- include/functions.php | 27 +--- 23 files changed, 109 insertions(+), 498 deletions(-) delete mode 100644 controller/footer.php delete mode 100644 controller/header.php diff --git a/controller/admin/bans.php b/controller/admin/bans.php index 0a3dd9d2..e6a8d6ff 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\bans(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/bans.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -46,33 +44,27 @@ public function display() $p = (!$this->request->get('p') || $this->request->get('p') <= 1 || $this->request->get('p') > $num_pages) ? 1 : intval($this->request->get('p')); $start_from = 50 * ($p - 1); - // Generate paging links - $paging_links = '' . __('Pages') . ' ' . paginate_old($num_pages, $p, '?find_ban=&' . implode('&', $ban_info['query_str'])); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans'), __('Results head')); - - $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->enableAdminConsole()->display(); - $ban_data = $this->model->find_ban($start_from); - $this->feather->render('admin/bans/search_ban.php', array( + $this->feather->view2->setPageInfo(array( + 'admin_console' => true, + 'page' => $p, + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans'), __('Results head')), + 'paging_links' => '' . __('Pages') . ' ' . paginate_old($num_pages, $p, '?find_ban=&' . implode('&', $ban_info['query_str'])), 'ban_data' => $ban_data['data'], ) - ); - - $this->footer->display(); + )->addTemplate('admin/bans/search_ban.php')->display(); } + else { + generate_admin_menu('bans'); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); - $focus_element = array('bans', 'new_ban_user'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); - - generate_admin_menu('bans'); - - $this->feather->render('admin/bans/admin_bans.php'); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'admin_console' => true, + 'focus_element' => array('bans', 'new_ban_user'), + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')), + ) + )->addTemplate('admin/bans/admin_bans.php')->display(); + } } public function add($id = null) @@ -85,19 +77,15 @@ public function add($id = null) $this->model->insert_ban(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); - $focus_element = array('bans2', 'ban_user'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); - generate_admin_menu('bans'); - $this->feather->render('admin/bans/add_ban.php', array( + $this->feather->view2->setPageInfo(array( + 'admin_console' => true, + 'focus_element' => array('bans2', 'ban_user'), + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')), 'ban' => $this->model->add_ban_info($id), ) - ); - - $this->footer->display(); + )->addTemplate('admin/bans/add_ban.php')->display(); } public function delete($id) @@ -120,18 +108,14 @@ public function edit($id) $this->model->insert_ban(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); - $focus_element = array('bans2', 'ban_user'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); - generate_admin_menu('bans'); - $this->feather->render('admin/bans/add_ban.php', array( + $this->feather->view2->setPageInfo(array( + 'admin_console' => true, + 'focus_element' => array('bans2', 'ban_user'), + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')), 'ban' => $this->model->edit_ban_info($id), ) - ); - - $this->footer->display(); + )->addTemplate('admin/bans/add_ban.php')->display(); } } diff --git a/controller/admin/categories.php b/controller/admin/categories.php index 397c2c73..e3b88025 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\categories(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/categories.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -103,16 +101,13 @@ public function display() message(__('No permission'), '403'); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Categories')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('categories'); - $this->feather->render('admin/categories.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Categories')), + 'active_page' => 'admin', + 'admin_console' => true, 'cat_list' => $this->model->get_cat_list(), - )); - - $this->footer->display(); + ))->addTemplate('admin/categories.php')->display();; } } diff --git a/controller/admin/censoring.php b/controller/admin/censoring.php index 850b4492..a7367eb9 100644 --- a/controller/admin/censoring.php +++ b/controller/admin/censoring.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\censoring(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/censoring.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -51,18 +49,15 @@ public function display() $this->model->remove_word(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Censoring')); - $focus_element = array('censoring', 'new_search_for'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); - generate_admin_menu('censoring'); - $this->feather->render('admin/censoring.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Censoring')), + 'focus_element' => array('censoring', 'new_search_for'), + 'active_page' => 'admin', + 'admin_console' => true, 'word_data' => $this->model->get_words(), ) - ); - - $this->footer->display(); + )->addTemplate('admin/censoring.php')->display(); } } diff --git a/controller/admin/forums.php b/controller/admin/forums.php index b57c096e..8206fcdd 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\forums(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/forums.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -138,7 +136,7 @@ public function edit_forum($forum_id) ) ); - $this->footer->display(); + } } @@ -168,7 +166,7 @@ public function delete_forum($forum_id) ) ); - $this->footer->display(); + } } @@ -211,6 +209,6 @@ public function display() ) ); - $this->footer->display(); + } } diff --git a/controller/admin/groups.php b/controller/admin/groups.php index 7a48234f..0fc1e004 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\groups(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/groups.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -55,7 +55,7 @@ public function display() ) ); - $this->footer->display(); + } public function delete($id) @@ -95,7 +95,7 @@ public function delete($id) ) ); - $this->footer->display(); + } } @@ -112,7 +112,7 @@ public function delete($id) ) ); - $this->footer->display(); + } public function addedit($id = '') @@ -148,7 +148,7 @@ public function addedit($id = '') ) ); - $this->footer->display(); + } } } diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index d58d7e52..bf942e45 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\maintenance(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/maintenance.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -79,7 +79,7 @@ public function display() ) ); - $this->footer->display(); + } $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Maintenance')); @@ -94,6 +94,6 @@ public function display() ) ); - $this->footer->display(); + } } diff --git a/controller/admin/options.php b/controller/admin/options.php index 2a640c18..545f797b 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\options(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/options.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -53,6 +53,6 @@ public function display() ) ); - $this->footer->display(); + } } diff --git a/controller/admin/parser.php b/controller/admin/parser.php index 81db5407..6178bd88 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\parser(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/parser.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -226,6 +226,6 @@ public function display() ) ); - $this->footer->display(); + } } diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index 9abbabe6..80ed8712 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\permissions(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/permissions.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -49,6 +49,6 @@ public function display() $this->feather->render('admin/permissions.php'); - $this->footer->display(); + } } diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index 61f72ac7..bc0f9496 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\plugins(); require FEATHER_ROOT . 'include/common_admin.php'; } @@ -71,6 +71,6 @@ public function display() $this->feather->render('admin/loader.php'); - $this->footer->display(); + } } diff --git a/controller/admin/reports.php b/controller/admin/reports.php index 3a9ced60..6c0ea0cc 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\reports(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/reports.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -53,6 +53,6 @@ public function display() ) ); - $this->footer->display(); + } } diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index a7c29d0d..8f422881 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\statistics(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/index.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -53,7 +53,7 @@ public function display() ) ); - $this->footer->display(); + } diff --git a/controller/admin/users.php b/controller/admin/users.php index aecd2f43..55e2e4b0 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\users(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/users.mo'); $this->header->enableAdminConsole(); @@ -56,7 +56,7 @@ public function display() ) ); - $this->footer->display(); + } @@ -79,7 +79,7 @@ public function display() ) ); - $this->footer->display(); + } @@ -103,7 +103,7 @@ public function display() ) ); - $this->footer->display(); + } // Display bans @@ -145,7 +145,7 @@ public function display() ) ); - $this->footer->display(); + } $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users')); @@ -160,7 +160,7 @@ public function display() ) ); - $this->footer->display(); + } // Show IP statistics for a certain user ID @@ -192,7 +192,7 @@ public function ipstats($id) ) ); - $this->footer->display(); + } // Show IP statistics for a certain user IP @@ -228,6 +228,6 @@ public function showusers($ip) ) ); - $this->footer->display(); + } } diff --git a/controller/edit.php b/controller/edit.php index 0065a307..0239c17e 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\edit(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); @@ -127,6 +127,6 @@ public function editpost($id) ) ); - $this->footer->display(); + } } diff --git a/controller/footer.php b/controller/footer.php deleted file mode 100644 index 60a4f6c9..00000000 --- a/controller/footer.php +++ /dev/null @@ -1,69 +0,0 @@ -feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->dontStop = false; - } - - public function dontStop() { - $this->dontStop = true; - } - - public function display($footer_style = null, $id = null, $p = null, $pid = null, $forum_id = null, $num_pages = null) - { - // Render the footer - // If no footer style has been specified, we use the default (only copyright/debug info) - $footer_style = isset($footer_style) ? $footer_style : null; - - $id = isset($id) ? $id : null; - $p = isset($p) ? $p : null; - $pid = isset($pid) ? $pid : null; - - $forum_id = isset($forum_id) ? $forum_id : null; - - $num_pages = isset($num_pages) ? $num_pages : null; - - if (!$this->feather->cache->isCached('quickjump')) { - $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - } - - $this->feather->render('footer.php', array( - 'id' => $id, - 'p' => $p, - 'pid' => $pid, - 'feather_start' => $this->start, - 'quickjump' => $this->feather->cache->retrieve('quickjump'), - 'forum_id' => $forum_id, - 'num_pages' => $num_pages, - ) - ); - - // Close Idiorm connection - $pdo = \DB::get_db(); - $pdo = null; - - // If we need to stop the application outside a route - if ($this->dontStop) { - die(); - } - - // If we reached this far, we shouldn't execute more code - $this->feather->stop(); - } -} diff --git a/controller/header.php b/controller/header.php deleted file mode 100644 index df89879b..00000000 --- a/controller/header.php +++ /dev/null @@ -1,266 +0,0 @@ -feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->model = new \model\header(); - } - - private $title; - - private $page; - - private $focus_element; - - private $paging_links; - - private $required_fields; - - private $page_head; - - private $active_page; - - private $admin_console; - - private $allow_index; - - public function setTitle($title) - { - $this->title = $title; - - return $this; - } - - public function setPage($page) - { - $this->page = $page; - - return $this; - } - - public function setFocusElement($focus_element) - { - $this->focus_element = $focus_element; - - return $this; - } - - public function setPagingLinks($paging_links) - { - $this->paging_links = $paging_links; - - return $this; - } - - public function setRequiredFields($required_fields) - { - $this->required_fields = $required_fields; - - return $this; - } - - public function setPageHead($page_head) - { - $this->page_head = $page_head; - - return $this; - } - - public function setActivePage($active_page) - { - $this->active_page = $active_page; - - return $this; - } - - public function enableAdminConsole() - { - $this->admin_console = true; - - return $this; - } - - public function allowIndex() - { - $this->allow_index = true; - - return $this; - } - - public function display() - { - if (!defined('FEATHER_HEADER')) { - define('FEATHER_HEADER', 1); - } - - // Render the header - $this->title = isset($this->title) ? $this->title : feather_escape($this->config['o_board_title']); - - // Define $p if it's not set to avoid a PHP notice - $this->page = isset($this->page) ? $this->page : null; - - // Set default safe values - $this->page_head = isset($this->page_head) ? $this->page_head : null; - $this->paging_links = isset($this->paging_links) ? $this->paging_links : null; - $this->required_fields = isset($this->required_fields) ? $this->required_fields : null; - - $navlinks = $this->getNavlinks(); - $page_info = $this->getStatus(); - $admin_console = $this->getAdminConsole(); - - // Show the robots meta only if enabled - $allow_index = ($this->allow_index === true) ? '' : ''."\n"; - - $focus_element = isset($this->focus_element) ? ' onload="document.getElementById(\''.$this->focus_element[0].'\').elements[\''.$this->focus_element[1].'\'].focus();"' : ''; - - $this->feather->render('header.php', array( - 'page_title' => $this->title, - 'p' => $this->page, - '_SERVER' => $_SERVER, - 'page_head' => $this->page_head, - 'active_page' => $this->active_page, - 'paging_links' => $this->paging_links, - 'required_fields' => $this->required_fields, - 'focus_element' => $focus_element, - 'navlinks' => $navlinks, - 'page_info' => $page_info, - 'admin_console' => $admin_console, - 'allow_index' => $allow_index, - ) - ); - } - - private function getNavlinks() - { - $links = array(); - - // Index should always be displayed - $links[] = ''; - - if ($this->user->g_read_board == '1' && $this->user->g_view_users == '1') { - $links[] = ''; - } - - if ($this->config['o_rules'] == '1' && (!$this->user->is_guest || $this->user->g_read_board == '1' || $this->config['o_regs_allow'] == '1')) { - $links[] = ''; - } - - if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $links[] = ''; - } - - if ($this->user->is_guest) { - $links[] = ''; - $links[] = ''; - } else { - $links[] = ''; - - if ($this->user->is_admmod) { - $links[] = ''; - } - - $links[] = ''; - } - - // Are there any additional navlinks we should insert into the array before imploding it? - if ($this->user->g_read_board == '1' && $this->config['o_additional_navlinks'] != '') { - if (preg_match_all('%([0-9]+)\s*=\s*(.*?)\n%s', $this->config['o_additional_navlinks']."\n", $extra_links)) { - // Insert any additional links into the $links array (at the correct index) - $num_links = count($extra_links[1]); - for ($i = 0; $i < $num_links; ++$i) { - array_splice($links, $extra_links[1][$i], 0, array('')); - } - } - } - - $navlinks = '
    '."\n\t\t\t".'
      '."\n\t\t\t\t".implode("\n\t\t\t\t", $links)."\n\t\t\t".'
    '."\n\t\t".'
    '; - - return $navlinks; - } - - private function getStatus() - { - $page_statusinfo = $page_topicsearches = array(); - - if ($this->user->is_guest) { - $page_statusinfo = '

    '.__('Not logged in').'

    '; - } else { - $page_statusinfo[] = '
  • '.__('Logged in as').' '.feather_escape($this->user->username).'
  • '; - $page_statusinfo[] = '
  • '.sprintf(__('Last visit'), format_time($this->user->last_visit)).'
  • '; - - if ($this->user->is_admmod) { - if ($this->config['o_report_method'] == '0' || $this->config['o_report_method'] == '2') { - if ($this->model->get_reports()) { - $page_statusinfo[] = ''; - } - } - - if ($this->config['o_maintenance'] == '1') { - $page_statusinfo[] = ''; - } - } - - if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $page_topicsearches[] = ''.__('Posted topics').''; - $page_topicsearches[] = ''.__('New posts header').''; - } - } - - // Quick searches - if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $page_topicsearches[] = ''.__('Active topics').''; - $page_topicsearches[] = ''.__('Unanswered topics').''; - } - - // Generate all that jazz - $page_info = '
    '; - - // The status information - if (is_array($page_statusinfo)) { - $page_info .= "\n\t\t\t".'
      '; - $page_info .= "\n\t\t\t\t".implode("\n\t\t\t\t", $page_statusinfo); - $page_info .= "\n\t\t\t".'
    '; - } else { - $page_info .= "\n\t\t\t".$page_statusinfo; - } - - // Generate quicklinks - if (!empty($page_topicsearches)) { - $page_info .= "\n\t\t\t".'
      '; - $page_info .= "\n\t\t\t\t".'
    • '.__('Topic searches').' '.implode(' | ', $page_topicsearches).'
    • '; - $page_info .= "\n\t\t\t".'
    '; - } - - $page_info .= "\n\t\t\t".'
    '."\n\t\t".'
    '; - - return $page_info; - } - - protected function getAdminConsole() - { - if ($this->admin_console === true) { - if (file_exists(FEATHER_ROOT.'style/'.$this->user->style.'/base_admin.css')) { - return ''."\n"; - } else { - return ''."\n"; - } - } else { - return ''; - } - } -} diff --git a/controller/help.php b/controller/help.php index 36f44c4e..45dff1bb 100644 --- a/controller/help.php +++ b/controller/help.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/help.mo'); } @@ -34,12 +32,9 @@ public function display() message(__('No view'), '403'); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Help')); - - $this->header->setTitle($page_title)->setActivePage('help')->display(); - - $this->feather->render('help.php'); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Help')), + 'active_page' => 'help', + ))->addTemplate('help.php')->display(); } } diff --git a/controller/login.php b/controller/login.php index a6aab50a..30c9c5f3 100644 --- a/controller/login.php +++ b/controller/login.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\login(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/login.mo'); } diff --git a/controller/moderate.php b/controller/moderate.php index c20ec362..7ea2a272 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\moderate(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); @@ -279,7 +279,7 @@ public function display($id, $name = null, $page = null) ) )->addTemplate('moderate/moderator_forum.php')->display(); - $this->footer->display(); + } public function dealposts($fid) diff --git a/controller/register.php b/controller/register.php index 5258ec6f..b1016b99 100644 --- a/controller/register.php +++ b/controller/register.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\register(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); diff --git a/controller/search.php b/controller/search.php index c692c862..f5361e1d 100644 --- a/controller/search.php +++ b/controller/search.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\search(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/search.mo'); diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index 4d93a4c1..64d1f82d 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -194,25 +194,15 @@ public function maintenance_message() $replace = array('    ', '  ', '  '); $message = str_replace($pattern, $replace, $this->app->forum_settings['o_maintenance_message']); - $page_title = array(feather_escape($this->app->forum_settings['o_board_title']), __('Maintenance')); - - $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? $this->app->forum_env['FEATHER_ROOT'].'style/'.$this->app->user->style.'/view' : $this->app->forum_env['FEATHER_ROOT'].'view'); - - $header = new \controller\header(); - - $header->setTitle($page_title)->setActivePage('index')->display(); - - $this->app->render('message.php', array( - 'message' => $message, - 'no_back_link' => '', - ) - ); - - $footer = new \controller\footer(); - - $footer->dontStop(); - - $footer->display(); + $this->app->view2->setPageInfo(array( + 'title' => array(feather_escape($this->app->forum_settings['o_board_title']), __('Maintenance')), + 'active_page' => 'index', + 'message' => $message, + 'no_back_link' => '', + ))->addTemplate('message.php')->display(); + + // Don't display anything after a message + $this->app->stop(); } public function call() diff --git a/include/functions.php b/include/functions.php index 09330114..c9c4087d 100644 --- a/include/functions.php +++ b/include/functions.php @@ -589,7 +589,7 @@ function paginate_old($num_pages, $cur_page, $link) // // Display a message // -function message($msg, $http_status = null, $no_back_link = false, $dontStop = false) +function message($msg, $http_status = null, $no_back_link = false) { // Did we receive a custom header? if (!is_null($http_status)) { @@ -608,29 +608,18 @@ function message($msg, $http_status = null, $no_back_link = false, $dontStop = f $feather->response->setBody(''); if (!defined('FEATHER_HEADER')) { - $page_title = array(feather_escape($feather->config['o_board_title']), __('Info')); - - require_once FEATHER_ROOT.'controller/header.php'; - - $header = new \controller\header(); - - $header->setTitle($page_title)->display(); + $feather->view2->setPageInfo(array( + 'title' => array(feather_escape($feather->config['o_board_title']), __('Info')), + )); } - $feather->render('message.php', array( + $feather->view2->setPageInfo(array( 'message' => $msg, 'no_back_link' => $no_back_link, - )); - - require_once FEATHER_ROOT.'controller/footer.php'; - - $footer = new \controller\footer(); - - if ($dontStop) { - $footer->dontStop(); - } + ))->addTemplate('message.php')->display(); - $footer->display(); + // Don't display anything after a message + $feather->stop(); } From 14ee7f1c039311e276098a3a3d3aa745690599d0 Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 27 Aug 2015 21:31:34 +0200 Subject: [PATCH 218/353] New template engine --- controller/admin/categories.php | 2 +- controller/admin/forums.php | 48 +++++------ controller/admin/groups.php | 63 ++++++--------- controller/admin/index.php | 2 +- controller/admin/maintenance.php | 26 +++--- controller/admin/options.php | 15 ++-- controller/admin/parser.php | 16 ++-- controller/admin/permissions.php | 15 ++-- controller/admin/plugins.php | 16 ++-- controller/admin/reports.php | 13 ++- controller/admin/statistics.php | 13 ++- controller/admin/users.php | 132 ++++++++++++------------------- include/classes/core.class.php | 1 - model/admin/groups.php | 6 +- 14 files changed, 139 insertions(+), 229 deletions(-) diff --git a/controller/admin/categories.php b/controller/admin/categories.php index e3b88025..916506be 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -108,6 +108,6 @@ public function display() 'active_page' => 'admin', 'admin_console' => true, 'cat_list' => $this->model->get_cat_list(), - ))->addTemplate('admin/categories.php')->display();; + ))->addTemplate('admin/categories.php')->display(); } } diff --git a/controller/admin/forums.php b/controller/admin/forums.php index 8206fcdd..ba4cfa60 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -121,22 +121,18 @@ public function edit_forum($forum_id) } } else { - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('forums'); - $this->feather->render('admin/forums/permissions.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')), + 'active_page' => 'admin', + 'admin_console' => true, 'perm_data' => $this->model->get_permissions($forum_id), 'cur_index' => 7, 'cur_forum' => $this->model->get_forum_info($forum_id), 'forum_data' => $this->model->get_forums(), ) - ); - - + )->addTemplate('admin/forums/permissions.php')->display(); } } @@ -153,20 +149,17 @@ public function delete_forum($forum_id) redirect(get_link('admin/forums/'), __('Forum deleted redirect')); - } else { // If the user hasn't confirmed the delete - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); + } else { // If the user hasn't confirmed generate_admin_menu('forums'); - $this->feather->render('admin/forums/delete_forum.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')), + 'active_page' => 'admin', + 'admin_console' => true, 'cur_forum' => $this->model->get_forum_info($forum_id), ) - ); - - + )->addTemplate('admin/forums/delete_forum.php')->display(); } } @@ -195,20 +188,17 @@ public function display() $this->edit_positions(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('forums'); $categories_model = new \model\admin\categories(); - $this->feather->render('admin/forums/admin_forums.php', array( - 'cat_list' => $categories_model->get_cat_list(), - 'forum_data' => $this->model->get_forums(), - 'cur_index' => 4, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')), + 'active_page' => 'admin', + 'admin_console' => true, + 'cat_list' => $categories_model->get_cat_list(), + 'forum_data' => $this->model->get_forums(), + 'cur_index' => 4, ) - ); - - + )->addTemplate('admin/forums/admin_forums.php')->display(); } } diff --git a/controller/admin/groups.php b/controller/admin/groups.php index 0fc1e004..2ccffa6a 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\admin\groups(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/groups.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -43,19 +41,16 @@ public function display() $this->model->set_default_group($groups, $this->feather); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('groups'); - $this->feather->render('admin/groups/admin_groups.php', array( - 'groups' => $groups, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), + 'active_page' => 'admin', + 'admin_console' => true, + 'groups' => $this->model->fetch_groups(), 'cur_index' => 5, ) - ); - - + )->addTemplate('admin/groups/admin_groups.php')->display(); } public function delete($id) @@ -81,38 +76,30 @@ public function delete($id) if ($this->request->post('del_group_comply') || $this->request->post('del_group')) { $this->model->delete_group($id); } else { - $group_title = $this->model->get_group_title($id); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - - $this->header->setTitle($page_title)->setActivePage('admin')->display(); - generate_admin_menu('groups'); - $this->feather->render('admin/groups/confirm_delete.php', array( - 'group_title' => $group_title, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), + 'active_page' => 'admin', + 'admin_console' => true, + 'group_title' => $this->model->get_group_title($id), 'id' => $id, ) - ); - - + )->addTemplate('admin/groups/confirm_delete.php')->display(); } } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('groups'); - $this->feather->render('admin/groups/delete_group.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), + 'active_page' => 'admin', + 'admin_console' => true, 'id' => $id, 'group_info' => $this->model->get_title_members($id), 'group_list_delete' => $this->model->get_group_list_delete($id), ) - ); - - + )->addTemplate('admin/groups/delete_group.php')->display(); } public function addedit($id = '') @@ -130,25 +117,23 @@ public function addedit($id = '') // Add/edit a group (stage 1) elseif ($this->request->post('add_group') || isset($id)) { - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - $required_fields = array('req_title' => __('Group title label')); - $focus_element = array('groups2', 'req_title'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->setRequiredFields($required_fields)->enableAdminConsole()->display(); generate_admin_menu('groups'); $group = $this->model->info_add_group($groups, $id); - $this->feather->render('admin/groups/add_edit_group.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), + 'active_page' => 'admin', + 'admin_console' => true, + 'focus_element' => array('groups2', 'req_title'), + 'required_fields' => array('req_title' => __('Group title label')), 'group' => $group, 'groups' => $groups, 'id' => $id, 'group_list' => $this->model->get_group_list($groups, $group), ) - ); - - + )->addTemplate('admin/groups/delete_group.php')->display(); } } } diff --git a/controller/admin/index.php b/controller/admin/index.php index ccafe51c..1069a7cb 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -79,7 +79,7 @@ public function display($action = null) generate_admin_menu('index'); $this->feather->view2->setPageInfo(array( - 'page_title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Index')), + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Index')), 'active_page' => 'admin', 'admin_console' => true, 'install_file_exists' => is_dir(FEATHER_ROOT.'install'), diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index bf942e45..cd8c237b 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -62,38 +62,32 @@ public function display() $prune_from = feather_trim($this->request->post('prune_from')); $prune_sticky = intval($this->request->post('prune_sticky')); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Prune')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('maintenance'); if ($this->request->post('prune_comply')) { $this->model->prune_comply($prune_from, $prune_sticky); } - $this->feather->render('admin/maintenance/prune.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Prune')), + 'active_page' => 'admin', + 'admin_console' => true, 'prune_sticky' => $prune_sticky, 'prune_from' => $prune_from, 'prune' => $this->model->get_info_prune($prune_sticky, $prune_from), ) - ); - - + )->addTemplate('admin/maintenance/prune.php')->display(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Maintenance')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('maintenance'); - $this->feather->render('admin/maintenance/admin_maintenance.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Maintenance')), + 'active_page' => 'admin', + 'admin_console' => true, 'first_id' => $this->model->get_first_id(), 'categories' => $this->model->get_categories(), ) - ); - - + )->addTemplate('admin/maintenance/admin_maintenance.php')->display(); } } diff --git a/controller/admin/options.php b/controller/admin/options.php index 545f797b..589b48cb 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\admin\options(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/options.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -40,19 +38,16 @@ public function display() $this->model->update_options(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Options')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('options'); - $this->feather->render('admin/options.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Options')), + 'active_page' => 'admin', + 'admin_console' => true, 'languages' => forum_list_langs(), 'styles' => $this->model->get_styles(), 'times' => $this->model->get_times(), ) - ); - - + )->addTemplate('admin/options.php')->display(); } } diff --git a/controller/admin/parser.php b/controller/admin/parser.php index 6178bd88..30b48a08 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\admin\parser(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/parser.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -209,14 +207,12 @@ public function display() redirect(get_link('admin/parser/'), $lang_admin_parser['save_success']); } - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Parser')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('parser'); - $this->feather->render('admin/parser.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Parser')), + 'active_page' => 'admin', + 'admin_console' => true, 'lang_admin_parser' => $lang_admin_parser, 'smiley_files' => $this->model->get_smiley_files(), 'bbcd' => $bbcd, @@ -224,8 +220,6 @@ public function display() 'smilies' => $smilies, 'i' => -1, ) - ); - - + )->addTemplate('admin/parser.php')->display(); } } diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index 80ed8712..ac1881bd 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\admin\permissions(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/permissions.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -41,14 +39,13 @@ public function display() $this->model->update_permissions(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('permissions'); - $this->feather->render('admin/permissions.php'); - - + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')), + 'active_page' => 'admin', + 'admin_console' => true, + ) + )->addTemplate('admin/permissions.php')->display(); } } diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index bc0f9496..24f35961 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -18,9 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - - $this->model = new \model\admin\plugins(); require FEATHER_ROOT . 'include/common_admin.php'; } @@ -57,10 +54,6 @@ public function display() $_SERVER['REQUEST_URI'] = (isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : '').'?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), str_replace('_', ' ', substr($plugin, strpos($plugin, '_') + 1, -4))); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - // Attempt to load the plugin. We don't use @ here to suppress error messages, // because if we did and a parse error occurred in the plugin, we would only // get the "blank page of death" @@ -69,8 +62,11 @@ public function display() message(sprintf(__('Plugin failed message'), $plugin)); } - $this->feather->render('admin/loader.php'); - - + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), str_replace('_', ' ', substr($plugin, strpos($plugin, '_') + 1, -4))), + 'active_page' => 'admin', + 'admin_console' => true, + ) + )->addTemplate('admin/loader.php')->display(); } } diff --git a/controller/admin/reports.php b/controller/admin/reports.php index 6c0ea0cc..7e2c933a 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -41,18 +41,15 @@ public function display() $this->model->zap_report(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Reports')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('reports'); - $this->feather->render('admin/reports.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Reports')), + 'active_page' => 'admin', + 'admin_console' => true, 'report_data' => $this->model->get_reports(), 'report_zapped_data' => $this->model->get_zapped_reports(), ) - ); - - + )->addTemplate('admin/reports.php')->display(); } } diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 8f422881..7bd279af 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -36,24 +36,21 @@ public function display() message(__('No permission'), '403'); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Server statistics')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('index'); $total = $this->model->get_total_size(); - $this->feather->render('admin/statistics.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Server statistics')), + 'active_page' => 'admin', + 'admin_console' => true, 'server_load' => $this->model->get_server_load(), 'num_online' => $this->model->get_num_online(), 'total_size' => $total['size'], 'total_records' => $total['records'], 'php_accelerator' => $this->model->get_php_accelerator(), ) - ); - - + )->addTemplate('admin/statistics.php')->display(); } diff --git a/controller/admin/users.php b/controller/admin/users.php index 55e2e4b0..705234ef 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -18,11 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\admin\users(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/users.mo'); - $this->header->enableAdminConsole(); require FEATHER_ROOT . 'include/common_admin.php'; } @@ -43,20 +40,15 @@ public function display() message(__('No permission'), '403'); } - $move = $this->model->move_users(); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Move users')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - generate_admin_menu('users'); - $this->feather->render('admin/users/move_users.php', array( - 'move' => $move, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Move users')), + 'active_page' => 'moderate', + 'admin_console' => true, + 'move' => $this->model->move_users(), ) - ); - - + )->addTemplate('admin/users/move_users.php')->display(); } @@ -66,20 +58,15 @@ public function display() message(__('No permission'), '403'); } - $user_ids = $this->model->delete_users(); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Delete users')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - generate_admin_menu('users'); - $this->feather->render('admin/users/delete_users.php', array( - 'user_ids' => $user_ids, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Delete users')), + 'active_page' => 'moderate', + 'admin_console' => true, + 'user_ids' => $this->model->delete_users(), ) - ); - - + )->addTemplate('admin/users/delete_users.php')->display(); } @@ -89,21 +76,16 @@ public function display() message(__('No permission'), '403'); } - $user_ids = $this->model->ban_users(); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); - $focus_element = array('bans2', 'ban_message'); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setFocusElement($focus_element)->display(); - generate_admin_menu('users'); - $this->feather->render('admin/users/ban_users.php', array( - 'user_ids' => $user_ids, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Bans')), + 'active_page' => 'moderate', + 'focus_element' => array('bans2', 'ban_message'), + 'admin_console' => true, + 'user_ids' => $this->model->ban_users(), ) - ); - - + )->addTemplate('admin/users/ban_users.php')->display(); } // Display bans @@ -128,13 +110,13 @@ public function display() $can_delete = $can_move = $this->user->g_id == FEATHER_ADMIN; $can_ban = $this->user->g_id == FEATHER_ADMIN || ($this->user->g_moderator == '1' && $this->user->g_mod_ban_users == '1'); $can_action = ($can_delete || $can_ban || $can_move) && $num_users > 0; + $this->feather->view2->addAsset('js', 'js/common.js', array('type' => 'text/javascript')); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')); - $page_head = array('js' => ''); - - $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); - - $this->feather->render('admin/users/find_users.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')), + 'active_page' => 'admin', + 'admin_console' => true, + 'paging_links' => $paging_links, 'search' => $search, 'start_from' => $start_from, 'can_delete' => $can_delete, @@ -143,24 +125,20 @@ public function display() 'can_move' => $can_move, 'user_data' => $this->model->print_users($search['conditions'], $search['order_by'], $search['direction'], $start_from), ) - ); - - + )->addTemplate('admin/users/find_users.php')->display(); } + else { + generate_admin_menu('users'); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users')); - $focus_element = array('find_user', 'form[username]'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); - - generate_admin_menu('users'); - - $this->feather->render('admin/users/admin_users.php', array( - 'group_list' => $this->model->get_group_list(), - ) - ); - - + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users')), + 'active_page' => 'admin', + 'admin_console' => true, + 'focus_element' => array('find_user', 'form[username]'), + 'group_list' => $this->model->get_group_list(), + ) + )->addTemplate('admin/users/admin_users.php')->display(); + } } // Show IP statistics for a certain user ID @@ -179,20 +157,16 @@ public function ipstats($id) $p = (!$this->request->get('p') || $this->request->get('p') <= 1 || $this->request->get('p') > $num_pages) ? 1 : intval($this->request->get('p')); $start_from = 50 * ($p - 1); - // Generate paging links - $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$id); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')); - - $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->display(); - - $this->feather->render('admin/users/search_ip.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')), + 'active_page' => 'admin', + 'admin_console' => true, + 'page' => $p, + 'paging_links' => ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$id), 'start_from' => $start_from, 'ip_data' => $this->model->get_ip_stats($id, $start_from), ) - ); - - + )->addTemplate('admin/users/search_ip.php')->display(); } // Show IP statistics for a certain user IP @@ -215,19 +189,15 @@ public function showusers($ip) $p = (!$this->request->get('p') || $this->request->get('p') <= 1 || $this->request->get('p') > $num_pages) ? 1 : intval($this->request->get('p')); $start_from = 50 * ($p - 1); - // Generate paging links - $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$ip); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')); - - $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->display(); - - $this->feather->render('admin/users/show_users.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')), + 'active_page' => 'admin', + 'admin_console' => true, + 'paging_links' => ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$ip), + 'page' => $p, 'start_from' => $start_from, 'info' => $this->model->get_info_poster($ip, $start_from), ) - ); - - + )->addTemplate('admin/users/show_users.php')->display(); } } diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 7053b0ab..cf1ca6c3 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -237,7 +237,6 @@ public function call() // Set default style and assets $this->app->view2->setStyle($this->forum_settings['o_default_style']); $this->app->view2->addAsset('js', 'style/FeatherBB/phone.min.js'); - $this->app->view2->addAsset('js', 'js/common.js'); // Populate FeatherBB Slim object with forum_settings vars $this->hydrate('forum_settings', $this->forum_settings); diff --git a/model/admin/groups.php b/model/admin/groups.php index 04218d1c..7f6b3d6b 100644 --- a/model/admin/groups.php +++ b/model/admin/groups.php @@ -283,11 +283,7 @@ public function set_default_group($groups) ->update_many('conf_value', $group_id); // Regenerate the config cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_config_cache(); + $this->feather->cache->store('config', \model\cache::get_config()); redirect(get_link('admin/groups/'), __('Default group redirect')); } From 4f21148800347d44451cf9f01f286ccf01549ae1 Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 27 Aug 2015 21:34:55 +0200 Subject: [PATCH 219/353] Remove legacy templates.path --- include/classes/core.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/include/classes/core.class.php b/include/classes/core.class.php index cf1ca6c3..9da291be 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -249,7 +249,6 @@ public function call() $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); $forum_date_formats = array($this->forum_settings['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); - $this->app->config('templates.path', $this->app->forum_env['FEATHER_ROOT'].'style/FeatherBB/view/'); // Call FeatherBBAuth middleware $this->next->call(); } From 420b1b7a94ed713e6e09bca54d687379db79cf6e Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 27 Aug 2015 21:41:08 +0200 Subject: [PATCH 220/353] Update /view folder --- view/admin/censoring.php | 2 +- view/admin/groups/add_edit_group.php | 2 +- view/admin/groups/admin_groups.php | 4 +- view/admin/index.php | 2 +- view/admin/menu.php | 2 +- view/admin/options.php | 264 +++++++++++++-------------- view/admin/parser.php | 2 +- view/admin/permissions.php | 44 ++--- view/edit.php | 8 +- view/help.php | 2 +- view/index.php | 8 +- view/misc/email.php | 4 +- view/misc/rules.php | 6 +- view/moderate/moderator_forum.php | 6 +- view/post.php | 16 +- view/profile/section_display.php | 12 +- view/profile/section_personality.php | 14 +- view/profile/section_privacy.php | 4 +- view/register/form.php | 10 +- view/register/rules.php | 2 +- view/search/form.php | 2 +- view/viewforum.php | 10 +- view/viewtopic.php | 18 +- 23 files changed, 222 insertions(+), 222 deletions(-) diff --git a/view/admin/censoring.php b/view/admin/censoring.php index 71c253f7..cf080869 100644 --- a/view/admin/censoring.php +++ b/view/admin/censoring.php @@ -22,7 +22,7 @@
    -

    '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    +

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    - +
    - +
    - +
    @@ -177,10 +177,10 @@
    - - @@ -192,7 +192,7 @@
    - - '.__('PHP manual').'') ?> + + forum_settings['o_time_format'], $timestamp), ''.__('PHP manual').'') ?>
    - - '.__('PHP manual').'') ?> + + forum_settings['o_date_format'], $timestamp), ''.__('PHP manual').'') ?>
    - +
    - +
    - +
    - - @@ -287,10 +287,10 @@
    - - @@ -299,10 +299,10 @@
    - - @@ -311,10 +311,10 @@
    - - @@ -323,10 +323,10 @@
    - - @@ -335,10 +335,10 @@
    - - @@ -347,35 +347,35 @@
    - +
    - +
    - +
    - +
    - +
    - - @@ -403,10 +403,10 @@
    - - @@ -415,10 +415,10 @@
    - - '.__('Censoring').'') ?> @@ -427,10 +427,10 @@
    - - @@ -439,10 +439,10 @@
    - - @@ -451,10 +451,10 @@
    - - @@ -463,10 +463,10 @@
    - - @@ -475,10 +475,10 @@
    - - @@ -487,10 +487,10 @@
    - - @@ -499,7 +499,7 @@
    - +
    - - - @@ -531,7 +531,7 @@
    - - - @@ -566,7 +566,7 @@
    - +
    - - @@ -594,28 +594,28 @@
    - +
    - +
    - +
    - +
    - +
    - +
    - - @@ -657,10 +657,10 @@
    - - @@ -669,14 +669,14 @@
    - +
    - +
    - +forum_settings['o_smtp_pass']) ? random_key(feather_strlen($feather->forum_settings['o_smtp_pass']), true) : ''; ?> @@ -693,10 +693,10 @@
    - - @@ -714,10 +714,10 @@
    - - @@ -726,10 +726,10 @@
    - - @@ -738,10 +738,10 @@
    - - @@ -750,10 +750,10 @@
    - - @@ -762,7 +762,7 @@
    - +
    - - -
    - - @@ -805,7 +805,7 @@
    - +
    - - @@ -833,7 +833,7 @@
    - +
    +
    - - @@ -40,10 +40,10 @@
    - - @@ -52,10 +52,10 @@
    - - @@ -64,10 +64,10 @@
    - - @@ -76,10 +76,10 @@
    - - @@ -97,10 +97,10 @@
    - - @@ -109,10 +109,10 @@
    - - @@ -121,10 +121,10 @@
    - - @@ -133,14 +133,14 @@
    - +
    - +
    - - @@ -168,10 +168,10 @@
    - - diff --git a/style/FeatherBB/view/edit.php b/style/FeatherBB/view/edit.php index 48a692e8..829d0c17 100644 --- a/style/FeatherBB/view/edit.php +++ b/style/FeatherBB/view/edit.php @@ -89,10 +89,10 @@
    diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index 470d5c6b..2826444c 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -63,7 +63,7 @@ +if ($feather->forum_settings['o_quickjump'] == '1' && !empty($quickjump)) { ?>
    @@ -87,27 +87,27 @@ forum_settings['o_feed_type'] == '1') { echo "\t\t\t\t".''."\n"; - } elseif ($feather_config['o_feed_type'] == '2') { + } elseif ($feather->forum_settings['o_feed_type'] == '2') { echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewforum') { - if ($feather_config['o_feed_type'] == '1') { + if ($feather->forum_settings['o_feed_type'] == '1') { echo "\t\t\t\t".''."\n"; - } elseif ($feather_config['o_feed_type'] == '2') { + } elseif ($feather->forum_settings['o_feed_type'] == '2') { echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewtopic') { - if ($feather_config['o_feed_type'] == '1') { + if ($feather->forum_settings['o_feed_type'] == '1') { echo "\t\t\t\t".''."\n"; - } elseif ($feather_config['o_feed_type'] == '2') { + } elseif ($feather->forum_settings['o_feed_type'] == '2') { echo "\t\t\t\t".''."\n"; } } ?> -

    FeatherBB'.(($feather_config['o_show_version'] == '1') ? ' '.$feather_config['o_cur_version'] : '')) ?>

    +

    FeatherBB'.(($feather->forum_settings['o_show_version'] == '1') ? ' '.$feather->forum_settings['o_cur_version'] : '')) ?>

    diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php index 9b662b3a..0068a5f6 100644 --- a/style/FeatherBB/view/header.php +++ b/style/FeatherBB/view/header.php @@ -92,21 +92,21 @@ function process_form(the_form)

    -

    +

    forum_settings['o_board_title']) ?>

    -
    +
    forum_settings['o_board_desc']) ?>

    - user->g_read_board == '1' && $feather_config['o_announcement'] == '1') : ?> + user->g_read_board == '1' && $feather->forum_settings['o_announcement'] == '1') : ?>

    -
    +
    forum_settings['o_announcement_message'] ?>
    diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php index 2ecf9e36..d171ddab 100644 --- a/style/FeatherBB/view/help.php +++ b/style/FeatherBB/view/help.php @@ -41,7 +41,7 @@

    -

    [url=][/url]

    +

    [url=]forum_settings['o_board_title']) ?>[/url] forum_settings['o_board_title']) ?>

    [url][/url]

    [url=/help/][/url]

    [email]myname@example.com[/email] myname@example.com

    diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php index 35b67b41..8b636222 100644 --- a/style/FeatherBB/view/moderate/moderator_forum.php +++ b/style/FeatherBB/view/moderate/moderator_forum.php @@ -40,7 +40,7 @@
    '.__('Empty forum').'
    diff --git a/view/admin/groups/add_edit_group.php b/view/admin/groups/add_edit_group.php index bc2bc244..ae278dce 100644 --- a/view/admin/groups/add_edit_group.php +++ b/view/admin/groups/add_edit_group.php @@ -54,7 +54,7 @@ - +forum_settings['o_default_user_group'] != $group['info']['g_id']): ?> @@ -50,124 +50,124 @@ @@ -275,10 +275,10 @@ @@ -391,10 +391,10 @@ @@ -515,13 +515,13 @@ @@ -582,10 +582,10 @@ @@ -631,24 +631,24 @@ @@ -684,7 +684,7 @@ @@ -770,13 +770,13 @@ @@ -793,10 +793,10 @@ @@ -821,10 +821,10 @@ diff --git a/view/admin/parser.php b/view/admin/parser.php index aec1f767..e32369b6 100644 --- a/view/admin/parser.php +++ b/view/admin/parser.php @@ -208,7 +208,7 @@ - diff --git a/view/admin/permissions.php b/view/admin/permissions.php index a70328ae..2b1bf413 100644 --- a/view/admin/permissions.php +++ b/view/admin/permissions.php @@ -28,10 +28,10 @@ @@ -156,10 +156,10 @@ - +forum_settings['o_topic_views'] == '1'): ?> @@ -63,7 +63,7 @@ - +forum_settings['o_topic_views'] == '1'): ?> @@ -72,7 +72,7 @@ } if (empty($topic_data)): - $colspan = ($feather_config['o_topic_views'] == '1') ? 5 : 4; + $colspan = ($feather->forum_settings['o_topic_views'] == '1') ? 5 : 4; $button_status = ' disabled="disabled"'; echo "\t\t\t\t\t".''."\n"; endif; diff --git a/view/post.php b/view/post.php index f1d22d07..ee2531da 100644 --- a/view/post.php +++ b/view/post.php @@ -98,14 +98,14 @@ user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); - $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; + $email_label = ($feather->forum_settings['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_form_name = ($feather->forum_settings['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - @@ -121,10 +121,10 @@
    @@ -172,7 +172,7 @@ forum_settings['o_topic_review'] != '0') : ?>

    diff --git a/view/profile/section_display.php b/view/profile/section_display.php index 5da0f4b4..ced4459f 100644 --- a/view/profile/section_display.php +++ b/view/profile/section_display.php @@ -55,26 +55,26 @@ } ?> - +forum_settings['o_smilies'] == '1' || $feather->forum_settings['o_smilies_sig'] == '1' || $feather->forum_settings['o_signatures'] == '1' || $feather->forum_settings['o_avatars'] == '1' || ($feather->forum_settings['p_message_bbcode'] == '1' && $feather->forum_settings['p_message_img_tag'] == '1')): ?>

    -
    -
    +forum_settings['o_forum_subscriptions'] == '1' || $feather->forum_settings['o_topic_subscriptions'] == '1'): ?>
    @@ -46,7 +46,7 @@ -
    -
    +forum_settings['o_regs_verify'] == '0'): ?>
    @@ -75,14 +75,14 @@
    - + forum_settings['o_regs_verify'] == '1') ? __('Email legend 2') : __('Email legend') ?>
    -

    +forum_settings['o_regs_verify'] == '1'): ?>

    -
    diff --git a/view/search/form.php b/view/search/form.php index 4731b068..16cd788a 100644 --- a/view/search/form.php +++ b/view/search/form.php @@ -41,7 +41,7 @@

    -user->is_admmod ? '

    '.__('Search multiple forums info').'

    ' : '') ?> +forum_settings['o_search_all_forums'] == '1' || $feather->user->is_admmod ? '

    '.__('Search multiple forums info').'

    ' : '') ?>
    diff --git a/view/viewforum.php b/view/viewforum.php index a35faf22..a9673fa0 100644 --- a/view/viewforum.php +++ b/view/viewforum.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -36,7 +36,7 @@
    - +forum_settings['o_topic_views'] == '1'): ?> @@ -56,7 +56,7 @@ - + forum_settings['o_topic_views'] == '1'): ?> @@ -66,7 +66,7 @@ if (empty($forum_data)): ?> - diff --git a/view/admin/parser.php b/view/admin/parser.php index e32369b6..df29eb0d 100644 --- a/view/admin/parser.php +++ b/view/admin/parser.php @@ -16,7 +16,7 @@

    - +

    diff --git a/view/admin/permissions.php b/view/admin/permissions.php index 2b1bf413..e8201e72 100644 --- a/view/admin/permissions.php +++ b/view/admin/permissions.php @@ -16,7 +16,7 @@

    - +

    diff --git a/view/admin/reports.php b/view/admin/reports.php index 63251681..163e25b0 100644 --- a/view/admin/reports.php +++ b/view/admin/reports.php @@ -16,7 +16,7 @@

    - +
    - +
    - +
    - +
    @@ -177,10 +177,10 @@
    - - @@ -192,7 +192,7 @@
    - - '.__('PHP manual').'') ?> + + forum_settings['o_time_format'], $timestamp), ''.__('PHP manual').'') ?>
    - - '.__('PHP manual').'') ?> + + forum_settings['o_date_format'], $timestamp), ''.__('PHP manual').'') ?>
    - +
    - +
    - +
    - - @@ -287,10 +287,10 @@
    - - @@ -299,10 +299,10 @@
    - - @@ -311,10 +311,10 @@
    - - @@ -323,10 +323,10 @@
    - - @@ -335,10 +335,10 @@
    - - @@ -347,35 +347,35 @@
    - +
    - +
    - +
    - +
    - +
    - - @@ -403,10 +403,10 @@
    - - @@ -415,10 +415,10 @@
    - - '.__('Censoring').'') ?> @@ -427,10 +427,10 @@
    - - @@ -439,10 +439,10 @@
    - - @@ -451,10 +451,10 @@
    - - @@ -463,10 +463,10 @@
    - - @@ -475,10 +475,10 @@
    - - @@ -487,10 +487,10 @@
    - - @@ -499,7 +499,7 @@
    - +
    - - - @@ -531,7 +531,7 @@
    - - - @@ -566,7 +566,7 @@
    - +
    - - @@ -594,28 +594,28 @@
    - +
    - +
    - +
    - +
    - +
    - +
    - - @@ -657,10 +657,10 @@
    - - @@ -669,14 +669,14 @@
    - +
    - +
    - +forum_settings['o_smtp_pass']) ? random_key(feather_strlen($feather->forum_settings['o_smtp_pass']), true) : ''; ?> @@ -693,10 +693,10 @@
    - - @@ -714,10 +714,10 @@
    - - @@ -726,10 +726,10 @@
    - - @@ -738,10 +738,10 @@
    - - @@ -750,10 +750,10 @@
    - - @@ -762,7 +762,7 @@
    - +
    - - -
    - - @@ -805,7 +805,7 @@
    - +
    - - @@ -833,7 +833,7 @@
    - +
    +
    - - @@ -40,10 +40,10 @@
    - - @@ -52,10 +52,10 @@
    - - @@ -64,10 +64,10 @@
    - - @@ -76,10 +76,10 @@
    - - @@ -97,10 +97,10 @@
    - - @@ -109,10 +109,10 @@
    - - @@ -121,10 +121,10 @@
    - - @@ -133,14 +133,14 @@
    - +
    - +
    - - @@ -168,10 +168,10 @@
    - - diff --git a/view/edit.php b/view/edit.php index 48a692e8..829d0c17 100644 --- a/view/edit.php +++ b/view/edit.php @@ -89,10 +89,10 @@
    diff --git a/view/help.php b/view/help.php index 2ecf9e36..d171ddab 100644 --- a/view/help.php +++ b/view/help.php @@ -41,7 +41,7 @@

    -

    [url=][/url]

    +

    [url=]forum_settings['o_board_title']) ?>[/url] forum_settings['o_board_title']) ?>

    [url][/url]

    [url=/help/][/url]

    [email]myname@example.com[/email] myname@example.com

    diff --git a/view/index.php b/view/index.php index 3142e1bd..cc51e8b5 100644 --- a/view/index.php +++ b/view/index.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -92,13 +92,13 @@
    - + forum_settings['o_users_online'] == 1) : ?>
    '.forum_number_format($online['num_users']).'') ?>
    '.forum_number_format($online['num_guests']).'') ?>
    forum_settings['o_users_online'] == 1) : if ($online['num_users'] > 0) { echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.__('Online').'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; } else { @@ -108,4 +108,4 @@ ?>
    - \ No newline at end of file + diff --git a/view/misc/email.php b/view/misc/email.php index eb44dafb..06f96f55 100644 --- a/view/misc/email.php +++ b/view/misc/email.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -34,4 +34,4 @@

    - \ No newline at end of file + diff --git a/view/misc/rules.php b/view/misc/rules.php index 366880ee..feb662ad 100644 --- a/view/misc/rules.php +++ b/view/misc/rules.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -17,7 +17,7 @@

    -
    +
    forum_settings['o_rules_message'] ?>
    - \ No newline at end of file + diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index 35b67b41..8b636222 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -40,7 +40,7 @@
    '.__('Empty forum').'
    +
    @@ -97,4 +97,4 @@ '.implode(' - ', $forum_actions).'

    '."\n" : '') ?>
    -
    \ No newline at end of file + diff --git a/view/viewtopic.php b/view/viewtopic.php index e2681757..e982045b 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -134,16 +134,16 @@
    - -user->auto_notify == '1' || $cur_topic['is_subscribed'])): ?> + +forum_settings['o_topic_subscriptions'] == '1' && ($feather->user->auto_notify == '1' || $cur_topic['is_subscribed'])): ?> user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); - $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; + $email_label = ($feather->forum_settings['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_form_name = ($feather->forum_settings['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
    ">
    From 3f64d51d0ed7a6d73affed7baa287bac0e7c7748 Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 27 Aug 2015 21:41:21 +0200 Subject: [PATCH 221/353] Add the first hook --- include/classes/core.class.php | 3 +++ include/routes.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 9da291be..b36bb627 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -205,6 +205,9 @@ public function call() return new \FeatherBB\Email(); }); + // This is the very first hook fired + $this->app->hooks->fire('core.start'); + if (!is_file($this->forum_env['FORUM_CONFIG_FILE'])) { $installer = new \controller\install; $installer->run(); diff --git a/include/routes.php b/include/routes.php index 499af8df..4d6e1e96 100644 --- a/include/routes.php +++ b/include/routes.php @@ -163,4 +163,4 @@ // 404 not found $feather->notFound(function () { message(__('Bad request'), '404'); -}); +}); \ No newline at end of file From e3aafee77a98d7dc74e55eeead7a3867555c9835 Mon Sep 17 00:00:00 2001 From: adaur Date: Thu, 27 Aug 2015 21:47:29 +0200 Subject: [PATCH 222/353] Get rid of some $feather_config --- extern.php | 71 ++++++++++++++++++------------------------- include/functions.php | 4 +-- 2 files changed, 32 insertions(+), 43 deletions(-) diff --git a/extern.php b/extern.php index cd24d1a6..656aa1ea 100644 --- a/extern.php +++ b/extern.php @@ -57,26 +57,23 @@ define('FEATHER_QUIET_VISIT', 1); -if (!defined('FEATHER_ROOT')) { - define('FEATHER_ROOT', dirname(__FILE__).'/'); -} - // Load Slim Framework require 'Slim/Slim.php'; \Slim\Slim::registerAutoloader(); -// Instantiate Slim -$feather = new \Slim\Slim(); +// Load FeatherBB +require 'include/classes/autoload.class.php'; +\FeatherBB\Loader::registerAutoloader(); -// Load the config -require 'include/config.php'; - -// Load middlewares -$feather->add(new \Slim\Extras\Middleware\CsrfGuard('featherbb_csrf')); // CSRF -$feather->add(new \Slim\Extras\Middleware\FeatherBB($feather_user_settings)); // FeatherBB +// Instantiate Slim and add CSRF +$feather = new \Slim\Slim(); +$feather->add(new \FeatherBB\Csrf()); -$feather->config('cookies.encrypt', true); -$feather->config('debug', true); // As long as we're developing FeatherBB +$feather_settings = array('config_file' => 'include/config.php', + 'cache_dir' => 'cache/', + 'debug' => 'all'); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) +$feather->add(new \FeatherBB\Auth()); +$feather->add(new \FeatherBB\Core($feather_settings)); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/common.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/index.mo'); @@ -139,8 +136,6 @@ function get_current_url($max_length = 0) // function set_default_user() { - global $feather_config; - // Get Slim current session $feather = \Slim\Slim::getInstance(); @@ -188,12 +183,12 @@ function set_default_user() ->update_many('logged', time()); } - $feather->user->disp_topics = $feather_config['o_disp_topics_default']; - $feather->user->disp_posts = $feather_config['o_disp_posts_default']; - $feather->user->timezone = $feather_config['o_default_timezone']; - $feather->user->dst = $feather_config['o_default_dst']; - $feather->user->language = $feather_config['o_default_lang']; - $feather->user->style = $feather_config['o_default_style']; + $feather->user->disp_topics = $feather->forum_settings['o_disp_topics_default']; + $feather->user->disp_posts = $feather->forum_settings['o_disp_posts_default']; + $feather->user->timezone = $feather->forum_settings['o_default_timezone']; + $feather->user->dst = $feather->forum_settings['o_default_dst']; + $feather->user->language = $feather->forum_settings['o_default_lang']; + $feather->user->style = $feather->forum_settings['o_default_style']; $feather->user->is_guest = true; $feather->user->is_admmod = false; } @@ -266,13 +261,13 @@ function authenticate_user($user, $password, $password_is_hash = false) // function http_authenticate_user() { - global $feather_config, $feather; + global $feather; if (!$feather->user->is_guest) { return; } - header('WWW-Authenticate: Basic realm="'.$feather_config['o_board_title'].' External Syndication"'); + header('WWW-Authenticate: Basic realm="'.$feather->forum_settings['o_board_title'].' External Syndication"'); header('HTTP/1.0 401 Unauthorized'); } @@ -282,8 +277,6 @@ function http_authenticate_user() // function output_rss($feed) { - global $feather_config; - // Send XML/no cache headers header('Content-Type: application/xml; charset=utf-8'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); @@ -299,8 +292,8 @@ function output_rss($feed) echo "\t\t".''."\n"; echo "\t\t".''.gmdate('r', count($feed['items']) ? $feed['items'][0]['pubdate'] : time()).''."\n"; - if ($feather_config['o_show_version'] == '1') { - echo "\t\t".'FeatherBB '.$feather_config['o_cur_version'].''."\n"; + if ($feather->forum_settings['o_show_version'] == '1') { + echo "\t\t".'FeatherBB '.$feather->forum_settings['o_cur_version'].''."\n"; } else { echo "\t\t".'FeatherBB'."\n"; } @@ -327,8 +320,6 @@ function output_rss($feed) // function output_atom($feed) { - global $feather_config; - // Send XML/no cache headers header('Content-Type: application/atom+xml; charset=utf-8'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); @@ -343,8 +334,8 @@ function output_atom($feed) echo "\t".''."\n"; echo "\t".''.gmdate('Y-m-d\TH:i:s\Z', count($feed['items']) ? $feed['items'][0]['pubdate'] : time()).''."\n"; - if ($feather_config['o_show_version'] == '1') { - echo "\t".'FluxBB'."\n"; + if ($feather->forum_settings['o_show_version'] == '1') { + echo "\t".'FluxBB'."\n"; } else { echo "\t".'FluxBB'."\n"; } @@ -385,8 +376,6 @@ function output_atom($feed) // function output_xml($feed) { - global $feather_config; - // Send XML/no cache headers header('Content-Type: application/xml; charset=utf-8'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); @@ -488,13 +477,13 @@ function output_html($feed) exit(__('Bad request')); } - if ($feather_config['o_censoring'] == '1') { + if ($feather->forum_settings['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); } // Setup the feed $feed = array( - 'title' => $feather_config['o_board_title'].__('Title separator').$cur_topic['subject'], + 'title' => $feather->forum_settings['o_board_title'].__('Title separator').$cur_topic['subject'], 'link' => get_link('topic/'.$tid.'/'.url_friendly($cur_topic['subject']).'/'), 'description' => sprintf(__('RSS description topic'), $cur_topic['subject']), 'items' => array(), @@ -589,7 +578,7 @@ function output_html($feed) } // Only attempt to cache if caching is enabled and we have all or a single forum - if ($feather_config['o_feed_ttl'] > 0 && ($forum_sql == '' || ($forum_name != '' && !isset($_GET['nfid'])))) { + if ($feather->forum_settings['o_feed_ttl'] > 0 && ($forum_sql == '' || ($forum_name != '' && !isset($_GET['nfid'])))) { $cache_id = 'feed'.sha1($feather->user->g_id.'|'.__('lang_identifier').'|'.($order_posted ? '1' : '0').($forum_name == '' ? '' : '|'.$fids[0])); } @@ -602,9 +591,9 @@ function output_html($feed) if (!isset($feed) || $cache_expire < $now) { // Setup the feed $feed = array( - 'title' => $feather_config['o_board_title'].$forum_name, + 'title' => $feather->forum_settings['o_board_title'].$forum_name, 'link' => '/index.php', - 'description' => sprintf(__('RSS description'), $feather_config['o_board_title']), + 'description' => sprintf(__('RSS description'), $feather->forum_settings['o_board_title']), 'items' => array(), 'type' => 'topics' ); @@ -628,7 +617,7 @@ function output_html($feed) ->find_array(); foreach ($result as $cur_topic) { - if ($feather_config['o_censoring'] == '1') { + if ($feather->forum_settings['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); } @@ -664,7 +653,7 @@ function output_html($feed) require FEATHER_ROOT.'include/cache.php'; } - $content = ''; + $content = 'forum_settings['o_feed_ttl'] * 60)).';'."\n\n".'?>'; featherbb_write_cache_file('cache_'.$cache_id.'.php', $content); } } diff --git a/include/functions.php b/include/functions.php index c9c4087d..2189bb05 100644 --- a/include/functions.php +++ b/include/functions.php @@ -89,7 +89,7 @@ function get_admin_ids() // function check_username($username, $errors, $exclude_id = null) { - global $feather, $feather_config, $errors, $feather_bans; + global $feather, $errors, $feather_bans; // Include UTF-8 function require_once FEATHER_ROOT.'include/utf8/strcasecmp.php'; @@ -116,7 +116,7 @@ function check_username($username, $errors, $exclude_id = null) } // Check username for any censored words - if ($feather_config['o_censoring'] == '1' && censor_words($username) != $username) { + if ($feather->forum_settings['o_censoring'] == '1' && censor_words($username) != $username) { $errors[] = __('Username censor'); } From 9a9fa3f727e5362dac721597af40c33320f8ce4b Mon Sep 17 00:00:00 2001 From: beaver Date: Fri, 28 Aug 2015 02:35:57 +0200 Subject: [PATCH 223/353] Begin plugins management --- .gitignore | 2 + composer.json | 19 +++ controller/admin/plugins.php | 62 ++++++- include/classes/core.class.php | 5 +- include/classes/plugin.class.php | 213 +++++++++++++++++++++++++ include/routes.php | 6 +- index.php | 7 +- plugins/Test.plugin.php | 48 ++++++ plugins/Test2.plugin.php | 48 ++++++ plugins/test/plugintest.php | 2 +- style/FeatherBB.css | 63 ++++++++ style/FeatherBB/view/admin/menu.php | 73 +++------ style/FeatherBB/view/admin/plugins.php | 54 +++++++ view/admin/menu.php | 4 +- 14 files changed, 544 insertions(+), 62 deletions(-) create mode 100644 composer.json create mode 100644 include/classes/plugin.class.php create mode 100644 plugins/Test.plugin.php create mode 100644 plugins/Test2.plugin.php create mode 100644 style/FeatherBB/view/admin/plugins.php diff --git a/.gitignore b/.gitignore index b1fc652e..be477e41 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ include/config.php nbproject/ lang/French .htaccess +vendor +composer.lock diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..5e356d38 --- /dev/null +++ b/composer.json @@ -0,0 +1,19 @@ +{ + "name": "featherbb/featherbb", + "type": "project", + "license": "GNU General Public Licence", + "description": "A multi-framework Composer library installer", + "keywords": ["forum", "lightweight", "featherbb"], + "homepage": "http://featherbb.github.com/installers/", + "authors": [ + {"name": "adaur"}, + {"name": "capkokoon"}, + {"name": "beaver"} + ], + "autoload": { + "classmap": ["plugins", "include/classes"] + }, + "require-dev": { + "phpunit/phpunit": "4.1.*" + } +} diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index 61f72ac7..83e1f480 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -20,7 +20,7 @@ public function __construct() $this->request = $this->feather->request; $this->header = new \controller\header(); $this->footer = new \controller\footer(); - $this->model = new \model\admin\plugins(); + // $this->model = new \model\admin\plugins(); require FEATHER_ROOT . 'include/common_admin.php'; } @@ -29,6 +29,66 @@ public function __autoload($class_name) require FEATHER_ROOT . $class_name . '.php'; } + public function index() + { + if (!$this->user->is_admmod) { + message(__('No permission'), '403'); + } + + // Update permissions + // if ($this->feather->request->isPost()) { + // $this->model->update_permissions(); + // } + + $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')); + + $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); + + generate_admin_menu('plugins'); + + $pluginsList = \FeatherBB\Plugin::getPluginsList(); + + $this->feather->render('admin/plugins.php', array( + 'pluginsList' => $pluginsList + ) + ); + + $this->footer->display(); + } + + public function activate() + { + if (!$this->user->is_admmod) { + message(__('No permission'), '403'); + } + + // Update permissions + // if ($this->feather->request->isPost()) { + // $this->model->update_permissions(); + // } + + // The plugin to load should be supplied via GET + $plugin = $this->request->get('plugin') ? $this->request->get('plugin') : null; + if (!$plugin) { + message(__('Bad request'), '404'); + } + + // Require all valide filenames... + \FeatherBB\Plugin::getPluginsList(); + // And make sure the plugin actually extends base Plugin class + if (!property_exists('\plugin\\'.$plugin, 'isFeatherPlugin')) { + message(sprintf(__('No plugin message'), $plugin)); + } + + try { + \FeatherBB\Plugin::activate($plugin); + redirect(get_link('admin/plugins/'), "Plugin $plugin activated"); + } catch (\Exception $e) { + redirect(get_link('admin/plugins/'), $e->getMessage()); + } + + } + public function display() { if (!$this->user->is_admmod) { diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 7053b0ab..bcba7571 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -46,7 +46,7 @@ public function __construct(array $data) require $this->forum_env['FEATHER_ROOT'].'include/classes/pomo/MO.php'; require $this->forum_env['FEATHER_ROOT'].'include/l10n.php'; require $this->forum_env['FEATHER_ROOT'].'include/classes/database.class.php'; - require $this->forum_env['FEATHER_ROOT'].'plugins/test/plugintest.php'; + // require $this->forum_env['FEATHER_ROOT'].'plugins/test/plugintest.php'; // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); @@ -244,7 +244,8 @@ public function call() $this->app->config = $this->forum_settings; // Legacy extract($this->forum_settings); // Legacy - new \plugin\plugintest(); + // new \plugin\plugintest(); + \FeatherBB\Plugin::runActivePlugins(); // Define time formats $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); diff --git a/include/classes/plugin.class.php b/include/classes/plugin.class.php new file mode 100644 index 00000000..24d72ea5 --- /dev/null +++ b/include/classes/plugin.class.php @@ -0,0 +1,213 @@ +feather = \Slim\Slim::getInstance(); + $this->user = $this->feather->user; + $this->hook = $this->feather->hooks; + } + + /** + * Get a list of all available plugins. + */ + public static function getPluginsList() + { + $plugins = array(); + + // Get all files declaring a new plugin + $directory = new \RecursiveDirectoryIterator('plugins'); + $iterator = new \RecursiveIteratorIterator($directory); + $pluginClasses = new \RegexIterator($iterator, '/^.+\/(\\w+)\.plugin\.php$/i', \RecursiveRegexIterator::GET_MATCH); + + // Require these files to access their properties and display them in view + foreach ($pluginClasses as $pluginClass) { + require $pluginClass[0]; + $className = "\plugin\\".$pluginClass[1]; + $plugins[$pluginClass[1]] = new $className(); + } + + return $plugins; + } + + /** + * Execute hooks of activated plugins + */ + public static function runActivePlugins() + { + // Get all files declaring a new plugin + $directory = new \RecursiveDirectoryIterator('plugins'); + $iterator = new \RecursiveIteratorIterator($directory); + $pluginClasses = new \RegexIterator($iterator, '/^.+\/(\\w+)\.plugin\.php$/i', \RecursiveRegexIterator::GET_MATCH); + + $feather = \Slim\Slim::getInstance(); + $activePlugins = $feather->cache->retrieve('active_plugins') ? $feather->cache->retrieve('active_plugins') : array(); + + // Require these files to access their properties and display them in view + foreach ($pluginClasses as $pluginClass) { + require $pluginClass[0]; + $className = "\plugin\\".$pluginClass[1]; + $plugin = new $className(); + $plugin->runHooks(); + } + + return true; + } + + /** + * Activate a plugin based on class name + */ + public static function activate($pluginName) + { + // Instantiate the plugin + $className = "\plugin\\".$pluginName; + $plugin = new $className; + + // TODO: Allow creation of new tables in database + // \FeatherBB\Core::init_db($data);; + // $feather = \Slim\Slim::getInstance(); + // // Handle db prefix + // $db_prefix = $feather->forum_settings['db_prefix'] + // // Create tables + // foreach ($this->getDatabaseScheme() as $table => $sql) { + // if (!$this->createTable($db_prefix.$table, $sql)) { + // // Error handling + // $this->errors[] = 'A problem was encountered while creating table '.$table; + // } + // } + // // Populate tables with default values + // foreach ($this->loadMockData() as $group_name => $group_data) { + // $this->model->addData('groups', $group_data); + // } + + $feather = \Slim\Slim::getInstance(); + $activePlugins = $feather->cache->isCached('active_plugins') ? $feather->cache->retrieve('active_plugins') : array(); + + // $feather->cache->delete('active_plugins'); + // Check if plugin isn't already activated + if (!array_key_exists($pluginName, $activePlugins)) { + $activePlugins[$pluginName] = true; + $feather->cache->store('active_plugins', $activePlugins); + return true; + } + throw new \Exception("Plugin $pluginName already activated", 1); + } + + protected function runHooks() + { + // Daughter classes may configure hooks in this function + } + + /** + * Getters + */ + + public function getName() + { + return $this->name; + } + + public function getVersion() + { + return $this->version; + } + + public function getAuthor() + { + return $this->author; + } + + public function getDescription() + { + return $this->description; + } + + protected function getDatabaseScheme() + { + return $this->databaseScheme; + } + + + protected function createTable($table_name, $sql) + { + $db = DB::get_db(); + $req = preg_replace('/%t%/', '`'.$table_name.'`', $sql); + return $db->exec($req); + } + + // protected function addData($table_name, array $data) + // { + // return (bool) DB::for_table($table_name) + // ->create() + // ->set($data) + // ->save(); + // } + + +} diff --git a/include/routes.php b/include/routes.php index 499af8df..0e58f819 100644 --- a/include/routes.php +++ b/include/routes.php @@ -143,7 +143,11 @@ }); // Admin plugins - $feather->map('/loader(/)', '\controller\admin\plugins:display')->via('GET', 'POST'); + $feather->group('/plugins', function() use ($feather) { + $feather->map('/(/)', '\controller\admin\plugins:index')->via('GET', 'POST'); + $feather->map('/activate(/)', '\controller\admin\plugins:activate')->via('GET'); + // $feather->map('/loader(/)', '\controller\admin\plugins:display')->via('GET', 'POST'); + }); // Admin maintenance $feather->map('/maintenance(/)', '\controller\admin\maintenance:display')->via('GET', 'POST'); diff --git a/index.php b/index.php index 277c67d2..630afa88 100644 --- a/index.php +++ b/index.php @@ -17,9 +17,12 @@ require 'Slim/Slim.php'; \Slim\Slim::registerAutoloader(); +// Load dependencies +require 'vendor/autoload.php'; + // Load FeatherBB -require 'include/classes/autoload.class.php'; -\FeatherBB\Loader::registerAutoloader(); +// require 'include/classes/autoload.class.php'; +// \FeatherBB\Loader::registerAutoloader(); // Instantiate Slim and add CSRF $feather = new \Slim\Slim(); diff --git a/plugins/Test.plugin.php b/plugins/Test.plugin.php new file mode 100644 index 00000000..04ddea4c --- /dev/null +++ b/plugins/Test.plugin.php @@ -0,0 +1,48 @@ +feather = \Slim\Slim::getInstance(); + // $this->start = $this->feather->start; + // $this->config = $this->feather->config; + // $this->user = $this->feather->user; + // $this->request = $this->feather->request; + // $this->hook = $this->feather->hooks; + // + $this->hook->bind('get_forum_actions', function ($forum_actions) { + $forum_actions[] = 'Test1'; + return $forum_actions; + }); + // + // $this->hook->bind('get_forum_actions', function ($forum_actions) { + // $forum_actions[] = 'Test2'; + // return $forum_actions; + // }); + // + // $this->hook->bind('query_fetch_users_online', function ($query) { + // $query = $query->limit(50); + // return $query; + // }); + + /*$this->hook->bind('query_fetch_users_online', function ($query) { + $query = $query->offset(50); + return $query; + });*/ + } +} diff --git a/plugins/Test2.plugin.php b/plugins/Test2.plugin.php new file mode 100644 index 00000000..8541512e --- /dev/null +++ b/plugins/Test2.plugin.php @@ -0,0 +1,48 @@ +feather = \Slim\Slim::getInstance(); + // $this->start = $this->feather->start; + // $this->config = $this->feather->config; + // $this->user = $this->feather->user; + // $this->request = $this->feather->request; + // $this->hook = $this->feather->hooks; + // + // $this->hook->bind('get_forum_actions', function ($forum_actions) { + // $forum_actions[] = 'Test1'; + // return $forum_actions; + // }); + // + // $this->hook->bind('get_forum_actions', function ($forum_actions) { + // $forum_actions[] = 'Test2'; + // return $forum_actions; + // }); + // + // $this->hook->bind('query_fetch_users_online', function ($query) { + // $query = $query->limit(50); + // return $query; + // }); + + /*$this->hook->bind('query_fetch_users_online', function ($query) { + $query = $query->offset(50); + return $query; + });*/ + } +} diff --git a/plugins/test/plugintest.php b/plugins/test/plugintest.php index c9fe31f2..55460cab 100644 --- a/plugins/test/plugintest.php +++ b/plugins/test/plugintest.php @@ -41,4 +41,4 @@ public function __construct() return $query; });*/ } -} \ No newline at end of file +} diff --git a/style/FeatherBB.css b/style/FeatherBB.css index be3f9568..af06e9ca 100644 --- a/style/FeatherBB.css +++ b/style/FeatherBB.css @@ -1744,3 +1744,66 @@ body #puninstall { #puninstall.pun div.punwrap section.container div#brdmain div.blockform div.box form#install div.inform fieldset div.infldset p{ margin-bottom: 12px; } + +table { + border-collapse: collapse; + border-spacing: 0; +} +td, +th { + padding: 0; +} +table { + background-color: transparent; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #777777; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #dddddd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #dddddd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} diff --git a/style/FeatherBB/view/admin/menu.php b/style/FeatherBB/view/admin/menu.php index b33c2727..4be6ff1d 100644 --- a/style/FeatherBB/view/admin/menu.php +++ b/style/FeatherBB/view/admin/menu.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -19,25 +19,15 @@
      - > - > -user->g_mod_ban_users == '1'): ?> > - > -
    + > + > + user->g_mod_ban_users == '1'): ?> + > + + > + +
      - > - > - > - > - > - > - > - > + > + > + > + > + > + > + > + > + >
    @@ -109,4 +76,4 @@ } ?> - \ No newline at end of file + diff --git a/style/FeatherBB/view/admin/plugins.php b/style/FeatherBB/view/admin/plugins.php new file mode 100644 index 00000000..ab69b6d8 --- /dev/null +++ b/style/FeatherBB/view/admin/plugins.php @@ -0,0 +1,54 @@ + +
    +

    Plugins

    +
    +
    + + + + + + + + + + $plugin) : ?> + + + + + + +
    The following plugins are available
    ExtensionDescription
    + getName(); ?> +
    + Activate + +
    +
    + getDescription(); ?> +
    + Version getVersion(); ?> | + By getAuthor(); ?> +
    +
    +

    éléments

    +
    +
    +
    + +
    + diff --git a/view/admin/menu.php b/view/admin/menu.php index b33c2727..29d6bee7 100644 --- a/view/admin/menu.php +++ b/view/admin/menu.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -109,4 +109,4 @@ } ?> - \ No newline at end of file + From 3659413dfd534c86bdb1533bf96a1661e7b68e51 Mon Sep 17 00:00:00 2001 From: beaver Date: Fri, 28 Aug 2015 02:55:46 +0200 Subject: [PATCH 224/353] Merge branch 'development' into 'plugins' & solve conflicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lot of improvements to be done, this is just a « first brick » commit. --- controller/admin/bans.php | 66 +- controller/admin/categories.php | 15 +- controller/admin/censoring.php | 18 +- controller/admin/forums.php | 52 +- controller/admin/groups.php | 65 +- controller/admin/index.php | 20 +- controller/admin/maintenance.php | 30 +- controller/admin/options.php | 18 +- controller/admin/parser.php | 18 +- controller/admin/permissions.php | 16 +- controller/admin/plugins.php | 39 +- controller/admin/reports.php | 17 +- controller/admin/statistics.php | 19 +- controller/admin/users.php | 132 ++- controller/delete.php | 52 +- controller/edit.php | 9 +- controller/footer.php | 73 -- controller/header.php | 269 ------ controller/help.php | 13 +- controller/index.php | 1 - controller/install.php | 2 - controller/login.php | 42 +- controller/misc.php | 103 +-- controller/moderate.php | 142 ++-- controller/post.php | 73 +- controller/register.php | 43 +- controller/search.php | 60 +- controller/userlist.php | 58 +- controller/viewforum.php | 61 +- controller/viewtopic.php | 108 ++- extern.php | 71 +- include/classes/auth.class.php | 28 +- include/classes/core.class.php | 5 +- include/classes/csrf.class.php | 32 +- include/classes/plugin.class.php | 2 +- include/classes/view.class.php | 767 +++++++++--------- include/common_admin.php | 7 +- include/functions.php | 31 +- include/routes.php | 2 +- model/admin/groups.php | 6 +- model/moderate.php | 8 +- model/search.php | 8 +- model/viewforum.php | 31 +- model/viewtopic.php | 31 +- style/FeatherBB/view/admin/censoring.php | 2 +- .../view/admin/groups/add_edit_group.php | 2 +- .../view/admin/groups/admin_groups.php | 4 +- style/FeatherBB/view/admin/index.php | 2 +- style/FeatherBB/view/admin/options.php | 264 +++--- style/FeatherBB/view/admin/parser.php | 2 +- style/FeatherBB/view/admin/permissions.php | 44 +- style/FeatherBB/view/edit.php | 8 +- style/FeatherBB/view/footer.new.php | 18 +- style/FeatherBB/view/footer.php | 16 +- style/FeatherBB/view/header.new.php | 18 +- style/FeatherBB/view/header.php | 8 +- style/FeatherBB/view/help.php | 2 +- style/FeatherBB/view/index.php | 8 +- style/FeatherBB/view/misc/email.php | 4 +- style/FeatherBB/view/misc/rules.php | 6 +- .../view/moderate/moderator_forum.php | 6 +- style/FeatherBB/view/post.php | 16 +- .../view/profile/section_display.php | 12 +- .../view/profile/section_personality.php | 14 +- .../view/profile/section_privacy.php | 4 +- style/FeatherBB/view/register/form.php | 10 +- style/FeatherBB/view/register/rules.php | 2 +- style/FeatherBB/view/search/form.php | 2 +- style/FeatherBB/view/viewforum.php | 10 +- style/FeatherBB/view/viewtopic.php | 18 +- view/admin/censoring.php | 2 +- view/admin/groups/add_edit_group.php | 2 +- view/admin/groups/admin_groups.php | 4 +- view/admin/index.php | 2 +- view/admin/menu.php | 2 +- view/admin/options.php | 264 +++--- view/admin/parser.php | 2 +- view/admin/permissions.php | 44 +- view/edit.php | 8 +- view/help.php | 2 +- view/index.php | 8 +- view/misc/email.php | 4 +- view/misc/rules.php | 6 +- view/moderate/moderator_forum.php | 6 +- view/post.php | 16 +- view/profile/menu.php | 4 +- view/profile/section_display.php | 12 +- view/profile/section_personality.php | 14 +- view/profile/section_privacy.php | 4 +- view/profile/upload_avatar.php | 8 +- view/register/form.php | 10 +- view/register/rules.php | 2 +- view/search/form.php | 2 +- view/viewforum.php | 10 +- view/viewtopic.php | 18 +- 95 files changed, 1473 insertions(+), 2148 deletions(-) delete mode 100644 controller/footer.php delete mode 100644 controller/header.php diff --git a/controller/admin/bans.php b/controller/admin/bans.php index 0a3dd9d2..e6a8d6ff 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\bans(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/bans.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -46,33 +44,27 @@ public function display() $p = (!$this->request->get('p') || $this->request->get('p') <= 1 || $this->request->get('p') > $num_pages) ? 1 : intval($this->request->get('p')); $start_from = 50 * ($p - 1); - // Generate paging links - $paging_links = '' . __('Pages') . ' ' . paginate_old($num_pages, $p, '?find_ban=&' . implode('&', $ban_info['query_str'])); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans'), __('Results head')); - - $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->enableAdminConsole()->display(); - $ban_data = $this->model->find_ban($start_from); - $this->feather->render('admin/bans/search_ban.php', array( + $this->feather->view2->setPageInfo(array( + 'admin_console' => true, + 'page' => $p, + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans'), __('Results head')), + 'paging_links' => '' . __('Pages') . ' ' . paginate_old($num_pages, $p, '?find_ban=&' . implode('&', $ban_info['query_str'])), 'ban_data' => $ban_data['data'], ) - ); - - $this->footer->display(); + )->addTemplate('admin/bans/search_ban.php')->display(); } + else { + generate_admin_menu('bans'); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); - $focus_element = array('bans', 'new_ban_user'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); - - generate_admin_menu('bans'); - - $this->feather->render('admin/bans/admin_bans.php'); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'admin_console' => true, + 'focus_element' => array('bans', 'new_ban_user'), + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')), + ) + )->addTemplate('admin/bans/admin_bans.php')->display(); + } } public function add($id = null) @@ -85,19 +77,15 @@ public function add($id = null) $this->model->insert_ban(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); - $focus_element = array('bans2', 'ban_user'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); - generate_admin_menu('bans'); - $this->feather->render('admin/bans/add_ban.php', array( + $this->feather->view2->setPageInfo(array( + 'admin_console' => true, + 'focus_element' => array('bans2', 'ban_user'), + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')), 'ban' => $this->model->add_ban_info($id), ) - ); - - $this->footer->display(); + )->addTemplate('admin/bans/add_ban.php')->display(); } public function delete($id) @@ -120,18 +108,14 @@ public function edit($id) $this->model->insert_ban(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); - $focus_element = array('bans2', 'ban_user'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); - generate_admin_menu('bans'); - $this->feather->render('admin/bans/add_ban.php', array( + $this->feather->view2->setPageInfo(array( + 'admin_console' => true, + 'focus_element' => array('bans2', 'ban_user'), + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')), 'ban' => $this->model->edit_ban_info($id), ) - ); - - $this->footer->display(); + )->addTemplate('admin/bans/add_ban.php')->display(); } } diff --git a/controller/admin/categories.php b/controller/admin/categories.php index 397c2c73..916506be 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\categories(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/categories.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -103,16 +101,13 @@ public function display() message(__('No permission'), '403'); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Categories')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('categories'); - $this->feather->render('admin/categories.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Categories')), + 'active_page' => 'admin', + 'admin_console' => true, 'cat_list' => $this->model->get_cat_list(), - )); - - $this->footer->display(); + ))->addTemplate('admin/categories.php')->display(); } } diff --git a/controller/admin/censoring.php b/controller/admin/censoring.php index 6406b9eb..a7367eb9 100644 --- a/controller/admin/censoring.php +++ b/controller/admin/censoring.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\censoring(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/censoring.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -51,19 +49,15 @@ public function display() $this->model->remove_word(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Censoring')); - $focus_element = array('censoring', 'new_search_for'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->enableAdminConsole()->display(); - generate_admin_menu('censoring'); - $this->feather->render('admin/censoring.php', array( - 'feather_config' => $this->config, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Censoring')), + 'focus_element' => array('censoring', 'new_search_for'), + 'active_page' => 'admin', + 'admin_console' => true, 'word_data' => $this->model->get_words(), ) - ); - - $this->footer->display(); + )->addTemplate('admin/censoring.php')->display(); } } diff --git a/controller/admin/forums.php b/controller/admin/forums.php index b1718ed8..ba4cfa60 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\forums(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/forums.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -123,23 +121,18 @@ public function edit_forum($forum_id) } } else { - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('forums'); - $this->feather->render('admin/forums/permissions.php', array( - 'feather_config' => $this->config, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')), + 'active_page' => 'admin', + 'admin_console' => true, 'perm_data' => $this->model->get_permissions($forum_id), 'cur_index' => 7, 'cur_forum' => $this->model->get_forum_info($forum_id), 'forum_data' => $this->model->get_forums(), ) - ); - - $this->footer->display(); + )->addTemplate('admin/forums/permissions.php')->display(); } } @@ -156,20 +149,17 @@ public function delete_forum($forum_id) redirect(get_link('admin/forums/'), __('Forum deleted redirect')); - } else { // If the user hasn't confirmed the delete - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); + } else { // If the user hasn't confirmed generate_admin_menu('forums'); - $this->feather->render('admin/forums/delete_forum.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')), + 'active_page' => 'admin', + 'admin_console' => true, 'cur_forum' => $this->model->get_forum_info($forum_id), ) - ); - - $this->footer->display(); + )->addTemplate('admin/forums/delete_forum.php')->display(); } } @@ -198,21 +188,17 @@ public function display() $this->edit_positions(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('forums'); $categories_model = new \model\admin\categories(); - $this->feather->render('admin/forums/admin_forums.php', array( - 'feather_config' => $this->config, - 'cat_list' => $categories_model->get_cat_list(), - 'forum_data' => $this->model->get_forums(), - 'cur_index' => 4, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')), + 'active_page' => 'admin', + 'admin_console' => true, + 'cat_list' => $categories_model->get_cat_list(), + 'forum_data' => $this->model->get_forums(), + 'cur_index' => 4, ) - ); - - $this->footer->display(); + )->addTemplate('admin/forums/admin_forums.php')->display(); } } diff --git a/controller/admin/groups.php b/controller/admin/groups.php index f2682dc8..2ccffa6a 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\groups(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/groups.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -43,20 +41,16 @@ public function display() $this->model->set_default_group($groups, $this->feather); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('groups'); - $this->feather->render('admin/groups/admin_groups.php', array( - 'feather_config' => $this->config, - 'groups' => $groups, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), + 'active_page' => 'admin', + 'admin_console' => true, + 'groups' => $this->model->fetch_groups(), 'cur_index' => 5, ) - ); - - $this->footer->display(); + )->addTemplate('admin/groups/admin_groups.php')->display(); } public function delete($id) @@ -82,38 +76,30 @@ public function delete($id) if ($this->request->post('del_group_comply') || $this->request->post('del_group')) { $this->model->delete_group($id); } else { - $group_title = $this->model->get_group_title($id); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - - $this->header->setTitle($page_title)->setActivePage('admin')->display(); - generate_admin_menu('groups'); - $this->feather->render('admin/groups/confirm_delete.php', array( - 'group_title' => $group_title, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), + 'active_page' => 'admin', + 'admin_console' => true, + 'group_title' => $this->model->get_group_title($id), 'id' => $id, ) - ); - - $this->footer->display(); + )->addTemplate('admin/groups/confirm_delete.php')->display(); } } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('groups'); - $this->feather->render('admin/groups/delete_group.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), + 'active_page' => 'admin', + 'admin_console' => true, 'id' => $id, 'group_info' => $this->model->get_title_members($id), 'group_list_delete' => $this->model->get_group_list_delete($id), ) - ); - - $this->footer->display(); + )->addTemplate('admin/groups/delete_group.php')->display(); } public function addedit($id = '') @@ -131,26 +117,23 @@ public function addedit($id = '') // Add/edit a group (stage 1) elseif ($this->request->post('add_group') || isset($id)) { - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')); - $required_fields = array('req_title' => __('Group title label')); - $focus_element = array('groups2', 'req_title'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->setRequiredFields($required_fields)->enableAdminConsole()->display(); generate_admin_menu('groups'); $group = $this->model->info_add_group($groups, $id); - $this->feather->render('admin/groups/add_edit_group.php', array( - 'feather_config' => $this->config, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), + 'active_page' => 'admin', + 'admin_console' => true, + 'focus_element' => array('groups2', 'req_title'), + 'required_fields' => array('req_title' => __('Group title label')), 'group' => $group, 'groups' => $groups, 'id' => $id, 'group_list' => $this->model->get_group_list($groups, $group), ) - ); - - $this->footer->display(); + )->addTemplate('admin/groups/delete_group.php')->display(); } } } diff --git a/controller/admin/index.php b/controller/admin/index.php index e48cad10..1069a7cb 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/index.mo'); require FEATHER_ROOT . 'include/common_admin.php'; } @@ -78,20 +76,14 @@ public function display($action = null) } } - $install_folder_exists = is_dir(FEATHER_ROOT.'install'); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Index')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('index'); - $this->feather->render('admin/index.php', array( - 'install_file_exists' => $install_folder_exists, - 'feather_config' => $this->config, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Index')), + 'active_page' => 'admin', + 'admin_console' => true, + 'install_file_exists' => is_dir(FEATHER_ROOT.'install'), ) - ); - - $this->footer->display(); + )->addTemplate('admin/index.php')->display(); } } diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index d58d7e52..cd8c237b 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\maintenance(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/maintenance.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -62,38 +62,32 @@ public function display() $prune_from = feather_trim($this->request->post('prune_from')); $prune_sticky = intval($this->request->post('prune_sticky')); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Prune')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('maintenance'); if ($this->request->post('prune_comply')) { $this->model->prune_comply($prune_from, $prune_sticky); } - $this->feather->render('admin/maintenance/prune.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Prune')), + 'active_page' => 'admin', + 'admin_console' => true, 'prune_sticky' => $prune_sticky, 'prune_from' => $prune_from, 'prune' => $this->model->get_info_prune($prune_sticky, $prune_from), ) - ); - - $this->footer->display(); + )->addTemplate('admin/maintenance/prune.php')->display(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Maintenance')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('maintenance'); - $this->feather->render('admin/maintenance/admin_maintenance.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Maintenance')), + 'active_page' => 'admin', + 'admin_console' => true, 'first_id' => $this->model->get_first_id(), 'categories' => $this->model->get_categories(), ) - ); - - $this->footer->display(); + )->addTemplate('admin/maintenance/admin_maintenance.php')->display(); } } diff --git a/controller/admin/options.php b/controller/admin/options.php index 230a9dbf..589b48cb 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\options(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/options.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -40,22 +38,16 @@ public function display() $this->model->update_options(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Options')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('options'); - $this->feather->render('admin/options.php', array( - 'feather_config' => $this->config, - 'feather_user' => $this->user, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Options')), + 'active_page' => 'admin', + 'admin_console' => true, 'languages' => forum_list_langs(), 'styles' => $this->model->get_styles(), 'times' => $this->model->get_times(), - 'feather' => $this->feather, ) - ); - - $this->footer->display(); + )->addTemplate('admin/options.php')->display(); } } diff --git a/controller/admin/parser.php b/controller/admin/parser.php index e2c42f34..30b48a08 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\parser(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/parser.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -209,25 +207,19 @@ public function display() redirect(get_link('admin/parser/'), $lang_admin_parser['save_success']); } - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Parser')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('parser'); - $this->feather->render('admin/parser.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Parser')), + 'active_page' => 'admin', + 'admin_console' => true, 'lang_admin_parser' => $lang_admin_parser, - 'smiley_files' => $this->model->get_smiley_files(), 'bbcd' => $bbcd, 'config' => $config, - 'feather_config' => $this->config, 'smilies' => $smilies, 'i' => -1, ) - ); - - $this->footer->display(); + )->addTemplate('admin/parser.php')->display(); } } diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index 78133649..ac1881bd 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\permissions(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/permissions.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -41,17 +39,13 @@ public function display() $this->model->update_permissions(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('permissions'); - $this->feather->render('admin/permissions.php', array( - 'feather_config' => $this->config, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')), + 'active_page' => 'admin', + 'admin_console' => true, ) - ); - - $this->footer->display(); + )->addTemplate('admin/permissions.php')->display(); } } diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index 83e1f480..3bfe6102 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -18,9 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); - // $this->model = new \model\admin\plugins(); require FEATHER_ROOT . 'include/common_admin.php'; } @@ -40,20 +37,27 @@ public function index() // $this->model->update_permissions(); // } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); + // $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); generate_admin_menu('plugins'); $pluginsList = \FeatherBB\Plugin::getPluginsList(); - $this->feather->render('admin/plugins.php', array( - 'pluginsList' => $pluginsList + $this->feather->view2->setPageInfo(array( + 'admin_console' => true, + 'active_page' => 'admin', + 'focus_element' => array('bans', 'new_ban_user'), + 'pluginsList' => $pluginsList, + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), 'Plugins'), ) - ); - - $this->footer->display(); + )->addTemplate('admin/plugins.php')->display(); + + // $this->feather->render('admin/plugins.php', array( + // 'pluginsList' => $pluginsList + // ) + // ); + // + // $this->footer->display(); } public function activate() @@ -117,10 +121,6 @@ public function display() $_SERVER['REQUEST_URI'] = (isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : '').'?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), str_replace('_', ' ', substr($plugin, strpos($plugin, '_') + 1, -4))); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - // Attempt to load the plugin. We don't use @ here to suppress error messages, // because if we did and a parse error occurred in the plugin, we would only // get the "blank page of death" @@ -129,8 +129,11 @@ public function display() message(sprintf(__('Plugin failed message'), $plugin)); } - $this->feather->render('admin/loader.php'); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), str_replace('_', ' ', substr($plugin, strpos($plugin, '_') + 1, -4))), + 'active_page' => 'admin', + 'admin_console' => true, + ) + )->addTemplate('admin/loader.php')->display(); } } diff --git a/controller/admin/reports.php b/controller/admin/reports.php index 3a9ced60..7e2c933a 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\reports(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/reports.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -41,18 +41,15 @@ public function display() $this->model->zap_report(); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Reports')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('reports'); - $this->feather->render('admin/reports.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Reports')), + 'active_page' => 'admin', + 'admin_console' => true, 'report_data' => $this->model->get_reports(), 'report_zapped_data' => $this->model->get_zapped_reports(), ) - ); - - $this->footer->display(); + )->addTemplate('admin/reports.php')->display(); } } diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 65dae86d..7bd279af 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\admin\statistics(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/index.mo'); require FEATHER_ROOT . 'include/common_admin.php'; @@ -36,26 +36,21 @@ public function display() message(__('No permission'), '403'); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Server statistics')); - - $this->header->setTitle($page_title)->setActivePage('admin')->enableAdminConsole()->display(); - generate_admin_menu('index'); $total = $this->model->get_total_size(); - $this->feather->render('admin/statistics.php', array( - 'feather_config' => $this->config, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Server statistics')), + 'active_page' => 'admin', + 'admin_console' => true, 'server_load' => $this->model->get_server_load(), 'num_online' => $this->model->get_num_online(), 'total_size' => $total['size'], 'total_records' => $total['records'], 'php_accelerator' => $this->model->get_php_accelerator(), - 'feather' => $this->feather, ) - ); - - $this->footer->display(); + )->addTemplate('admin/statistics.php')->display(); } diff --git a/controller/admin/users.php b/controller/admin/users.php index aecd2f43..705234ef 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -18,11 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\admin\users(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/users.mo'); - $this->header->enableAdminConsole(); require FEATHER_ROOT . 'include/common_admin.php'; } @@ -43,20 +40,15 @@ public function display() message(__('No permission'), '403'); } - $move = $this->model->move_users(); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Move users')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - generate_admin_menu('users'); - $this->feather->render('admin/users/move_users.php', array( - 'move' => $move, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Move users')), + 'active_page' => 'moderate', + 'admin_console' => true, + 'move' => $this->model->move_users(), ) - ); - - $this->footer->display(); + )->addTemplate('admin/users/move_users.php')->display(); } @@ -66,20 +58,15 @@ public function display() message(__('No permission'), '403'); } - $user_ids = $this->model->delete_users(); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Delete users')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - generate_admin_menu('users'); - $this->feather->render('admin/users/delete_users.php', array( - 'user_ids' => $user_ids, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Delete users')), + 'active_page' => 'moderate', + 'admin_console' => true, + 'user_ids' => $this->model->delete_users(), ) - ); - - $this->footer->display(); + )->addTemplate('admin/users/delete_users.php')->display(); } @@ -89,21 +76,16 @@ public function display() message(__('No permission'), '403'); } - $user_ids = $this->model->ban_users(); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans')); - $focus_element = array('bans2', 'ban_message'); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setFocusElement($focus_element)->display(); - generate_admin_menu('users'); - $this->feather->render('admin/users/ban_users.php', array( - 'user_ids' => $user_ids, + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Bans')), + 'active_page' => 'moderate', + 'focus_element' => array('bans2', 'ban_message'), + 'admin_console' => true, + 'user_ids' => $this->model->ban_users(), ) - ); - - $this->footer->display(); + )->addTemplate('admin/users/ban_users.php')->display(); } // Display bans @@ -128,13 +110,13 @@ public function display() $can_delete = $can_move = $this->user->g_id == FEATHER_ADMIN; $can_ban = $this->user->g_id == FEATHER_ADMIN || ($this->user->g_moderator == '1' && $this->user->g_mod_ban_users == '1'); $can_action = ($can_delete || $can_ban || $can_move) && $num_users > 0; + $this->feather->view2->addAsset('js', 'js/common.js', array('type' => 'text/javascript')); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')); - $page_head = array('js' => ''); - - $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->setPageHead($page_head)->display(); - - $this->feather->render('admin/users/find_users.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')), + 'active_page' => 'admin', + 'admin_console' => true, + 'paging_links' => $paging_links, 'search' => $search, 'start_from' => $start_from, 'can_delete' => $can_delete, @@ -143,24 +125,20 @@ public function display() 'can_move' => $can_move, 'user_data' => $this->model->print_users($search['conditions'], $search['order_by'], $search['direction'], $start_from), ) - ); - - $this->footer->display(); + )->addTemplate('admin/users/find_users.php')->display(); } + else { + generate_admin_menu('users'); - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users')); - $focus_element = array('find_user', 'form[username]'); - - $this->header->setTitle($page_title)->setActivePage('admin')->setFocusElement($focus_element)->display(); - - generate_admin_menu('users'); - - $this->feather->render('admin/users/admin_users.php', array( - 'group_list' => $this->model->get_group_list(), - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users')), + 'active_page' => 'admin', + 'admin_console' => true, + 'focus_element' => array('find_user', 'form[username]'), + 'group_list' => $this->model->get_group_list(), + ) + )->addTemplate('admin/users/admin_users.php')->display(); + } } // Show IP statistics for a certain user ID @@ -179,20 +157,16 @@ public function ipstats($id) $p = (!$this->request->get('p') || $this->request->get('p') <= 1 || $this->request->get('p') > $num_pages) ? 1 : intval($this->request->get('p')); $start_from = 50 * ($p - 1); - // Generate paging links - $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$id); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')); - - $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->display(); - - $this->feather->render('admin/users/search_ip.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')), + 'active_page' => 'admin', + 'admin_console' => true, + 'page' => $p, + 'paging_links' => ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$id), 'start_from' => $start_from, 'ip_data' => $this->model->get_ip_stats($id, $start_from), ) - ); - - $this->footer->display(); + )->addTemplate('admin/users/search_ip.php')->display(); } // Show IP statistics for a certain user IP @@ -215,19 +189,15 @@ public function showusers($ip) $p = (!$this->request->get('p') || $this->request->get('p') <= 1 || $this->request->get('p') > $num_pages) ? 1 : intval($this->request->get('p')); $start_from = 50 * ($p - 1); - // Generate paging links - $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$ip); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')); - - $this->header->setTitle($page_title)->setActivePage('admin')->setPage($p)->setPagingLinks($paging_links)->display(); - - $this->feather->render('admin/users/show_users.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')), + 'active_page' => 'admin', + 'admin_console' => true, + 'paging_links' => ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$ip), + 'page' => $p, 'start_from' => $start_from, 'info' => $this->model->get_info_poster($ip, $start_from), ) - ); - - $this->footer->display(); + )->addTemplate('admin/users/show_users.php')->display(); } } diff --git a/controller/delete.php b/controller/delete.php index e6dc453d..a1eb2a45 100644 --- a/controller/delete.php +++ b/controller/delete.php @@ -14,76 +14,58 @@ class delete public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\delete(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/delete.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); - } - - public function __autoload($class_name) - { - require FEATHER_ROOT . $class_name . '.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/delete.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/post.mo'); } public function deletepost($id) { global $pd; - if ($this->user->g_read_board == '0') { + if ($this->feather->user->g_read_board == '0') { message(__('No view'), '403'); } // Fetch some informations about the post, the topic and the forum $cur_post = $this->model->get_info_delete($id); - if ($this->config['o_censoring'] == '1') { + if ($this->feather->forum_settings['o_censoring'] == '1') { $cur_post['subject'] = censor_words($cur_post['subject']); } // Sort out who the moderators are and if we are currently a moderator (or an admin) $mods_array = ($cur_post['moderators'] != '') ? unserialize($cur_post['moderators']) : array(); - $is_admmod = ($this->user->g_id == FEATHER_ADMIN || ($this->user->g_moderator == '1' && array_key_exists($this->user->username, $mods_array))) ? true : false; + $is_admmod = ($this->feather->user->g_id == FEATHER_ADMIN || ($this->feather->user->g_moderator == '1' && array_key_exists($this->feather->user->username, $mods_array))) ? true : false; $is_topic_post = ($id == $cur_post['first_post_id']) ? true : false; // Do we have permission to edit this post? - if (($this->user->g_delete_posts == '0' || - ($this->user->g_delete_topics == '0' && $is_topic_post) || - $cur_post['poster_id'] != $this->user->id || + if (($this->feather->user->g_delete_posts == '0' || + ($this->feather->user->g_delete_topics == '0' && $is_topic_post) || + $cur_post['poster_id'] != $this->feather->user->id || $cur_post['closed'] == '1') && !$is_admmod) { message(__('No permission'), '403'); } - if ($is_admmod && $this->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) { + if ($is_admmod && $this->feather->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) { message(__('No permission'), '403'); } - if ($this->feather->request()->isPost()) { $this->model->handle_deletion($is_topic_post, $id, $cur_post['tid'], $cur_post['fid']); } - - $page_title = array(feather_escape($this->config['o_board_title']), __('Delete post')); - - $this->header->setTitle($page_title)->setActivePage('delete')->display(); - - require FEATHER_ROOT.'include/parser.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'include/parser.php'; $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); - $this->feather->render('delete.php', array( - 'cur_post' => $cur_post, - 'id' => $id, - 'is_topic_post' => $is_topic_post, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Delete post')), + 'active_page' => 'delete', + 'cur_post' => $cur_post, + 'id' => $id, + 'is_topic_post' => $is_topic_post + ))->addTemplate('delete.php')->display(); } } diff --git a/controller/edit.php b/controller/edit.php index 27e7f445..0239c17e 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\edit(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); @@ -120,16 +120,13 @@ public function editpost($id) 'errors' => $errors, 'preview_message' => $preview_message, 'id' => $id, - 'feather_config' => $this->config, - 'feather_user' => $this->user, 'checkboxes' => $this->model->get_checkboxes($can_edit_subject, $is_admmod, $cur_post, 1), - 'feather' => $this->feather, 'can_edit_subject' => $can_edit_subject, 'lang_bbeditor' => $lang_bbeditor, 'post' => $post, ) ); - $this->footer->display(); + } } diff --git a/controller/footer.php b/controller/footer.php deleted file mode 100644 index a05ffdd2..00000000 --- a/controller/footer.php +++ /dev/null @@ -1,73 +0,0 @@ -feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->dontStop = false; - } - - public function dontStop() { - $this->dontStop = true; - } - - public function display($footer_style = null, $id = null, $p = null, $pid = null, $forum_id = null, $num_pages = null) - { - // Render the footer - // If no footer style has been specified, we use the default (only copyright/debug info) - $footer_style = isset($footer_style) ? $footer_style : null; - - $id = isset($id) ? $id : null; - $p = isset($p) ? $p : null; - $pid = isset($pid) ? $pid : null; - - $forum_id = isset($forum_id) ? $forum_id : null; - - $num_pages = isset($num_pages) ? $num_pages : null; - - if (!$this->feather->cache->isCached('quickjump')) { - $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - } - - $this->feather->render('footer.php', array( - 'id' => $id, - 'p' => $p, - 'pid' => $pid, - 'feather_user' => $this->user, - 'feather_config' => $this->config, - 'feather_start' => $this->start, - 'footer_style' => $footer_style, - 'quickjump' => $this->feather->cache->retrieve('quickjump'), - 'forum_id' => $forum_id, - 'num_pages' => $num_pages, - 'feather' => $this->feather, - ) - ); - - // Close Idiorm connection - $pdo = \DB::get_db(); - $pdo = null; - - // If we need to stop the application outside a route - if ($this->dontStop) { - die(); - } - - // If we reached this far, we shouldn't execute more code - $this->feather->stop(); - } -} diff --git a/controller/header.php b/controller/header.php deleted file mode 100644 index ebc8c550..00000000 --- a/controller/header.php +++ /dev/null @@ -1,269 +0,0 @@ -feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->model = new \model\header(); - } - - private $title; - - private $page; - - private $focus_element; - - private $paging_links; - - private $required_fields; - - private $page_head; - - private $active_page; - - private $admin_console; - - private $allow_index; - - public function setTitle($title) - { - $this->title = $title; - - return $this; - } - - public function setPage($page) - { - $this->page = $page; - - return $this; - } - - public function setFocusElement($focus_element) - { - $this->focus_element = $focus_element; - - return $this; - } - - public function setPagingLinks($paging_links) - { - $this->paging_links = $paging_links; - - return $this; - } - - public function setRequiredFields($required_fields) - { - $this->required_fields = $required_fields; - - return $this; - } - - public function setPageHead($page_head) - { - $this->page_head = $page_head; - - return $this; - } - - public function setActivePage($active_page) - { - $this->active_page = $active_page; - - return $this; - } - - public function enableAdminConsole() - { - $this->admin_console = true; - - return $this; - } - - public function allowIndex() - { - $this->allow_index = true; - - return $this; - } - - public function display() - { - if (!defined('FEATHER_HEADER')) { - define('FEATHER_HEADER', 1); - } - - // Render the header - $this->title = isset($this->title) ? $this->title : feather_escape($this->config['o_board_title']); - - // Define $p if it's not set to avoid a PHP notice - $this->page = isset($this->page) ? $this->page : null; - - // Set default safe values - $this->page_head = isset($this->page_head) ? $this->page_head : null; - $this->paging_links = isset($this->paging_links) ? $this->paging_links : null; - $this->required_fields = isset($this->required_fields) ? $this->required_fields : null; - - $navlinks = $this->getNavlinks(); - $page_info = $this->getStatus(); - $admin_console = $this->getAdminConsole(); - - // Show the robots meta only if enabled - $allow_index = ($this->allow_index === true) ? '' : ''."\n"; - - $focus_element = isset($this->focus_element) ? ' onload="document.getElementById(\''.$this->focus_element[0].'\').elements[\''.$this->focus_element[1].'\'].focus();"' : ''; - - $this->feather->render('header.php', array( - 'page_title' => $this->title, - 'p' => $this->page, - 'feather_user' => $this->user, - 'feather_config' => $this->config, - '_SERVER' => $_SERVER, - 'page_head' => $this->page_head, - 'active_page' => $this->active_page, - 'paging_links' => $this->paging_links, - 'required_fields' => $this->required_fields, - 'feather' => $this->feather, - 'focus_element' => $focus_element, - 'navlinks' => $navlinks, - 'page_info' => $page_info, - 'admin_console' => $admin_console, - 'allow_index' => $allow_index, - ) - ); - } - - private function getNavlinks() - { - $links = array(); - - // Index should always be displayed - $links[] = ''; - - if ($this->user->g_read_board == '1' && $this->user->g_view_users == '1') { - $links[] = ''; - } - - if ($this->config['o_rules'] == '1' && (!$this->user->is_guest || $this->user->g_read_board == '1' || $this->config['o_regs_allow'] == '1')) { - $links[] = ''; - } - - if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $links[] = ''; - } - - if ($this->user->is_guest) { - $links[] = ''; - $links[] = ''; - } else { - $links[] = ''; - - if ($this->user->is_admmod) { - $links[] = ''; - } - - $links[] = ''; - } - - // Are there any additional navlinks we should insert into the array before imploding it? - if ($this->user->g_read_board == '1' && $this->config['o_additional_navlinks'] != '') { - if (preg_match_all('%([0-9]+)\s*=\s*(.*?)\n%s', $this->config['o_additional_navlinks']."\n", $extra_links)) { - // Insert any additional links into the $links array (at the correct index) - $num_links = count($extra_links[1]); - for ($i = 0; $i < $num_links; ++$i) { - array_splice($links, $extra_links[1][$i], 0, array('')); - } - } - } - - $navlinks = '
    '."\n\t\t\t".'
      '."\n\t\t\t\t".implode("\n\t\t\t\t", $links)."\n\t\t\t".'
    '."\n\t\t".'
    '; - - return $navlinks; - } - - private function getStatus() - { - $page_statusinfo = $page_topicsearches = array(); - - if ($this->user->is_guest) { - $page_statusinfo = '

    '.__('Not logged in').'

    '; - } else { - $page_statusinfo[] = '
  • '.__('Logged in as').' '.feather_escape($this->user->username).'
  • '; - $page_statusinfo[] = '
  • '.sprintf(__('Last visit'), format_time($this->user->last_visit)).'
  • '; - - if ($this->user->is_admmod) { - if ($this->config['o_report_method'] == '0' || $this->config['o_report_method'] == '2') { - if ($this->model->get_reports()) { - $page_statusinfo[] = ''; - } - } - - if ($this->config['o_maintenance'] == '1') { - $page_statusinfo[] = ''; - } - } - - if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $page_topicsearches[] = ''.__('Posted topics').''; - $page_topicsearches[] = ''.__('New posts header').''; - } - } - - // Quick searches - if ($this->user->g_read_board == '1' && $this->user->g_search == '1') { - $page_topicsearches[] = ''.__('Active topics').''; - $page_topicsearches[] = ''.__('Unanswered topics').''; - } - - // Generate all that jazz - $page_info = '
    '; - - // The status information - if (is_array($page_statusinfo)) { - $page_info .= "\n\t\t\t".'
      '; - $page_info .= "\n\t\t\t\t".implode("\n\t\t\t\t", $page_statusinfo); - $page_info .= "\n\t\t\t".'
    '; - } else { - $page_info .= "\n\t\t\t".$page_statusinfo; - } - - // Generate quicklinks - if (!empty($page_topicsearches)) { - $page_info .= "\n\t\t\t".'
      '; - $page_info .= "\n\t\t\t\t".'
    • '.__('Topic searches').' '.implode(' | ', $page_topicsearches).'
    • '; - $page_info .= "\n\t\t\t".'
    '; - } - - $page_info .= "\n\t\t\t".'
    '."\n\t\t".'
    '; - - return $page_info; - } - - protected function getAdminConsole() - { - if ($this->admin_console === true) { - if (file_exists(FEATHER_ROOT.'style/'.$this->user->style.'/base_admin.css')) { - return ''."\n"; - } else { - return ''."\n"; - } - } else { - return ''; - } - } -} diff --git a/controller/help.php b/controller/help.php index 36f44c4e..45dff1bb 100644 --- a/controller/help.php +++ b/controller/help.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/help.mo'); } @@ -34,12 +32,9 @@ public function display() message(__('No view'), '403'); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Help')); - - $this->header->setTitle($page_title)->setActivePage('help')->display(); - - $this->feather->render('help.php'); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Help')), + 'active_page' => 'help', + ))->addTemplate('help.php')->display(); } } diff --git a/controller/index.php b/controller/index.php index 40b06c76..df1c4c8d 100644 --- a/controller/index.php +++ b/controller/index.php @@ -30,7 +30,6 @@ public function display() 'is_indexed' => true, 'index_data' => $this->model->print_categories_forums(), 'stats' => $this->model->collect_stats(), - 'feather_config' => $this->feather->forum_settings, 'online' => $this->model->fetch_users_online(), 'forum_actions' => $this->model->get_forum_actions(), 'cur_cat' => 0 diff --git a/controller/install.php b/controller/install.php index a083113e..0f1133be 100644 --- a/controller/install.php +++ b/controller/install.php @@ -115,7 +115,6 @@ public function run() if (!empty($this->errors)) { $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); $this->feather->view()->display('install.php', array( - 'feather' => $this->feather, 'languages' => $this->available_langs, 'supported_dbs' => $this->supported_dbs, 'data' => $data, @@ -137,7 +136,6 @@ public function run() } $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); $this->feather->view()->display('install.php', array( - 'feather' => $this->feather, 'languages' => $this->available_langs, 'supported_dbs' => $this->supported_dbs, 'data' => $data, diff --git a/controller/login.php b/controller/login.php index 669c6cd8..30c9c5f3 100644 --- a/controller/login.php +++ b/controller/login.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\login(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/login.mo'); } @@ -39,18 +39,14 @@ public function display() // TODO?: Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login) $redirect_url = $this->model->get_redirect_url(); - $page_title = array(feather_escape($this->config['o_board_title']), __('Login')); - $required_fields = array('req_username' => __('Username'), 'req_password' => __('Password')); - $focus_element = array('login', 'req_username'); - - $this->header->setTitle($page_title)->setActivePage('login')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - - $this->feather->render('login/form.php', array( + $this->feather->view2->setPageInfo(array( 'redirect_url' => $redirect_url, + 'active_page' => 'login', + 'title' => array(feather_escape($this->config['o_board_title']), __('Login')), + 'required_fields' => array('req_username' => __('Username'), 'req_password' => __('Password')), + 'focus_element' => array('login', 'req_username'), ) - ); - - $this->footer->display(); + )->addTemplate('login/form.php')->display(); } public function logmein() @@ -81,19 +77,13 @@ public function forget() exit; } - $errors = $this->model->password_forgotten(); - - $page_title = array(feather_escape($this->config['o_board_title']), __('Request pass')); - $required_fields = array('req_email' => __('Email')); - $focus_element = array('request_pass', 'req_email'); - - $this->header->setTitle($page_title)->setActivePage('login')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - - $this->feather->render('login/password_forgotten.php', array( - 'errors' => $errors, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'errors' => $this->model->password_forgotten(), + 'active_page' => 'login', + 'title' => array(feather_escape($this->config['o_board_title']), __('Request pass')), + 'required_fields' => array('req_email' => __('Email')), + 'focus_element' => array('request_pass', 'req_email'), + ) + )->addTemplate('login/password_forgotten.php')->display(); } } diff --git a/controller/misc.php b/controller/misc.php index 8ca7d4eb..914b0561 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -1,11 +1,11 @@ feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\misc(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/misc.mo'); - } - - public function __autoload($class_name) - { - require FEATHER_ROOT . $class_name . '.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/register.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/misc.mo'); } public function rules() { - if ($this->config['o_rules'] == '0' || ($this->user->is_guest && $this->user->g_read_board == '0' && $this->config['o_regs_allow'] == '0')) { + if ($this->feather->forum_settings['o_rules'] == '0' || ($this->feather->user->is_guest && $this->feather->user->g_read_board == '0' && $this->feather->forum_settings['o_regs_allow'] == '0')) { message(__('Bad request'), '404'); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Forum rules')); - - $this->header->setTitle($page_title)->setActivePage('rules')->display(); - - $this->feather->render('misc/rules.php', array( - 'feather_config' => $this->config, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Forum rules')), + 'active_page' => 'rules' + ))->addTemplate('misc/rules.php')->display(); } public function markread() { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -64,7 +47,7 @@ public function markread() public function markforumread($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -77,7 +60,7 @@ public function markforumread($id) public function subscribeforum($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -86,7 +69,7 @@ public function subscribeforum($id) public function subscribetopic($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -95,7 +78,7 @@ public function subscribetopic($id) public function unsubscribeforum($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -104,7 +87,7 @@ public function unsubscribeforum($id) public function unsubscribetopic($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -113,7 +96,7 @@ public function unsubscribetopic($id) public function email($id) { - if ($this->user->is_guest || $this->user->g_send_email == '0') { + if ($this->feather->user->is_guest || $this->feather->user->g_send_email == '0') { message(__('No permission'), '403'); } @@ -123,7 +106,7 @@ public function email($id) $mail = $this->model->get_info_mail($id); - if ($mail['email_setting'] == 2 && !$this->user->is_admmod) { + if ($mail['email_setting'] == 2 && !$this->feather->user->is_admmod) { message(__('Form email disabled')); } @@ -132,24 +115,19 @@ public function email($id) $this->model->send_email($mail); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Send email to').' '.feather_escape($mail['recipient'])); - $required_fields = array('req_subject' => __('Email subject'), 'req_message' => __('Email message')); - $focus_element = array('email', 'req_subject'); - - $this->header->setTitle($page_title)->setActivePage('email')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - - $this->feather->render('misc/email.php', array( - 'id' => $id, - 'mail' => $mail, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Send email to').' '.feather_escape($mail['recipient'])), + 'active_page' => 'email', + 'required_fields' => array('req_subject' => __('Email subject'), 'req_message' => __('Email message')), + 'focus_element' => array('email', 'req_subject'), + 'id' => $id, + 'mail' => $mail + ))->addTemplate('misc/email.php')->display(); } public function report($id) { - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { message(__('No permission'), '403'); } @@ -160,22 +138,17 @@ public function report($id) // Fetch some info about the post, the topic and the forum $cur_post = $this->model->get_info_report($id); - if ($this->config['o_censoring'] == '1') { + if ($this->feather->forum_settings['o_censoring'] == '1') { $cur_post['subject'] = censor_words($cur_post['subject']); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Report post')); - $required_fields = array('req_reason' => __('Reason')); - $focus_element = array('report', 'req_reason'); - - $this->header->setTitle($page_title)->setActivePage('report')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - - $this->feather->render('misc/report.php', array( - 'id' => $id, - 'cur_post' => $cur_post, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Report post')), + 'active_page' => 'report', + 'required_fields' => array('req_reason' => __('Reason')), + 'focus_element' => array('report', 'req_reason'), + 'id' => $id, + 'cur_post' => $cur_post + ))->addTemplate('misc/report.php')->display(); } } diff --git a/controller/moderate.php b/controller/moderate.php index 84d81727..7ea2a272 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\moderate(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); @@ -105,19 +105,15 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // Check if there are enough forums to move the topic $this->model->check_move_possible(); - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->display(); - - $this->feather->render('moderate/move_topics.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', 'action' => 'multi', 'id' => $fid, 'topics' => $topics, 'list_forums' => $this->model->get_forum_list_move($fid), ) - ); - - $this->footer->display(); + )->addTemplate('moderate/move_topics.php')->display(); } // Stick a topic @@ -163,19 +159,16 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = // Check if there are enough forums to move the topic $this->model->check_move_possible(); - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->display(); - - $this->feather->render('moderate/move_topics.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', + 'page' => $p, 'action' => 'single', 'id' => $id, 'topics' => $id, 'list_forums' => $this->model->get_forum_list_move($fid), ) - ); - - $this->footer->display(); + )->addTemplate('moderate/move_topics.php')->display(); } // Moderate a topic @@ -185,34 +178,28 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = if ($this->request->post('delete_posts') || $this->request->post('delete_posts_comply')) { $posts = $this->model->delete_posts($id, $fid, $p); - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->display(); - - $this->feather->render('moderate/delete_posts.php', array( - 'id' => $id, - 'posts' => $posts, - ) - ); - - $this->footer->display(); + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', + 'page' => $p, + 'id' => $id, + 'posts' => $posts, + )) + ->addTemplate('moderate/delete_posts.php')->display(); } if ($this->request->post('split_posts') || $this->request->post('split_posts_comply')) { - $posts = $this->model->split_posts($id, $fid, $p); - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - $focus_element = array('subject','new_subject'); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->setFocusElement($focus_element)->display(); - - $this->feather->render('moderate/split_posts.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'focus_element' => array('subject','new_subject'), + 'page' => $p, + 'active_page' => 'moderate', 'id' => $id, - 'posts' => $posts, + 'posts' => $this->model->split_posts($id, $fid, $p), 'list_forums' => $this->model->get_forum_list_split($id), ) - ); + )->addTemplate('moderate/split_posts.php')->display(); - $this->footer->display(); } // Show the moderate posts view @@ -224,31 +211,25 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = $this->user->disp_posts = $cur_topic['num_replies'] + 1; }*/ - // Generate paging links - $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/topic/'.$id.'/forum/'.$fid.'/action/moderate/#'); - if ($this->config['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); } - $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_topic['forum_name']), feather_escape($cur_topic['subject'])); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->setPagingLinks($paging_links)->display(); - - $this->feather->render('moderate/posts_view.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), feather_escape($cur_topic['forum_name']), feather_escape($cur_topic['subject'])), + 'page' => $p, + 'active_page' => 'moderate', 'cur_topic' => $cur_topic, 'url_topic' => url_friendly($cur_topic['subject']), 'url_forum' => url_friendly($cur_topic['forum_name']), 'fid' => $fid, 'id' => $id, - 'paging_links' => $paging_links, + 'paging_links' => ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/topic/'.$id.'/forum/'.$fid.'/action/moderate/#'), 'post_data' => $this->model->display_posts_view($id, $start_from), 'button_status' => $button_status, 'start_from' => $start_from, ) - ); - - $this->footer->display(); + )->addTemplate('moderate/posts_view.php')->display(); } } @@ -284,26 +265,21 @@ public function display($id, $name = null, $page = null) $start_from = $this->user->disp_topics * ($p - 1); $url_forum = url_friendly($cur_forum['forum_name']); - // Generate paging links - $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/forum/'.$id.'/#'); - - $page_title = array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])); - - $this->header->setTitle($page_title)->setActivePage('moderate')->setPage($p)->setPagingLinks($paging_links)->display(); - - $this->feather->render('moderate/moderator_forum.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])), + 'active_page' => 'moderate', + 'page' => $p, 'id' => $id, 'p' => $p, 'url_forum' => $url_forum, 'cur_forum' => $cur_forum, - 'paging_links' => $paging_links, - 'feather_config' => $this->config, + 'paging_links' => ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/forum/'.$id.'/#'), 'topic_data' => $this->model->display_topics($id, $sort_by, $start_from), 'start_from' => $start_from, ) - ); + )->addTemplate('moderate/moderator_forum.php')->display(); + - $this->footer->display(); } public function dealposts($fid) @@ -331,24 +307,18 @@ public function dealposts($fid) message(__('No topics selected')); } - $topics = implode(',', array_map('intval', array_keys($topics))); - // Check if there are enough forums to move the topic $this->model->check_move_possible(); - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - - $this->feather->render('moderate/move_topics.php', array( + $this->feather->view2->setPageInfo(array( 'action' => 'multi', + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', 'id' => $fid, - 'topics' => $topics, + 'topics' => implode(',', array_map('intval', array_keys($topics))), 'list_forums' => $this->model->get_forum_list_move($fid), ) - ); - - $this->footer->display(); + )->addTemplate('moderate/move_topics.php')->display(); } // Merge two or more topics @@ -362,17 +332,13 @@ public function dealposts($fid) message(__('Not enough topics selected')); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - - $this->feather->render('moderate/merge_topics.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', 'id' => $fid, 'topics' => $topics, ) - ); - - $this->footer->display(); + )->addTemplate('moderate/merge_topics.php')->display(); } // Delete one or more topics @@ -386,17 +352,13 @@ public function dealposts($fid) $this->model->delete_topics($topics, $fid); } - $page_title = array(feather_escape($this->config['o_board_title']), __('Moderate')); - - $this->header->setTitle($page_title)->setActivePage('moderate')->display(); - - $this->feather->render('moderate/delete_topics.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Moderate')), + 'active_page' => 'moderate', 'id' => $fid, 'topics' => $topics, ) - ); - - $this->footer->display(); + )->addTemplate('moderate/delete_topics.php')->display(); } diff --git a/controller/post.php b/controller/post.php index 6c680faa..5400a9dc 100644 --- a/controller/post.php +++ b/controller/post.php @@ -14,23 +14,12 @@ class post public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\post(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.mo'); - } - - public function __autoload($class_name) - { - require FEATHER_ROOT . $class_name . '.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/post.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/register.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/antispam.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/bbeditor.mo'); } public function newreply($fid = null, $tid = null, $qid = null) @@ -41,11 +30,11 @@ public function newreply($fid = null, $tid = null, $qid = null) public function newpost($fid = null, $tid = null, $qid = null) { // Antispam feature - require FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); // If $_POST['username'] is filled, we are facing a bot - if ($this->request->post('username')) { + if ($this->feather->request->post('username')) { message(__('Bad request'), '404'); } @@ -61,11 +50,11 @@ public function newpost($fid = null, $tid = null, $qid = null) // Sort out who the moderators are and if we are currently a moderator (or an admin) $mods_array = ($cur_posting['moderators'] != '') ? unserialize($cur_posting['moderators']) : array(); - $is_admmod = ($this->user->g_id == FEATHER_ADMIN || ($this->user->g_moderator == '1' && array_key_exists($this->user->username, $mods_array))) ? true : false; + $is_admmod = ($this->feather->user->g_id == FEATHER_ADMIN || ($this->feather->user->g_moderator == '1' && array_key_exists($this->feather->user->username, $mods_array))) ? true : false; // Do we have permission to post? - if ((($tid && (($cur_posting['post_replies'] == '' && $this->user->g_post_replies == '0') || $cur_posting['post_replies'] == '0')) || - ($fid && (($cur_posting['post_topics'] == '' && $this->user->g_post_topics == '0') || $cur_posting['post_topics'] == '0')) || + if ((($tid && (($cur_posting['post_replies'] == '' && $this->feather->user->g_post_replies == '0') || $cur_posting['post_replies'] == '0')) || + ($fid && (($cur_posting['post_topics'] == '' && $this->feather->user->g_post_topics == '0') || $cur_posting['post_topics'] == '0')) || (isset($cur_posting['closed']) && $cur_posting['closed'] == '1')) && !$is_admmod) { message(__('No permission'), '403'); @@ -80,14 +69,14 @@ public function newpost($fid = null, $tid = null, $qid = null) if ($this->feather->request()->isPost()) { // Include $pid and $page if needed for confirm_referrer function called in check_errors_before_post() - if ($this->request->post('pid')) { - $pid = $this->request->post('pid'); + if ($this->feather->request->post('pid')) { + $pid = $this->feather->request->post('pid'); } else { $pid = ''; } - if ($this->request->post('page')) { - $page = $this->request->post('page'); + if ($this->feather->request->post('page')) { + $page = $this->feather->request->post('page'); } else { $page = ''; } @@ -99,14 +88,14 @@ public function newpost($fid = null, $tid = null, $qid = null) $post = $this->model->setup_variables($errors, $is_admmod); // Did everything go according to plan? - if (empty($errors) && !$this->request->post('preview')) { + if (empty($errors) && !$this->feather->request->post('preview')) { // If it's a reply if ($tid) { // Insert the reply, get the new_pid $new = $this->model->insert_reply($post, $tid, $cur_posting, $is_subscribed); // Should we send out notifications? - if ($this->config['o_topic_subscriptions'] == '1') { + if ($this->feather->forum_settings['o_topic_subscriptions'] == '1') { $this->model->send_notifications_reply($tid, $cur_posting, $new['pid'], $post); } } @@ -116,18 +105,18 @@ public function newpost($fid = null, $tid = null, $qid = null) $new = $this->model->insert_topic($post, $fid); // Should we send out notifications? - if ($this->config['o_forum_subscriptions'] == '1') { + if ($this->feather->forum_settings['o_forum_subscriptions'] == '1') { $this->model->send_notifications_new_topic($post, $cur_posting, $new['tid']); } } // If we previously found out that the email was banned - if ($this->user->is_guest && isset($errors['banned_email']) && $this->config['o_mailing_list'] != '') { + if ($this->feather->user->is_guest && isset($errors['banned_email']) && $this->feather->forum_settings['o_mailing_list'] != '') { $this->model->warn_banned_user($post, $new['pid']); } // If the posting user is logged in, increment his/her post count - if (!$this->user->is_guest) { + if (!$this->feather->user->is_guest) { $this->model->increment_post_count($post, $new['tid']); } @@ -166,28 +155,25 @@ public function newpost($fid = null, $tid = null, $qid = null) $url_topic = ''; } - $page_title = array(feather_escape($this->config['o_board_title']), $action); $required_fields = array('req_email' => __('Email'), 'req_subject' => __('Subject'), 'req_message' => __('Message')); - if ($this->user->is_guest) { + if ($this->feather->user->is_guest) { $required_fields['captcha'] = __('Robot title'); } // Set focus element (new post or new reply to an existing post ?) $focus_element[] = 'post'; - if (!$this->user->is_guest) { + if (!$this->feather->user->is_guest) { $focus_element[] = ($fid) ? 'req_subject' : 'req_message'; } else { $required_fields['req_username'] = __('Guest name'); $focus_element[] = 'req_username'; } - $this->header->setTitle($page_title)->setActivePage('post')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - // Get the current state of checkboxes $checkboxes = $this->model->get_checkboxes($fid, $is_admmod, $is_subscribed); // Check to see if the topic review is to be displayed - if ($tid && $this->config['o_topic_review'] != '0') { + if ($tid && $this->feather->forum_settings['o_topic_review'] != '0') { $post_data = $this->model->topic_review($tid); } else { $post_data = ''; @@ -212,20 +198,20 @@ public function newpost($fid = null, $tid = null, $qid = null) 'promptQuote' => __('promptQuote') ); - $this->feather->render('post.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), $action), + 'required_fields' => $required_fields, + 'focus_element' => $focus_element, + 'active_page' => 'post', 'post' => $post, 'tid' => $tid, 'fid' => $fid, - 'feather_config' => $this->config, - 'feather_user' => $this->user, 'cur_posting' => $cur_posting, 'lang_antispam' => $lang_antispam, 'lang_antispam_questions' => $lang_antispam_questions, 'lang_bbeditor' => $lang_bbeditor, 'index_questions' => $index_questions, 'checkboxes' => $checkboxes, - 'cur_posting' => $cur_posting, - 'feather' => $this->feather, 'action' => $action, 'form' => $form, 'post_data' => $post_data, @@ -233,9 +219,6 @@ public function newpost($fid = null, $tid = null, $qid = null) 'url_topic' => $url_topic, 'quote' => $quote, 'errors' => $errors, - ) - ); - - $this->footer->display(); + ))->addTemplate('post.php')->display(); } } diff --git a/controller/register.php b/controller/register.php index ef580e88..b1016b99 100644 --- a/controller/register.php +++ b/controller/register.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\register(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); @@ -62,24 +62,19 @@ public function display() } } - $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), __('Register')), - 'focus_element' => array('register', 'req_user'), - 'required_fields' => array('req_user' => __('Username'), 'req_password1' => __('Password'), 'req_password2' => __('Confirm pass'), 'req_email1' => __('Email'), 'req_email2' => __('Email').' 2', 'captcha' => __('Robot title')), - 'active_page' => 'register', - 'is_indexed' => true, - )); - - $this->feather->view2->display('register/form.php', array( - 'errors' => $user['errors'], - 'feather_config' => $this->config, - 'index_questions' => $index_questions, - 'feather' => $this->feather, - 'languages' => forum_list_langs(), - 'question' => array_keys($lang_antispam_questions), - 'qencoded' => md5(array_keys($lang_antispam_questions)[$index_questions]), + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Register')), + 'focus_element' => array('register', 'req_user'), + 'required_fields' => array('req_user' => __('Username'), 'req_password1' => __('Password'), 'req_password2' => __('Confirm pass'), 'req_email1' => __('Email'), 'req_email2' => __('Email').' 2', 'captcha' => __('Robot title')), + 'active_page' => 'register', + 'is_indexed' => true, + 'errors' => $user['errors'], + 'index_questions' => $index_questions, + 'languages' => forum_list_langs(), + 'question' => array_keys($lang_antispam_questions), + 'qencoded' => md5(array_keys($lang_antispam_questions)[$index_questions]), ) - ); + )->addTemplate('register/form.php')->display(); } public function cancel() @@ -107,13 +102,9 @@ public function rules() } $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), __('Register'), __('Forum rules')), - 'active_page' => 'register', - )); - - $this->feather->view2->display('register/rules.php', array( - 'feather_config' => $this->config, + 'title' => array(feather_escape($this->config['o_board_title']), __('Register'), __('Forum rules')), + 'active_page' => 'register', ) - ); + )->addTemplate('register/rules.php')->display(); } } diff --git a/controller/search.php b/controller/search.php index 5d91d5d5..f5361e1d 100644 --- a/controller/search.php +++ b/controller/search.php @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); + + $this->model = new \model\search(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/search.mo'); @@ -47,45 +47,47 @@ public function display() // We have results to display if (isset($search['is_result'])) { - $page_title = array(feather_escape($this->config['o_board_title']), __('Search results')); - - $this->header->setTitle($page_title)->setActivePage('search')->display(); - - $this->feather->render('search/header.php', array( - 'search' => $search, - ) - ); if ($search['show_as'] == 'posts') { require FEATHER_ROOT.'include/parser.php'; } + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Search results')), + 'active_page' => 'search', + )); + $this->model->display_search_results($search, $this->feather); - $this->feather->render('search/footer.php', array( - 'search' => $search, - ) - ); + $this->feather->view2->setPageInfo(array( + 'search' => $search, + )); + + $this->feather->view2->addTemplate('search/header.php', 1); + + if ($search['show_as'] == 'posts') { + $this->feather->view2->addTemplate('search/posts.php', 5); + } + else { + $this->feather->view2->addTemplate('search/topics.php', 5); + } + + $this->feather->view2->addTemplate('search/footer.php', 10)->display(); - $this->footer->display(); } else { message(__('No hits')); } } - - $page_title = array(feather_escape($this->config['o_board_title']), __('Search')); - $focus_element = array('search', 'keywords'); - - $this->header->setTitle($page_title)->setActivePage('search')->setFocusElement($focus_element)->display(); - - $this->feather->render('search/form.php', array( - 'feather_config' => $this->config, - 'feather' => $this->feather, - 'forums' => $this->model->get_list_forums(), - ) - ); - - $this->footer->display(); + // Display the form + else { + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Search')), + 'active_page' => 'search', + 'focus_element' => array('search', 'keywords'), + 'is_indexed' => true, + 'forums' => $this->model->get_list_forums(), + ))->addTemplate('search/form.php')->display(); + } } public function quicksearches($show) diff --git a/controller/userlist.php b/controller/userlist.php index 44a42e5d..671724dc 100644 --- a/controller/userlist.php +++ b/controller/userlist.php @@ -14,47 +14,36 @@ class userlist public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\userlist(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/search.mo'); - } - - public function __autoload($class_name) - { - require FEATHER_ROOT . $class_name . '.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/userlist.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/search.mo'); } public function display() { - if ($this->user->g_read_board == '0') { + if ($this->feather->user->g_read_board == '0') { message(__('No view'), '403'); - } elseif ($this->user->g_view_users == '0') { + } elseif ($this->feather->user->g_view_users == '0') { message(__('No permission'), '403'); } // Determine if we are allowed to view post counts - $show_post_count = ($this->config['o_show_post_count'] == '1' || $this->user->is_admmod) ? true : false; + $show_post_count = ($this->feather->forum_settings['o_show_post_count'] == '1' || $this->feather->user->is_admmod) ? true : false; - $username = $this->request->get('username') && $this->user->g_search_users == '1' ? feather_trim($this->request->get('username')) : ''; - $show_group = $this->request->get('show_group') ? intval($this->request->get('show_group')) : -1; - $sort_by = $this->request->get('sort_by') && (in_array($this->request->get('sort_by'), array('username', 'registered')) || ($this->request->get('sort_by') == 'num_posts' && $show_post_count)) ? $this->request->get('sort_by') : 'username'; - $sort_dir = $this->request->get('sort_dir') && $this->request->get('sort_dir') == 'DESC' ? 'DESC' : 'ASC'; + $username = $this->feather->request->get('username') && $this->feather->user->g_search_users == '1' ? feather_trim($this->feather->request->get('username')) : ''; + $show_group = $this->feather->request->get('show_group') ? intval($this->feather->request->get('show_group')) : -1; + $sort_by = $this->feather->request->get('sort_by') && (in_array($this->feather->request->get('sort_by'), array('username', 'registered')) || ($this->feather->request->get('sort_by') == 'num_posts' && $show_post_count)) ? $this->feather->request->get('sort_by') : 'username'; + $sort_dir = $this->feather->request->get('sort_dir') && $this->feather->request->get('sort_dir') == 'DESC' ? 'DESC' : 'ASC'; $num_users = $this->model->fetch_user_count($username, $show_group); // Determine the user offset (based on $page) $num_pages = ceil($num_users / 50); - $p = (!$this->request->get('p') || $page <= 1 || $page > $num_pages) ? 1 : intval($page); + $p = (!$this->feather->request->get('p') || $page <= 1 || $page > $num_pages) ? 1 : intval($page); $start_from = 50 * ($p - 1); - if ($this->user->g_search_users == '1') { + if ($this->feather->user->g_search_users == '1') { $focus_element = array('userlist', 'username'); } else { @@ -65,26 +54,19 @@ public function display() $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.$sort_dir); $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), __('User list')), + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('User list')), 'active_page' => 'userlist', 'page_number' => $p, 'paging_links' => $paging_links, 'focus_element' => $focus_element, 'is_indexed' => true, - )); - - $this->feather->view2->display('userlist.php', array( - 'feather' => $this->feather, - 'username' => $username, - 'show_group' => $show_group, - 'sort_by' => $sort_by, - 'sort_dir' => $sort_dir, - 'show_post_count' => $show_post_count, - 'paging_links' => $paging_links, - 'feather_config' => $this->config, - 'dropdown_menu' => $this->model->generate_dropdown_menu($show_group), - 'userlist_data' => $this->model->print_users($username, $start_from, $sort_by, $sort_dir, $show_group), - ) - ); + 'username' => $username, + 'show_group' => $show_group, + 'sort_by' => $sort_by, + 'sort_dir' => $sort_dir, + 'show_post_count' => $show_post_count, + 'dropdown_menu' => $this->model->generate_dropdown_menu($show_group), + 'userlist_data' => $this->model->print_users($username, $start_from, $sort_by, $sort_dir, $show_group), + ))->addTemplate('userlist.php')->display(); } } diff --git a/controller/viewforum.php b/controller/viewforum.php index 032c58ab..7206f604 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -14,12 +14,6 @@ class viewforum public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\viewforum(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); } @@ -31,7 +25,7 @@ public function __autoload($class_name) public function display($id, $name = null, $page = null) { - if ($this->user->g_read_board == '0') { + if ($this->feather->user->g_read_board == '0') { message(__('No view'), '403'); } @@ -50,50 +44,59 @@ public function display($id, $name = null, $page = null) // Sort out who the moderators are and if we are currently a moderator (or an admin) $mods_array = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); - $is_admmod = ($this->user->g_id == FEATHER_ADMIN || ($this->user->g_moderator == '1' && array_key_exists($this->user->username, $mods_array))) ? true : false; + $is_admmod = ($this->feather->user->g_id == FEATHER_ADMIN || ($this->feather->user->g_moderator == '1' && array_key_exists($this->feather->user->username, $mods_array))) ? true : false; $sort_by = $this->model->sort_forum_by($cur_forum['sort_by']); // Can we or can we not post new topics? - if (($cur_forum['post_topics'] == '' && $this->user->g_post_topics == '1') || $cur_forum['post_topics'] == '1' || $is_admmod) { + if (($cur_forum['post_topics'] == '' && $this->feather->user->g_post_topics == '1') || $cur_forum['post_topics'] == '1' || $is_admmod) { $post_link = "\t\t\t".''."\n"; } else { $post_link = ''; } // Determine the topic offset (based on $page) - $num_pages = ceil($cur_forum['num_topics'] / $this->user->disp_topics); + $num_pages = ceil($cur_forum['num_topics'] / $this->feather->user->disp_topics); $p = (!isset($page) || $page <= 1 || $page > $num_pages) ? 1 : intval($page); - $start_from = $this->user->disp_topics * ($p - 1); + $start_from = $this->feather->user->disp_topics * ($p - 1); $url_forum = url_friendly($cur_forum['forum_name']); // Generate paging links $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'forum/'.$id.'/'.$url_forum.'/#'); - $forum_actions = $this->model->get_forum_actions($id, $this->config['o_forum_subscriptions'], $cur_forum['is_subscribed']); + $forum_actions = $this->model->get_forum_actions($id, $this->feather->forum_settings['o_forum_subscriptions'], $cur_forum['is_subscribed']); + + $this->feather->view2->addAsset('canonical', get_link('forum/'.$id.'/'.$url_forum.'/')); + if ($num_pages > 1) { + if ($p > 1) { + $this->feather->view2->addAsset('prev', get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); + } + if ($p < $num_pages) { + $this->feather->view2->addAsset('next', get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); + } + } + + if ($this->feather->forum_settings['o_feed_type'] == '1') { + $this->feather->view2->addAsset('feed', 'extern.php?action=feed&fid='.$id.'&type=rss', array('title' => __('RSS forum feed'))); + } elseif ($this->feather->forum_settings['o_feed_type'] == '2') { + $this->feather->view2->addAsset('feed', 'extern.php?action=feed&fid='.$id.'&type=atom', array('title' => __('Atom forum feed'))); + } $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])), + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), feather_escape($cur_forum['forum_name'])), 'active_page' => 'viewforum', 'page_number' => $p, 'paging_links' => $paging_links, - 'page_head' => $this->model->get_page_head($id, $num_pages, $p, $url_forum), 'is_indexed' => true, - )); - - $this->feather->view2->display('viewforum.php', array( - 'id' => $id, - 'forum_data' => $this->model->print_topics($id, $sort_by, $start_from), - 'cur_forum' => $cur_forum, - 'paging_links' => $paging_links, - 'post_link' => $post_link, - 'is_admmod' => $is_admmod, - 'start_from' => $start_from, - 'url_forum' => $url_forum, - 'forum_actions' => $forum_actions, - 'feather_config' => $this->config, - ) - ); + 'id' => $id, + 'fid' => $id, + 'forum_data' => $this->model->print_topics($id, $sort_by, $start_from), + 'cur_forum' => $cur_forum, + 'post_link' => $post_link, + 'start_from' => $start_from, + 'url_forum' => $url_forum, + 'forum_actions' => $forum_actions, + ))->addTemplate('viewforum.php')->display(); } } diff --git a/controller/viewtopic.php b/controller/viewtopic.php index 8bba869e..6abdf274 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -14,44 +14,30 @@ class viewtopic public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - $this->header = new \controller\header(); - $this->footer = new \controller\footer(); $this->model = new \model\viewtopic(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.mo'); - } - - public function __autoload($class_name) - { - require FEATHER_ROOT . $class_name . '.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/topic.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/post.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/bbeditor.mo'); } public function display($id = null, $name = null, $page = null, $pid = null) { global $pd; - if ($this->user->g_read_board == '0') { + if ($this->feather->user->g_read_board == '0') { message(__('No view'), '403'); } // Antispam feature - require FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); - // Load the viewtopic.php model file - require_once FEATHER_ROOT.'model/viewtopic.php'; - // Fetch some informations about the topic $cur_topic = $this->model->get_info_topic($id); // Sort out who the moderators are and if we are currently a moderator (or an admin) $mods_array = ($cur_topic['moderators'] != '') ? unserialize($cur_topic['moderators']) : array(); - $is_admmod = ($this->user->g_id == FEATHER_ADMIN || ($this->user->g_moderator == '1' && array_key_exists($this->user->username, $mods_array))) ? true : false; + $is_admmod = ($this->feather->user->g_id == FEATHER_ADMIN || ($this->feather->user->g_moderator == '1' && array_key_exists($this->feather->user->username, $mods_array))) ? true : false; if ($is_admmod) { $admin_ids = get_admin_ids(); } @@ -60,17 +46,17 @@ public function display($id = null, $name = null, $page = null, $pid = null) $post_link = $this->model->get_post_link($id, $cur_topic['closed'], $cur_topic['post_replies'], $is_admmod); // Add/update this topic in our list of tracked topics - if (!$this->user->is_guest) { + if (!$this->feather->user->is_guest) { $tracked_topics = get_tracked_topics(); $tracked_topics['topics'][$id] = time(); set_tracked_topics($tracked_topics); } // Determine the post offset (based on $_GET['p']) - $num_pages = ceil(($cur_topic['num_replies'] + 1) / $this->user->disp_posts); + $num_pages = ceil(($cur_topic['num_replies'] + 1) / $this->feather->user->disp_posts); $p = (!isset($page) || $page <= 1 || $page > $num_pages) ? 1 : intval($page); - $start_from = $this->user->disp_posts * ($p - 1); + $start_from = $this->feather->user->disp_posts * ($p - 1); $url_topic = url_friendly($cur_topic['subject']); $url_forum = url_friendly($cur_topic['forum_name']); @@ -78,25 +64,14 @@ public function display($id = null, $name = null, $page = null, $pid = null) // Generate paging links $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'topic/'.$id.'/'.$url_topic.'/#'); - if ($this->config['o_censoring'] == '1') { + if ($this->feather->forum_settings['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); } $quickpost = $this->model->is_quickpost($cur_topic['post_replies'], $cur_topic['closed'], $is_admmod); - $subscraction = $this->model->get_subscraction($cur_topic['is_subscribed'], $id); - $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), feather_escape($cur_topic['forum_name']), feather_escape($cur_topic['subject'])), - 'active_page' => 'viewtopic', - 'page_number' => $p, - 'paging_links' => $paging_links, - 'page_head' => $this->model->get_page_head($id, $num_pages, $p, $url_topic), - 'is_indexed' => true, - )); - - require FEATHER_ROOT.'include/parser.php'; - + require $this->feather->forum_env['FEATHER_ROOT'].'include/parser.php'; $lang_bbeditor = array( 'btnBold' => __('btnBold'), 'btnItalic' => __('btnItalic'), @@ -116,28 +91,45 @@ public function display($id = null, $name = null, $page = null, $pid = null) 'promptQuote' => __('promptQuote') ); - $this->feather->view2->display('viewtopic.php', array( - 'id' => $id, - 'p' => $p, - 'post_data' => $this->model->print_posts($id, $start_from, $cur_topic, $is_admmod), - 'cur_topic' => $cur_topic, - 'subscraction' => $subscraction, - 'is_admmod' => $is_admmod, - 'feather_config' => $this->config, - 'paging_links' => $paging_links, - 'post_link' => $post_link, - 'start_from' => $start_from, - 'lang_antispam' => $lang_antispam, - 'pid' => $pid, - 'quickpost' => $quickpost, - 'index_questions' => $index_questions, - 'lang_antispam_questions' => $lang_antispam_questions, - 'lang_bbeditor' => $lang_bbeditor, - 'url_forum' => $url_forum, - 'url_topic' => $url_topic, - 'feather' => $this->feather, - ) - ); + $this->feather->view2->addAsset('canonical', get_link('forum/'.$id.'/'.$url_forum.'/')); + if ($num_pages > 1) { + if ($p > 1) { + $this->feather->view2->addAsset('prev', get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); + } + if ($p < $num_pages) { + $this->feather->view2->addAsset('next', get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); + } + } + + if ($this->feather->forum_settings['o_feed_type'] == '1') { + $this->feather->view2->addAsset('feed', 'extern.php?action=feed&fid='.$id.'&type=rss', array('title' => __('RSS forum feed'))); + } elseif ($this->feather->forum_settings['o_feed_type'] == '2') { + $this->feather->view2->addAsset('feed', 'extern.php?action=feed&fid='.$id.'&type=atom', array('title' => __('Atom forum feed'))); + } + + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), feather_escape($cur_topic['forum_name']), feather_escape($cur_topic['subject'])), + 'active_page' => 'viewtopic', + 'page_number' => $p, + 'paging_links' => $paging_links, + 'is_indexed' => true, + 'id' => $id, + 'pid' => $pid, + 'tid' => $id, + 'fid' => $cur_topic['forum_id'], + 'post_data' => $this->model->print_posts($id, $start_from, $cur_topic, $is_admmod), + 'cur_topic' => $cur_topic, + 'subscraction' => $subscraction, + 'post_link' => $post_link, + 'start_from' => $start_from, + 'lang_antispam' => $lang_antispam, + 'quickpost' => $quickpost, + 'index_questions' => $index_questions, + 'lang_antispam_questions' => $lang_antispam_questions, + 'lang_bbeditor' => $lang_bbeditor, + 'url_forum' => $url_forum, + 'url_topic' => $url_topic, + ))->addTemplate('viewtopic.php')->display(); // Increment "num_views" for topic $this->model->increment_views($id); diff --git a/extern.php b/extern.php index cd24d1a6..656aa1ea 100644 --- a/extern.php +++ b/extern.php @@ -57,26 +57,23 @@ define('FEATHER_QUIET_VISIT', 1); -if (!defined('FEATHER_ROOT')) { - define('FEATHER_ROOT', dirname(__FILE__).'/'); -} - // Load Slim Framework require 'Slim/Slim.php'; \Slim\Slim::registerAutoloader(); -// Instantiate Slim -$feather = new \Slim\Slim(); +// Load FeatherBB +require 'include/classes/autoload.class.php'; +\FeatherBB\Loader::registerAutoloader(); -// Load the config -require 'include/config.php'; - -// Load middlewares -$feather->add(new \Slim\Extras\Middleware\CsrfGuard('featherbb_csrf')); // CSRF -$feather->add(new \Slim\Extras\Middleware\FeatherBB($feather_user_settings)); // FeatherBB +// Instantiate Slim and add CSRF +$feather = new \Slim\Slim(); +$feather->add(new \FeatherBB\Csrf()); -$feather->config('cookies.encrypt', true); -$feather->config('debug', true); // As long as we're developing FeatherBB +$feather_settings = array('config_file' => 'include/config.php', + 'cache_dir' => 'cache/', + 'debug' => 'all'); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) +$feather->add(new \FeatherBB\Auth()); +$feather->add(new \FeatherBB\Core($feather_settings)); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/common.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/index.mo'); @@ -139,8 +136,6 @@ function get_current_url($max_length = 0) // function set_default_user() { - global $feather_config; - // Get Slim current session $feather = \Slim\Slim::getInstance(); @@ -188,12 +183,12 @@ function set_default_user() ->update_many('logged', time()); } - $feather->user->disp_topics = $feather_config['o_disp_topics_default']; - $feather->user->disp_posts = $feather_config['o_disp_posts_default']; - $feather->user->timezone = $feather_config['o_default_timezone']; - $feather->user->dst = $feather_config['o_default_dst']; - $feather->user->language = $feather_config['o_default_lang']; - $feather->user->style = $feather_config['o_default_style']; + $feather->user->disp_topics = $feather->forum_settings['o_disp_topics_default']; + $feather->user->disp_posts = $feather->forum_settings['o_disp_posts_default']; + $feather->user->timezone = $feather->forum_settings['o_default_timezone']; + $feather->user->dst = $feather->forum_settings['o_default_dst']; + $feather->user->language = $feather->forum_settings['o_default_lang']; + $feather->user->style = $feather->forum_settings['o_default_style']; $feather->user->is_guest = true; $feather->user->is_admmod = false; } @@ -266,13 +261,13 @@ function authenticate_user($user, $password, $password_is_hash = false) // function http_authenticate_user() { - global $feather_config, $feather; + global $feather; if (!$feather->user->is_guest) { return; } - header('WWW-Authenticate: Basic realm="'.$feather_config['o_board_title'].' External Syndication"'); + header('WWW-Authenticate: Basic realm="'.$feather->forum_settings['o_board_title'].' External Syndication"'); header('HTTP/1.0 401 Unauthorized'); } @@ -282,8 +277,6 @@ function http_authenticate_user() // function output_rss($feed) { - global $feather_config; - // Send XML/no cache headers header('Content-Type: application/xml; charset=utf-8'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); @@ -299,8 +292,8 @@ function output_rss($feed) echo "\t\t".''."\n"; echo "\t\t".''.gmdate('r', count($feed['items']) ? $feed['items'][0]['pubdate'] : time()).''."\n"; - if ($feather_config['o_show_version'] == '1') { - echo "\t\t".'FeatherBB '.$feather_config['o_cur_version'].''."\n"; + if ($feather->forum_settings['o_show_version'] == '1') { + echo "\t\t".'FeatherBB '.$feather->forum_settings['o_cur_version'].''."\n"; } else { echo "\t\t".'FeatherBB'."\n"; } @@ -327,8 +320,6 @@ function output_rss($feed) // function output_atom($feed) { - global $feather_config; - // Send XML/no cache headers header('Content-Type: application/atom+xml; charset=utf-8'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); @@ -343,8 +334,8 @@ function output_atom($feed) echo "\t".''."\n"; echo "\t".''.gmdate('Y-m-d\TH:i:s\Z', count($feed['items']) ? $feed['items'][0]['pubdate'] : time()).''."\n"; - if ($feather_config['o_show_version'] == '1') { - echo "\t".'FluxBB'."\n"; + if ($feather->forum_settings['o_show_version'] == '1') { + echo "\t".'FluxBB'."\n"; } else { echo "\t".'FluxBB'."\n"; } @@ -385,8 +376,6 @@ function output_atom($feed) // function output_xml($feed) { - global $feather_config; - // Send XML/no cache headers header('Content-Type: application/xml; charset=utf-8'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); @@ -488,13 +477,13 @@ function output_html($feed) exit(__('Bad request')); } - if ($feather_config['o_censoring'] == '1') { + if ($feather->forum_settings['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); } // Setup the feed $feed = array( - 'title' => $feather_config['o_board_title'].__('Title separator').$cur_topic['subject'], + 'title' => $feather->forum_settings['o_board_title'].__('Title separator').$cur_topic['subject'], 'link' => get_link('topic/'.$tid.'/'.url_friendly($cur_topic['subject']).'/'), 'description' => sprintf(__('RSS description topic'), $cur_topic['subject']), 'items' => array(), @@ -589,7 +578,7 @@ function output_html($feed) } // Only attempt to cache if caching is enabled and we have all or a single forum - if ($feather_config['o_feed_ttl'] > 0 && ($forum_sql == '' || ($forum_name != '' && !isset($_GET['nfid'])))) { + if ($feather->forum_settings['o_feed_ttl'] > 0 && ($forum_sql == '' || ($forum_name != '' && !isset($_GET['nfid'])))) { $cache_id = 'feed'.sha1($feather->user->g_id.'|'.__('lang_identifier').'|'.($order_posted ? '1' : '0').($forum_name == '' ? '' : '|'.$fids[0])); } @@ -602,9 +591,9 @@ function output_html($feed) if (!isset($feed) || $cache_expire < $now) { // Setup the feed $feed = array( - 'title' => $feather_config['o_board_title'].$forum_name, + 'title' => $feather->forum_settings['o_board_title'].$forum_name, 'link' => '/index.php', - 'description' => sprintf(__('RSS description'), $feather_config['o_board_title']), + 'description' => sprintf(__('RSS description'), $feather->forum_settings['o_board_title']), 'items' => array(), 'type' => 'topics' ); @@ -628,7 +617,7 @@ function output_html($feed) ->find_array(); foreach ($result as $cur_topic) { - if ($feather_config['o_censoring'] == '1') { + if ($feather->forum_settings['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); } @@ -664,7 +653,7 @@ function output_html($feed) require FEATHER_ROOT.'include/cache.php'; } - $content = ''; + $content = 'forum_settings['o_feed_ttl'] * 60)).';'."\n\n".'?>'; featherbb_write_cache_file('cache_'.$cache_id.'.php', $content); } } diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index 4d93a4c1..64d1f82d 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -194,25 +194,15 @@ public function maintenance_message() $replace = array('    ', '  ', '  '); $message = str_replace($pattern, $replace, $this->app->forum_settings['o_maintenance_message']); - $page_title = array(feather_escape($this->app->forum_settings['o_board_title']), __('Maintenance')); - - $this->app->config('templates.path', (is_dir('style/'.$this->app->user->style.'/view')) ? $this->app->forum_env['FEATHER_ROOT'].'style/'.$this->app->user->style.'/view' : $this->app->forum_env['FEATHER_ROOT'].'view'); - - $header = new \controller\header(); - - $header->setTitle($page_title)->setActivePage('index')->display(); - - $this->app->render('message.php', array( - 'message' => $message, - 'no_back_link' => '', - ) - ); - - $footer = new \controller\footer(); - - $footer->dontStop(); - - $footer->display(); + $this->app->view2->setPageInfo(array( + 'title' => array(feather_escape($this->app->forum_settings['o_board_title']), __('Maintenance')), + 'active_page' => 'index', + 'message' => $message, + 'no_back_link' => '', + ))->addTemplate('message.php')->display(); + + // Don't display anything after a message + $this->app->stop(); } public function call() diff --git a/include/classes/core.class.php b/include/classes/core.class.php index bcba7571..0b175c9c 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -205,6 +205,9 @@ public function call() return new \FeatherBB\Email(); }); + // This is the very first hook fired + $this->app->hooks->fire('core.start'); + if (!is_file($this->forum_env['FORUM_CONFIG_FILE'])) { $installer = new \controller\install; $installer->run(); @@ -237,7 +240,6 @@ public function call() // Set default style and assets $this->app->view2->setStyle($this->forum_settings['o_default_style']); $this->app->view2->addAsset('js', 'style/FeatherBB/phone.min.js'); - $this->app->view2->addAsset('js', 'js/common.js'); // Populate FeatherBB Slim object with forum_settings vars $this->hydrate('forum_settings', $this->forum_settings); @@ -251,7 +253,6 @@ public function call() $forum_time_formats = array($this->forum_settings['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); $forum_date_formats = array($this->forum_settings['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); - $this->app->config('templates.path', $this->app->forum_env['FEATHER_ROOT'].'style/FeatherBB/view/'); // Call FeatherBBAuth middleware $this->next->call(); } diff --git a/include/classes/csrf.class.php b/include/classes/csrf.class.php index c2e0646d..823dd96e 100644 --- a/include/classes/csrf.class.php +++ b/include/classes/csrf.class.php @@ -1,24 +1,24 @@ 'intval', - 'active_page' => 'strval', - //'focus_element' => 'strval', - 'is_indexed' => 'boolval', - 'admin_console' => 'boolval', - 'has_reports' => 'boolval', - 'paging_links' => 'strval', - //'required_fields' => 'strval', - 'has_reports' => 'boolval', - 'footer_style' => 'strval', - 'fid' => 'intval', - 'pid' => 'intval', - 'tid' => 'intval'); - - /** - * Constructor - */ - public function __construct() - { - $this->data = $this->page = new \Slim\Helper\Set(); - $this->app = \Slim\Slim::getInstance(); - } - - /******************************************************************************** - * Data methods - *******************************************************************************/ - - /** - * Does view data have value with key? - * @param string $key - * @return boolean - */ - public function has($key) - { - return $this->data->has($key); - } - - /** - * Return view data value with key - * @param string $key - * @return mixed - */ - public function get($key) - { - return $this->data->get($key); - } - - /** - * Set view data value with key - * @param string $key - * @param mixed $value - */ - public function set($key, $value) - { - $this->data->set($key, $value); - } - - /** - * Set view data value as Closure with key - * @param string $key - * @param mixed $value - */ - public function keep($key, \Closure $value) - { - $this->data->keep($key, $value); - } - - /** - * Return view data - * @return array - */ - public function all() - { - return $this->data->all(); - } - - /** - * Replace view data - * @param array $data - */ - public function replace(array $data) - { - $this->data->replace($data); - } - - /** - * Clear view data - */ - public function clear() - { - $this->data->clear(); - } - - /******************************************************************************** - * Legacy data methods - *******************************************************************************/ - - /** - * DEPRECATION WARNING! This method will be removed in the next major point release - * - * Get data from view - */ - public function getData($key = null) - { - if (!is_null($key)) { - return isset($this->data[$key]) ? $this->data[$key] : null; - } - - return $this->data->all(); - } - - /** - * DEPRECATION WARNING! This method will be removed in the next major point release - * - * Set data for view - */ - public function setData() - { - $args = func_get_args(); - if (count($args) === 1 && is_array($args[0])) { - $this->data->replace($args[0]); - } elseif (count($args) === 2) { - // Ensure original behavior is maintained. DO NOT invoke stored Closures. - if (is_object($args[1]) && method_exists($args[1], '__invoke')) { - $this->data->set($args[0], $this->data->protect($args[1])); - } else { - $this->data->set($args[0], $args[1]); - } - } else { - throw new \InvalidArgumentException('Cannot set View data with provided arguments. Usage: `View::setData( $key, $value );` or `View::setData([ key => value, ... ]);`'); - } - } - - /** - * DEPRECATION WARNING! This method will be removed in the next major point release - * - * Append data to view - * @param array $data - */ - public function appendData($data) - { - if (!is_array($data)) { - throw new \InvalidArgumentException('Cannot append view data. Expected array argument.'); - } - $this->data->replace($data); - } - - /******************************************************************************** - * Resolve template paths - *******************************************************************************/ - - /** - * Set the base directory that contains view templates - * @param string $directory - * @throws \InvalidArgumentException If directory is not a directory - */ - public function setTemplatesDirectory($directory) - { - $this->templatesDirectory = rtrim($directory, DIRECTORY_SEPARATOR); - } - - /** - * Get templates base directory - * @return string - */ - public function getTemplatesDirectory() - { - return $this->templatesDirectory; - } - - /** - * Get fully qualified path to template file using templates base directory - * @param string $file The template file pathname relative to templates base directory - * @return string - */ - public function getTemplatePathname($file) - { - $pathname = $this->templatesDirectory . DIRECTORY_SEPARATOR . ltrim($file, DIRECTORY_SEPARATOR); - if (!is_file($pathname)) { - $pathname = $this->app->forum_env['FEATHER_ROOT'] . 'view/' . ltrim($file, DIRECTORY_SEPARATOR); // Fallback on default view - if (!is_file($pathname)) { - throw new \RuntimeException("View cannot add template `$file` to stack because the template does not exist"); - } - } - return (string) $pathname; - } - - /******************************************************************************** - * Rendering - *******************************************************************************/ - - public function display($data = null) - { - echo $this->fetch($data); - } - - public function fetch($data = null) - { - // Force flash messages - if (isset($this->app->environment['slim.flash'])) { - $this->data->set('flash', $this->app->environment['slim.flash']); - } - $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), (array) $data); - $data['feather'] = \Slim\Slim::getInstance(); - $data['assets'] = $this->getAssets(); - $data = $this->app->hooks->fire('view.alter_data', $data); - return $this->render($data); - } - - protected function render($data = null) - { - extract($data); - ob_start(); - - require $this->getTemplatePathname('header.new.php'); - foreach ($this->getTemplates() as $tpl) { - require $tpl; - } - require $this->getTemplatePathname('footer.new.php'); - return ob_get_clean(); - } - - /******************************************************************************** - * Getters and setters - *******************************************************************************/ - - public function setStyle($style) - { - if (!is_dir($this->app->forum_env['FEATHER_ROOT'].'style/'.$style.'/view/')) { - throw new \InvalidArgumentException('The style '.$style.' doesn\'t exist'); - } - $this->data->set('style', (string) $style); - $this->setTemplatesDirectory($this->app->forum_env['FEATHER_ROOT'].'style/'.$style.'/view'); - $this->addAsset('css', 'style/'.$style.'.css'); - return $this; - } - - public function getStyle() - { - return $this->data['style']; - } - - public function setPageInfo(array $data) - { - foreach ($data as $key => $value) { - list($key, $value) = $this->validate($key, $value); - $this->page->set($key, $value); - } - return $this; - } - - public function getPageInfo() - { - return $this->page->all(); - } - - protected function validate($key, $value) - { - $key = (string) $key; - if (isset($this->validation[$key])) { - if (function_exists($this->validation[$key])) { - $value = $this->validation[$key]($value); - } - } - return array($key, $value); - } - - public function addAsset($type, $asset, $params = null) - { - $type = (string) $type; - if (!in_array($type, array('js', 'css'))) { - throw new \Exception('Invalid asset type : ' . $type); - } - if (!is_file($this->app->forum_env['FEATHER_ROOT'].$asset)) { - throw new \Exception('The asset file ' . $asset . ' does not exist'); - } - $this->assets[$type][] = array( - 'file' => $asset, - 'params' => $params - ); - } - - public function getAssets() - { - return $this->assets; - } - - public function addTemplate($tpl, $priority = 10) - { - $tpl = (array) $tpl; - foreach ($tpl as $key => $tpl_file) { - $this->templates[(int) $priority][] = $this->getTemplatePathname((string) $tpl_file); - } - return $this; - } - - public function getTemplates() - { - $output = array(); - if (count($this->templates) > 1) { - ksort($this->templates); - } - foreach ($this->templates as $priority) { - if (!empty($priority)) { - foreach ($priority as $tpl) { +* Copyright (C) 2015 FeatherBB +* based on code by (C) 2008-2012 FluxBB +* and Rickard Andersson (C) 2002-2008 PunBB +* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher +*/ + +namespace FeatherBB; + +class View +{ + protected $templatesDirectory, + $templates, + $app, + $data, + $page, + $assets, + $validation = array( + 'page_number' => 'intval', + 'active_page' => 'strval', + //'focus_element' => 'strval', + 'is_indexed' => 'boolval', + 'admin_console' => 'boolval', + 'has_reports' => 'boolval', + 'paging_links' => 'strval', + //'required_fields' => 'strval', + 'has_reports' => 'boolval', + 'footer_style' => 'strval', + 'fid' => 'intval', + 'pid' => 'intval', + 'tid' => 'intval'); + + /** + * Constructor + */ + public function __construct() + { + $this->data = $this->page = new \Slim\Helper\Set(); + $this->app = \Slim\Slim::getInstance(); + } + + /******************************************************************************** + * Data methods + *******************************************************************************/ + + /** + * Does view data have value with key? + * @param string $key + * @return boolean + */ + public function has($key) + { + return $this->data->has($key); + } + + /** + * Return view data value with key + * @param string $key + * @return mixed + */ + public function get($key) + { + return $this->data->get($key); + } + + /** + * Set view data value with key + * @param string $key + * @param mixed $value + */ + public function set($key, $value) + { + $this->data->set($key, $value); + } + + /** + * Set view data value as Closure with key + * @param string $key + * @param mixed $value + */ + public function keep($key, \Closure $value) + { + $this->data->keep($key, $value); + } + + /** + * Return view data + * @return array + */ + public function all() + { + return $this->data->all(); + } + + /** + * Replace view data + * @param array $data + */ + public function replace(array $data) + { + $this->data->replace($data); + } + + /** + * Clear view data + */ + public function clear() + { + $this->data->clear(); + } + + /******************************************************************************** + * Legacy data methods + *******************************************************************************/ + + /** + * DEPRECATION WARNING! This method will be removed in the next major point release + * + * Get data from view + */ + public function getData($key = null) + { + if (!is_null($key)) { + return isset($this->data[$key]) ? $this->data[$key] : null; + } + + return $this->data->all(); + } + + /** + * DEPRECATION WARNING! This method will be removed in the next major point release + * + * Set data for view + */ + public function setData() + { + $args = func_get_args(); + if (count($args) === 1 && is_array($args[0])) { + $this->data->replace($args[0]); + } elseif (count($args) === 2) { + // Ensure original behavior is maintained. DO NOT invoke stored Closures. + if (is_object($args[1]) && method_exists($args[1], '__invoke')) { + $this->data->set($args[0], $this->data->protect($args[1])); + } else { + $this->data->set($args[0], $args[1]); + } + } else { + throw new \InvalidArgumentException('Cannot set View data with provided arguments. Usage: `View::setData( $key, $value );` or `View::setData([ key => value, ... ]);`'); + } + } + + /** + * DEPRECATION WARNING! This method will be removed in the next major point release + * + * Append data to view + * @param array $data + */ + public function appendData($data) + { + if (!is_array($data)) { + throw new \InvalidArgumentException('Cannot append view data. Expected array argument.'); + } + $this->data->replace($data); + } + + /******************************************************************************** + * Resolve template paths + *******************************************************************************/ + + /** + * Set the base directory that contains view templates + * @param string $directory + * @throws \InvalidArgumentException If directory is not a directory + */ + public function setTemplatesDirectory($directory) + { + $this->templatesDirectory = rtrim($directory, DIRECTORY_SEPARATOR); + } + + /** + * Get templates base directory + * @return string + */ + public function getTemplatesDirectory() + { + return $this->templatesDirectory; + } + + /** + * Get fully qualified path to template file using templates base directory + * @param string $file The template file pathname relative to templates base directory + * @return string + */ + public function getTemplatePathname($file) + { + $pathname = $this->templatesDirectory . DIRECTORY_SEPARATOR . ltrim($file, DIRECTORY_SEPARATOR); + if (!is_file($pathname)) { + $pathname = $this->app->forum_env['FEATHER_ROOT'] . 'view/' . ltrim($file, DIRECTORY_SEPARATOR); // Fallback on default view + if (!is_file($pathname)) { + throw new \RuntimeException("View cannot add template `$file` to stack because the template does not exist"); + } + } + return (string) $pathname; + } + + /******************************************************************************** + * Rendering + *******************************************************************************/ + + public function display($data = null) + { + echo $this->fetch($data); + } + + public function fetch($data = null) + { + // Force flash messages + if (isset($this->app->environment['slim.flash'])) { + $this->data->set('flash', $this->app->environment['slim.flash']); + } + $data = array_merge($this->getDefaultPageInfo(), $this->page->all(), $this->data->all(), (array) $data); + $data['feather'] = \Slim\Slim::getInstance(); + $data['assets'] = $this->getAssets(); + $data = $this->app->hooks->fire('view.alter_data', $data); + return $this->render($data); + } + + protected function render($data = null) + { + extract($data); + ob_start(); + + require $this->getTemplatePathname('header.new.php'); + foreach ($this->getTemplates() as $tpl) { + require $tpl; + } + require $this->getTemplatePathname('footer.new.php'); + return ob_get_clean(); + } + + /******************************************************************************** + * Getters and setters + *******************************************************************************/ + + public function setStyle($style) + { + if (!is_dir($this->app->forum_env['FEATHER_ROOT'].'style/'.$style.'/view/')) { + throw new \InvalidArgumentException('The style '.$style.' doesn\'t exist'); + } + $this->data->set('style', (string) $style); + $this->setTemplatesDirectory($this->app->forum_env['FEATHER_ROOT'].'style/'.$style.'/view'); + $this->addAsset('css', 'style/'.$style.'.css'); + return $this; + } + + public function getStyle() + { + return $this->data['style']; + } + + public function setPageInfo(array $data) + { + foreach ($data as $key => $value) { + list($key, $value) = $this->validate($key, $value); + $this->page->set($key, $value); + } + return $this; + } + + public function getPageInfo() + { + return $this->page->all(); + } + + protected function validate($key, $value) + { + $key = (string) $key; + if (isset($this->validation[$key])) { + if (function_exists($this->validation[$key])) { + $value = $this->validation[$key]($value); + } + } + return array($key, $value); + } + + public function addAsset($type, $asset, $params = array()) + { + $type = (string) $type; + if (!in_array($type, array('js', 'css', 'feed', 'canonical', 'prev', 'next'))) { + throw new \Exception('Invalid asset type : ' . $type); + } + if (in_array($type, array('js', 'css')) && !is_file($this->app->forum_env['FEATHER_ROOT'].$asset)) { + throw new \Exception('The asset file ' . $asset . ' does not exist'); + } + + $params = array_merge(static::getDefaultParams($type), $params); + if (isset($params['title'])) { + $params['title'] = feather_escape($params['title']); + } + $this->assets[$type][] = array( + 'file' => (string) $asset, + 'params' => $params + ); + } + + public function getAssets() + { + return $this->assets; + } + + public function addTemplate($tpl, $priority = 10) + { + $tpl = (array) $tpl; + foreach ($tpl as $key => $tpl_file) { + $this->templates[(int) $priority][] = $this->getTemplatePathname((string) $tpl_file); + } + return $this; + } + + public function getTemplates() + { + $output = array(); + if (count($this->templates) > 1) { + ksort($this->templates); + } + foreach ($this->templates as $priority) { + if (!empty($priority)) { + foreach ($priority as $tpl) { $output[] = $tpl; - } - } - } - return $output; - } - - public function __call($method, $args) - { - $method = mb_substr(preg_replace_callback('/([A-Z])/', function ($c) { - return "_" . strtolower($c[1]); - }, $method), 4); - if (empty($args)) { - $args = null; - } - list($key, $value) = $this->validate($method, $args); - $this->page->set($key, $value); - } - - protected function getDefaultPageInfo() - { - if (!$this->app->cache->isCached('quickjump')) { - $this->app->cache->store('quickjump', \model\cache::get_quickjump()); - } - - $data = array( - 'title' => feather_escape($this->app->forum_settings['o_board_title']), - 'page_number' => null, - 'active_page' => 'index', - 'focus_element' => null, - 'is_indexed' => true, - 'admin_console' => false, - 'page_head' => null, - 'paging_links' => null, - 'required_fields' => null, - 'footer_style' => null, - 'quickjump' => $this->app->cache->retrieve('quickjump'), - 'fid' => null, - 'pid' => null, - 'tid' => null, - 'feather_config' => $this->app->config, - ); - - if ($this->app->user->is_admmod) { - $data['has_reports'] = \model\header::get_reports(); - } - - return $data; - } - } + } + } + } + return $output; + } + + public function __call($method, $args) + { + $method = mb_substr(preg_replace_callback('/([A-Z])/', function ($c) { + return "_" . strtolower($c[1]); + }, $method), 4); + if (empty($args)) { + $args = null; + } + list($key, $value) = $this->validate($method, $args); + $this->page->set($key, $value); + } + + protected function getDefaultPageInfo() + { + if (!$this->app->cache->isCached('quickjump')) { + $this->app->cache->store('quickjump', \model\cache::get_quickjump()); + } + + $data = array( + 'title' => feather_escape($this->app->forum_settings['o_board_title']), + 'page_number' => null, + 'active_page' => 'index', + 'focus_element' => null, + 'is_indexed' => true, + 'admin_console' => false, + 'page_head' => null, + 'paging_links' => null, + 'required_fields' => null, + 'footer_style' => null, + 'quickjump' => $this->app->cache->retrieve('quickjump'), + 'fid' => null, + 'pid' => null, + 'tid' => null, + ); + + if ($this->app->user->is_admmod) { + $data['has_reports'] = \model\header::get_reports(); + } + + return $data; + } + + protected static function getDefaultParams($type) + { + switch($type) { + case 'js': + return array('type' => 'text/javascript'); + case 'css': + return array('rel' => 'stylesheet', 'type' => 'text/css'); + case 'feed': + return array('rel' => 'alternate', 'type' => 'application/atom+xml'); + case 'canonical': + return array('rel' => 'canonical'); + case 'prev': + return array('rel' => 'prev'); + case 'next': + return array('rel' => 'next'); + default: + return array(); + } + } +} diff --git a/include/common_admin.php b/include/common_admin.php index 228b2fa2..c1778f08 100644 --- a/include/common_admin.php +++ b/include/common_admin.php @@ -37,14 +37,13 @@ function generate_admin_menu($page = '') // See if there are any plugins $plugins = forum_list_plugins($is_admin); - $feather->render('admin/menu.php', array( + $feather->view2->setPageInfo(array( 'page' => $page, 'is_admin' => $is_admin, 'feather_config' => $feather->config, - 'feather_user' => $feather->user, 'plugins' => $plugins, - ) - ); + ), 1 + )->addTemplate('admin/menu.php'); } // diff --git a/include/functions.php b/include/functions.php index 09330114..2189bb05 100644 --- a/include/functions.php +++ b/include/functions.php @@ -89,7 +89,7 @@ function get_admin_ids() // function check_username($username, $errors, $exclude_id = null) { - global $feather, $feather_config, $errors, $feather_bans; + global $feather, $errors, $feather_bans; // Include UTF-8 function require_once FEATHER_ROOT.'include/utf8/strcasecmp.php'; @@ -116,7 +116,7 @@ function check_username($username, $errors, $exclude_id = null) } // Check username for any censored words - if ($feather_config['o_censoring'] == '1' && censor_words($username) != $username) { + if ($feather->forum_settings['o_censoring'] == '1' && censor_words($username) != $username) { $errors[] = __('Username censor'); } @@ -589,7 +589,7 @@ function paginate_old($num_pages, $cur_page, $link) // // Display a message // -function message($msg, $http_status = null, $no_back_link = false, $dontStop = false) +function message($msg, $http_status = null, $no_back_link = false) { // Did we receive a custom header? if (!is_null($http_status)) { @@ -608,29 +608,18 @@ function message($msg, $http_status = null, $no_back_link = false, $dontStop = f $feather->response->setBody(''); if (!defined('FEATHER_HEADER')) { - $page_title = array(feather_escape($feather->config['o_board_title']), __('Info')); - - require_once FEATHER_ROOT.'controller/header.php'; - - $header = new \controller\header(); - - $header->setTitle($page_title)->display(); + $feather->view2->setPageInfo(array( + 'title' => array(feather_escape($feather->config['o_board_title']), __('Info')), + )); } - $feather->render('message.php', array( + $feather->view2->setPageInfo(array( 'message' => $msg, 'no_back_link' => $no_back_link, - )); - - require_once FEATHER_ROOT.'controller/footer.php'; - - $footer = new \controller\footer(); - - if ($dontStop) { - $footer->dontStop(); - } + ))->addTemplate('message.php')->display(); - $footer->display(); + // Don't display anything after a message + $feather->stop(); } diff --git a/include/routes.php b/include/routes.php index 0e58f819..74281f92 100644 --- a/include/routes.php +++ b/include/routes.php @@ -167,4 +167,4 @@ // 404 not found $feather->notFound(function () { message(__('Bad request'), '404'); -}); +}); \ No newline at end of file diff --git a/model/admin/groups.php b/model/admin/groups.php index 04218d1c..7f6b3d6b 100644 --- a/model/admin/groups.php +++ b/model/admin/groups.php @@ -283,11 +283,7 @@ public function set_default_group($groups) ->update_many('conf_value', $group_id); // Regenerate the config cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; - } - - generate_config_cache(); + $this->feather->cache->store('config', \model\cache::get_config()); redirect(get_link('admin/groups/'), __('Default group redirect')); } diff --git a/model/moderate.php b/model/moderate.php index 36a02d82..d2f53fc8 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -561,7 +561,7 @@ public function move_topics_to($fid, $tfid = null, $param = null) $moved_to = $moved_to->find_one(); // Create the redirect topic - $move_topics_to['insert'] = array( + $insert_move_topics_to = array( 'poster' => $moved_to['poster'], 'subject' => $moved_to['subject'], 'posted' => $moved_to['posted'], @@ -573,7 +573,7 @@ public function move_topics_to($fid, $tfid = null, $param = null) // Insert the report $move_topics_to = DB::for_table('topics') ->create() - ->set($move_topics_to['insert']); + ->set($insert_move_topics_to); $move_topics_to = $this->hook->fireDB('move_topics_to_redirect', $move_topics_to); $move_topics_to = $move_topics_to->save(); @@ -608,7 +608,7 @@ public function check_move_possible() ->where_any_is($result['where']) ->where_null('f.redirect_url') ->order_by_many($result['order_by']); - $result = $this->hook->fireDB('check_move_possible'); + $result = $this->hook->fireDB('check_move_possible', $result); $result = $result->find_many(); if (count($result) < 2) { @@ -798,6 +798,8 @@ public function delete_topics($topics, $fid) $find_ids = $this->hook->fireDB('delete_topics_find_ids', $find_ids); $find_ids = $find_ids->find_many(); + $ids_post = array(); + foreach ($find_ids as $id) { $ids_post[] = $id['id']; } diff --git a/model/search.php b/model/search.php index 8facdca0..e27188e5 100644 --- a/model/search.php +++ b/model/search.php @@ -536,7 +536,7 @@ public function get_search_results() } $delete_cache = DB::for_table('search_cache') - ->where_not_in('ident', $old_searches); + ->where_not_in('ident', $old_searches); $delete_cache = $this->hook->fireDB('get_search_results_delete_cache', $delete_cache); $delete_cache = $delete_cache->delete_many(); } @@ -735,7 +735,7 @@ public function display_search_results($search) $cur_search['pposter_disp'] = ''.$pposter.''; } - $this->feather->render('search/posts.php', array( + $this->feather->view2->setPageInfo(array( 'post_count' => $post_count, 'url_topic' => $url_topic, 'cur_search' => $cur_search, @@ -792,12 +792,14 @@ public function display_search_results($search) $start_from = $cur_search['start_from']; } - $this->feather->render('search/topics.php', array( + $this->feather->view2->setPageInfo(array( 'cur_search' => $cur_search, 'start_from' => $start_from, 'topic_count' => $topic_count, 'subject' => $subject, 'forum' => $forum, + 'post_count' => $post_count, + 'url_topic' => $url_topic, ) ); } diff --git a/model/viewforum.php b/model/viewforum.php index 6579c292..d88a0e6c 100644 --- a/model/viewforum.php +++ b/model/viewforum.php @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; } - + // Returns basic informations about the forum public function get_info_forum($id) { @@ -93,35 +93,6 @@ public function sort_forum_by($sort_by_sql) return $sort_by; } - // Adds relationship meta tags - public function get_page_head($forum_id, $num_pages, $p, $url_forum) - { - $page_head = array(); - - $page_head = $this->hook->fire('get_page_head_start', $page_head, $forum_id, $num_pages, $p, $url_forum); - - $page_head['canonical'] = "\t".''; - - if ($num_pages > 1) { - if ($p > 1) { - $page_head['prev'] = "\t".''; - } - if ($p < $num_pages) { - $page_head['next'] = "\t".''; - } - } - - if ($this->config['o_feed_type'] == '1') { - $page_head['feed'] = ''; - } elseif ($this->config['o_feed_type'] == '2') { - $page_head['feed'] = ''; - } - - $page_head = $this->hook->fire('get_page_head', $page_head); - - return $page_head; - } - // Returns forum action public function get_forum_actions($forum_id, $subscriptions, $is_subscribed) { diff --git a/model/viewtopic.php b/model/viewtopic.php index 444b23ef..6a8f6674 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -219,35 +219,6 @@ public function get_subscraction($is_subscribed, $topic_id) return $subscraction; } - // Adds relationship meta tags - public function get_page_head($topic_id, $num_pages, $p, $url_topic) - { - $page_head = array(); - - $page_head = $this->hook->fire('get_page_head_start', $page_head, $topic_id, $num_pages, $p, $url_topic); - - $page_head['canonical'] = "\t".''; - - if ($num_pages > 1) { - if ($p > 1) { - $page_head['prev'] = "\t".''; - } - if ($p < $num_pages) { - $page_head['next'] = "\t".''; - } - } - - if ($this->config['o_feed_type'] == '1') { - $page_head['feed'] = ''; - } elseif ($this->config['o_feed_type'] == '2') { - $page_head['feed'] = ''; - } - - $page_head = $this->hook->fire('get_page_head', $page_head, $topic_id, $num_pages, $p, $url_topic); - - return $page_head; - } - // Prints the posts public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) { @@ -435,7 +406,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) return $post_data; } - + public function increment_views($id) { if ($this->config['o_topic_views'] == '1') { diff --git a/style/FeatherBB/view/admin/censoring.php b/style/FeatherBB/view/admin/censoring.php index 71c253f7..cf080869 100644 --- a/style/FeatherBB/view/admin/censoring.php +++ b/style/FeatherBB/view/admin/censoring.php @@ -22,7 +22,7 @@
    -

    '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    +

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    diff --git a/style/FeatherBB/view/admin/groups/add_edit_group.php b/style/FeatherBB/view/admin/groups/add_edit_group.php index bc2bc244..ae278dce 100644 --- a/style/FeatherBB/view/admin/groups/add_edit_group.php +++ b/style/FeatherBB/view/admin/groups/add_edit_group.php @@ -54,7 +54,7 @@ - +forum_settings['o_default_user_group'] != $group['info']['g_id']): ?> @@ -50,124 +50,124 @@ @@ -275,10 +275,10 @@ @@ -391,10 +391,10 @@ @@ -515,13 +515,13 @@ @@ -582,10 +582,10 @@ @@ -631,24 +631,24 @@ @@ -684,7 +684,7 @@ @@ -770,13 +770,13 @@ @@ -793,10 +793,10 @@ @@ -821,10 +821,10 @@ diff --git a/style/FeatherBB/view/admin/parser.php b/style/FeatherBB/view/admin/parser.php index aec1f767..e32369b6 100644 --- a/style/FeatherBB/view/admin/parser.php +++ b/style/FeatherBB/view/admin/parser.php @@ -208,7 +208,7 @@ - diff --git a/style/FeatherBB/view/admin/permissions.php b/style/FeatherBB/view/admin/permissions.php index a70328ae..2b1bf413 100644 --- a/style/FeatherBB/view/admin/permissions.php +++ b/style/FeatherBB/view/admin/permissions.php @@ -28,10 +28,10 @@ @@ -156,10 +156,10 @@ - +forum_settings['o_topic_views'] == '1'): ?> @@ -56,7 +56,7 @@ - + forum_settings['o_topic_views'] == '1'): ?> @@ -66,7 +66,7 @@ if (empty($forum_data)): ?> - diff --git a/style/FeatherBB/view/admin/parser.php b/style/FeatherBB/view/admin/parser.php index e32369b6..df29eb0d 100644 --- a/style/FeatherBB/view/admin/parser.php +++ b/style/FeatherBB/view/admin/parser.php @@ -16,7 +16,7 @@

    - +

    diff --git a/style/FeatherBB/view/admin/permissions.php b/style/FeatherBB/view/admin/permissions.php index 2b1bf413..e8201e72 100644 --- a/style/FeatherBB/view/admin/permissions.php +++ b/style/FeatherBB/view/admin/permissions.php @@ -16,7 +16,7 @@

    - +

    diff --git a/style/FeatherBB/view/admin/reports.php b/style/FeatherBB/view/admin/reports.php index 63251681..163e25b0 100644 --- a/style/FeatherBB/view/admin/reports.php +++ b/style/FeatherBB/view/admin/reports.php @@ -16,7 +16,7 @@

    - +
    - +
    - +
    - +
    @@ -177,10 +177,10 @@
    - - @@ -192,7 +192,7 @@
    - - '.__('PHP manual').'') ?> + + forum_settings['o_time_format'], $timestamp), ''.__('PHP manual').'') ?>
    - - '.__('PHP manual').'') ?> + + forum_settings['o_date_format'], $timestamp), ''.__('PHP manual').'') ?>
    - +
    - +
    - +
    - - @@ -287,10 +287,10 @@
    - - @@ -299,10 +299,10 @@
    - - @@ -311,10 +311,10 @@
    - - @@ -323,10 +323,10 @@
    - - @@ -335,10 +335,10 @@
    - - @@ -347,35 +347,35 @@
    - +
    - +
    - +
    - +
    - +
    - - @@ -403,10 +403,10 @@
    - - @@ -415,10 +415,10 @@
    - - '.__('Censoring').'') ?> @@ -427,10 +427,10 @@
    - - @@ -439,10 +439,10 @@
    - - @@ -451,10 +451,10 @@
    - - @@ -463,10 +463,10 @@
    - - @@ -475,10 +475,10 @@
    - - @@ -487,10 +487,10 @@
    - - @@ -499,7 +499,7 @@
    - +
    - - - @@ -531,7 +531,7 @@
    - - - @@ -566,7 +566,7 @@
    - +
    - - @@ -594,28 +594,28 @@
    - +
    - +
    - +
    - +
    - +
    - +
    - - @@ -657,10 +657,10 @@
    - - @@ -669,14 +669,14 @@
    - +
    - +
    - +forum_settings['o_smtp_pass']) ? random_key(feather_strlen($feather->forum_settings['o_smtp_pass']), true) : ''; ?> @@ -693,10 +693,10 @@
    - - @@ -714,10 +714,10 @@
    - - @@ -726,10 +726,10 @@
    - - @@ -738,10 +738,10 @@
    - - @@ -750,10 +750,10 @@
    - - @@ -762,7 +762,7 @@
    - +
    - - -
    - - @@ -805,7 +805,7 @@
    - +
    - - @@ -833,7 +833,7 @@
    - +
    +
    - - @@ -40,10 +40,10 @@
    - - @@ -52,10 +52,10 @@
    - - @@ -64,10 +64,10 @@
    - - @@ -76,10 +76,10 @@
    - - @@ -97,10 +97,10 @@
    - - @@ -109,10 +109,10 @@
    - - @@ -121,10 +121,10 @@
    - - @@ -133,14 +133,14 @@
    - +
    - +
    - - @@ -168,10 +168,10 @@
    - - diff --git a/style/FeatherBB/view/edit.php b/style/FeatherBB/view/edit.php index 48a692e8..829d0c17 100644 --- a/style/FeatherBB/view/edit.php +++ b/style/FeatherBB/view/edit.php @@ -89,10 +89,10 @@
    diff --git a/style/FeatherBB/view/footer.new.php b/style/FeatherBB/view/footer.new.php index 26d09007..13b79669 100644 --- a/style/FeatherBB/view/footer.new.php +++ b/style/FeatherBB/view/footer.new.php @@ -15,15 +15,15 @@
    user->is_admmod) { +if (isset($active_page) && ($active_page == 'viewforum' || $active_page == 'viewtopic') && $feather->user->is_admmod) { echo "\t\t".'
    '."\n"; - if ($footer_style == 'viewforum') { + if ($active_page == 'viewforum') { echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; echo "\t\t\t".'
    '."\n"; - } elseif ($footer_style == 'viewtopic') { + } elseif ($active_page == 'viewtopic') { if (isset($pid)) { $parameter = 'param/'.$pid.'/'; } elseif (isset($page_number) && $page_number != 1) { @@ -86,19 +86,19 @@
    forum_settings['o_feed_type'] == '1') { echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { echo "\t\t\t\t".''."\n"; } -} elseif ($footer_style == 'viewforum') { +} elseif ($active_page == 'viewforum') { if ($feather->forum_settings['o_feed_type'] == '1') { echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { echo "\t\t\t\t".''."\n"; } -} elseif ($footer_style == 'viewtopic') { +} elseif ($active_page == 'viewtopic') { if ($feather->forum_settings['o_feed_type'] == '1') { echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { @@ -143,6 +143,10 @@ '."\n"; + echo '
    @@ -172,7 +172,7 @@ forum_settings['o_topic_review'] != '0') : ?>

    diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php index 5da0f4b4..ced4459f 100644 --- a/style/FeatherBB/view/profile/section_display.php +++ b/style/FeatherBB/view/profile/section_display.php @@ -55,26 +55,26 @@ } ?> - +forum_settings['o_smilies'] == '1' || $feather->forum_settings['o_smilies_sig'] == '1' || $feather->forum_settings['o_signatures'] == '1' || $feather->forum_settings['o_avatars'] == '1' || ($feather->forum_settings['p_message_bbcode'] == '1' && $feather->forum_settings['p_message_img_tag'] == '1')): ?>

    -
    -
    +forum_settings['o_forum_subscriptions'] == '1' || $feather->forum_settings['o_topic_subscriptions'] == '1'): ?>
    @@ -46,7 +46,7 @@ -
    -
    +forum_settings['o_regs_verify'] == '0'): ?>
    @@ -75,14 +75,14 @@
    - + forum_settings['o_regs_verify'] == '1') ? __('Email legend 2') : __('Email legend') ?>
    -

    +forum_settings['o_regs_verify'] == '1'): ?>

    -
    diff --git a/style/FeatherBB/view/search/form.php b/style/FeatherBB/view/search/form.php index 4731b068..16cd788a 100644 --- a/style/FeatherBB/view/search/form.php +++ b/style/FeatherBB/view/search/form.php @@ -41,7 +41,7 @@

    -user->is_admmod ? '

    '.__('Search multiple forums info').'

    ' : '') ?> +forum_settings['o_search_all_forums'] == '1' || $feather->user->is_admmod ? '

    '.__('Search multiple forums info').'

    ' : '') ?>
    diff --git a/style/FeatherBB/view/viewforum.php b/style/FeatherBB/view/viewforum.php index a35faf22..a9673fa0 100644 --- a/style/FeatherBB/view/viewforum.php +++ b/style/FeatherBB/view/viewforum.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -36,7 +36,7 @@
    +
    @@ -97,4 +97,4 @@ '.implode(' - ', $forum_actions).'

    '."\n" : '') ?>
    -
    \ No newline at end of file + diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php index e2681757..e982045b 100644 --- a/style/FeatherBB/view/viewtopic.php +++ b/style/FeatherBB/view/viewtopic.php @@ -134,16 +134,16 @@
    - -user->auto_notify == '1' || $cur_topic['is_subscribed'])): ?> + +forum_settings['o_topic_subscriptions'] == '1' && ($feather->user->auto_notify == '1' || $cur_topic['is_subscribed'])): ?> user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); - $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; + $email_label = ($feather->forum_settings['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_form_name = ($feather->forum_settings['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
    ">
    diff --git a/view/admin/censoring.php b/view/admin/censoring.php index 71c253f7..cf080869 100644 --- a/view/admin/censoring.php +++ b/view/admin/censoring.php @@ -22,7 +22,7 @@
    -

    '.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    +

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    diff --git a/view/admin/groups/add_edit_group.php b/view/admin/groups/add_edit_group.php index bc2bc244..ae278dce 100644 --- a/view/admin/groups/add_edit_group.php +++ b/view/admin/groups/add_edit_group.php @@ -54,7 +54,7 @@ - +forum_settings['o_default_user_group'] != $group['info']['g_id']): ?> @@ -50,124 +50,124 @@ @@ -275,10 +275,10 @@ @@ -391,10 +391,10 @@ @@ -515,13 +515,13 @@ @@ -582,10 +582,10 @@ @@ -631,24 +631,24 @@ @@ -684,7 +684,7 @@ @@ -770,13 +770,13 @@ @@ -793,10 +793,10 @@ @@ -821,10 +821,10 @@ diff --git a/view/admin/parser.php b/view/admin/parser.php index aec1f767..e32369b6 100644 --- a/view/admin/parser.php +++ b/view/admin/parser.php @@ -208,7 +208,7 @@ - diff --git a/view/admin/permissions.php b/view/admin/permissions.php index a70328ae..2b1bf413 100644 --- a/view/admin/permissions.php +++ b/view/admin/permissions.php @@ -28,10 +28,10 @@ @@ -156,10 +156,10 @@ - +forum_settings['o_topic_views'] == '1'): ?> @@ -63,7 +63,7 @@ - +forum_settings['o_topic_views'] == '1'): ?> @@ -72,7 +72,7 @@ } if (empty($topic_data)): - $colspan = ($feather_config['o_topic_views'] == '1') ? 5 : 4; + $colspan = ($feather->forum_settings['o_topic_views'] == '1') ? 5 : 4; $button_status = ' disabled="disabled"'; echo "\t\t\t\t\t".''."\n"; endif; diff --git a/view/post.php b/view/post.php index f1d22d07..ee2531da 100644 --- a/view/post.php +++ b/view/post.php @@ -98,14 +98,14 @@ user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); - $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; + $email_label = ($feather->forum_settings['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_form_name = ($feather->forum_settings['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - @@ -121,10 +121,10 @@
    @@ -172,7 +172,7 @@ forum_settings['o_topic_review'] != '0') : ?>

    diff --git a/view/profile/menu.php b/view/profile/menu.php index 4627f8db..12b3b47f 100644 --- a/view/profile/menu.php +++ b/view/profile/menu.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -31,7 +31,7 @@ echo ' class="isactive"'; } ?>> - forum_settings['o_avatars'] == '1' || $feather->forum_settings['o_signatures'] == '1'): ?> > diff --git a/view/profile/section_display.php b/view/profile/section_display.php index 5da0f4b4..ced4459f 100644 --- a/view/profile/section_display.php +++ b/view/profile/section_display.php @@ -55,26 +55,26 @@ } ?> - +forum_settings['o_smilies'] == '1' || $feather->forum_settings['o_smilies_sig'] == '1' || $feather->forum_settings['o_signatures'] == '1' || $feather->forum_settings['o_avatars'] == '1' || ($feather->forum_settings['p_message_bbcode'] == '1' && $feather->forum_settings['p_message_img_tag'] == '1')): ?>

    -
    -
    +forum_settings['o_forum_subscriptions'] == '1' || $feather->forum_settings['o_topic_subscriptions'] == '1'): ?>
    @@ -46,7 +46,7 @@ -

    -
    \ No newline at end of file + diff --git a/view/register/form.php b/view/register/form.php index f1a360ef..bdff9a2b 100644 --- a/view/register/form.php +++ b/view/register/form.php @@ -59,7 +59,7 @@ -
    +forum_settings['o_regs_verify'] == '0'): ?>
    @@ -75,14 +75,14 @@
    - + forum_settings['o_regs_verify'] == '1') ? __('Email legend 2') : __('Email legend') ?>
    -

    +forum_settings['o_regs_verify'] == '1'): ?>

    -
    diff --git a/view/search/form.php b/view/search/form.php index 4731b068..16cd788a 100644 --- a/view/search/form.php +++ b/view/search/form.php @@ -41,7 +41,7 @@

    -user->is_admmod ? '

    '.__('Search multiple forums info').'

    ' : '') ?> +forum_settings['o_search_all_forums'] == '1' || $feather->user->is_admmod ? '

    '.__('Search multiple forums info').'

    ' : '') ?>
    diff --git a/view/viewforum.php b/view/viewforum.php index a35faf22..a9673fa0 100644 --- a/view/viewforum.php +++ b/view/viewforum.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -36,7 +36,7 @@
    - +forum_settings['o_topic_views'] == '1'): ?> @@ -56,7 +56,7 @@ - + forum_settings['o_topic_views'] == '1'): ?> @@ -66,7 +66,7 @@ if (empty($forum_data)): ?> - - - + +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/admin/categories.php b/style/FeatherBB/view/admin/categories.php index c8786528..370838ac 100644 --- a/style/FeatherBB/view/admin/categories.php +++ b/style/FeatherBB/view/admin/categories.php @@ -16,7 +16,7 @@

    - +
    @@ -27,7 +27,7 @@
    - +
    - +
    - +
    @@ -177,10 +177,10 @@
    - - @@ -192,7 +192,7 @@
    - - '.__('PHP manual').'') ?> + + forum_settings['o_time_format'], $timestamp), ''.__('PHP manual').'') ?>
    - - '.__('PHP manual').'') ?> + + forum_settings['o_date_format'], $timestamp), ''.__('PHP manual').'') ?>
    - +
    - +
    - +
    - - @@ -287,10 +287,10 @@
    - - @@ -299,10 +299,10 @@
    - - @@ -311,10 +311,10 @@
    - - @@ -323,10 +323,10 @@
    - - @@ -335,10 +335,10 @@
    - - @@ -347,35 +347,35 @@
    - +
    - +
    - +
    - +
    - +
    - - @@ -403,10 +403,10 @@
    - - @@ -415,10 +415,10 @@
    - - '.__('Censoring').'') ?> @@ -427,10 +427,10 @@
    - - @@ -439,10 +439,10 @@
    - - @@ -451,10 +451,10 @@
    - - @@ -463,10 +463,10 @@
    - - @@ -475,10 +475,10 @@
    - - @@ -487,10 +487,10 @@
    - - @@ -499,7 +499,7 @@
    - +
    - - - @@ -531,7 +531,7 @@
    - - - @@ -566,7 +566,7 @@
    - +
    - - @@ -594,28 +594,28 @@
    - +
    - +
    - +
    - +
    - +
    - +
    - - @@ -657,10 +657,10 @@
    - - @@ -669,14 +669,14 @@
    - +
    - +
    - +forum_settings['o_smtp_pass']) ? random_key(feather_strlen($feather->forum_settings['o_smtp_pass']), true) : ''; ?> @@ -693,10 +693,10 @@
    - - @@ -714,10 +714,10 @@
    - - @@ -726,10 +726,10 @@
    - - @@ -738,10 +738,10 @@
    - - @@ -750,10 +750,10 @@
    - - @@ -762,7 +762,7 @@
    - +
    - - -
    - - @@ -805,7 +805,7 @@
    - +
    - - @@ -833,7 +833,7 @@
    - +
    +
    - - @@ -40,10 +40,10 @@
    - - @@ -52,10 +52,10 @@
    - - @@ -64,10 +64,10 @@
    - - @@ -76,10 +76,10 @@
    - - @@ -97,10 +97,10 @@
    - - @@ -109,10 +109,10 @@
    - - @@ -121,10 +121,10 @@
    - - @@ -133,14 +133,14 @@
    - +
    - +
    - - @@ -168,10 +168,10 @@
    - - diff --git a/view/edit.php b/view/edit.php index 48a692e8..829d0c17 100644 --- a/view/edit.php +++ b/view/edit.php @@ -89,10 +89,10 @@
    diff --git a/view/help.php b/view/help.php index 2ecf9e36..d171ddab 100644 --- a/view/help.php +++ b/view/help.php @@ -41,7 +41,7 @@

    -

    [url=][/url]

    +

    [url=]forum_settings['o_board_title']) ?>[/url] forum_settings['o_board_title']) ?>

    [url][/url]

    [url=/help/][/url]

    [email]myname@example.com[/email] myname@example.com

    diff --git a/view/index.php b/view/index.php index 3142e1bd..cc51e8b5 100644 --- a/view/index.php +++ b/view/index.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -92,13 +92,13 @@
    - + forum_settings['o_users_online'] == 1) : ?>
    '.forum_number_format($online['num_users']).'') ?>
    '.forum_number_format($online['num_guests']).'') ?>
    forum_settings['o_users_online'] == 1) : if ($online['num_users'] > 0) { echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.__('Online').'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; } else { @@ -108,4 +108,4 @@ ?>
    - \ No newline at end of file + diff --git a/view/misc/email.php b/view/misc/email.php index eb44dafb..06f96f55 100644 --- a/view/misc/email.php +++ b/view/misc/email.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -34,4 +34,4 @@

    - \ No newline at end of file + diff --git a/view/misc/rules.php b/view/misc/rules.php index 366880ee..feb662ad 100644 --- a/view/misc/rules.php +++ b/view/misc/rules.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -17,7 +17,7 @@

    -
    +
    forum_settings['o_rules_message'] ?>
    - \ No newline at end of file + diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index 35b67b41..8b636222 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -40,7 +40,7 @@
    '.__('Empty forum').'
    +
    @@ -97,4 +97,4 @@ '.implode(' - ', $forum_actions).'

    '."\n" : '') ?>
    -
    \ No newline at end of file + diff --git a/view/viewtopic.php b/view/viewtopic.php index e2681757..e982045b 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -134,16 +134,16 @@
    - -user->auto_notify == '1' || $cur_topic['is_subscribed'])): ?> + +forum_settings['o_topic_subscriptions'] == '1' && ($feather->user->auto_notify == '1' || $cur_topic['is_subscribed'])): ?> user->is_guest) { - $email_label = ($feather_config['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); - $email_form_name = ($feather_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; + $email_label = ($feather->forum_settings['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_form_name = ($feather->forum_settings['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> - +
    ">
    From 921980178ef10a625d0ddfdfb4eddcecb810cf7d Mon Sep 17 00:00:00 2001 From: capkokoon Date: Fri, 28 Aug 2015 10:43:25 +0200 Subject: [PATCH 225/353] Update admin/maintenance/rebuild controller and view --- controller/admin/maintenance.php | 48 +++++++------------ .../view/admin/maintenance/rebuild.php | 27 ++--------- 2 files changed, 19 insertions(+), 56 deletions(-) diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index cd8c237b..42343ecc 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -14,62 +14,46 @@ class maintenance public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - - $this->model = new \model\admin\maintenance(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/maintenance.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; - } - - public function __autoload($class_name) - { - require FEATHER_ROOT . $class_name . '.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/admin/maintenance.mo'); + require $this->feather->forum_env['FEATHER_ROOT'] . 'include/common_admin.php'; } public function display() { - if ($this->user->g_id != FEATHER_ADMIN) { + if ($this->feather->user->g_id != FEATHER_ADMIN) { message(__('No permission'), '403'); } $action = ''; - if ($this->request->post('action')) { - $action = $this->request->post('action'); - } elseif ($this->request->get('action')) { - $action = $this->request->get('action'); + if ($this->feather->request->post('action')) { + $action = $this->feather->request->post('action'); + } elseif ($this->feather->request->get('action')) { + $action = $this->feather->request->get('action'); } if ($action == 'rebuild') { $this->model->rebuild(); - $page_title = array(feather_escape($this->config['o_board_title']), __('Rebuilding search index')); - - $this->feather->render('admin/maintenance/rebuild.php', array( - 'page_title' => $page_title, + $this->feather->view2->setPageInfo(array( + 'page_title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Rebuilding search index')), + 'query_str' => $this->model->get_query_str() ) - ); - - $query_str = $this->model->get_query_str(); - - exit('

    '.sprintf(__('Javascript redirect failed'), ''.__('Click here').'').'

    '); + )->addTemplate('admin/maintenance/rebuild.php')->display(); } if ($action == 'prune') { - $prune_from = feather_trim($this->request->post('prune_from')); - $prune_sticky = intval($this->request->post('prune_sticky')); + $prune_from = feather_trim($this->feather->request->post('prune_from')); + $prune_sticky = intval($this->feather->request->post('prune_sticky')); generate_admin_menu('maintenance'); - if ($this->request->post('prune_comply')) { + if ($this->feather->request->post('prune_comply')) { $this->model->prune_comply($prune_from, $prune_sticky); } $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Prune')), + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Admin'), __('Prune')), 'active_page' => 'admin', 'admin_console' => true, 'prune_sticky' => $prune_sticky, @@ -82,7 +66,7 @@ public function display() generate_admin_menu('maintenance'); $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Maintenance')), + 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Admin'), __('Maintenance')), 'active_page' => 'admin', 'admin_console' => true, 'first_id' => $this->model->get_first_id(), diff --git a/style/FeatherBB/view/admin/maintenance/rebuild.php b/style/FeatherBB/view/admin/maintenance/rebuild.php index 5bd6ffc0..0d24339b 100644 --- a/style/FeatherBB/view/admin/maintenance/rebuild.php +++ b/style/FeatherBB/view/admin/maintenance/rebuild.php @@ -6,33 +6,12 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; } ?> - - - - - - -<?php echo generate_page_title($page_title) ?> - - - -

    -
    \ No newline at end of file + +

    '.__('Click here').'')?>

    From 7daccd883b276466bbfa569b45e7cb526ecbf192 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Fri, 28 Aug 2015 10:46:08 +0200 Subject: [PATCH 226/353] Remove remaining feather_config var --- include/common_admin.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/common_admin.php b/include/common_admin.php index c1778f08..a166af6a 100644 --- a/include/common_admin.php +++ b/include/common_admin.php @@ -33,14 +33,13 @@ function generate_admin_menu($page = '') $feather = \Slim\Slim::getInstance(); $is_admin = $feather->user->g_id == FEATHER_ADMIN ? true : false; - + // See if there are any plugins $plugins = forum_list_plugins($is_admin); $feather->view2->setPageInfo(array( 'page' => $page, 'is_admin' => $is_admin, - 'feather_config' => $feather->config, 'plugins' => $plugins, ), 1 )->addTemplate('admin/menu.php'); From af31e1b2916a5519055eb1edd1e6662281cb49ac Mon Sep 17 00:00:00 2001 From: capkokoon Date: Fri, 28 Aug 2015 12:30:42 +0200 Subject: [PATCH 227/353] First attempt to check route permissions --- include/classes/auth.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index 64d1f82d..012841ce 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -281,6 +281,12 @@ public function call() // Update online list $this->update_users_online(); + $this->app->hook('slim.before.dispatch', function() { + if(preg_match('/\/admin/', $this->app->router->getCurrentRoute()->getPattern()) && $this->app->user->g_id != $this->app->forum_env['FEATHER_ADMIN']) { + $this->app->flash('message', __('No permission')); + $this->app->redirect(get_link('/'), 403); + } + }); $this->next->call(); } } From 8091fbcc522031c43cc0b6710b616e7fd53966ed Mon Sep 17 00:00:00 2001 From: beaver Date: Fri, 28 Aug 2015 12:48:06 +0200 Subject: [PATCH 228/353] Add middleware check for admin routes --- .gitignore | 2 ++ include/routes.php | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b1fc652e..be477e41 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ include/config.php nbproject/ lang/French .htaccess +vendor +composer.lock diff --git a/include/routes.php b/include/routes.php index 4d6e1e96..a1229f75 100644 --- a/include/routes.php +++ b/include/routes.php @@ -7,6 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ +/** + * middleware to check if user is admin, if it's not redirect to homepage. + */ +$isAdmin = function() use ($feather) { + if($feather->user->g_id != $feather->forum_env['FEATHER_ADMIN']) { + redirect(get_link('/'), __('No permission')); + } +}; // Index $feather->get('/', '\controller\index:display'); @@ -88,7 +96,7 @@ }); // Admin routes -$feather->group('/admin', function() use ($feather) { +$feather->group('/admin', $isAdmin, function() use ($feather) { // Admin index $feather->get('(/action/:action)(/)', '\controller\admin\index:display'); @@ -163,4 +171,4 @@ // 404 not found $feather->notFound(function () { message(__('Bad request'), '404'); -}); \ No newline at end of file +}); From 1591b301517886f6c4477207f4bf35191204b147 Mon Sep 17 00:00:00 2001 From: beaver Date: Fri, 28 Aug 2015 13:09:06 +0200 Subject: [PATCH 229/353] Create AdminUtils class Replaces the include/common_admin.php --- controller/admin/bans.php | 11 +++--- controller/admin/categories.php | 7 ++-- controller/admin/censoring.php | 7 ++-- controller/admin/forums.php | 11 +++--- controller/admin/groups.php | 13 +++--- controller/admin/index.php | 11 +++--- controller/admin/maintenance.php | 5 +-- controller/admin/options.php | 5 +-- controller/admin/parser.php | 5 +-- controller/admin/permissions.php | 7 ++-- controller/admin/reports.php | 7 ++-- controller/admin/statistics.php | 7 ++-- controller/admin/users.php | 13 +++--- include/classes/AdminUtils.class.php | 59 ++++++++++++++++++++++++++++ include/classes/Utils.class.php | 30 ++++++++++++++ 15 files changed, 137 insertions(+), 61 deletions(-) create mode 100644 include/classes/AdminUtils.class.php create mode 100644 include/classes/Utils.class.php diff --git a/controller/admin/bans.php b/controller/admin/bans.php index e6a8d6ff..16d6f741 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -19,13 +19,12 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\bans(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/bans.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/bans.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT . $class_name . '.php'; + require $this->feather->forum_env['FEATHER_ROOT'] . $class_name . '.php'; } public function display() @@ -56,7 +55,7 @@ public function display() )->addTemplate('admin/bans/search_ban.php')->display(); } else { - generate_admin_menu('bans'); + \FeatherBB\AdminUtils::generateAdminMenu('bans'); $this->feather->view2->setPageInfo(array( 'admin_console' => true, @@ -77,7 +76,7 @@ public function add($id = null) $this->model->insert_ban(); } - generate_admin_menu('bans'); + \FeatherBB\AdminUtils::generateAdminMenu('bans'); $this->feather->view2->setPageInfo(array( 'admin_console' => true, @@ -108,7 +107,7 @@ public function edit($id) $this->model->insert_ban(); } - generate_admin_menu('bans'); + \FeatherBB\AdminUtils::generateAdminMenu('bans'); $this->feather->view2->setPageInfo(array( 'admin_console' => true, diff --git a/controller/admin/categories.php b/controller/admin/categories.php index 916506be..cd9f22a2 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -19,13 +19,12 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\categories(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/categories.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/categories.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT.$class_name.'.php'; + require $this->feather->forum_env['FEATHER_ROOT'].$class_name.'.php'; } public function add_category() @@ -101,7 +100,7 @@ public function display() message(__('No permission'), '403'); } - generate_admin_menu('categories'); + \FeatherBB\AdminUtils::generateAdminMenu('categories'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Categories')), diff --git a/controller/admin/censoring.php b/controller/admin/censoring.php index a7367eb9..7c80fd54 100644 --- a/controller/admin/censoring.php +++ b/controller/admin/censoring.php @@ -19,13 +19,12 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\censoring(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/censoring.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/censoring.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT . $class_name . '.php'; + require $this->feather->forum_env['FEATHER_ROOT'] . $class_name . '.php'; } public function display() @@ -49,7 +48,7 @@ public function display() $this->model->remove_word(); } - generate_admin_menu('censoring'); + \FeatherBB\AdminUtils::generateAdminMenu('censoring'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Censoring')), diff --git a/controller/admin/forums.php b/controller/admin/forums.php index ba4cfa60..2f21597b 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -19,13 +19,12 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\forums(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/forums.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/forums.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT . $class_name . '.php'; + require $this->feather->forum_env['FEATHER_ROOT'] . $class_name . '.php'; } // @@ -121,7 +120,7 @@ public function edit_forum($forum_id) } } else { - generate_admin_menu('forums'); + \FeatherBB\AdminUtils::generateAdminMenu('forums'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')), @@ -151,7 +150,7 @@ public function delete_forum($forum_id) } else { // If the user hasn't confirmed - generate_admin_menu('forums'); + \FeatherBB\AdminUtils::generateAdminMenu('forums'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Forums')), @@ -188,7 +187,7 @@ public function display() $this->edit_positions(); } - generate_admin_menu('forums'); + \FeatherBB\AdminUtils::generateAdminMenu('forums'); $categories_model = new \model\admin\categories(); $this->feather->view2->setPageInfo(array( diff --git a/controller/admin/groups.php b/controller/admin/groups.php index 2ccffa6a..3f0e4ea9 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -19,13 +19,12 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\groups(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/groups.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/groups.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT . $class_name . '.php'; + require $this->feather->forum_env['FEATHER_ROOT'] . $class_name . '.php'; } public function display() @@ -41,7 +40,7 @@ public function display() $this->model->set_default_group($groups, $this->feather); } - generate_admin_menu('groups'); + \FeatherBB\AdminUtils::generateAdminMenu('groups'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), @@ -76,7 +75,7 @@ public function delete($id) if ($this->request->post('del_group_comply') || $this->request->post('del_group')) { $this->model->delete_group($id); } else { - generate_admin_menu('groups'); + \FeatherBB\AdminUtils::generateAdminMenu('groups'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), @@ -89,7 +88,7 @@ public function delete($id) } } - generate_admin_menu('groups'); + \FeatherBB\AdminUtils::generateAdminMenu('groups'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), @@ -118,7 +117,7 @@ public function addedit($id = '') // Add/edit a group (stage 1) elseif ($this->request->post('add_group') || isset($id)) { - generate_admin_menu('groups'); + \FeatherBB\AdminUtils::generateAdminMenu('groups'); $group = $this->model->info_add_group($groups, $id); diff --git a/controller/admin/index.php b/controller/admin/index.php index 1069a7cb..87ff57c6 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -18,13 +18,12 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/index.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/index.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT . $class_name . '.php'; + require $this->feather->forum_env['FEATHER_ROOT'] . $class_name . '.php'; } public function remove_install_folder($directory) @@ -67,7 +66,7 @@ public function display($action = null) } // Remove /install elseif ($action == 'remove_install_file') { - $deleted = $this->remove_install_folder(FEATHER_ROOT.'install'); + $deleted = $this->remove_install_folder($this->feather->forum_env['FEATHER_ROOT'].'install'); if ($deleted) { redirect(get_link('admin/'), __('Deleted install.php redirect')); @@ -76,13 +75,13 @@ public function display($action = null) } } - generate_admin_menu('index'); + \FeatherBB\AdminUtils::generateAdminMenu('index'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Index')), 'active_page' => 'admin', 'admin_console' => true, - 'install_file_exists' => is_dir(FEATHER_ROOT.'install'), + 'install_file_exists' => is_dir($this->feather->forum_env['FEATHER_ROOT'].'install'), ) )->addTemplate('admin/index.php')->display(); } diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index 42343ecc..aba79e7d 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -16,7 +16,6 @@ public function __construct() $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\admin\maintenance(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/admin/maintenance.mo'); - require $this->feather->forum_env['FEATHER_ROOT'] . 'include/common_admin.php'; } public function display() @@ -46,7 +45,7 @@ public function display() $prune_from = feather_trim($this->feather->request->post('prune_from')); $prune_sticky = intval($this->feather->request->post('prune_sticky')); - generate_admin_menu('maintenance'); + \FeatherBB\AdminUtils::generateAdminMenu('maintenance'); if ($this->feather->request->post('prune_comply')) { $this->model->prune_comply($prune_from, $prune_sticky); @@ -63,7 +62,7 @@ public function display() )->addTemplate('admin/maintenance/prune.php')->display(); } - generate_admin_menu('maintenance'); + \FeatherBB\AdminUtils::generateAdminMenu('maintenance'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Admin'), __('Maintenance')), diff --git a/controller/admin/options.php b/controller/admin/options.php index 589b48cb..0903873b 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -19,8 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\options(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/options.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/options.mo'); } public function __autoload($class_name) @@ -38,7 +37,7 @@ public function display() $this->model->update_options(); } - generate_admin_menu('options'); + \FeatherBB\AdminUtils::generateAdminMenu('options'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Options')), diff --git a/controller/admin/parser.php b/controller/admin/parser.php index 30b48a08..56db8f50 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -19,8 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\parser(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/parser.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/parser.mo'); } public function __autoload($class_name) @@ -207,7 +206,7 @@ public function display() redirect(get_link('admin/parser/'), $lang_admin_parser['save_success']); } - generate_admin_menu('parser'); + \FeatherBB\AdminUtils::generateAdminMenu('parser'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Parser')), diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index ac1881bd..be2364e9 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -19,13 +19,12 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\permissions(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/permissions.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/permissions.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT . $class_name . '.php'; + require $this->feather->forum_env['FEATHER_ROOT'] . $class_name . '.php'; } public function display() @@ -39,7 +38,7 @@ public function display() $this->model->update_permissions(); } - generate_admin_menu('permissions'); + \FeatherBB\AdminUtils::generateAdminMenu('permissions'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')), diff --git a/controller/admin/reports.php b/controller/admin/reports.php index 7e2c933a..b3b7a092 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -21,13 +21,12 @@ public function __construct() $this->model = new \model\admin\reports(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/reports.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/reports.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT . $class_name . '.php'; + require $this->feather->forum_env['FEATHER_ROOT'] . $class_name . '.php'; } public function display() @@ -41,7 +40,7 @@ public function display() $this->model->zap_report(); } - generate_admin_menu('reports'); + \FeatherBB\AdminUtils::generateAdminMenu('reports'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Reports')), diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 7bd279af..5a27a454 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -21,13 +21,12 @@ public function __construct() $this->model = new \model\admin\statistics(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/index.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/index.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT . $class_name . '.php'; + require $this->feather->forum_env['FEATHER_ROOT'] . $class_name . '.php'; } public function display() @@ -36,7 +35,7 @@ public function display() message(__('No permission'), '403'); } - generate_admin_menu('index'); + \FeatherBB\AdminUtils::generateAdminMenu('index'); $total = $this->model->get_total_size(); diff --git a/controller/admin/users.php b/controller/admin/users.php index 705234ef..17cd8aaf 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -19,13 +19,12 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\users(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/users.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/users.mo'); } public function __autoload($class_name) { - require FEATHER_ROOT . $class_name . '.php'; + require $this->feather->forum_env['FEATHER_ROOT'] . $class_name . '.php'; } public function display() @@ -40,7 +39,7 @@ public function display() message(__('No permission'), '403'); } - generate_admin_menu('users'); + \FeatherBB\AdminUtils::generateAdminMenu('users'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Move users')), @@ -58,7 +57,7 @@ public function display() message(__('No permission'), '403'); } - generate_admin_menu('users'); + \FeatherBB\AdminUtils::generateAdminMenu('users'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Delete users')), @@ -76,7 +75,7 @@ public function display() message(__('No permission'), '403'); } - generate_admin_menu('users'); + \FeatherBB\AdminUtils::generateAdminMenu('users'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Bans')), @@ -128,7 +127,7 @@ public function display() )->addTemplate('admin/users/find_users.php')->display(); } else { - generate_admin_menu('users'); + \FeatherBB\AdminUtils::generateAdminMenu('users'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users')), diff --git a/include/classes/AdminUtils.class.php b/include/classes/AdminUtils.class.php new file mode 100644 index 00000000..29fe4c78 --- /dev/null +++ b/include/classes/AdminUtils.class.php @@ -0,0 +1,59 @@ +user->g_id == $feather->forum_env['FEATHER_ADMIN']) ? true : false; + + // See if there are any plugins + // $plugins = forum_list_plugins($is_admin); + $plugins = array(); + + $feather->view2->setPageInfo(array( + 'page' => $page, + 'is_admin' => $is_admin, + 'plugins' => $plugins, + ), 1 + )->addTemplate('admin/menu.php'); + } + + // Will be removed when plugins branch is finished + + // public static function forum_list_plugins($is_admin) + // { + // $plugins = array(); + // + // $d = dir(FEATHER_ROOT.'plugins'); + // if (!$d) { + // return $plugins; + // } + // + // while (($entry = $d->read()) !== false) { + // if (!is_dir(FEATHER_ROOT.'plugins/'.$entry) && preg_match('%^AM?P_(\w+)\.php$%i', $entry)) { + // $prefix = substr($entry, 0, strpos($entry, '_')); + // + // if ($prefix == 'AMP' || ($is_admin && $prefix == 'AP')) { + // $plugins[$entry] = substr($entry, strlen($prefix) + 1, -4); + // } + // } + // } + // $d->close(); + // + // natcasesort($plugins); + // + // return $plugins; + // } +} diff --git a/include/classes/Utils.class.php b/include/classes/Utils.class.php new file mode 100644 index 00000000..67ea590c --- /dev/null +++ b/include/classes/Utils.class.php @@ -0,0 +1,30 @@ + Date: Fri, 28 Aug 2015 14:26:33 +0200 Subject: [PATCH 230/353] Better handling of permissions --- controller/admin/statistics.php | 2 -- controller/moderate.php | 24 ------------------------ controller/search.php | 2 -- controller/viewforum.php | 2 +- include/classes/auth.class.php | 6 ------ include/routes.php | 22 +++++++++++----------- 6 files changed, 12 insertions(+), 46 deletions(-) diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 5a27a454..9453836f 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\admin\statistics(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/index.mo'); } diff --git a/controller/moderate.php b/controller/moderate.php index 7ea2a272..5c65e775 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -38,13 +38,6 @@ public function gethostpost($pid) message(__('No view'), '403'); } - - // This particular function doesn't require forum-based moderator access. It can be used - // by all moderators and admins - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - $this->model->display_ip_address_post($pid); } @@ -54,13 +47,6 @@ public function gethostip($ip) message(__('No view'), '403'); } - - // This particular function doesn't require forum-based moderator access. It can be used - // by all moderators and admins - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - $this->model->display_ip_info($ip); } @@ -70,14 +56,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = message(__('No view'), '403'); } - - // This particular function doesn't require forum-based moderator access. It can be used - // by all moderators and admins if ($action == 'get_host') { - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - $this->model->display_ip_address(); } @@ -239,7 +218,6 @@ public function display($id, $name = null, $page = null) message(__('No view'), '403'); } - // Make sure that only admmods allowed access this page $moderators = $this->model->get_moderators($id); $mods_array = ($moderators != '') ? unserialize($moderators) : array(); @@ -278,8 +256,6 @@ public function display($id, $name = null, $page = null) 'start_from' => $start_from, ) )->addTemplate('moderate/moderator_forum.php')->display(); - - } public function dealposts($fid) diff --git a/controller/search.php b/controller/search.php index f5361e1d..58490662 100644 --- a/controller/search.php +++ b/controller/search.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\search(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/search.mo'); diff --git a/controller/viewforum.php b/controller/viewforum.php index 7206f604..49252f71 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -15,7 +15,7 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\viewforum(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->feather->user->language.'/forum.mo'); } public function __autoload($class_name) diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index 012841ce..64d1f82d 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -281,12 +281,6 @@ public function call() // Update online list $this->update_users_online(); - $this->app->hook('slim.before.dispatch', function() { - if(preg_match('/\/admin/', $this->app->router->getCurrentRoute()->getPattern()) && $this->app->user->g_id != $this->app->forum_env['FEATHER_ADMIN']) { - $this->app->flash('message', __('No permission')); - $this->app->redirect(get_link('/'), 403); - } - }); $this->next->call(); } } diff --git a/include/routes.php b/include/routes.php index a1229f75..d3352985 100644 --- a/include/routes.php +++ b/include/routes.php @@ -7,15 +7,6 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -/** - * middleware to check if user is admin, if it's not redirect to homepage. - */ -$isAdmin = function() use ($feather) { - if($feather->user->g_id != $feather->forum_env['FEATHER_ADMIN']) { - redirect(get_link('/'), __('No permission')); - } -}; - // Index $feather->get('/', '\controller\index:display'); @@ -85,8 +76,17 @@ $feather->map('/:id(/action/:action)(/)', '\controller\profile:action')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); }); +/** + * Middleware to check if user is allowed to moderate, if he's not redirect to homepage. + */ +$isAdmmod = function() use ($feather) { + if(!$feather->user->is_admmod) { + redirect(get_base_url(), __('No permission')); + } +}; + // Moderate routes -$feather->group('/moderate', function() use ($feather) { +$feather->group('/moderate', $isAdmmod, function() use ($feather) { $feather->get('/forum/:id(/:name)(/page/:page)(/)', '\controller\moderate:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); $feather->get('/get-host/post/:pid(/)', '\controller\moderate:gethostpost')->conditions(array('pid' => '[0-9]+')); $feather->get('/get-host/ip/:ip(/)', '\controller\moderate:gethostip'); @@ -96,7 +96,7 @@ }); // Admin routes -$feather->group('/admin', $isAdmin, function() use ($feather) { +$feather->group('/admin', $isAdmmod, function() use ($feather) { // Admin index $feather->get('(/action/:action)(/)', '\controller\admin\index:display'); From bb07cddefbadc7eac45a67b1fac5a7ba318e6396 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 28 Aug 2015 15:32:55 +0200 Subject: [PATCH 231/353] Windows compatibility --- controller/admin/plugins.php | 12 ++++---- include/classes/plugin.class.php | 47 ++++++++++++++++---------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index 3bfe6102..ce7de69b 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -77,18 +77,18 @@ public function activate() message(__('Bad request'), '404'); } - // Require all valide filenames... + // Require all valid filenames... \FeatherBB\Plugin::getPluginsList(); // And make sure the plugin actually extends base Plugin class if (!property_exists('\plugin\\'.$plugin, 'isFeatherPlugin')) { - message(sprintf(__('No plugin message'), $plugin)); + message(sprintf(__('No plugin message'), feather_escape($plugin))); } try { \FeatherBB\Plugin::activate($plugin); - redirect(get_link('admin/plugins/'), "Plugin $plugin activated"); + redirect(get_link('admin/plugins/'), 'Plugin '.feather_escape($plugin).' activated'); } catch (\Exception $e) { - redirect(get_link('admin/plugins/'), $e->getMessage()); + redirect(get_link('admin/plugins/'), feather_escape($e->getMessage())); } } @@ -113,7 +113,7 @@ public function display() // Make sure the file actually exists if (!file_exists(FEATHER_ROOT.'plugins/'.$plugin)) { - message(sprintf(__('No plugin message'), $plugin)); + message(sprintf(__('No plugin message'), feather_escape($plugin))); } // Construct REQUEST_URI if it isn't set TODO? @@ -126,7 +126,7 @@ public function display() // get the "blank page of death" include FEATHER_ROOT.'plugins/'.$plugin; if (!defined('FEATHER_PLUGIN_LOADED')) { - message(sprintf(__('Plugin failed message'), $plugin)); + message(sprintf(__('Plugin failed message'), feather_escape($plugin))); } $this->feather->view2->setPageInfo(array( diff --git a/include/classes/plugin.class.php b/include/classes/plugin.class.php index 3e7217f3..3d1cc7c9 100644 --- a/include/classes/plugin.class.php +++ b/include/classes/plugin.class.php @@ -81,18 +81,19 @@ public static function getPluginsList() { $plugins = array(); - // Get all files declaring a new plugin - $directory = new \RecursiveDirectoryIterator('plugins'); - $iterator = new \RecursiveIteratorIterator($directory); - $pluginClasses = new \RegexIterator($iterator, '/^.+\/(\\w+)\.plugin\.php$/i', \RecursiveRegexIterator::GET_MATCH); - - // Require these files to access their properties and display them in view - foreach ($pluginClasses as $pluginClass) { - // require $pluginClass[0]; - $className = "\plugin\\".$pluginClass[1]; - $plugins[$pluginClass[1]] = new $className(); + $d = dir(FEATHER_ROOT.'plugins'); + if (!$d) { + return $plugins; } + while (($entry = $d->read()) !== false) { + if (!is_dir(FEATHER_ROOT.'plugins/'.$entry) && preg_match('%^(\w+)\.plugin\.php$%i', $entry, $plugin)) { + $className = "\plugin\\".$plugin[1]; + $plugins[$plugin[1]] = new $className(); + } + } + $d->close(); + return $plugins; } @@ -101,23 +102,23 @@ public static function getPluginsList() */ public static function runActivePlugins() { - // Get all files declaring a new plugin - $directory = new \RecursiveDirectoryIterator('plugins'); - $iterator = new \RecursiveIteratorIterator($directory); - $pluginClasses = new \RegexIterator($iterator, '/^.+\/(\\w+)\.plugin\.php$/i', \RecursiveRegexIterator::GET_MATCH); - $feather = \Slim\Slim::getInstance(); - $activePlugins = $feather->cache->retrieve('active_plugins') ? $feather->cache->retrieve('active_plugins') : array(); - - // Require these files to access their properties and display them in view - foreach ($pluginClasses as $pluginClass) { - require $pluginClass[0]; - $className = "\plugin\\".$pluginClass[1]; - $plugin = new $className(); - $plugin->runHooks(); + //$activePlugins = $feather->cache->retrieve('active_plugins') ? $feather->cache->retrieve('active_plugins') : array(); + + $d = dir(FEATHER_ROOT.'plugins'); + + while (($entry = $d->read()) !== false) { + if (!is_dir(FEATHER_ROOT.'plugins/'.$entry) && preg_match('%^(\w+)\.plugin\.php$%i', $entry, $plugin)) { + require FEATHER_ROOT.'plugins/'.$plugin[0]; + $className = "\plugin\\".$plugin[1]; + $newPlugin = new $className(); + $newPlugin->runHooks(); + } } + $d->close(); return true; + } /** From c91776e89c11dd6629b677f96d94871d56da482d Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 28 Aug 2015 16:03:55 +0200 Subject: [PATCH 232/353] Better permissions handling --- controller/admin/bans.php | 20 ++++---------------- controller/admin/categories.php | 16 ---------------- controller/admin/censoring.php | 4 ---- controller/admin/forums.php | 16 ---------------- controller/admin/groups.php | 14 +------------- controller/admin/index.php | 4 ---- controller/admin/maintenance.php | 4 ---- controller/admin/options.php | 4 ---- controller/admin/parser.php | 4 ---- controller/admin/permissions.php | 4 ---- controller/admin/plugins.php | 4 ---- controller/admin/reports.php | 6 ------ controller/admin/statistics.php | 8 -------- controller/admin/users.php | 12 ------------ include/routes.php | 25 +++++++++++++++++-------- 15 files changed, 22 insertions(+), 123 deletions(-) diff --git a/controller/admin/bans.php b/controller/admin/bans.php index 16d6f741..e450e04c 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -20,6 +20,10 @@ public function __construct() $this->request = $this->feather->request; $this->model = new \model\admin\bans(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/bans.mo'); + + if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { + message(__('No permission'), '403'); + } } public function __autoload($class_name) @@ -29,10 +33,6 @@ public function __autoload($class_name) public function display() { - if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message(__('No permission'), '403'); - } - // Display bans if ($this->request->get('find_ban')) { $ban_info = $this->model->find_ban(); @@ -68,10 +68,6 @@ public function display() public function add($id = null) { - if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message(__('No permission'), '403'); - } - if ($this->request->post('add_edit_ban')) { $this->model->insert_ban(); } @@ -89,20 +85,12 @@ public function add($id = null) public function delete($id) { - if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message(__('No permission'), '403'); - } - // Remove the ban $this->model->remove_ban($id); } public function edit($id) { - if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message(__('No permission'), '403'); - } - if ($this->request->post('add_edit_ban')) { $this->model->insert_ban(); } diff --git a/controller/admin/categories.php b/controller/admin/categories.php index cd9f22a2..fde60846 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -29,10 +29,6 @@ public function __autoload($class_name) public function add_category() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - $cat_name = feather_trim($this->request->post('cat_name')); if ($cat_name == '') { redirect(get_link('admin/categories/'), __('Must enter name message')); @@ -47,10 +43,6 @@ public function add_category() public function edit_categories() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - if (empty($this->request->post('cat'))) { message(__('Bad request'), '404'); } @@ -73,10 +65,6 @@ public function edit_categories() public function delete_category() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - $cat_to_delete = (int) $this->request->post('cat_to_delete'); if ($cat_to_delete < 1) { @@ -96,10 +84,6 @@ public function delete_category() public function display() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - \FeatherBB\AdminUtils::generateAdminMenu('categories'); $this->feather->view2->setPageInfo(array( diff --git a/controller/admin/censoring.php b/controller/admin/censoring.php index 7c80fd54..2d738891 100644 --- a/controller/admin/censoring.php +++ b/controller/admin/censoring.php @@ -29,10 +29,6 @@ public function __autoload($class_name) public function display() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - // Add a censor word if ($this->request->post('add_word')) { $this->model->add_word(); diff --git a/controller/admin/forums.php b/controller/admin/forums.php index 2f21597b..b12d3980 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -33,10 +33,6 @@ public function __autoload($class_name) public function add_forum() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - $cat_id = (int) $this->request->post('cat'); if ($cat_id < 1) { @@ -54,10 +50,6 @@ public function add_forum() public function edit_forum($forum_id) { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - if($this->request->isPost()) { if ($this->request->post('save') && $this->request->post('read_forum_old')) { @@ -137,10 +129,6 @@ public function edit_forum($forum_id) public function delete_forum($forum_id) { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - if($this->request->isPost()) { $this->model->delete_forum($forum_id); // Regenerate the quick jump cache @@ -179,10 +167,6 @@ public function edit_positions() public function display() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - if ($this->request->post('update_positions')) { $this->edit_positions(); } diff --git a/controller/admin/groups.php b/controller/admin/groups.php index 3f0e4ea9..dea27bee 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -29,10 +29,6 @@ public function __autoload($class_name) public function display() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - $groups = $this->model->fetch_groups(); // Set default group @@ -54,10 +50,6 @@ public function display() public function delete($id) { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - if ($id < 5) { message(__('Bad request'), '404'); } @@ -103,10 +95,6 @@ public function delete($id) public function addedit($id = '') { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - $groups = $this->model->fetch_groups(); // Add/edit a group (stage 2) @@ -132,7 +120,7 @@ public function addedit($id = '') 'id' => $id, 'group_list' => $this->model->get_group_list($groups, $group), ) - )->addTemplate('admin/groups/delete_group.php')->display(); + )->addTemplate('admin/groups/add_edit_group.php')->display(); } } } diff --git a/controller/admin/index.php b/controller/admin/index.php index 87ff57c6..d864cc97 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -43,10 +43,6 @@ public function remove_install_folder($directory) public function display($action = null) { - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - // Check for upgrade if ($action == 'check_upgrade') { if (!ini_get('allow_url_fopen')) { diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index aba79e7d..88108ada 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -20,10 +20,6 @@ public function __construct() public function display() { - if ($this->feather->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - $action = ''; if ($this->feather->request->post('action')) { $action = $this->feather->request->post('action'); diff --git a/controller/admin/options.php b/controller/admin/options.php index 0903873b..34cf6f1c 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -29,10 +29,6 @@ public function __autoload($class_name) public function display() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - if ($this->feather->request->isPost()) { $this->model->update_options(); } diff --git a/controller/admin/parser.php b/controller/admin/parser.php index 56db8f50..a2f8c7ea 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -31,10 +31,6 @@ public function display() { global $lang_admin_parser; - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - // Legacy require FEATHER_ROOT . 'lang/' . $this->user->language . '/admin/parser.php'; diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index be2364e9..20614a18 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -29,10 +29,6 @@ public function __autoload($class_name) public function display() { - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - // Update permissions if ($this->feather->request->isPost()) { $this->model->update_permissions(); diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index 24f35961..a86e4b55 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -28,10 +28,6 @@ public function __autoload($class_name) public function display() { - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - // The plugin to load should be supplied via GET $plugin = $this->request->get('plugin') ? $this->request->get('plugin') : ''; if (!preg_match('%^AM?P_(\w*?)\.php$%i', $plugin)) { diff --git a/controller/admin/reports.php b/controller/admin/reports.php index b3b7a092..5330c24f 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\admin\reports(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/reports.mo'); } @@ -31,10 +29,6 @@ public function __autoload($class_name) public function display() { - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - // Zap a report if ($this->feather->request->isPost()) { $this->model->zap_report(); diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 9453836f..26c56f49 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -29,10 +29,6 @@ public function __autoload($class_name) public function display() { - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - \FeatherBB\AdminUtils::generateAdminMenu('index'); $total = $this->model->get_total_size(); @@ -53,10 +49,6 @@ public function display() public function phpinfo() { - if ($this->user->g_id != FEATHER_ADMIN) { - message(__('No permission'), '403'); - } - // Show phpinfo() output // Is phpinfo() a disabled function? if (strpos(strtolower((string) ini_get('disable_functions')), 'phpinfo') !== false) { diff --git a/controller/admin/users.php b/controller/admin/users.php index 17cd8aaf..c8b93334 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -29,10 +29,6 @@ public function __autoload($class_name) public function display() { - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - // Move multiple users to other user groups if ($this->request->post('move_users') || $this->request->post('move_users_comply')) { if ($this->user->g_id > FEATHER_ADMIN) { @@ -143,10 +139,6 @@ public function display() // Show IP statistics for a certain user ID public function ipstats($id) { - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - // Fetch ip count $num_ips = $this->model->get_num_ip($id); @@ -171,10 +163,6 @@ public function ipstats($id) // Show IP statistics for a certain user IP public function showusers($ip) { - if (!$this->user->is_admmod) { - message(__('No permission'), '403'); - } - if (!@preg_match('%^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$%', $ip) && !@preg_match('%^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$%', $ip)) { message(__('Bad IP message')); } diff --git a/include/routes.php b/include/routes.php index d3352985..8d2c54e3 100644 --- a/include/routes.php +++ b/include/routes.php @@ -98,6 +98,15 @@ // Admin routes $feather->group('/admin', $isAdmmod, function() use ($feather) { + /** + * Middleware to check if user is admin. + */ + $isAdmin = function() use ($feather) { + if($feather->user->g_id != FEATHER_ADMIN) { + redirect(get_base_url(), __('No permission')); + } + }; + // Admin index $feather->get('(/action/:action)(/)', '\controller\admin\index:display'); $feather->get('/index(/)', '\controller\admin\index:display'); @@ -111,10 +120,10 @@ }); // Admin options - $feather->map('/options(/)', '\controller\admin\options:display')->via('GET', 'POST'); + $feather->map('/options(/)', $isAdmin, '\controller\admin\options:display')->via('GET', 'POST'); // Admin categories - $feather->group('/categories', function() use ($feather) { + $feather->group('/categories', $isAdmin, function() use ($feather) { $feather->get('(/)', '\controller\admin\categories:display'); $feather->post('/add(/)', '\controller\admin\categories:add_category'); $feather->post('/edit(/)', '\controller\admin\categories:edit_categories'); @@ -122,20 +131,20 @@ }); // Admin censoring - $feather->map('/censoring(/)', '\controller\admin\censoring:display')->via('GET', 'POST'); + $feather->map('/censoring(/)', $isAdmin, '\controller\admin\censoring:display')->via('GET', 'POST'); // Admin reports $feather->map('/reports(/)', '\controller\admin\reports:display')->via('GET', 'POST'); // Admin permissions - $feather->map('/permissions(/)', '\controller\admin\permissions:display')->via('GET', 'POST'); + $feather->map('/permissions(/)', $isAdmin, '\controller\admin\permissions:display')->via('GET', 'POST'); // Admin statistics $feather->get('/statistics(/)', '\controller\admin\statistics:display'); $feather->get('/phpinfo(/)', '\controller\admin\statistics:phpinfo'); // Admin forums - $feather->group('/forums', function() use ($feather) { + $feather->group('/forums', $isAdmin, function() use ($feather) { $feather->map('(/)', '\controller\admin\forums:display')->via('GET', 'POST'); $feather->post('/add(/)', '\controller\admin\forums:add_forum'); $feather->map('/edit/:id(/)', '\controller\admin\forums:edit_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); @@ -143,7 +152,7 @@ }); // Admin groups - $feather->group('/groups', function() use ($feather) { + $feather->group('/groups', $isAdmin, function() use ($feather) { $feather->map('(/)', '\controller\admin\groups:display')->via('GET', 'POST'); $feather->map('/add(/)', '\controller\admin\groups:addedit')->via('GET', 'POST'); $feather->map('/edit/:id(/)', '\controller\admin\groups:addedit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); @@ -154,10 +163,10 @@ $feather->map('/loader(/)', '\controller\admin\plugins:display')->via('GET', 'POST'); // Admin maintenance - $feather->map('/maintenance(/)', '\controller\admin\maintenance:display')->via('GET', 'POST'); + $feather->map('/maintenance(/)', $isAdmin, '\controller\admin\maintenance:display')->via('GET', 'POST'); // Admin parser - $feather->map('/parser(/)', '\controller\admin\parser:display')->via('GET', 'POST'); + $feather->map('/parser(/)', $isAdmin, '\controller\admin\parser:display')->via('GET', 'POST'); // Admin users $feather->group('/users', function() use ($feather) { From 5c5723f1d1a06cbc41b2edeee1ee2347c1dc0bdc Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 28 Aug 2015 16:04:05 +0200 Subject: [PATCH 233/353] Fix is_admmod var --- include/classes/auth.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index 64d1f82d..4932c96b 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -213,7 +213,7 @@ public function call() $this->app->user = $this->model->load_user($cookie['user_id']); $expires = ($cookie['expires'] > $this->app->now + $this->app->forum_settings['o_timeout_visit']) ? $this->app->now + 1209600 : $this->app->now + $this->app->forum_settings['o_timeout_visit']; $this->app->user->is_guest = false; - $this->app->user->is_admmod = $this->app->user->g_id == $this->app->forum_env['FEATHER_ADMIN'] || $this->app->g_moderator == '1'; + $this->app->user->is_admmod = $this->app->user->g_id == $this->app->forum_env['FEATHER_ADMIN'] || $this->app->user->g_moderator == '1'; if (!$this->app->user->disp_topics) { $this->app->user->disp_topics = $this->app->forum_settings['o_disp_topics_default']; } From 2d1efc82aec683cf6b7241958edfa9cf5a2c2208 Mon Sep 17 00:00:00 2001 From: beaver Date: Fri, 28 Aug 2015 18:31:16 +0200 Subject: [PATCH 234/353] Solve conflicts from update --- controller/admin/maintenance.php | 29 ------------------------- controller/admin/options.php | 4 ---- controller/admin/parser.php | 4 ---- controller/admin/permissions.php | 4 ---- controller/admin/reports.php | 9 -------- controller/admin/statistics.php | 9 -------- controller/admin/users.php | 33 ----------------------------- controller/moderate.php | 2 -- controller/search.php | 5 ----- include/common_admin.php | 4 ---- style/FeatherBB/view/admin/menu.php | 12 ----------- 11 files changed, 115 deletions(-) diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index 279a8f52..88108ada 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -14,15 +14,6 @@ class maintenance public function __construct() { $this->feather = \Slim\Slim::getInstance(); -<<<<<<< HEAD - $this->start = $this->feather->start; - $this->config = $this->feather->config; - $this->user = $this->feather->user; - $this->request = $this->feather->request; - - -======= ->>>>>>> development $this->model = new \model\admin\maintenance(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/admin/maintenance.mo'); } @@ -47,30 +38,17 @@ public function display() } if ($action == 'prune') { -<<<<<<< HEAD - $prune_from = feather_trim($this->request->post('prune_from')); - $prune_sticky = intval($this->request->post('prune_sticky')); - - generate_admin_menu('maintenance'); - - if ($this->request->post('prune_comply')) { -======= $prune_from = feather_trim($this->feather->request->post('prune_from')); $prune_sticky = intval($this->feather->request->post('prune_sticky')); \FeatherBB\AdminUtils::generateAdminMenu('maintenance'); if ($this->feather->request->post('prune_comply')) { ->>>>>>> development $this->model->prune_comply($prune_from, $prune_sticky); } $this->feather->view2->setPageInfo(array( -<<<<<<< HEAD - 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Prune')), -======= 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Admin'), __('Prune')), ->>>>>>> development 'active_page' => 'admin', 'admin_console' => true, 'prune_sticky' => $prune_sticky, @@ -80,17 +58,10 @@ public function display() )->addTemplate('admin/maintenance/prune.php')->display(); } -<<<<<<< HEAD - generate_admin_menu('maintenance'); - - $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Maintenance')), -======= \FeatherBB\AdminUtils::generateAdminMenu('maintenance'); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('Admin'), __('Maintenance')), ->>>>>>> development 'active_page' => 'admin', 'admin_console' => true, 'first_id' => $this->model->get_first_id(), diff --git a/controller/admin/options.php b/controller/admin/options.php index a5e85ef4..34cf6f1c 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -33,11 +33,7 @@ public function display() $this->model->update_options(); } -<<<<<<< HEAD - generate_admin_menu('options'); -======= \FeatherBB\AdminUtils::generateAdminMenu('options'); ->>>>>>> development $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Options')), diff --git a/controller/admin/parser.php b/controller/admin/parser.php index d2aa7d2e..a2f8c7ea 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -202,11 +202,7 @@ public function display() redirect(get_link('admin/parser/'), $lang_admin_parser['save_success']); } -<<<<<<< HEAD - generate_admin_menu('parser'); -======= \FeatherBB\AdminUtils::generateAdminMenu('parser'); ->>>>>>> development $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Parser')), diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index d086b110..20614a18 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -34,11 +34,7 @@ public function display() $this->model->update_permissions(); } -<<<<<<< HEAD - generate_admin_menu('permissions'); -======= \FeatherBB\AdminUtils::generateAdminMenu('permissions'); ->>>>>>> development $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Permissions')), diff --git a/controller/admin/reports.php b/controller/admin/reports.php index 35a06f9f..5330c24f 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -18,11 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; -<<<<<<< HEAD - - -======= ->>>>>>> development $this->model = new \model\admin\reports(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/reports.mo'); } @@ -39,11 +34,7 @@ public function display() $this->model->zap_report(); } -<<<<<<< HEAD - generate_admin_menu('reports'); -======= \FeatherBB\AdminUtils::generateAdminMenu('reports'); ->>>>>>> development $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Reports')), diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index 67bff2b8..bcaf9b46 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -18,11 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; -<<<<<<< HEAD - - -======= ->>>>>>> development $this->model = new \model\admin\statistics(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/index.mo'); } @@ -34,15 +29,11 @@ public function __autoload($class_name) public function display() { -<<<<<<< HEAD if (!$this->user->is_admmod) { message(__('No permission'), '403'); } - generate_admin_menu('index'); -======= \FeatherBB\AdminUtils::generateAdminMenu('index'); ->>>>>>> development $total = $this->model->get_total_size(); diff --git a/controller/admin/users.php b/controller/admin/users.php index 6c5cb69d..c8b93334 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -19,12 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\users(); -<<<<<<< HEAD - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/admin/users.mo'); - require FEATHER_ROOT . 'include/common_admin.php'; -======= load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/users.mo'); ->>>>>>> development } public function __autoload($class_name) @@ -40,11 +35,7 @@ public function display() message(__('No permission'), '403'); } -<<<<<<< HEAD - generate_admin_menu('users'); -======= \FeatherBB\AdminUtils::generateAdminMenu('users'); ->>>>>>> development $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Move users')), @@ -62,11 +53,7 @@ public function display() message(__('No permission'), '403'); } -<<<<<<< HEAD - generate_admin_menu('users'); -======= \FeatherBB\AdminUtils::generateAdminMenu('users'); ->>>>>>> development $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Delete users')), @@ -84,11 +71,7 @@ public function display() message(__('No permission'), '403'); } -<<<<<<< HEAD - generate_admin_menu('users'); -======= \FeatherBB\AdminUtils::generateAdminMenu('users'); ->>>>>>> development $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Bans')), @@ -138,21 +121,6 @@ public function display() 'user_data' => $this->model->print_users($search['conditions'], $search['order_by'], $search['direction'], $start_from), ) )->addTemplate('admin/users/find_users.php')->display(); -<<<<<<< HEAD - } - else { - generate_admin_menu('users'); - - $this->feather->view2->setPageInfo(array( - 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users')), - 'active_page' => 'admin', - 'admin_console' => true, - 'focus_element' => array('find_user', 'form[username]'), - 'group_list' => $this->model->get_group_list(), - ) - )->addTemplate('admin/users/admin_users.php')->display(); - } -======= } else { \FeatherBB\AdminUtils::generateAdminMenu('users'); @@ -166,7 +134,6 @@ public function display() ) )->addTemplate('admin/users/admin_users.php')->display(); } ->>>>>>> development } // Show IP statistics for a certain user ID diff --git a/controller/moderate.php b/controller/moderate.php index 5c65e775..0cb485d5 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\moderate(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); diff --git a/controller/search.php b/controller/search.php index 589ffe41..58490662 100644 --- a/controller/search.php +++ b/controller/search.php @@ -18,11 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; -<<<<<<< HEAD - - -======= ->>>>>>> development $this->model = new \model\search(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/search.mo'); diff --git a/include/common_admin.php b/include/common_admin.php index 48cbd9de..a166af6a 100644 --- a/include/common_admin.php +++ b/include/common_admin.php @@ -40,10 +40,6 @@ function generate_admin_menu($page = '') $feather->view2->setPageInfo(array( 'page' => $page, 'is_admin' => $is_admin, -<<<<<<< HEAD - 'feather_config' => $feather->config, -======= ->>>>>>> development 'plugins' => $plugins, ), 1 )->addTemplate('admin/menu.php'); diff --git a/style/FeatherBB/view/admin/menu.php b/style/FeatherBB/view/admin/menu.php index ee145aa8..09257e7c 100644 --- a/style/FeatherBB/view/admin/menu.php +++ b/style/FeatherBB/view/admin/menu.php @@ -19,17 +19,6 @@
      -<<<<<<< HEAD - > - > - user->g_mod_ban_users == '1'): ?> - > - - > - -
    -======= > ->>>>>>> development
    Date: Fri, 28 Aug 2015 21:57:30 +0200 Subject: [PATCH 235/353] Setup URL lib --- controller/admin/bans.php | 2 +- controller/admin/categories.php | 16 +- controller/admin/forums.php | 18 +- controller/admin/index.php | 2 +- controller/admin/parser.php | 6 +- controller/admin/users.php | 6 +- controller/edit.php | 2 +- controller/install.php | 2 +- controller/misc.php | 2 +- controller/moderate.php | 20 +- controller/post.php | 12 +- controller/profile.php | 8 +- controller/register.php | 2 +- controller/search.php | 2 +- controller/userlist.php | 2 +- controller/viewforum.php | 12 +- controller/viewtopic.php | 12 +- include/classes/core.class.php | 4 + include/classes/url.class.php | 777 ++++++++++++++++++ include/functions.php | 191 ----- include/url_replace.php | 589 ------------- model/admin/bans.php | 4 +- model/admin/censoring.php | 6 +- model/admin/groups.php | 8 +- model/admin/maintenance.php | 2 +- model/admin/options.php | 2 +- model/admin/permissions.php | 2 +- model/admin/reports.php | 2 +- model/admin/users.php | 6 +- model/delete.php | 4 +- model/index.php | 14 +- model/login.php | 4 +- model/misc.php | 14 +- model/moderate.php | 30 +- model/post.php | 18 +- model/profile.php | 40 +- model/register.php | 10 +- model/search.php | 26 +- model/viewforum.php | 20 +- model/viewtopic.php | 30 +- plugins/test/plugintest.php | 4 +- .../FeatherBB/view/admin/bans/admin_bans.php | 4 +- .../FeatherBB/view/admin/bans/search_ban.php | 12 +- style/FeatherBB/view/admin/categories.php | 8 +- style/FeatherBB/view/admin/censoring.php | 4 +- .../view/admin/forums/admin_forums.php | 6 +- .../view/admin/forums/delete_forum.php | 2 +- .../view/admin/forums/permissions.php | 2 +- .../view/admin/groups/admin_groups.php | 6 +- .../view/admin/groups/confirm_delete.php | 4 +- .../view/admin/groups/delete_group.php | 2 +- style/FeatherBB/view/admin/index.php | 6 +- .../admin/maintenance/admin_maintenance.php | 8 +- .../view/admin/maintenance/prune.php | 2 +- .../view/admin/maintenance/rebuild.php | 4 +- style/FeatherBB/view/admin/menu.php | 26 +- style/FeatherBB/view/admin/options.php | 4 +- style/FeatherBB/view/admin/parser.php | 2 +- style/FeatherBB/view/admin/permissions.php | 2 +- style/FeatherBB/view/admin/reports.php | 20 +- style/FeatherBB/view/admin/statistics.php | 2 +- .../view/admin/users/admin_users.php | 4 +- .../FeatherBB/view/admin/users/ban_users.php | 2 +- .../view/admin/users/delete_users.php | 2 +- .../FeatherBB/view/admin/users/find_users.php | 14 +- .../FeatherBB/view/admin/users/move_users.php | 2 +- .../FeatherBB/view/admin/users/search_ip.php | 12 +- .../FeatherBB/view/admin/users/show_users.php | 12 +- style/FeatherBB/view/delete.php | 6 +- style/FeatherBB/view/edit.php | 14 +- style/FeatherBB/view/footer.new.php | 20 +- style/FeatherBB/view/footer.php | 20 +- style/FeatherBB/view/header.new.php | 28 +- style/FeatherBB/view/help.php | 18 +- style/FeatherBB/view/login/form.php | 4 +- .../view/login/password_forgotten.php | 2 +- style/FeatherBB/view/misc/email.php | 2 +- style/FeatherBB/view/misc/report.php | 6 +- .../view/moderate/moderator_forum.php | 6 +- style/FeatherBB/view/moderate/posts_view.php | 10 +- style/FeatherBB/view/post.php | 12 +- style/FeatherBB/view/profile/change_mail.php | 2 +- style/FeatherBB/view/profile/change_pass.php | 2 +- style/FeatherBB/view/profile/delete_user.php | 2 +- style/FeatherBB/view/profile/menu.php | 14 +- .../FeatherBB/view/profile/section_admin.php | 2 +- .../view/profile/section_display.php | 2 +- .../view/profile/section_essentials.php | 6 +- .../view/profile/section_messaging.php | 2 +- .../view/profile/section_personal.php | 2 +- .../view/profile/section_personality.php | 10 +- .../view/profile/section_privacy.php | 2 +- .../FeatherBB/view/profile/upload_avatar.php | 2 +- style/FeatherBB/view/register/rules.php | 2 +- style/FeatherBB/view/search/footer.php | 2 +- style/FeatherBB/view/search/header.php | 2 +- style/FeatherBB/view/search/posts.php | 6 +- style/FeatherBB/view/search/topics.php | 2 +- style/FeatherBB/view/userlist.php | 2 +- style/FeatherBB/view/viewforum.php | 4 +- style/FeatherBB/view/viewtopic.php | 20 +- view/admin/bans/admin_bans.php | 4 +- view/admin/bans/search_ban.php | 12 +- view/admin/categories.php | 8 +- view/admin/censoring.php | 4 +- view/admin/forums/admin_forums.php | 6 +- view/admin/forums/delete_forum.php | 2 +- view/admin/forums/permissions.php | 2 +- view/admin/groups/admin_groups.php | 6 +- view/admin/groups/confirm_delete.php | 4 +- view/admin/groups/delete_group.php | 2 +- view/admin/index.php | 6 +- view/admin/maintenance/admin_maintenance.php | 8 +- view/admin/maintenance/prune.php | 2 +- view/admin/maintenance/rebuild.php | 27 +- view/admin/menu.php | 26 +- view/admin/options.php | 4 +- view/admin/parser.php | 2 +- view/admin/permissions.php | 2 +- view/admin/reports.php | 20 +- view/admin/statistics.php | 2 +- view/admin/users/admin_users.php | 4 +- view/admin/users/ban_users.php | 2 +- view/admin/users/delete_users.php | 2 +- view/admin/users/find_users.php | 14 +- view/admin/users/move_users.php | 2 +- view/admin/users/search_ip.php | 12 +- view/admin/users/show_users.php | 12 +- view/delete.php | 6 +- view/edit.php | 14 +- view/footer.php | 2 +- view/help.php | 18 +- view/login/form.php | 4 +- view/login/password_forgotten.php | 2 +- view/misc/email.php | 2 +- view/misc/report.php | 6 +- view/moderate/moderator_forum.php | 6 +- view/moderate/posts_view.php | 10 +- view/post.php | 12 +- view/profile/change_mail.php | 2 +- view/profile/change_pass.php | 2 +- view/profile/delete_user.php | 2 +- view/profile/menu.php | 14 +- view/profile/section_admin.php | 2 +- view/profile/section_display.php | 2 +- view/profile/section_essentials.php | 6 +- view/profile/section_messaging.php | 2 +- view/profile/section_personal.php | 2 +- view/profile/section_personality.php | 10 +- view/profile/section_privacy.php | 2 +- view/profile/upload_avatar.php | 2 +- view/register/rules.php | 2 +- view/search/footer.php | 2 +- view/search/header.php | 2 +- view/search/posts.php | 6 +- view/search/topics.php | 2 +- view/userlist.php | 2 +- view/viewforum.php | 4 +- view/viewtopic.php | 20 +- 159 files changed, 1345 insertions(+), 1365 deletions(-) create mode 100644 include/classes/url.class.php delete mode 100644 include/url_replace.php diff --git a/controller/admin/bans.php b/controller/admin/bans.php index e450e04c..2e88ab5f 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -49,7 +49,7 @@ public function display() 'admin_console' => true, 'page' => $p, 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Bans'), __('Results head')), - 'paging_links' => '' . __('Pages') . ' ' . paginate_old($num_pages, $p, '?find_ban=&' . implode('&', $ban_info['query_str'])), + 'paging_links' => '' . __('Pages') . ' ' . $this->feather->url->paginate_old($num_pages, $p, '?find_ban=&' . implode('&', $ban_info['query_str'])), 'ban_data' => $ban_data['data'], ) )->addTemplate('admin/bans/search_ban.php')->display(); diff --git a/controller/admin/categories.php b/controller/admin/categories.php index fde60846..4da8c180 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -31,13 +31,13 @@ public function add_category() { $cat_name = feather_trim($this->request->post('cat_name')); if ($cat_name == '') { - redirect(get_link('admin/categories/'), __('Must enter name message')); + redirect($this->feather->url->get_link('admin/categories/'), __('Must enter name message')); } if ($this->model->add_category($cat_name)) { - redirect(get_link('admin/categories/'), __('Category added redirect')); + redirect($this->feather->url->get_link('admin/categories/'), __('Category added redirect')); } else { //TODO, add error message - redirect(get_link('admin/categories/'), __('Category added redirect')); + redirect($this->feather->url->get_link('admin/categories/'), __('Category added redirect')); } } @@ -52,7 +52,7 @@ public function edit_categories() 'name' => feather_escape($properties['name']), 'order' => (int) $properties['order'], ); if ($category['name'] == '') { - redirect(get_link('admin/categories/'), __('Must enter name message')); + redirect($this->feather->url->get_link('admin/categories/'), __('Must enter name message')); } $this->model->update_category($category); } @@ -60,7 +60,7 @@ public function edit_categories() // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect(get_link('admin/categories/'), __('Categories updated redirect')); + redirect($this->feather->url->get_link('admin/categories/'), __('Categories updated redirect')); } public function delete_category() @@ -72,13 +72,13 @@ public function delete_category() } if (intval($this->request->post('disclaimer')) != 1) { - redirect(get_link('admin/categories/'), __('Delete category not validated')); + redirect($this->feather->url->get_link('admin/categories/'), __('Delete category not validated')); } if ($this->model->delete_category($cat_to_delete)) { - redirect(get_link('admin/categories/'), __('Category deleted redirect')); + redirect($this->feather->url->get_link('admin/categories/'), __('Category deleted redirect')); } else { - redirect(get_link('admin/categories/'), __('Unable to delete category')); + redirect($this->feather->url->get_link('admin/categories/'), __('Unable to delete category')); } } diff --git a/controller/admin/forums.php b/controller/admin/forums.php index b12d3980..55e3df55 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -36,15 +36,15 @@ public function add_forum() $cat_id = (int) $this->request->post('cat'); if ($cat_id < 1) { - redirect(get_link('admin/forums/'), __('Must be valid category')); + redirect($this->feather->url->get_link('admin/forums/'), __('Must be valid category')); } if ($fid = $this->model->add_forum($cat_id, __('New forum'))) { // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect(get_link('admin/forums/edit/'.$fid.'/'), __('Forum added redirect')); + redirect($this->feather->url->get_link('admin/forums/edit/'.$fid.'/'), __('Forum added redirect')); } else { - redirect(get_link('admin/forums/'), __('Unable to add forum')); + redirect($this->feather->url->get_link('admin/forums/'), __('Unable to add forum')); } } @@ -61,10 +61,10 @@ public function edit_forum($forum_id) 'redirect_url' => url_valid($this->request->post('redirect_url')) ? feather_escape($this->request->post('redirect_url')) : NULL); if ($forum_data['forum_name'] == '') { - redirect(get_link('admin/forums/edit/'.$forum_id.'/'), __('Must enter name message')); + redirect($this->feather->url->get_link('admin/forums/edit/'.$forum_id.'/'), __('Must enter name message')); } if ($forum_data['cat_id'] < 1) { - redirect(get_link('admin/forums/edit/'.$forum_id.'/'), __('Must be valid category')); + redirect($this->feather->url->get_link('admin/forums/edit/'.$forum_id.'/'), __('Must be valid category')); } $this->model->update_forum($forum_id, $forum_data); @@ -100,7 +100,7 @@ public function edit_forum($forum_id) // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect(get_link('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); + redirect($this->feather->url->get_link('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); } elseif ($this->request->post('revert_perms')) { $this->model->delete_permissions($forum_id); @@ -108,7 +108,7 @@ public function edit_forum($forum_id) // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect(get_link('admin/forums/edit/'.$forum_id.'/'), __('Perms reverted redirect')); + redirect($this->feather->url->get_link('admin/forums/edit/'.$forum_id.'/'), __('Perms reverted redirect')); } } else { @@ -134,7 +134,7 @@ public function delete_forum($forum_id) // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect(get_link('admin/forums/'), __('Forum deleted redirect')); + redirect($this->feather->url->get_link('admin/forums/'), __('Forum deleted redirect')); } else { // If the user hasn't confirmed @@ -162,7 +162,7 @@ public function edit_positions() // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect(get_link('admin/forums/'), __('Forums updated redirect')); + redirect($this->feather->url->get_link('admin/forums/'), __('Forums updated redirect')); } public function display() diff --git a/controller/admin/index.php b/controller/admin/index.php index d864cc97..6ecdb650 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -65,7 +65,7 @@ public function display($action = null) $deleted = $this->remove_install_folder($this->feather->forum_env['FEATHER_ROOT'].'install'); if ($deleted) { - redirect(get_link('admin/'), __('Deleted install.php redirect')); + redirect($this->feather->url->get_link('admin/'), __('Deleted install.php redirect')); } else { message(__('Delete install.php failed')); } diff --git a/controller/admin/parser.php b/controller/admin/parser.php index a2f8c7ea..3889a2c4 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -41,7 +41,7 @@ public function display() if ($this->request->post('reset') || !file_exists($cache_file)) { require_once(FEATHER_ROOT.'include/bbcd_source.php'); require_once(FEATHER_ROOT.'include/bbcd_compile.php'); - redirect(get_link('admin/parser/'), $lang_admin_parser['reset_success']); + redirect($this->feather->url->get_link('admin/parser/'), $lang_admin_parser['reset_success']); } // Load the current BBCode $pd array from include/parser_data.inc.php. @@ -65,7 +65,7 @@ public function display() if (preg_match('%^image/%', $f['type'])) { // If we have an image file type? if ($f['size'] > 0 && $f['size'] <= $this->config['o_avatars_size']) { if (move_uploaded_file($f['tmp_name'], FEATHER_ROOT .'img/smilies/'. $name)) { - redirect(get_link('admin/parser/'), $lang_admin_parser['upload success']); + redirect($this->feather->url->get_link('admin/parser/'), $lang_admin_parser['upload success']); } else { // Error #1: 'Smiley upload failed. Unable to move to smiley folder.'. message($lang_admin_parser['upload_err_1']); } @@ -199,7 +199,7 @@ public function display() } require_once('include/bbcd_compile.php'); // Compile $bbcd and save into $pd['bbcd'] - redirect(get_link('admin/parser/'), $lang_admin_parser['save_success']); + redirect($this->feather->url->get_link('admin/parser/'), $lang_admin_parser['save_success']); } \FeatherBB\AdminUtils::generateAdminMenu('parser'); diff --git a/controller/admin/users.php b/controller/admin/users.php index c8b93334..b4903b1a 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -99,7 +99,7 @@ public function display() $start_from = 50 * ($p - 1); // Generate paging links - $paging_links = '' . __('Pages') . ' ' . paginate_old($num_pages, $p, '?find_user=&'.implode('&', $search['query_str'])); + $paging_links = '' . __('Pages') . ' ' . $this->feather->url->paginate_old($num_pages, $p, '?find_user=&'.implode('&', $search['query_str'])); // Some helper variables for permissions $can_delete = $can_move = $this->user->g_id == FEATHER_ADMIN; @@ -153,7 +153,7 @@ public function ipstats($id) 'active_page' => 'admin', 'admin_console' => true, 'page' => $p, - 'paging_links' => ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$id), + 'paging_links' => ''.__('Pages').' '.$this->feather->url->paginate_old($num_pages, $p, '?ip_stats='.$id), 'start_from' => $start_from, 'ip_data' => $this->model->get_ip_stats($id, $start_from), ) @@ -180,7 +180,7 @@ public function showusers($ip) 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('Users'), __('Results head')), 'active_page' => 'admin', 'admin_console' => true, - 'paging_links' => ''.__('Pages').' '.paginate_old($num_pages, $p, '?ip_stats='.$ip), + 'paging_links' => ''.__('Pages').' '.$this->feather->url->paginate_old($num_pages, $p, '?ip_stats='.$ip), 'page' => $p, 'start_from' => $start_from, 'info' => $this->model->get_info_poster($ip, $start_from), diff --git a/controller/edit.php b/controller/edit.php index 0239c17e..8fbdeef5 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -76,7 +76,7 @@ public function editpost($id) // Edit the post $this->model->edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod); - redirect(get_link('post/'.$id.'/#p'.$id), __('Post redirect')); + redirect($this->feather->url->get_link('post/'.$id.'/#p'.$id), __('Post redirect')); } } else { $post = ''; diff --git a/controller/install.php b/controller/install.php index 0f1133be..bdc8cf24 100644 --- a/controller/install.php +++ b/controller/install.php @@ -203,7 +203,7 @@ public function create_db(array $data) $flash->save(); // Redirect to homepage - redirect(get_link('/')); + redirect($this->feather->url->get_link('/')); } public function write_config($json) diff --git a/controller/misc.php b/controller/misc.php index 914b0561..77f6491b 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -55,7 +55,7 @@ public function markforumread($id) $tracked_topics['forums'][$id] = time(); set_tracked_topics($tracked_topics); - redirect(get_link('forum/'.$id.'/'), __('Mark forum read redirect')); + redirect($this->feather->url->get_link('forum/'.$id.'/'), __('Mark forum read redirect')); } public function subscribeforum($id) diff --git a/controller/moderate.php b/controller/moderate.php index 5c65e775..758ad1c4 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -99,7 +99,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = if ($action == 'stick') { $this->model->stick_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), __('Stick topic redirect')); + redirect($this->feather->url->get_link('topic/'.$id.'/'), __('Stick topic redirect')); } @@ -107,21 +107,21 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = if ($action == 'unstick') { $this->model->unstick_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), __('Unstick topic redirect')); + redirect($this->feather->url->get_link('topic/'.$id.'/'), __('Unstick topic redirect')); } // Open a topic if ($action == 'open') { $this->model->open_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), __('Open topic redirect')); + redirect($this->feather->url->get_link('topic/'.$id.'/'), __('Open topic redirect')); } // Close a topic if ($action == 'close') { $this->model->close_topic($id, $fid); - redirect(get_link('topic/'.$id.'/'), __('Close topic redirect')); + redirect($this->feather->url->get_link('topic/'.$id.'/'), __('Close topic redirect')); } $cur_topic = $this->model->get_topic_info($fid, $id); @@ -199,11 +199,11 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = 'page' => $p, 'active_page' => 'moderate', 'cur_topic' => $cur_topic, - 'url_topic' => url_friendly($cur_topic['subject']), - 'url_forum' => url_friendly($cur_topic['forum_name']), + 'url_topic' => $this->feather->url->url_friendly($cur_topic['subject']), + 'url_forum' => $this->feather->url->url_friendly($cur_topic['forum_name']), 'fid' => $fid, 'id' => $id, - 'paging_links' => ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/topic/'.$id.'/forum/'.$fid.'/action/moderate/#'), + 'paging_links' => ''.__('Pages').' '.$this->feather->url->paginate($num_pages, $p, 'moderate/topic/'.$id.'/forum/'.$fid.'/action/moderate/#'), 'post_data' => $this->model->display_posts_view($id, $start_from), 'button_status' => $button_status, 'start_from' => $start_from, @@ -241,7 +241,7 @@ public function display($id, $name = null, $page = null) $p = (!isset($page) || $page <= 1 || $page > $num_pages) ? 1 : intval($page); $start_from = $this->user->disp_topics * ($p - 1); - $url_forum = url_friendly($cur_forum['forum_name']); + $url_forum = $this->feather->url->url_friendly($cur_forum['forum_name']); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), feather_escape($cur_forum['forum_name'])), @@ -251,7 +251,7 @@ public function display($id, $name = null, $page = null) 'p' => $p, 'url_forum' => $url_forum, 'cur_forum' => $cur_forum, - 'paging_links' => ''.__('Pages').' '.paginate($num_pages, $p, 'moderate/forum/'.$id.'/#'), + 'paging_links' => ''.__('Pages').' '.$this->feather->url->paginate($num_pages, $p, 'moderate/forum/'.$id.'/#'), 'topic_data' => $this->model->display_topics($id, $sort_by, $start_from), 'start_from' => $start_from, ) @@ -352,7 +352,7 @@ public function dealposts($fid) $this->model->close_multiple_topics($action, $topics, $fid); $redirect_msg = ($action) ? __('Close topics redirect') : __('Open topics redirect'); - redirect(get_link('moderate/forum/'.$fid.'/'), $redirect_msg); + redirect($this->feather->url->get_link('moderate/forum/'.$fid.'/'), $redirect_msg); } } } diff --git a/controller/post.php b/controller/post.php index 5400a9dc..ec676380 100644 --- a/controller/post.php +++ b/controller/post.php @@ -120,7 +120,7 @@ public function newpost($fid = null, $tid = null, $qid = null) $this->model->increment_post_count($post, $new['tid']); } - redirect(get_link('post/'.$new['pid'].'/#p'.$new['pid']), __('Post redirect')); + redirect($this->feather->url->get_link('post/'.$new['pid'].'/#p'.$new['pid']), __('Post redirect')); } } @@ -129,28 +129,28 @@ public function newpost($fid = null, $tid = null, $qid = null) // If a topic ID was specified in the url (it's a reply) if ($tid) { $action = __('Post a reply'); - $form = '
    '; + $form = ''; // If a quote ID was specified in the url if (isset($qid)) { $quote = $this->model->get_quote_message($qid, $tid); - $form = ''; + $form = ''; } } // If a forum ID was specified in the url (new topic) elseif ($fid) { $action = __('Post new topic'); - $form = ''; + $form = ''; } else { message(__('Bad request'), '404'); } - $url_forum = url_friendly($cur_posting['forum_name']); + $url_forum = $this->feather->url->url_friendly($cur_posting['forum_name']); $is_subscribed = $tid && $cur_posting['is_subscribed']; if (isset($cur_posting['subject'])) { - $url_topic = url_friendly($cur_posting['subject']); + $url_topic = $this->feather->url->url_friendly($cur_posting['subject']); } else { $url_topic = ''; } diff --git a/controller/profile.php b/controller/profile.php index 5e7ea6c4..a05d9b5f 100644 --- a/controller/profile.php +++ b/controller/profile.php @@ -166,13 +166,13 @@ public function display($id, $section = null) message(__('Bad request'), '404'); } - $avatar_field = ''.__('Change avatar').''; + $avatar_field = ''.__('Change avatar').''; $user_avatar = generate_avatar_markup($id); if ($user_avatar) { - $avatar_field .= ' '.__('Delete avatar').''; + $avatar_field .= ' '.__('Delete avatar').''; } else { - $avatar_field = ''.__('Upload avatar').''; + $avatar_field = ''.__('Upload avatar').''; } if ($user['signature'] != '') { @@ -312,7 +312,7 @@ public function action($id, $action) $this->model->delete_avatar($id); - redirect(get_link('user/'.$id.'/section/personality/'), __('Avatar deleted redirect')); + redirect($this->feather->url->get_link('user/'.$id.'/section/personality/'), __('Avatar deleted redirect')); } elseif ($action == 'promote') { if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_promote_users == '0')) { message(__('No permission'), '403'); diff --git a/controller/register.php b/controller/register.php index b1016b99..e2963cee 100644 --- a/controller/register.php +++ b/controller/register.php @@ -98,7 +98,7 @@ public function rules() } if ($this->config['o_rules'] != '1') { - redirect(get_link('register/agree/')); + redirect($this->feather->url->get_link('register/agree/')); } $this->feather->view2->setPageInfo(array( diff --git a/controller/search.php b/controller/search.php index 58490662..9405fbeb 100644 --- a/controller/search.php +++ b/controller/search.php @@ -90,6 +90,6 @@ public function display() public function quicksearches($show) { - redirect(get_link('search/?action=show_'.$show)); + redirect($this->feather->url->get_link('search/?action=show_'.$show)); } } diff --git a/controller/userlist.php b/controller/userlist.php index 671724dc..fed9c086 100644 --- a/controller/userlist.php +++ b/controller/userlist.php @@ -51,7 +51,7 @@ public function display() } // Generate paging links - $paging_links = ''.__('Pages').' '.paginate_old($num_pages, $p, '?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.$sort_dir); + $paging_links = ''.__('Pages').' '.$this->feather->url->paginate_old($num_pages, $p, '?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.$sort_dir); $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->feather->forum_settings['o_board_title']), __('User list')), diff --git a/controller/viewforum.php b/controller/viewforum.php index 49252f71..f1f07a67 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -50,7 +50,7 @@ public function display($id, $name = null, $page = null) // Can we or can we not post new topics? if (($cur_forum['post_topics'] == '' && $this->feather->user->g_post_topics == '1') || $cur_forum['post_topics'] == '1' || $is_admmod) { - $post_link = "\t\t\t".''."\n"; + $post_link = "\t\t\t".''."\n"; } else { $post_link = ''; } @@ -60,20 +60,20 @@ public function display($id, $name = null, $page = null) $p = (!isset($page) || $page <= 1 || $page > $num_pages) ? 1 : intval($page); $start_from = $this->feather->user->disp_topics * ($p - 1); - $url_forum = url_friendly($cur_forum['forum_name']); + $url_forum = $this->feather->url->url_friendly($cur_forum['forum_name']); // Generate paging links - $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'forum/'.$id.'/'.$url_forum.'/#'); + $paging_links = ''.__('Pages').' '.$this->feather->url->paginate($num_pages, $p, 'forum/'.$id.'/'.$url_forum.'/#'); $forum_actions = $this->model->get_forum_actions($id, $this->feather->forum_settings['o_forum_subscriptions'], $cur_forum['is_subscribed']); - $this->feather->view2->addAsset('canonical', get_link('forum/'.$id.'/'.$url_forum.'/')); + $this->feather->view2->addAsset('canonical', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/')); if ($num_pages > 1) { if ($p > 1) { - $this->feather->view2->addAsset('prev', get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); + $this->feather->view2->addAsset('prev', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); } if ($p < $num_pages) { - $this->feather->view2->addAsset('next', get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); + $this->feather->view2->addAsset('next', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); } } diff --git a/controller/viewtopic.php b/controller/viewtopic.php index 6abdf274..a8bf757a 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -58,11 +58,11 @@ public function display($id = null, $name = null, $page = null, $pid = null) $p = (!isset($page) || $page <= 1 || $page > $num_pages) ? 1 : intval($page); $start_from = $this->feather->user->disp_posts * ($p - 1); - $url_topic = url_friendly($cur_topic['subject']); - $url_forum = url_friendly($cur_topic['forum_name']); + $url_topic = $this->feather->url->url_friendly($cur_topic['subject']); + $url_forum = $this->feather->url->url_friendly($cur_topic['forum_name']); // Generate paging links - $paging_links = ''.__('Pages').' '.paginate($num_pages, $p, 'topic/'.$id.'/'.$url_topic.'/#'); + $paging_links = ''.__('Pages').' '.$this->feather->url->paginate($num_pages, $p, 'topic/'.$id.'/'.$url_topic.'/#'); if ($this->feather->forum_settings['o_censoring'] == '1') { $cur_topic['subject'] = censor_words($cur_topic['subject']); @@ -91,13 +91,13 @@ public function display($id = null, $name = null, $page = null, $pid = null) 'promptQuote' => __('promptQuote') ); - $this->feather->view2->addAsset('canonical', get_link('forum/'.$id.'/'.$url_forum.'/')); + $this->feather->view2->addAsset('canonical', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/')); if ($num_pages > 1) { if ($p > 1) { - $this->feather->view2->addAsset('prev', get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); + $this->feather->view2->addAsset('prev', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); } if ($p < $num_pages) { - $this->feather->view2->addAsset('next', get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); + $this->feather->view2->addAsset('next', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); } } diff --git a/include/classes/core.class.php b/include/classes/core.class.php index b36bb627..78811653 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -196,6 +196,10 @@ public function call() $this->app->container->singleton('view2', function() { return new \FeatherBB\View(); }); + // Load FeatherBB url class + $this->app->container->singleton('url', function () { + return new \FeatherBB\Url(); + }); // Load FeatherBB hooks $this->app->container->singleton('hooks', function () { return new \FeatherBB\Hooks(); diff --git a/include/classes/url.class.php b/include/classes/url.class.php new file mode 100644 index 00000000..f9340f33 --- /dev/null +++ b/include/classes/url.class.php @@ -0,0 +1,777 @@ + 'A', + '' => 'A', + '' => 'A', + '' => 'A', + '' => 'Ae', + '' => 'A', + '' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '' => 'C', + '?' => 'C', + '?' => 'C', + '?' => 'C', + '?' => 'C', + '?' => 'D', + '?' => 'D', + '' => 'E', + '' => 'E', + '' => 'E', + '' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'G', + '?' => 'G', + '?' => 'G', + '?' => 'G', + '?' => 'H', + '?' => 'H', + '' => 'I', + '' => 'I', + '' => 'I', + '' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'IJ', + '?' => 'J', + '?' => 'K', + '?' => 'K', + '?' => 'K', + '?' => 'K', + '?' => 'K', + '?' => 'L', + '' => 'N', + '?' => 'N', + '?' => 'N', + '?' => 'N', + '?' => 'N', + '' => 'O', + '' => 'O', + '' => 'O', + '' => 'O', + '' => 'Oe', + '' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '' => 'OE', + '?' => 'R', + '?' => 'R', + '?' => 'R', + '?' => 'S', + '?' => 'S', + '?' => 'S', + '?' => 'S', + '' => 'S', + '?' => 'T', + '?' => 'T', + '?' => 'T', + '?' => 'T', + '' => 'U', + '' => 'U', + '' => 'U', + '' => 'Ue', + '?' => 'U', + '?' => 'U', + '?' => 'U', + '?' => 'U', + '?' => 'U', + '?' => 'U', + '?' => 'W', + '?' => 'Y', + '' => 'Y', + '' => 'Y', + '?' => 'Z', + '?' => 'Z', + '' => 'Z', + '' => 'a', + '' => 'a', + '' => 'a', + '' => 'a', + '' => 'ae', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '' => 'a', + '' => 'ae', + '' => 'c', + '?' => 'c', + '?' => 'c', + '?' => 'c', + '?' => 'c', + '?' => 'd', + '?' => 'd', + '' => 'e', + '' => 'e', + '' => 'e', + '' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '' => 'f', + '?' => 'g', + '?' => 'g', + '?' => 'g', + '?' => 'g', + '?' => 'h', + '?' => 'h', + '' => 'i', + '' => 'i', + '' => 'i', + '' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'ij', + '?' => 'j', + '?' => 'k', + '?' => 'k', + '?' => 'l', + '?' => 'l', + '?' => 'l', + '?' => 'l', + '?' => 'l', + '' => 'n', + '?' => 'n', + '?' => 'n', + '?' => 'n', + '?' => 'n', + '?' => 'n', + '' => 'o', + '' => 'o', + '' => 'o', + '' => 'o', + '' => 'oe', + '' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '' => 'oe', + '?' => 'r', + '?' => 'r', + '?' => 'r', + '?' => 's', + '' => 's', + '?' => 't', + '' => 'u', + '' => 'u', + '' => 'u', + '' => 'ue', + '?' => 'u', + '?' => 'u', + '?' => 'u', + '?' => 'u', + '?' => 'u', + '?' => 'u', + '?' => 'w', + '' => 'y', + '' => 'y', + '?' => 'y', + '?' => 'z', + '?' => 'z', + '' => 'z', + '' => 'ss', + '?' => 'ss', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'A', + '?' => 'B', + '?' => 'G', + '?' => 'D', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'E', + '?' => 'Z', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'TH', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'I', + '?' => 'K', + '?' => 'L', + '?' => 'M', + '?' => 'N', + '?' => 'KS', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'P', + '?' => 'R', + '?' => 'R', + '?' => 'S', + '?' => 'T', + '?' => 'Y', + '?' => 'Y', + '?' => 'Y', + '?' => 'Y', + '?' => 'Y', + '?' => 'Y', + '?' => 'Y', + '?' => 'Y', + '?' => 'Y', + '?' => 'Y', + '?' => 'Y', + '?' => 'F', + '?' => 'X', + '?' => 'PS', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'O', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'a', + '?' => 'b', + '?' => 'g', + '?' => 'd', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'e', + '?' => 'z', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'th', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'i', + '?' => 'k', + '?' => 'l', + '?' => 'm', + '?' => 'n', + '?' => 'ks', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'p', + '?' => 'r', + '?' => 'r', + '?' => 'r', + '?' => 's', + '?' => 's', + '?' => 't', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'y', + '?' => 'f', + '?' => 'x', + '?' => 'ps', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '?' => 'o', + '' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + '?' => 'A', + '?' => 'B', + '?' => 'V', + '?' => 'G', + '?' => 'D', + '?' => 'E', + '?' => 'E', + '?' => 'ZH', + '?' => 'Z', + '?' => 'I', + '?' => 'I', + '?' => 'K', + '?' => 'L', + '?' => 'M', + '?' => 'N', + '?' => 'O', + '?' => 'P', + '?' => 'R', + '?' => 'S', + '?' => 'T', + '?' => 'U', + '?' => 'F', + '?' => 'KH', + '?' => 'TS', + '?' => 'CH', + '?' => 'SH', + '?' => 'SHCH', + '?' => 'Y', + '?' => 'E', + '?' => 'YU', + '?' => 'YA', + '?' => 'A', + '?' => 'B', + '?' => 'V', + '?' => 'G', + '?' => 'D', + '?' => 'E', + '?' => 'E', + '?' => 'ZH', + '?' => 'Z', + '?' => 'I', + '?' => 'I', + '?' => 'K', + '?' => 'L', + '?' => 'M', + '?' => 'N', + '?' => 'O', + '?' => 'P', + '?' => 'R', + '?' => 'S', + '?' => 'T', + '?' => 'U', + '?' => 'F', + '?' => 'KH', + '?' => 'TS', + '?' => 'CH', + '?' => 'SH', + '?' => 'SHCH', + '?' => 'Y', + '?' => 'E', + '?' => 'YU', + '?' => 'YA', + '?' => '', + '?' => '', + '?' => '', + '?' => '', + + '?' => 'YE', + '?' => 'YE', + '?' => 'YI', + '?' => 'YI', + '?' => 'KG', + '?' => 'KG', + + '' => 'd', + '' => 'D', + '' => 'th', + '' => 'TH', + + '&' => '-', + '/' => '-', + '(' => '-', + '"' => '-', + "'" => '-', + + ); + + // + // Generate a string with numbered links (for multipage scripts) + // + public function paginate($num_pages, $cur_page, $link, $args = null) + { + $pages = array(); + $link_to_all = false; + + // If $cur_page == -1, we link to all pages (used in viewforum.php) + if ($cur_page == -1) { + $cur_page = 1; + $link_to_all = true; + } + + if ($num_pages <= 1) { + $pages = array('1'); + } else { + // Add a previous page link + if ($num_pages > 1 && $cur_page > 1) { + $pages[] = ''; + } + + if ($cur_page > 3) { + $pages[] = '1'; + + if ($cur_page > 5) { + $pages[] = ''.__('Spacer').''; + } + } + + // Don't ask me how the following works. It just does, OK? :-) + for ($current = ($cur_page == 5) ? $cur_page - 3 : $cur_page - 2, $stop = ($cur_page + 4 == $num_pages) ? $cur_page + 4 : $cur_page + 3; $current < $stop; ++$current) { + if ($current < 1 || $current > $num_pages) { + continue; + } elseif ($current != $cur_page || $link_to_all) { + $pages[] = ''.forum_number_format($current).''; + } else { + $pages[] = ''.forum_number_format($current).''; + } + } + + if ($cur_page <= ($num_pages-3)) { + if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4)) { + $pages[] = ''.__('Spacer').''; + } + + $pages[] = ''.forum_number_format($num_pages).''; + } + + // Add a next page link + if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages) { + $pages[] = ''; + } + } + + return implode(' ', $pages); + } + + // + // Generate a string with numbered links (for multipage scripts) + // Old FluxBB-style function for search page + // + public function paginate_old($num_pages, $cur_page, $link) + { + $pages = array(); + $link_to_all = false; + + // If $cur_page == -1, we link to all pages (used in viewforum.php) + if ($cur_page == -1) { + $cur_page = 1; + $link_to_all = true; + } + + if ($num_pages <= 1) { + $pages = array('1'); + } else { + // Add a previous page link + if ($num_pages > 1 && $cur_page > 1) { + $pages[] = ''; + } + + if ($cur_page > 3) { + $pages[] = '1'; + + if ($cur_page > 5) { + $pages[] = ''.__('Spacer').''; + } + } + + // Don't ask me how the following works. It just does, OK? :-) + for ($current = ($cur_page == 5) ? $cur_page - 3 : $cur_page - 2, $stop = ($cur_page + 4 == $num_pages) ? $cur_page + 4 : $cur_page + 3; $current < $stop; ++$current) { + if ($current < 1 || $current > $num_pages) { + continue; + } elseif ($current != $cur_page || $link_to_all) { + $pages[] = ''.forum_number_format($current).''; + } else { + $pages[] = ''.forum_number_format($current).''; + } + } + + if ($cur_page <= ($num_pages-3)) { + if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4)) { + $pages[] = ''.__('Spacer').''; + } + + $pages[] = ''.forum_number_format($num_pages).''; + } + + // Add a next page link + if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages) { + $pages[] = ''; + } + } + + return implode(' ', $pages); + } + + // + // Make a string safe to use in a URL + // Inspired by (c) Panther + // + public function url_friendly($str) + { + $str = strtr($str, $this->url_replace); + $str = strtolower(utf8_decode($str)); + $str = feather_trim(preg_replace(array('/[^a-z0-9\s]/', '/[\s]+/'), array('', '-'), $str), '-'); + + if (empty($str)) { + $str = 'view'; + } + + return $str; + } + + // + // Generate link to another page on the forum + // Inspired by (c) Panther + // + public function get_link($link, $args = null) + { + if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) { // If we have Apache's mod_rewrite enabled + $base_url = get_base_url(); + } else { + $base_url = get_base_url().'/index.php'; + } + + $gen_link = $link; + if ($args == null) { + $gen_link = $base_url.'/'.$link; + } elseif (!is_array($args)) { + $gen_link = $base_url.'/'.str_replace('$1', $args, $link); + } else { + for ($i = 0; isset($args[$i]); ++$i) { + $gen_link = str_replace('$'.($i + 1), $args[$i], $gen_link); + } + $gen_link = $base_url.'/'.$gen_link; + } + + return $gen_link; + } + + // + // Generate a hyperlink with parameters and anchor and a subsection such as a subpage + // Inspired by (c) Panther + // + private function get_sublink($link, $sublink, $subarg, $args = null) + { + $base_url = get_base_url(); + + if ($sublink == 'p$1' && $subarg == 1) { + return $this->get_link($link, $args); + } + + $gen_link = $link; + if (!is_array($args) && $args != null) { + $gen_link = str_replace('$1', $args, $link); + } else { + for ($i = 0; isset($args[$i]); ++$i) { + $gen_link = str_replace('$'.($i + 1), $args[$i], $gen_link); + } + } + + $gen_link = $base_url.'/'.str_replace('#', str_replace('$1', str_replace('$1', $subarg, $sublink), '$1/'), $gen_link); + + return $gen_link; + } +} \ No newline at end of file diff --git a/include/functions.php b/include/functions.php index 2189bb05..d29a8d6c 100644 --- a/include/functions.php +++ b/include/functions.php @@ -468,124 +468,6 @@ function get_title($user) } -// -// Generate a string with numbered links (for multipage scripts) -// -function paginate($num_pages, $cur_page, $link, $args = null) -{ - $pages = array(); - $link_to_all = false; - - // If $cur_page == -1, we link to all pages (used in viewforum.php) - if ($cur_page == -1) { - $cur_page = 1; - $link_to_all = true; - } - - if ($num_pages <= 1) { - $pages = array('1'); - } else { - // Add a previous page link - if ($num_pages > 1 && $cur_page > 1) { - $pages[] = ''; - } - - if ($cur_page > 3) { - $pages[] = '1'; - - if ($cur_page > 5) { - $pages[] = ''.__('Spacer').''; - } - } - - // Don't ask me how the following works. It just does, OK? :-) - for ($current = ($cur_page == 5) ? $cur_page - 3 : $cur_page - 2, $stop = ($cur_page + 4 == $num_pages) ? $cur_page + 4 : $cur_page + 3; $current < $stop; ++$current) { - if ($current < 1 || $current > $num_pages) { - continue; - } elseif ($current != $cur_page || $link_to_all) { - $pages[] = ''.forum_number_format($current).''; - } else { - $pages[] = ''.forum_number_format($current).''; - } - } - - if ($cur_page <= ($num_pages-3)) { - if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4)) { - $pages[] = ''.__('Spacer').''; - } - - $pages[] = ''.forum_number_format($num_pages).''; - } - - // Add a next page link - if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages) { - $pages[] = ''; - } - } - - return implode(' ', $pages); -} - -// -// Generate a string with numbered links (for multipage scripts) -// Old FluxBB-style function for search page -// -function paginate_old($num_pages, $cur_page, $link) -{ - $pages = array(); - $link_to_all = false; - - // If $cur_page == -1, we link to all pages (used in viewforum.php) - if ($cur_page == -1) { - $cur_page = 1; - $link_to_all = true; - } - - if ($num_pages <= 1) { - $pages = array('1'); - } else { - // Add a previous page link - if ($num_pages > 1 && $cur_page > 1) { - $pages[] = ''; - } - - if ($cur_page > 3) { - $pages[] = '1'; - - if ($cur_page > 5) { - $pages[] = ''.__('Spacer').''; - } - } - - // Don't ask me how the following works. It just does, OK? :-) - for ($current = ($cur_page == 5) ? $cur_page - 3 : $cur_page - 2, $stop = ($cur_page + 4 == $num_pages) ? $cur_page + 4 : $cur_page + 3; $current < $stop; ++$current) { - if ($current < 1 || $current > $num_pages) { - continue; - } elseif ($current != $cur_page || $link_to_all) { - $pages[] = ''.forum_number_format($current).''; - } else { - $pages[] = ''.forum_number_format($current).''; - } - } - - if ($cur_page <= ($num_pages-3)) { - if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4)) { - $pages[] = ''.__('Spacer').''; - } - - $pages[] = ''.forum_number_format($num_pages).''; - } - - // Add a next page link - if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages) { - $pages[] = ''; - } - } - - return implode(' ', $pages); -} - - // // Display a message // @@ -1108,79 +990,6 @@ function generate_stopwords_cache_id() return sha1(implode('|', $hash)); } -// -// Make a string safe to use in a URL -// Inspired by (c) Panther -// -function url_friendly($str) -{ - require FEATHER_ROOT.'include/url_replace.php'; - - $str = strtr($str, $url_replace); - $str = strtolower(utf8_decode($str)); - $str = feather_trim(preg_replace(array('/[^a-z0-9\s]/', '/[\s]+/'), array('', '-'), $str), '-'); - - if (empty($str)) { - $str = 'view'; - } - - return $str; -} - -// -// Generate link to another page on the forum -// Inspired by (c) Panther -// -function get_link($link, $args = null) -{ - if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) { // If we have Apache's mod_rewrite enabled - $base_url = get_base_url(); - } else { - $base_url = get_base_url().'/index.php'; - } - - $gen_link = $link; - if ($args == null) { - $gen_link = $base_url.'/'.$link; - } elseif (!is_array($args)) { - $gen_link = $base_url.'/'.str_replace('$1', $args, $link); - } else { - for ($i = 0; isset($args[$i]); ++$i) { - $gen_link = str_replace('$'.($i + 1), $args[$i], $gen_link); - } - $gen_link = $base_url.'/'.$gen_link; - } - - return $gen_link; -} - - -// -// Generate a hyperlink with parameters and anchor and a subsection such as a subpage -// Inspired by (c) Panther -// -function get_sublink($link, $sublink, $subarg, $args = null) -{ - $base_url = get_base_url(); - - if ($sublink == 'p$1' && $subarg == 1) { - return get_link($link, $args); - } - - $gen_link = $link; - if (!is_array($args) && $args != null) { - $gen_link = str_replace('$1', $args, $link); - } else { - for ($i = 0; isset($args[$i]); ++$i) { - $gen_link = str_replace('$'.($i + 1), $args[$i], $gen_link); - } - } - - $gen_link = $base_url.'/'.str_replace('#', str_replace('$1', str_replace('$1', $subarg, $sublink), '$1/'), $gen_link); - - return $gen_link; -} - // Generate breadcrumbs from an array of name and URLs function breadcrumbs_admin(array $links) { diff --git a/include/url_replace.php b/include/url_replace.php deleted file mode 100644 index 2e232759..00000000 --- a/include/url_replace.php +++ /dev/null @@ -1,589 +0,0 @@ - - * based on code by (C) 2008-2012 FluxBB - * and Rickard Andersson (C) 2002-2008 PunBB - * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher - */ - -// Replacements will be carried out by url_friendly() function -$url_replace = array( - - 'À' => 'A', - 'Á' => 'A', - 'Â' => 'A', - 'Ã' => 'A', - 'Ä' => 'Ae', - 'Å' => 'A', - 'Æ' => 'A', - 'Ā' => 'A', - 'Ą' => 'A', - 'Ă' => 'A', - 'Ç' => 'C', - 'Ć' => 'C', - 'Č' => 'C', - 'Ĉ' => 'C', - 'Ċ' => 'C', - 'Ď' => 'D', - 'Đ' => 'D', - 'È' => 'E', - 'É' => 'E', - 'Ê' => 'E', - 'Ë' => 'E', - 'Ē' => 'E', - 'Ę' => 'E', - 'Ě' => 'E', - 'Ĕ' => 'E', - 'Ė' => 'E', - 'Ĝ' => 'G', - 'Ğ' => 'G', - 'Ġ' => 'G', - 'Ģ' => 'G', - 'Ĥ' => 'H', - 'Ħ' => 'H', - 'Ì' => 'I', - 'Í' => 'I', - 'Î' => 'I', - 'Ï' => 'I', - 'Ī' => 'I', - 'Ĩ' => 'I', - 'Ĭ' => 'I', - 'Į' => 'I', - 'İ' => 'I', - 'IJ' => 'IJ', - 'Ĵ' => 'J', - 'Ķ' => 'K', - 'Ľ' => 'K', - 'Ĺ' => 'K', - 'Ļ' => 'K', - 'Ŀ' => 'K', - 'Ł' => 'L', - 'Ñ' => 'N', - 'Ń' => 'N', - 'Ň' => 'N', - 'Ņ' => 'N', - 'Ŋ' => 'N', - 'Ò' => 'O', - 'Ó' => 'O', - 'Ô' => 'O', - 'Õ' => 'O', - 'Ö' => 'Oe', - 'Ø' => 'O', - 'Ō' => 'O', - 'Ő' => 'O', - 'Ŏ' => 'O', - 'Œ' => 'OE', - 'Ŕ' => 'R', - 'Ř' => 'R', - 'Ŗ' => 'R', - 'Ś' => 'S', - 'Ş' => 'S', - 'Ŝ' => 'S', - 'Ș' => 'S', - 'Š' => 'S', - 'Ť' => 'T', - 'Ţ' => 'T', - 'Ŧ' => 'T', - 'Ț' => 'T', - 'Ù' => 'U', - 'Ú' => 'U', - 'Û' => 'U', - 'Ü' => 'Ue', - 'Ū' => 'U', - 'Ů' => 'U', - 'Ű' => 'U', - 'Ŭ' => 'U', - 'Ũ' => 'U', - 'Ų' => 'U', - 'Ŵ' => 'W', - 'Ŷ' => 'Y', - 'Ÿ' => 'Y', - 'Ý' => 'Y', - 'Ź' => 'Z', - 'Ż' => 'Z', - 'Ž' => 'Z', - 'à' => 'a', - 'á' => 'a', - 'â' => 'a', - 'ã' => 'a', - 'ä' => 'ae', - 'ā' => 'a', - 'ą' => 'a', - 'ă' => 'a', - 'å' => 'a', - 'æ' => 'ae', - 'ç' => 'c', - 'ć' => 'c', - 'č' => 'c', - 'ĉ' => 'c', - 'ċ' => 'c', - 'ď' => 'd', - 'đ' => 'd', - 'è' => 'e', - 'é' => 'e', - 'ê' => 'e', - 'ë' => 'e', - 'ē' => 'e', - 'ę' => 'e', - 'ě' => 'e', - 'ĕ' => 'e', - 'ė' => 'e', - 'ƒ' => 'f', - 'ĝ' => 'g', - 'ğ' => 'g', - 'ġ' => 'g', - 'ģ' => 'g', - 'ĥ' => 'h', - 'ħ' => 'h', - 'ì' => 'i', - 'í' => 'i', - 'î' => 'i', - 'ï' => 'i', - 'ī' => 'i', - 'ĩ' => 'i', - 'ĭ' => 'i', - 'į' => 'i', - 'ı' => 'i', - 'ij' => 'ij', - 'ĵ' => 'j', - 'ķ' => 'k', - 'ĸ' => 'k', - 'ł' => 'l', - 'ľ' => 'l', - 'ĺ' => 'l', - 'ļ' => 'l', - 'ŀ' => 'l', - 'ñ' => 'n', - 'ń' => 'n', - 'ň' => 'n', - 'ņ' => 'n', - 'ʼn' => 'n', - 'ŋ' => 'n', - 'ò' => 'o', - 'ó' => 'o', - 'ô' => 'o', - 'õ' => 'o', - 'ö' => 'oe', - 'ø' => 'o', - 'ō' => 'o', - 'ő' => 'o', - 'ŏ' => 'o', - 'œ' => 'oe', - 'ŕ' => 'r', - 'ř' => 'r', - 'ŗ' => 'r', - 'ś' => 's', - 'š' => 's', - 'ť' => 't', - 'ù' => 'u', - 'ú' => 'u', - 'û' => 'u', - 'ü' => 'ue', - 'ū' => 'u', - 'ů' => 'u', - 'ű' => 'u', - 'ŭ' => 'u', - 'ũ' => 'u', - 'ų' => 'u', - 'ŵ' => 'w', - 'ÿ' => 'y', - 'ý' => 'y', - 'ŷ' => 'y', - 'ż' => 'z', - 'ź' => 'z', - 'ž' => 'z', - 'ß' => 'ss', - 'ſ' => 'ss', - 'Α' => 'A', - 'Ά' => 'A', - 'Ἀ' => 'A', - 'Ἁ' => 'A', - 'Ἂ' => 'A', - 'Ἃ' => 'A', - 'Ἄ' => 'A', - 'Ἅ' => 'A', - 'Ἆ' => 'A', - 'Ἇ' => 'A', - 'ᾈ' => 'A', - 'ᾉ' => 'A', - 'ᾊ' => 'A', - 'ᾋ' => 'A', - 'ᾌ' => 'A', - 'ᾍ' => 'A', - 'ᾎ' => 'A', - 'ᾏ' => 'A', - 'Ᾰ' => 'A', - 'Ᾱ' => 'A', - 'Ὰ' => 'A', - 'Ά' => 'A', - 'ᾼ' => 'A', - 'Β' => 'B', - 'Γ' => 'G', - 'Δ' => 'D', - 'Ε' => 'E', - 'Έ' => 'E', - 'Ἐ' => 'E', - 'Ἑ' => 'E', - 'Ἒ' => 'E', - 'Ἓ' => 'E', - 'Ἔ' => 'E', - 'Ἕ' => 'E', - 'Έ' => 'E', - 'Ὲ' => 'E', - 'Ζ' => 'Z', - 'Η' => 'I', - 'Ή' => 'I', - 'Ἠ' => 'I', - 'Ἡ' => 'I', - 'Ἢ' => 'I', - 'Ἣ' => 'I', - 'Ἤ' => 'I', - 'Ἥ' => 'I', - 'Ἦ' => 'I', - 'Ἧ' => 'I', - 'ᾘ' => 'I', - 'ᾙ' => 'I', - 'ᾚ' => 'I', - 'ᾛ' => 'I', - 'ᾜ' => 'I', - 'ᾝ' => 'I', - 'ᾞ' => 'I', - 'ᾟ' => 'I', - 'Ὴ' => 'I', - 'Ή' => 'I', - 'ῌ' => 'I', - 'Θ' => 'TH', - 'Ι' => 'I', - 'Ί' => 'I', - 'Ϊ' => 'I', - 'Ἰ' => 'I', - 'Ἱ' => 'I', - 'Ἲ' => 'I', - 'Ἳ' => 'I', - 'Ἴ' => 'I', - 'Ἵ' => 'I', - 'Ἶ' => 'I', - 'Ἷ' => 'I', - 'Ῐ' => 'I', - 'Ῑ' => 'I', - 'Ὶ' => 'I', - 'Ί' => 'I', - 'Κ' => 'K', - 'Λ' => 'L', - 'Μ' => 'M', - 'Ν' => 'N', - 'Ξ' => 'KS', - 'Ο' => 'O', - 'Ό' => 'O', - 'Ὀ' => 'O', - 'Ὁ' => 'O', - 'Ὂ' => 'O', - 'Ὃ' => 'O', - 'Ὄ' => 'O', - 'Ὅ' => 'O', - 'Ὸ' => 'O', - 'Ό' => 'O', - 'Π' => 'P', - 'Ρ' => 'R', - 'Ῥ' => 'R', - 'Σ' => 'S', - 'Τ' => 'T', - 'Υ' => 'Y', - 'Ύ' => 'Y', - 'Ϋ' => 'Y', - 'Ὑ' => 'Y', - 'Ὓ' => 'Y', - 'Ὕ' => 'Y', - 'Ὗ' => 'Y', - 'Ῠ' => 'Y', - 'Ῡ' => 'Y', - 'Ὺ' => 'Y', - 'Ύ' => 'Y', - 'Φ' => 'F', - 'Χ' => 'X', - 'Ψ' => 'PS', - 'Ω' => 'O', - 'Ώ' => 'O', - 'Ὠ' => 'O', - 'Ὡ' => 'O', - 'Ὢ' => 'O', - 'Ὣ' => 'O', - 'Ὤ' => 'O', - 'Ὥ' => 'O', - 'Ὦ' => 'O', - 'Ὧ' => 'O', - 'ᾨ' => 'O', - 'ᾩ' => 'O', - 'ᾪ' => 'O', - 'ᾫ' => 'O', - 'ᾬ' => 'O', - 'ᾭ' => 'O', - 'ᾮ' => 'O', - 'ᾯ' => 'O', - 'Ὼ' => 'O', - 'Ώ' => 'O', - 'ῼ' => 'O', - 'α' => 'a', - 'ά' => 'a', - 'ἀ' => 'a', - 'ἁ' => 'a', - 'ἂ' => 'a', - 'ἃ' => 'a', - 'ἄ' => 'a', - 'ἅ' => 'a', - 'ἆ' => 'a', - 'ἇ' => 'a', - 'ᾀ' => 'a', - 'ᾁ' => 'a', - 'ᾂ' => 'a', - 'ᾃ' => 'a', - 'ᾄ' => 'a', - 'ᾅ' => 'a', - 'ᾆ' => 'a', - 'ᾇ' => 'a', - 'ὰ' => 'a', - 'ά' => 'a', - 'ᾰ' => 'a', - 'ᾱ' => 'a', - 'ᾲ' => 'a', - 'ᾳ' => 'a', - 'ᾴ' => 'a', - 'ᾶ' => 'a', - 'ᾷ' => 'a', - 'β' => 'b', - 'γ' => 'g', - 'δ' => 'd', - 'ε' => 'e', - 'έ' => 'e', - 'ἐ' => 'e', - 'ἑ' => 'e', - 'ἒ' => 'e', - 'ἓ' => 'e', - 'ἔ' => 'e', - 'ἕ' => 'e', - 'ὲ' => 'e', - 'έ' => 'e', - 'ζ' => 'z', - 'η' => 'i', - 'ή' => 'i', - 'ἠ' => 'i', - 'ἡ' => 'i', - 'ἢ' => 'i', - 'ἣ' => 'i', - 'ἤ' => 'i', - 'ἥ' => 'i', - 'ἦ' => 'i', - 'ἧ' => 'i', - 'ᾐ' => 'i', - 'ᾑ' => 'i', - 'ᾒ' => 'i', - 'ᾓ' => 'i', - 'ᾔ' => 'i', - 'ᾕ' => 'i', - 'ᾖ' => 'i', - 'ᾗ' => 'i', - 'ὴ' => 'i', - 'ή' => 'i', - 'ῂ' => 'i', - 'ῃ' => 'i', - 'ῄ' => 'i', - 'ῆ' => 'i', - 'ῇ' => 'i', - 'θ' => 'th', - 'ι' => 'i', - 'ί' => 'i', - 'ϊ' => 'i', - 'ΐ' => 'i', - 'ἰ' => 'i', - 'ἱ' => 'i', - 'ἲ' => 'i', - 'ἳ' => 'i', - 'ἴ' => 'i', - 'ἵ' => 'i', - 'ἶ' => 'i', - 'ἷ' => 'i', - 'ὶ' => 'i', - 'ί' => 'i', - 'ῐ' => 'i', - 'ῑ' => 'i', - 'ῒ' => 'i', - 'ΐ' => 'i', - 'ΐ' => 'i', - 'ῖ' => 'i', - 'ῗ' => 'i', - 'κ' => 'k', - 'λ' => 'l', - 'μ' => 'm', - 'ν' => 'n', - 'ξ' => 'ks', - 'ο' => 'o', - 'ό' => 'o', - 'ὀ' => 'o', - 'ὁ' => 'o', - 'ὂ' => 'o', - 'ὃ' => 'o', - 'ὄ' => 'o', - 'ὅ' => 'o', - 'ὸ' => 'o', - 'ό' => 'o', - 'π' => 'p', - 'ρ' => 'r', - 'ῤ' => 'r', - 'ῥ' => 'r', - 'σ' => 's', - 'ς' => 's', - 'τ' => 't', - 'υ' => 'y', - 'ύ' => 'y', - 'ϋ' => 'y', - 'ΰ' => 'y', - 'ὐ' => 'y', - 'ὑ' => 'y', - 'ὒ' => 'y', - 'ὓ' => 'y', - 'ὔ' => 'y', - 'ὕ' => 'y', - 'ὖ' => 'y', - 'ὗ' => 'y', - 'ὺ' => 'y', - 'ύ' => 'y', - 'ῠ' => 'y', - 'ῡ' => 'y', - 'ῢ' => 'y', - 'ΰ' => 'y', - 'ῦ' => 'y', - 'ῧ' => 'y', - 'φ' => 'f', - 'χ' => 'x', - 'ψ' => 'ps', - 'ω' => 'o', - 'ώ' => 'o', - 'ὠ' => 'o', - 'ὡ' => 'o', - 'ὢ' => 'o', - 'ὣ' => 'o', - 'ὤ' => 'o', - 'ὥ' => 'o', - 'ὦ' => 'o', - 'ὧ' => 'o', - 'ᾠ' => 'o', - 'ᾡ' => 'o', - 'ᾢ' => 'o', - 'ᾣ' => 'o', - 'ᾤ' => 'o', - 'ᾥ' => 'o', - 'ᾦ' => 'o', - 'ᾧ' => 'o', - 'ὼ' => 'o', - 'ώ' => 'o', - 'ῲ' => 'o', - 'ῳ' => 'o', - 'ῴ' => 'o', - 'ῶ' => 'o', - 'ῷ' => 'o', - '¨' => '', - '΅' => '', - '᾿' => '', - '῾' => '', - '῍' => '', - '῝' => '', - '῎' => '', - '῞' => '', - '῏' => '', - '῟' => '', - '῀' => '', - '῁' => '', - '΄' => '', - '΅' => '', - '`' => '', - '῭' => '', - 'ͺ' => '', - '᾽' => '', - 'А' => 'A', - 'Б' => 'B', - 'В' => 'V', - 'Г' => 'G', - 'Д' => 'D', - 'Е' => 'E', - 'Ё' => 'E', - 'Ж' => 'ZH', - 'З' => 'Z', - 'И' => 'I', - 'Й' => 'I', - 'К' => 'K', - 'Л' => 'L', - 'М' => 'M', - 'Н' => 'N', - 'О' => 'O', - 'П' => 'P', - 'Р' => 'R', - 'С' => 'S', - 'Т' => 'T', - 'У' => 'U', - 'Ф' => 'F', - 'Х' => 'KH', - 'Ц' => 'TS', - 'Ч' => 'CH', - 'Ш' => 'SH', - 'Щ' => 'SHCH', - 'Ы' => 'Y', - 'Э' => 'E', - 'Ю' => 'YU', - 'Я' => 'YA', - 'а' => 'A', - 'б' => 'B', - 'в' => 'V', - 'г' => 'G', - 'д' => 'D', - 'е' => 'E', - 'ё' => 'E', - 'ж' => 'ZH', - 'з' => 'Z', - 'и' => 'I', - 'й' => 'I', - 'к' => 'K', - 'л' => 'L', - 'м' => 'M', - 'н' => 'N', - 'о' => 'O', - 'п' => 'P', - 'р' => 'R', - 'с' => 'S', - 'т' => 'T', - 'у' => 'U', - 'ф' => 'F', - 'х' => 'KH', - 'ц' => 'TS', - 'ч' => 'CH', - 'ш' => 'SH', - 'щ' => 'SHCH', - 'ы' => 'Y', - 'э' => 'E', - 'ю' => 'YU', - 'я' => 'YA', - 'Ъ' => '', - 'ъ' => '', - 'Ь' => '', - 'ь' => '', - - 'Є' => 'YE', - 'є' => 'YE', - 'Ї' => 'YI', - 'ї' => 'YI', - 'Ґ' => 'KG', - 'ґ' => 'KG', - - 'ð' => 'd', - 'Ð' => 'D', - 'þ' => 'th', - 'Þ' => 'TH', - - '&' => '-', - '/' => '-', - '(' => '-', - '"' => '-', - "'" => '-', - -); diff --git a/model/admin/bans.php b/model/admin/bans.php index 1fd0a997..f89d6054 100644 --- a/model/admin/bans.php +++ b/model/admin/bans.php @@ -276,7 +276,7 @@ public function insert_ban() // Regenerate the bans cache $this->feather->cache->store('bans', \model\cache::get_bans()); - redirect(get_link('admin/bans/'), __('Ban edited redirect')); + redirect($this->feather->url->get_link('admin/bans/'), __('Ban edited redirect')); } public function remove_ban($ban_id) @@ -291,7 +291,7 @@ public function remove_ban($ban_id) // Regenerate the bans cache $this->feather->cache->store('bans', \model\cache::get_bans()); - redirect(get_link('admin/bans/'), __('Ban removed redirect')); + redirect($this->feather->url->get_link('admin/bans/'), __('Ban removed redirect')); } public function find_ban($start_from = false) diff --git a/model/admin/censoring.php b/model/admin/censoring.php index 73e14d85..488e94be 100644 --- a/model/admin/censoring.php +++ b/model/admin/censoring.php @@ -46,7 +46,7 @@ public function add_word() $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); - redirect(get_link('admin/censoring/'), __('Word added redirect')); + redirect($this->feather->url->get_link('admin/censoring/'), __('Word added redirect')); } public function update_word() @@ -74,7 +74,7 @@ public function update_word() $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); - redirect(get_link('admin/censoring/'), __('Word updated redirect')); + redirect($this->feather->url->get_link('admin/censoring/'), __('Word updated redirect')); } public function remove_word() @@ -90,7 +90,7 @@ public function remove_word() $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); - redirect(get_link('admin/censoring/'), __('Word removed redirect')); + redirect($this->feather->url->get_link('admin/censoring/'), __('Word removed redirect')); } public function get_words() diff --git a/model/admin/groups.php b/model/admin/groups.php index 7f6b3d6b..88ac1247 100644 --- a/model/admin/groups.php +++ b/model/admin/groups.php @@ -258,9 +258,9 @@ public function add_edit_group($groups) $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); if ($this->request->post('mode') == 'edit') { - redirect(get_link('admin/groups/'), __('Group edited redirect')); + redirect($this->feather->url->get_link('admin/groups/'), __('Group edited redirect')); } else { - redirect(get_link('admin/groups/'), __('Group added redirect')); + redirect($this->feather->url->get_link('admin/groups/'), __('Group added redirect')); } } @@ -285,7 +285,7 @@ public function set_default_group($groups) // Regenerate the config cache $this->feather->cache->store('config', \model\cache::get_config()); - redirect(get_link('admin/groups/'), __('Default group redirect')); + redirect($this->feather->url->get_link('admin/groups/'), __('Default group redirect')); } public function check_members($group_id) @@ -328,7 +328,7 @@ public function delete_group($group_id) DB::for_table('groups')->where('g_promote_next_group', $group_id) ->update_many('g_promote_next_group', 0); - redirect(get_link('admin/groups/'), __('Group removed redirect')); + redirect($this->feather->url->get_link('admin/groups/'), __('Group removed redirect')); } public function get_group_title($group_id) diff --git a/model/admin/maintenance.php b/model/admin/maintenance.php index 913fc563..5d9636a5 100644 --- a/model/admin/maintenance.php +++ b/model/admin/maintenance.php @@ -211,7 +211,7 @@ public function prune_comply($prune_from, $prune_sticky) ->delete_many(); } - redirect(get_link('admin/maintenance/'), __('Posts pruned redirect')); + redirect($this->feather->url->get_link('admin/maintenance/'), __('Posts pruned redirect')); } public function get_info_prune($prune_sticky, $prune_from) diff --git a/model/admin/options.php b/model/admin/options.php index 18749061..c0adf8c3 100644 --- a/model/admin/options.php +++ b/model/admin/options.php @@ -230,7 +230,7 @@ public function update_options() $this->feather->cache->store('config', \model\cache::get_config()); $this->clear_feed_cache(); - redirect(get_link('admin/options/'), __('Options updated redirect')); + redirect($this->feather->url->get_link('admin/options/'), __('Options updated redirect')); } public function clear_feed_cache() diff --git a/model/admin/permissions.php b/model/admin/permissions.php index 19d409fd..42a3ea46 100644 --- a/model/admin/permissions.php +++ b/model/admin/permissions.php @@ -48,6 +48,6 @@ public function update_permissions() generate_config_cache(); - redirect(get_link('admin/permissions/'), __('Perms updated redirect')); + redirect($this->feather->url->get_link('admin/permissions/'), __('Perms updated redirect')); } } diff --git a/model/admin/reports.php b/model/admin/reports.php index d0500dc1..af24e0fd 100644 --- a/model/admin/reports.php +++ b/model/admin/reports.php @@ -58,7 +58,7 @@ public function zap_report() ->delete_many(); } - redirect(get_link('admin/reports/'), __('Report zapped redirect')); + redirect($this->feather->url->get_link('admin/reports/'), __('Report zapped redirect')); } public function get_reports() diff --git a/model/admin/users.php b/model/admin/users.php index 1f4e72bf..0ac78492 100644 --- a/model/admin/users.php +++ b/model/admin/users.php @@ -237,7 +237,7 @@ public function move_users() DB::for_table('users')->where_in('id', $move['user_ids']) ->update_many('group_id', $new_group); - redirect(get_link('admin/users/'), __('Users move redirect')); + redirect($this->feather->url->get_link('admin/users/'), __('Users move redirect')); } $move = $this->hook->fire('model.users.move_users.move', $move); @@ -402,7 +402,7 @@ public function delete_users() $stats = $this->feather->cache->retrieve('users_info'); - redirect(get_link('admin/users/'), __('Users delete redirect')); + redirect($this->feather->url->get_link('admin/users/'), __('Users delete redirect')); } return $user_ids; @@ -521,7 +521,7 @@ public function ban_users() // Regenerate the bans cache $this->feather->cache->store('bans', \model\cache::get_bans()); - redirect(get_link('admin/users/'), __('Users banned redirect')); + redirect($this->feather->url->get_link('admin/users/'), __('Users banned redirect')); } } return $user_ids; diff --git a/model/delete.php b/model/delete.php index c79e7915..1ef9b86b 100644 --- a/model/delete.php +++ b/model/delete.php @@ -65,7 +65,7 @@ public function handle_deletion($is_topic_post, $id, $tid, $fid) delete_topic($tid); update_forum($fid); - redirect(get_link('forum/'.$fid.'/'), __('Topic del redirect')); + redirect($this->feather->url->get_link('forum/'.$fid.'/'), __('Topic del redirect')); } else { $this->hook->fire('handle_deletion', $tid, $fid, $id); @@ -84,7 +84,7 @@ public function handle_deletion($is_topic_post, $id, $tid, $fid) $post = $post->find_one(); - redirect(get_link('post/'.$post['id'].'/#p'.$post['id']), __('Post del redirect')); + redirect($this->feather->url->get_link('post/'.$post['id'].'/#p'.$post['id']), __('Post del redirect')); } } } diff --git a/model/index.php b/model/index.php index c5cf6066..978d7363 100644 --- a/model/index.php +++ b/model/index.php @@ -49,7 +49,7 @@ public function get_forum_actions() // Display a "mark all as read" link if (!$this->user->is_guest) { - $forum_actions[] = ''.__('Mark all as read').''; + $forum_actions[] = ''.__('Mark all as read').''; } $forum_actions = $this->hook->fire('get_forum_actions', $forum_actions); @@ -177,7 +177,7 @@ public function print_categories_forums() // Are there new posts since our last visit? if (isset($new_topics[$cur_forum->fid])) { $cur_forum->item_status .= ' inew'; - $forum_field_new = '[ '.__('New posts').' ]'; + $forum_field_new = '[ '.__('New posts').' ]'; $cur_forum->icon_type = 'icon icon-new'; } @@ -188,7 +188,7 @@ public function print_categories_forums() $cur_forum->item_status .= ' iredirect'; $cur_forum->icon_type = 'icon'; } else { - $cur_forum->forum_field = '

    '.feather_escape($cur_forum->forum_name).''.(!empty($forum_field_new) ? ' '.$forum_field_new : '').'

    '; + $cur_forum->forum_field = '

    '.feather_escape($cur_forum->forum_name).''.(!empty($forum_field_new) ? ' '.$forum_field_new : '').'

    '; $cur_forum->num_topics_formatted = $cur_forum->num_topics; $cur_forum->num_posts_formatted = $cur_forum->num_posts; } @@ -199,7 +199,7 @@ public function print_categories_forums() // If there is a last_post/last_poster if ($cur_forum->last_post != '') { - $cur_forum->last_post_formatted = ''.format_time($cur_forum->last_post).' '.__('by').' '.feather_escape($cur_forum->last_poster).''; + $cur_forum->last_post_formatted = ''.format_time($cur_forum->last_post).' '.__('by').' '.feather_escape($cur_forum->last_poster).''; } elseif ($cur_forum->redirect_url != '') { $cur_forum->last_post_formatted = '- - -'; } else { @@ -212,7 +212,7 @@ public function print_categories_forums() foreach ($mods_array as $mod_username => $mod_id) { if ($this->user->g_view_users == '1') { - $moderators[] = ''.feather_escape($mod_username).''; + $moderators[] = ''.feather_escape($mod_username).''; } else { $moderators[] = feather_escape($mod_username); } @@ -256,7 +256,7 @@ public function collect_stats() $stats['total_posts'] = intval($query['total_posts']); if ($this->user->g_view_users == '1') { - $stats['newest_user'] = ''.feather_escape($stats['last_user']['username']).''; + $stats['newest_user'] = ''.feather_escape($stats['last_user']['username']).''; } else { $stats['newest_user'] = feather_escape($stats['last_user']['username']); } @@ -291,7 +291,7 @@ public function fetch_users_online() foreach($query as $user_online) { if ($user_online->user_id > 1) { if ($this->user->g_view_users == '1') { - $online['users'][] = "\n\t\t\t\t".'
    '.feather_escape($user_online->ident).''; + $online['users'][] = "\n\t\t\t\t".'
    '.feather_escape($user_online->ident).''; } else { $online['users'][] = "\n\t\t\t\t".'
    '.feather_escape($user_online->ident); } diff --git a/model/login.php b/model/login.php index 2aa08f95..78f743e3 100644 --- a/model/login.php +++ b/model/login.php @@ -49,7 +49,7 @@ public function login() $authorized = $this->hook->fire('authorized_login', $authorized); if (!$authorized) { - message(__('Wrong user/pass').' '.__('Forgotten pass').''); + message(__('Wrong user/pass').' '.__('Forgotten pass').''); } // Update the status if this is the first time the user logged in @@ -186,7 +186,7 @@ public function password_forgotten() // Do the user specific replacements to the template $cur_mail_message = str_replace('', $cur_hit->username, $mail_message); - $cur_mail_message = str_replace('', get_link('user/'.$cur_hit->id.'/action/change_pass/?key='.$new_password_key), $cur_mail_message); + $cur_mail_message = str_replace('', $this->feather->url->get_link('user/'.$cur_hit->id.'/action/change_pass/?key='.$new_password_key), $cur_mail_message); $cur_mail_message = str_replace('', $new_password, $cur_mail_message); $cur_mail_message = $this->hook->fire('cur_mail_message_password_forgotten', $cur_mail_message); diff --git a/model/misc.php b/model/misc.php index 96479d42..208a059a 100644 --- a/model/misc.php +++ b/model/misc.php @@ -123,7 +123,7 @@ public function get_redirect_url($recipient_id) } if (!isset($redirect_url)) { - $redirect_url = get_link('user/'.$recipient_id.'/'); + $redirect_url = $this->feather->url->get_link('user/'.$recipient_id.'/'); } elseif (preg_match('%viewtopic\.php\?pid=(\d+)$%', $redirect_url, $matches)) { $redirect_url .= '#p'.$matches[1]; } @@ -205,7 +205,7 @@ public function insert_report($post_id) $mail_subject = str_replace('', $report['forum_id'], $mail_subject); $mail_subject = str_replace('', $report['subject'], $mail_subject); $mail_message = str_replace('', $this->user->username, $mail_message); - $mail_message = str_replace('', get_link('post/'.$post_id.'/#p'.$post_id), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('post/'.$post_id.'/#p'.$post_id), $mail_message); $mail_message = str_replace('', $reason, $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); @@ -221,7 +221,7 @@ public function insert_report($post_id) $last_report_sent = $this->hook->fireDB('insert_last_report_sent', $last_report_sent); $last_report_sent = $last_report_sent->save(); - redirect(get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['subject']).'/'), __('Report redirect')); + redirect($this->feather->url->get_link('forum/'.$report['forum_id'].'/'.$this->feather->url->url_friendly($report['subject']).'/'), __('Report redirect')); } public function get_info_report($post_id) @@ -305,7 +305,7 @@ public function subscribe_topic($topic_id) $subscription = $this->hook->fireDB('subscribe_topic_query', $subscription); $subscription = $subscription->save(); - redirect(get_link('topic/'.$topic_id.'/'), __('Subscribe redirect')); + redirect($this->feather->url->get_link('topic/'.$topic_id.'/'), __('Subscribe redirect')); } public function unsubscribe_topic($topic_id) @@ -333,7 +333,7 @@ public function unsubscribe_topic($topic_id) $delete = $this->hook->fireDB('unsubscribe_topic_query', $delete); $delete = $delete->delete_many(); - redirect(get_link('topic/'.$topic_id.'/'), __('Unsubscribe redirect')); + redirect($this->feather->url->get_link('topic/'.$topic_id.'/'), __('Unsubscribe redirect')); } public function unsubscribe_forum($forum_id) @@ -361,7 +361,7 @@ public function unsubscribe_forum($forum_id) $delete = $this->hook->fireDB('unsubscribe_forum_query', $delete); $delete = $delete->delete_many(); - redirect(get_link('forum/'.$forum_id.'/'), __('Unsubscribe redirect')); + redirect($this->feather->url->get_link('forum/'.$forum_id.'/'), __('Unsubscribe redirect')); } public function subscribe_forum($forum_id) @@ -412,6 +412,6 @@ public function subscribe_forum($forum_id) $subscription = $this->hook->fireDB('subscribe_forum_query', $subscription); $subscription = $subscription->save(); - redirect(get_link('forum/'.$forum_id.'/'), __('Subscribe redirect')); + redirect($this->feather->url->get_link('forum/'.$forum_id.'/'), __('Subscribe redirect')); } } diff --git a/model/moderate.php b/model/moderate.php index d2f53fc8..eade841e 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -27,7 +27,7 @@ public function __construct() public function display_ip_info($ip) { $ip = $this->hook->fire('display_ip_info', $ip); - message(sprintf(__('Host info 1'), $ip).'
    '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

    '.__('Show more users').''); + message(sprintf(__('Host info 1'), $ip).'
    '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

    '.__('Show more users').''); } public function display_ip_address_post($pid) @@ -45,7 +45,7 @@ public function display_ip_address_post($pid) $ip = $this->hook->fire('display_ip_address_post', $ip); - message(sprintf(__('Host info 1'), $ip).'
    '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

    '.__('Show more users').''); + message(sprintf(__('Host info 1'), $ip).'
    '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

    '.__('Show more users').''); } public function get_moderators($fid) @@ -155,7 +155,7 @@ public function delete_posts($tid, $fid, $p = null) update_forum($fid); - redirect(get_link('topic/'.$tid.'/'), __('Delete posts redirect')); + redirect($this->feather->url->get_link('topic/'.$tid.'/'), __('Delete posts redirect')); } $posts = $this->hook->fire('delete_posts', $posts); @@ -316,7 +316,7 @@ public function split_posts($tid, $fid, $p = null) update_forum($fid); update_forum($move_to_forum); - redirect(get_link('topic/'.$new_tid.'/'), __('Split posts redirect')); + redirect($this->feather->url->get_link('topic/'.$new_tid.'/'), __('Split posts redirect')); } $posts = $this->hook->fire('split_posts', $posts); @@ -460,7 +460,7 @@ public function display_posts_view($tid, $start_from) // If the poster is a registered user if ($cur_post->poster_id > 1) { if ($this->user->g_view_users == '1') { - $cur_post->poster_disp = ''.feather_escape($cur_post->poster).''; + $cur_post->poster_disp = ''.feather_escape($cur_post->poster).''; } else { $cur_post->poster_disp = feather_escape($cur_post->poster); } @@ -585,7 +585,7 @@ public function move_topics_to($fid, $tfid = null, $param = null) $redirect_msg = (count($topics) > 1) ? __('Move topics redirect') : __('Move topic redirect'); $redirect_msg = $this->hook->fire('move_topics_to_redirect_message', $redirect_msg); - redirect(get_link('forum/'.$move_to_forum.'/'), $redirect_msg); + redirect($this->feather->url->get_link('forum/'.$move_to_forum.'/'), $redirect_msg); } public function check_move_possible() @@ -737,7 +737,7 @@ public function merge_topics($fid) // Update the forum FROM which the topic was moved and redirect update_forum($fid); - redirect(get_link('forum/'.$fid.'/'), __('Merge topics redirect')); + redirect($this->feather->url->get_link('forum/'.$fid.'/'), __('Merge topics redirect')); } public function delete_topics($topics, $fid) @@ -821,7 +821,7 @@ public function delete_topics($topics, $fid) $this->hook->fire('delete_topics'); - redirect(get_link('forum/'.$fid.'/'), __('Delete topics redirect')); + redirect($this->feather->url->get_link('forum/'.$fid.'/'), __('Delete topics redirect')); } public function get_forum_info($fid) @@ -918,10 +918,10 @@ public function display_topics($fid, $sort_by, $start_from) $status_text = array(); $cur_topic['item_status'] = ($topic_count % 2 == 0) ? 'roweven' : 'rowodd'; $cur_topic['icon_type'] = 'icon'; - $url_topic = url_friendly($cur_topic['subject']); + $url_topic = $this->feather->url->url_friendly($cur_topic['subject']); if (is_null($cur_topic['moved_to'])) { - $cur_topic['last_post_disp'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; + $cur_topic['last_post_disp'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; $cur_topic['ghost_topic'] = false; } else { $cur_topic['last_post_disp'] = '- - -'; @@ -938,13 +938,13 @@ public function display_topics($fid, $sort_by, $start_from) } if ($cur_topic['moved_to'] != 0) { - $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.__('Moved').''; $cur_topic['item_status'] .= ' imoved'; } elseif ($cur_topic['closed'] == '0') { - $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; } else { - $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.__('Closed').''; $cur_topic['item_status'] .= ' iclosed'; } @@ -953,7 +953,7 @@ public function display_topics($fid, $sort_by, $start_from) $cur_topic['item_status'] .= ' inew'; $cur_topic['icon_type'] = 'icon icon-new'; $cur_topic['subject_disp'] = ''.$cur_topic['subject_disp'].''; - $subject_new_posts = '[ '.__('New posts').' ]'; + $subject_new_posts = '[ '.__('New posts').' ]'; } else { $subject_new_posts = null; } @@ -964,7 +964,7 @@ public function display_topics($fid, $sort_by, $start_from) $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $this->user->disp_posts); if ($num_pages_topic > 1) { - $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'topic/'.$cur_topic['id'].'/'.$url_topic.'/#').' ]'; + $subject_multipage = '[ '.$this->feather->url->paginate($num_pages_topic, -1, 'topic/'.$cur_topic['id'].'/'.$url_topic.'/#').' ]'; } else { $subject_multipage = null; } diff --git a/model/post.php b/model/post.php index 24fe3e71..c65589fb 100644 --- a/model/post.php +++ b/model/post.php @@ -408,8 +408,8 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) $mail_subject = str_replace('', $cur_posting['subject'], $mail_subject); $mail_message = str_replace('', $cur_posting['subject'], $mail_message); $mail_message = str_replace('', $post['username'], $mail_message); - $mail_message = str_replace('', get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message); - $mail_message = str_replace('', get_link('unsubscribe/topic/'.$tid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('unsubscribe/topic/'.$tid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('send_notifications_reply_mail_message', $mail_message); @@ -417,8 +417,8 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) $mail_message_full = str_replace('', $cur_posting['subject'], $mail_message_full); $mail_message_full = str_replace('', $post['username'], $mail_message_full); $mail_message_full = str_replace('', $cleaned_message, $mail_message_full); - $mail_message_full = str_replace('', get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message_full); - $mail_message_full = str_replace('', get_link('unsubscribe/topic/'.$tid.'/'), $mail_message_full); + $mail_message_full = str_replace('', $this->feather->url->get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message_full); + $mail_message_full = str_replace('', $this->feather->url->get_link('unsubscribe/topic/'.$tid.'/'), $mail_message_full); $mail_message_full = str_replace('', $this->config['o_board_title'], $mail_message_full); $mail_message_full = $this->hook->fire('send_notifications_reply_mail_message_full', $mail_message_full); @@ -616,8 +616,8 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) $mail_message = str_replace('', $this->config['o_censoring'] == '1' ? $censored_subject : $post['subject'], $mail_message); $mail_message = str_replace('', $cur_posting['forum_name'], $mail_message); $mail_message = str_replace('', $post['username'], $mail_message); - $mail_message = str_replace('', get_link('topic/'.$new_tid.'/'), $mail_message); - $mail_message = str_replace('', get_link('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('topic/'.$new_tid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('send_notifications_new_topic_mail_message', $mail_message); @@ -626,8 +626,8 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) $mail_message_full = str_replace('', $cur_posting['forum_name'], $mail_message_full); $mail_message_full = str_replace('', $post['username'], $mail_message_full); $mail_message_full = str_replace('', $cleaned_message, $mail_message_full); - $mail_message_full = str_replace('', get_link('topic/'.$new_tid.'/'), $mail_message_full); - $mail_message_full = str_replace('', get_link('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message_full); + $mail_message_full = str_replace('', $this->feather->url->get_link('topic/'.$new_tid.'/'), $mail_message_full); + $mail_message_full = str_replace('', $this->feather->url->get_link('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message_full); $mail_message_full = str_replace('', $this->config['o_board_title'], $mail_message_full); $mail_message_full = $this->hook->fire('send_notifications_new_topic_mail_message_full', $mail_message_full); @@ -670,7 +670,7 @@ public function warn_banned_user($post, $new_pid) $mail_message = str_replace('', $post['username'], $mail_message); $mail_message = str_replace('', $post['email'], $mail_message); - $mail_message = str_replace('', get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('warn_banned_user_mail_message', $mail_message); diff --git a/model/profile.php b/model/profile.php index 79910176..c09c70d5 100644 --- a/model/profile.php +++ b/model/profile.php @@ -136,7 +136,7 @@ public function change_pass($id) $this->hook->fire('change_pass'); - redirect(get_link('user/'.$id.'/section/essentials/'), __('Pass updated redirect')); + redirect($this->feather->url->get_link('user/'.$id.'/section/essentials/'), __('Pass updated redirect')); } } @@ -226,7 +226,7 @@ public function change_email($id) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', $new_email, $mail_message); - $mail_message = str_replace('', get_link('user/'.$id.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_message', $mail_message); @@ -263,7 +263,7 @@ public function change_email($id) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', implode(', ', $dupe_list), $mail_message); - $mail_message = str_replace('', get_link('user/'.$id.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_dupe_message', $mail_message); @@ -300,7 +300,7 @@ public function change_email($id) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', get_base_url(), $mail_message); - $mail_message = str_replace('', get_link('user/'.$id.'/action/change_email/?key='.$new_email_key), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('user/'.$id.'/action/change_email/?key='.$new_email_key), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_activate_message', $mail_message); @@ -402,7 +402,7 @@ public function upload_avatar($id, $files_data) $uploaded_file = $this->hook->fire('upload_avatar', $uploaded_file); - redirect(get_link('user/'.$id.'/section/personality/'), __('Avatar upload redirect')); + redirect($this->feather->url->get_link('user/'.$id.'/section/personality/'), __('Avatar upload redirect')); } public function update_group_membership($id) @@ -469,7 +469,7 @@ public function update_group_membership($id) $id = $this->hook->fire('update_group_membership', $id); - redirect(get_link('user/'.$id.'/section/admin/'), __('Group membership redirect')); + redirect($this->feather->url->get_link('user/'.$id.'/section/admin/'), __('Group membership redirect')); } public function get_username($id) @@ -539,7 +539,7 @@ public function update_mod_forums($id) $id = $this->hook->fire('update_mod_forums', $id); - redirect(get_link('user/'.$id.'/section/admin/'), __('Update forums redirect')); + redirect($this->feather->url->get_link('user/'.$id.'/section/admin/'), __('Update forums redirect')); } public function ban_user($id) @@ -558,9 +558,9 @@ public function ban_user($id) $ban_id = $ban_id->find_one_col('id'); if ($ban_id) { - redirect(get_link('admin/bans/edit/'.$ban_id.'/'), __('Ban redirect')); + redirect($this->feather->url->get_link('admin/bans/edit/'.$ban_id.'/'), __('Ban redirect')); } else { - redirect(get_link('admin/bans/add/'.$id.'/'), __('Ban redirect')); + redirect($this->feather->url->get_link('admin/bans/add/'.$id.'/'), __('Ban redirect')); } } @@ -592,7 +592,7 @@ public function promote_user($id) $pid = $this->hook->fire('promote_user', $pid); - redirect(get_link('post/'.$pid.'/#p'.$pid), __('User promote redirect')); + redirect($this->feather->url->get_link('post/'.$pid.'/#p'.$pid), __('User promote redirect')); } public function delete_user($id) @@ -1086,7 +1086,7 @@ public function update_profile($id, $info, $section) $section = $this->hook->fireDB('update_profile', $section, $id); - redirect(get_link('user/'.$id.'/section/'.$section.'/'), __('Profile redirect')); + redirect($this->feather->url->get_link('user/'.$id.'/section/'.$section.'/'), __('Profile redirect')); } public function get_user_info($id) @@ -1140,7 +1140,7 @@ public function parse_user_info($user) if ($user['email_setting'] == '0' && !$this->user->is_guest && $this->user->g_send_email == '1') { $user['email_field'] = ''.feather_escape($user['email']).''; } elseif ($user['email_setting'] == '1' && !$this->user->is_guest && $this->user->g_send_email == '1') { - $user['email_field'] = ''.__('Send email').''; + $user['email_field'] = ''.__('Send email').''; } else { $user['email_field'] = ''; } @@ -1196,11 +1196,11 @@ public function parse_user_info($user) if ($this->user->g_search == '1') { $quick_searches = array(); if ($user['num_posts'] > 0) { - $quick_searches[] = ''.__('Show topics').''; - $quick_searches[] = ''.__('Show posts').''; + $quick_searches[] = ''.__('Show topics').''; + $quick_searches[] = ''.__('Show posts').''; } if ($this->user->is_admmod && $this->config['o_topic_subscriptions'] == '1') { - $quick_searches[] = ''.__('Show subscriptions').''; + $quick_searches[] = ''.__('Show subscriptions').''; } if (!empty($quick_searches)) { @@ -1238,12 +1238,12 @@ public function edit_essentials($id, $user) $user_disp['username_field'] = '

    '.sprintf(__('Username info'), feather_escape($user['username'])).'

    '."\n"; } - $user_disp['email_field'] = '

    '."\n"; + $user_disp['email_field'] = '

    '."\n"; } else { $user_disp['username_field'] = '

    '.__('Username').': '.feather_escape($user['username']).'

    '."\n"; if ($this->config['o_regs_verify'] == '1') { - $user_disp['email_field'] = '

    '.sprintf(__('Email info'), feather_escape($user['email']).' - '.__('Change email').'').'

    '."\n"; + $user_disp['email_field'] = '

    '.sprintf(__('Email info'), feather_escape($user['email']).' - '.__('Change email').'').'

    '."\n"; } else { $user_disp['email_field'] = ''."\n"; } @@ -1259,11 +1259,11 @@ public function edit_essentials($id, $user) } if ($this->user->g_search == '1' || $this->user->g_id == FEATHER_ADMIN) { - $posts_actions[] = ''.__('Show topics').''; - $posts_actions[] = ''.__('Show posts').''; + $posts_actions[] = ''.__('Show topics').''; + $posts_actions[] = ''.__('Show posts').''; if ($this->config['o_topic_subscriptions'] == '1') { - $posts_actions[] = ''.__('Show subscriptions').''; + $posts_actions[] = ''.__('Show subscriptions').''; } } diff --git a/model/register.php b/model/register.php index 226b4238..bc5e2467 100644 --- a/model/register.php +++ b/model/register.php @@ -190,7 +190,7 @@ public function insert_user($user) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', $user['email1'], $mail_message); - $mail_message = str_replace('', get_link('user/'.$new_uid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_banned_mail_message', $mail_message); @@ -211,7 +211,7 @@ public function insert_user($user) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', implode(', ', $dupe_list), $mail_message); - $mail_message = str_replace('', get_link('user/'.$new_uid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_dupe_mail_message', $mail_message); @@ -232,8 +232,8 @@ public function insert_user($user) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', get_base_url().'/', $mail_message); - $mail_message = str_replace('', get_link('user/'.$new_uid.'/'), $mail_message); - $mail_message = str_replace('', get_link('user/'.$new_uid.'/section/admin/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('user/'.$new_uid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('user/'.$new_uid.'/section/admin/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_new_mail_message', $mail_message); @@ -257,7 +257,7 @@ public function insert_user($user) $mail_message = str_replace('', get_base_url().'/', $mail_message); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', $user['password1'], $mail_message); - $mail_message = str_replace('', get_link('login/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get_link('login/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_welcome_mail_message', $mail_message); diff --git a/model/search.php b/model/search.php index e27188e5..5c1c713f 100644 --- a/model/search.php +++ b/model/search.php @@ -569,7 +569,7 @@ public function get_search_results() // If we're on the new posts search, display a "mark all as read" link if (!$this->user->is_guest && $search_type[0] == 'action' && $search_type[1] == 'show_new') { - $search['forum_actions'][] = ''.__('Mark all as read').''; + $search['forum_actions'][] = ''.__('Mark all as read').''; } // Fetch results to display @@ -604,7 +604,7 @@ public function get_search_results() $search['start_from'] = $start_from; // Generate paging links - $search['paging_links'] = ''.__('Pages').' '.paginate_old($num_pages, $p, '?search_id='.$search_id); + $search['paging_links'] = ''.__('Pages').' '.$this->feather->url->paginate_old($num_pages, $p, '?search_id='.$search_id); // throw away the first $start_from of $search_ids, only keep the top $per_page of $search_ids $search_ids = array_slice($search_ids, $start_from, $per_page); @@ -643,9 +643,9 @@ public function get_search_results() if ($search_type[0] == 'action') { if ($search_type[1] == 'show_user_topics') { - $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_user_topics'), feather_escape($search['search_set'][0]['poster'])).''; + $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_user_topics'), feather_escape($search['search_set'][0]['poster'])).''; } elseif ($search_type[1] == 'show_user_posts') { - $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_user_posts'), feather_escape($search['search_set'][0]['pposter'])).''; + $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_user_posts'), feather_escape($search['search_set'][0]['pposter'])).''; } elseif ($search_type[1] == 'show_subscriptions') { // Fetch username of subscriber $subscriber_id = $search_type[2]; @@ -658,10 +658,10 @@ public function get_search_results() message(__('Bad request'), '404'); } - $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_subscriptions'), feather_escape($subscriber_name)).''; + $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_subscriptions'), feather_escape($subscriber_name)).''; } else { $search_url = str_replace('_', '/', $search_type[1]); - $search['crumbs_text']['search_type'] = ''.__('Quick search '.$search_type[1]).''; + $search['crumbs_text']['search_type'] = ''.__('Quick search '.$search_type[1]).''; } } else { $keywords = $author = ''; @@ -677,7 +677,7 @@ public function get_search_results() $search['crumbs_text']['search_type'] = sprintf(__('By user show as '.$show_as), feather_escape($author)); } - $search['crumbs_text']['search_type'] = ''.$search['crumbs_text']['search_type'].''; + $search['crumbs_text']['search_type'] = ''.$search['crumbs_text']['search_type'].''; } } @@ -702,8 +702,8 @@ public function display_search_results($search) $post_count = $topic_count = 0; foreach ($search['search_set'] as $cur_search) { - $forum = ''.feather_escape($cur_search['forum_name']).''; - $url_topic = url_friendly($cur_search['subject']); + $forum = ''.feather_escape($cur_search['forum_name']).''; + $url_topic = $this->feather->url->url_friendly($cur_search['subject']); if ($this->config['o_censoring'] == '1') { $cur_search['subject'] = censor_words($cur_search['subject']); @@ -730,7 +730,7 @@ public function display_search_results($search) $pposter = feather_escape($cur_search['pposter']); if ($cur_search['poster_id'] > 1 && $this->user->g_view_users == '1') { - $cur_search['pposter_disp'] = ''.$pposter.''; + $cur_search['pposter_disp'] = ''.$pposter.''; } else { $cur_search['pposter_disp'] = ''.$pposter.''; } @@ -748,7 +748,7 @@ public function display_search_results($search) $cur_search['item_status'] = ($topic_count % 2 == 0) ? 'roweven' : 'rowodd'; $cur_search['icon_type'] = 'icon'; - $subject = ''.feather_escape($cur_search['subject']).' '.__('by').' '.feather_escape($cur_search['poster']).''; + $subject = ''.feather_escape($cur_search['subject']).' '.__('by').' '.feather_escape($cur_search['poster']).''; if ($cur_search['sticky'] == '1') { $cur_search['item_status'] .= ' isticky'; @@ -764,7 +764,7 @@ public function display_search_results($search) $cur_search['item_status'] .= ' inew'; $cur_search['icon_type'] = 'icon icon-new'; $subject = ''.$subject.''; - $subject_new_posts = '[ '.__('New posts').' ]'; + $subject_new_posts = '[ '.__('New posts').' ]'; } else { $subject_new_posts = null; } @@ -775,7 +775,7 @@ public function display_search_results($search) $num_pages_topic = ceil(($cur_search['num_replies'] + 1) / $this->user->disp_posts); if ($num_pages_topic > 1) { - $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'topic/'.$cur_search['tid'].'/'.$url_topic.'/#').' ]'; + $subject_multipage = '[ '.$this->feather->url->paginate($num_pages_topic, -1, 'topic/'.$cur_search['tid'].'/'.$url_topic.'/#').' ]'; } else { $subject_multipage = null; } diff --git a/model/viewforum.php b/model/viewforum.php index d88a0e6c..779d6999 100644 --- a/model/viewforum.php +++ b/model/viewforum.php @@ -103,13 +103,13 @@ public function get_forum_actions($forum_id, $subscriptions, $is_subscribed) if (!$this->user->is_guest) { if ($subscriptions == 1) { if ($is_subscribed) { - $forum_actions[] = ''.__('Is subscribed').' - '.__('Unsubscribe').''; + $forum_actions[] = ''.__('Is subscribed').' - '.__('Unsubscribe').''; } else { - $forum_actions[] = ''.__('Subscribe').''; + $forum_actions[] = ''.__('Subscribe').''; } } - $forum_actions[] = ''.__('Mark forum read').''; + $forum_actions[] = ''.__('Mark forum read').''; } $forum_actions = $this->hook->fire('get_page_head', $forum_actions); @@ -184,10 +184,10 @@ public function print_topics($forum_id, $sort_by, $start_from) $status_text = array(); $cur_topic['item_status'] = ($topic_count % 2 == 0) ? 'roweven' : 'rowodd'; $cur_topic['icon_type'] = 'icon'; - $url_subject = url_friendly($cur_topic['subject']); + $url_subject = $this->feather->url->url_friendly($cur_topic['subject']); if (is_null($cur_topic['moved_to'])) { - $cur_topic['last_post_formatted'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; + $cur_topic['last_post_formatted'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; } else { $cur_topic['last_post_formatted'] = '- - -'; } @@ -202,13 +202,13 @@ public function print_topics($forum_id, $sort_by, $start_from) } if ($cur_topic['moved_to'] != 0) { - $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.__('Moved').''; $cur_topic['item_status'] .= ' imoved'; } elseif ($cur_topic['closed'] == '0') { - $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; } else { - $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.__('Closed').''; $cur_topic['item_status'] .= ' iclosed'; } @@ -217,7 +217,7 @@ public function print_topics($forum_id, $sort_by, $start_from) $cur_topic['item_status'] .= ' inew'; $cur_topic['icon_type'] = 'icon icon-new'; $cur_topic['subject_formatted'] = ''.$cur_topic['subject_formatted'].''; - $subject_new_posts = '[ '.__('New posts').' ]'; + $subject_new_posts = '[ '.__('New posts').' ]'; } else { $subject_new_posts = null; } @@ -236,7 +236,7 @@ public function print_topics($forum_id, $sort_by, $start_from) $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $this->user->disp_posts); if ($num_pages_topic > 1) { - $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'topic/'.$cur_topic['id'].'/'.$url_subject.'/#').' ]'; + $subject_multipage = '[ '.$this->feather->url->paginate($num_pages_topic, -1, 'topic/'.$cur_topic['id'].'/'.$url_subject.'/#').' ]'; } else { $subject_multipage = null; } diff --git a/model/viewtopic.php b/model/viewtopic.php index 6a8f6674..81ab1b86 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -160,7 +160,7 @@ public function get_post_link($topic_id, $closed, $post_replies, $is_admmod) if ($closed == '0') { if (($post_replies == '' && $this->user->g_post_replies == '1') || $post_replies == '1' || $is_admmod) { - $post_link = "\t\t\t".''."\n"; + $post_link = "\t\t\t".''."\n"; } else { $post_link = ''; } @@ -168,7 +168,7 @@ public function get_post_link($topic_id, $closed, $post_replies, $is_admmod) $post_link = __('Topic closed'); if ($is_admmod) { - $post_link .= ' / '.__('Post reply').''; + $post_link .= ' / '.__('Post reply').''; } $post_link = "\t\t\t".''."\n"; @@ -206,9 +206,9 @@ public function get_subscraction($is_subscribed, $topic_id) if (!$this->user->is_guest && $this->config['o_topic_subscriptions'] == '1') { if ($is_subscribed) { // I apologize for the variable naming here. It's a mix of subscription and action I guess :-) - $subscraction = "\t\t".''."\n"; + $subscraction = "\t\t".''."\n"; } else { - $subscraction = "\t\t".''."\n"; + $subscraction = "\t\t".''."\n"; } } else { $subscraction = ''; @@ -317,7 +317,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) if ((($cur_post['email_setting'] == '0' && !$this->user->is_guest) || $this->user->is_admmod) && $this->user->g_send_email == '1') { $cur_post['user_contacts'][] = ''; } elseif ($cur_post['email_setting'] == '1' && !$this->user->is_guest && $this->user->g_send_email == '1') { - $cur_post['user_contacts'][] = ''; + $cur_post['user_contacts'][] = ''; } if ($cur_post['url'] != '') { @@ -336,7 +336,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) } if ($this->user->is_admmod) { - $cur_post['user_info'][] = '
    '.__('IP address logged').'
    '; + $cur_post['user_info'][] = '
    '.__('IP address logged').'
    '; if ($cur_post['admin_note'] != '') { $cur_post['user_info'][] = '
    '.__('Note').' '.feather_escape($cur_post['admin_note']).'
    '; @@ -349,7 +349,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) $cur_post['user_title_formatted'] = get_title($cur_post); if ($this->user->is_admmod) { - $cur_post['user_info'][] = '
    '.__('IP address logged').'
    '; + $cur_post['user_info'][] = '
    '.__('IP address logged').'
    '; } if ($this->config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$this->user->is_guest && $this->user->g_send_email == '1') { @@ -360,30 +360,30 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) // Generation post action array (quote, edit, delete etc.) if (!$is_admmod) { if (!$this->user->is_guest) { - $cur_post['post_actions'][] = '
  • '.__('Report').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Report').'
  • '; } if ($cur_topic['closed'] == '0') { if ($cur_post['poster_id'] == $this->user->id) { if ((($start_from + $post_count) == 1 && $this->user->g_delete_topics == '1') || (($start_from + $post_count) > 1 && $this->user->g_delete_posts == '1')) { - $cur_post['post_actions'][] = '
  • '.__('Delete').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Delete').'
  • '; } if ($this->user->g_edit_posts == '1') { - $cur_post['post_actions'][] = '
  • '.__('Edit').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Edit').'
  • '; } } if (($cur_topic['post_replies'] == '' && $this->user->g_post_replies == '1') || $cur_topic['post_replies'] == '1') { - $cur_post['post_actions'][] = '
  • '.__('Quote').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Quote').'
  • '; } } } else { - $cur_post['post_actions'][] = '
  • '.__('Report').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Report').'
  • '; if ($this->user->g_id == FEATHER_ADMIN || !in_array($cur_post['poster_id'], $admin_ids)) { - $cur_post['post_actions'][] = '
  • '.__('Delete').'
  • '; - $cur_post['post_actions'][] = '
  • '.__('Edit').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Delete').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Edit').'
  • '; } - $cur_post['post_actions'][] = '
  • '.__('Quote').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Quote').'
  • '; } // Perform the main parsing of the message (BBCode, smilies, censor words etc) diff --git a/plugins/test/plugintest.php b/plugins/test/plugintest.php index c9fe31f2..20b9d907 100644 --- a/plugins/test/plugintest.php +++ b/plugins/test/plugintest.php @@ -22,12 +22,12 @@ public function __construct() $this->hook = $this->feather->hooks; $this->hook->bind('get_forum_actions', function ($forum_actions) { - $forum_actions[] = 'Test1'; + $forum_actions[] = 'Test1'; return $forum_actions; }); $this->hook->bind('get_forum_actions', function ($forum_actions) { - $forum_actions[] = 'Test2'; + $forum_actions[] = 'Test2'; return $forum_actions; }); diff --git a/style/FeatherBB/view/admin/bans/admin_bans.php b/style/FeatherBB/view/admin/bans/admin_bans.php index 3d714e7f..50e72e76 100644 --- a/style/FeatherBB/view/admin/bans/admin_bans.php +++ b/style/FeatherBB/view/admin/bans/admin_bans.php @@ -16,7 +16,7 @@

    - +
    @@ -39,7 +39,7 @@

    - +

    diff --git a/style/FeatherBB/view/admin/bans/search_ban.php b/style/FeatherBB/view/admin/bans/search_ban.php index 0d057182..676b3e63 100644 --- a/style/FeatherBB/view/admin/bans/search_ban.php +++ b/style/FeatherBB/view/admin/bans/search_ban.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -55,8 +55,8 @@
    '.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>'.__('Edit').' | '.__('Remove').'' ?>url->get_link('user/'.$cur_ban['ban_creator'].'/').'">'.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>url->get_link('admin/bans/edit/'.$cur_ban['id'].'/').'">'.__('Edit').' | '.__('Remove').'' ?>
    - '.__('Forums').'') ?> + url->get_link('admin/forums').'">'.__('Forums').'') ?>
    @@ -39,7 +39,7 @@

    - +
    @@ -71,7 +71,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/censoring.php b/style/FeatherBB/view/admin/censoring.php index cf080869..69977dfa 100644 --- a/style/FeatherBB/view/admin/censoring.php +++ b/style/FeatherBB/view/admin/censoring.php @@ -16,13 +16,13 @@

    - +
    -

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    +

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    diff --git a/style/FeatherBB/view/admin/forums/admin_forums.php b/style/FeatherBB/view/admin/forums/admin_forums.php index e966e6f5..cbd5a6c0 100644 --- a/style/FeatherBB/view/admin/forums/admin_forums.php +++ b/style/FeatherBB/view/admin/forums/admin_forums.php @@ -16,7 +16,7 @@

    - +

    - +

    - + diff --git a/style/FeatherBB/view/admin/forums/delete_forum.php b/style/FeatherBB/view/admin/forums/delete_forum.php index 6a5263ba..86954f4d 100644 --- a/style/FeatherBB/view/admin/forums/delete_forum.php +++ b/style/FeatherBB/view/admin/forums/delete_forum.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/forums/permissions.php b/style/FeatherBB/view/admin/forums/permissions.php index df092f46..8f358170 100644 --- a/style/FeatherBB/view/admin/forums/permissions.php +++ b/style/FeatherBB/view/admin/forums/permissions.php @@ -16,7 +16,7 @@

    - +

    diff --git a/style/FeatherBB/view/admin/groups/admin_groups.php b/style/FeatherBB/view/admin/groups/admin_groups.php index aff5db98..d776239e 100644 --- a/style/FeatherBB/view/admin/groups/admin_groups.php +++ b/style/FeatherBB/view/admin/groups/admin_groups.php @@ -18,7 +18,7 @@
    - +
    @@ -51,7 +51,7 @@
    - +
    @@ -95,7 +95,7 @@
    | |
    '."\n"; + echo "\t\t\t\t\t\t\t\t".''."\n"; } ?> diff --git a/style/FeatherBB/view/admin/groups/confirm_delete.php b/style/FeatherBB/view/admin/groups/confirm_delete.php index ca595ab3..df490091 100644 --- a/style/FeatherBB/view/admin/groups/confirm_delete.php +++ b/style/FeatherBB/view/admin/groups/confirm_delete.php @@ -16,10 +16,10 @@

    - +
    - +
    diff --git a/style/FeatherBB/view/admin/groups/delete_group.php b/style/FeatherBB/view/admin/groups/delete_group.php index aea315d0..a878dcbb 100644 --- a/style/FeatherBB/view/admin/groups/delete_group.php +++ b/style/FeatherBB/view/admin/groups/delete_group.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/index.php b/style/FeatherBB/view/admin/index.php index f369b039..710a0e0e 100644 --- a/style/FeatherBB/view/admin/index.php +++ b/style/FeatherBB/view/admin/index.php @@ -35,7 +35,7 @@

    -

    '.__('Delete install file').'') ?>

    +

    url->get_link('admin/action/remove_install_file/').'">'.__('Delete install file').'') ?>

    @@ -45,11 +45,11 @@
    - forum_settings['o_cur_version'], ''.__('Check for upgrade').'') ?> + forum_settings['o_cur_version'], ''.__('Check for upgrade').'') ?>
    - +
    diff --git a/style/FeatherBB/view/admin/maintenance/admin_maintenance.php b/style/FeatherBB/view/admin/maintenance/admin_maintenance.php index 068b914b..6bd9ade5 100644 --- a/style/FeatherBB/view/admin/maintenance/admin_maintenance.php +++ b/style/FeatherBB/view/admin/maintenance/admin_maintenance.php @@ -16,13 +16,13 @@

    - +
    -

    '.__('Maintenance mode').'') ?>

    +

    url->get_link('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
    @@ -52,7 +52,7 @@ - +
    @@ -87,7 +87,7 @@
    -

    '.__('Maintenance mode').'') ?>

    +

    url->get_link('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    diff --git a/style/FeatherBB/view/admin/maintenance/prune.php b/style/FeatherBB/view/admin/maintenance/prune.php index 9e3b0d2b..fcfd7918 100644 --- a/style/FeatherBB/view/admin/maintenance/prune.php +++ b/style/FeatherBB/view/admin/maintenance/prune.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/maintenance/rebuild.php b/style/FeatherBB/view/admin/maintenance/rebuild.php index 0d24339b..b4f9434b 100644 --- a/style/FeatherBB/view/admin/maintenance/rebuild.php +++ b/style/FeatherBB/view/admin/maintenance/rebuild.php @@ -13,5 +13,5 @@ } ?>

    - -

    '.__('Click here').'')?>

    + +

    url->get_link('admin/maintenance/').$query_str.'">'.__('Click here').'')?>

    diff --git a/style/FeatherBB/view/admin/menu.php b/style/FeatherBB/view/admin/menu.php index d958a4ab..abc7f7ed 100644 --- a/style/FeatherBB/view/admin/menu.php +++ b/style/FeatherBB/view/admin/menu.php @@ -22,20 +22,20 @@ > + ?>> > + ?>> user->g_mod_ban_users == '1'): ?> > + ?>> forum_settings['o_report_method'] == '0' || $feather->forum_settings['o_report_method'] == '2'): ?> > + ?>>
    @@ -51,35 +51,35 @@ > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>>
    @@ -97,7 +97,7 @@ $plugin) { - echo "\t\t\t\t\t".''.str_replace('_', ' ', $plugin).''."\n"; + echo "\t\t\t\t\t".''.str_replace('_', ' ', $plugin).''."\n"; } ?> diff --git a/style/FeatherBB/view/admin/options.php b/style/FeatherBB/view/admin/options.php index 88c2c0b6..161058ea 100644 --- a/style/FeatherBB/view/admin/options.php +++ b/style/FeatherBB/view/admin/options.php @@ -16,7 +16,7 @@

    - +

    @@ -421,7 +421,7 @@ - '.__('Censoring').'') ?> + url->get_link('admin/censoring/').'">'.__('Censoring').'') ?>
    - - + + @@ -74,14 +74,14 @@ ?>
    - '.feather_escape($report['zapped_by']).'' : __('NA')) ?> + url->get_link('user/'.$report['zapped_by_id'].'/').'">'.feather_escape($report['zapped_by']).'' : __('NA')) ?>
    '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), - $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>url->get_link('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get_link('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get_link('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    - - + + diff --git a/style/FeatherBB/view/admin/statistics.php b/style/FeatherBB/view/admin/statistics.php index 5306b027..d7e779d6 100644 --- a/style/FeatherBB/view/admin/statistics.php +++ b/style/FeatherBB/view/admin/statistics.php @@ -25,7 +25,7 @@ user->g_id == FEATHER_ADMIN): ?>

    - '.__('Show info').'') ?>
    + url->get_link('admin/phpinfo/').'">'.__('Show info').'') ?>
    diff --git a/style/FeatherBB/view/admin/users/admin_users.php b/style/FeatherBB/view/admin/users/admin_users.php index 27e99a16..20b0a521 100644 --- a/style/FeatherBB/view/admin/users/admin_users.php +++ b/style/FeatherBB/view/admin/users/admin_users.php @@ -16,7 +16,7 @@

    - +

    @@ -150,7 +150,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/users/ban_users.php b/style/FeatherBB/view/admin/users/ban_users.php index e929c043..1d7bebd2 100644 --- a/style/FeatherBB/view/admin/users/ban_users.php +++ b/style/FeatherBB/view/admin/users/ban_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/users/delete_users.php b/style/FeatherBB/view/admin/users/delete_users.php index a82c22ec..29630f72 100644 --- a/style/FeatherBB/view/admin/users/delete_users.php +++ b/style/FeatherBB/view/admin/users/delete_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/users/find_users.php b/style/FeatherBB/view/admin/users/find_users.php index d426177d..168ff16b 100644 --- a/style/FeatherBB/view/admin/users/find_users.php +++ b/style/FeatherBB/view/admin/users/find_users.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -28,7 +28,7 @@
    - +

    @@ -54,12 +54,12 @@ foreach ($user_data as $user) { ?>
    - + - + @@ -90,8 +90,8 @@ ?>
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/admin/users/move_users.php b/style/FeatherBB/view/admin/users/move_users.php index d43303e8..ee7e6419 100644 --- a/style/FeatherBB/view/admin/users/move_users.php +++ b/style/FeatherBB/view/admin/users/move_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/users/search_ip.php b/style/FeatherBB/view/admin/users/search_ip.php index a17e7ac5..ad3ce72a 100644 --- a/style/FeatherBB/view/admin/users/search_ip.php +++ b/style/FeatherBB/view/admin/users/search_ip.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -45,10 +45,10 @@ foreach ($ip_data as $ip) { ?>
    - + - +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/admin/users/show_users.php b/style/FeatherBB/view/admin/users/show_users.php index 4ab008c7..b662779c 100644 --- a/style/FeatherBB/view/admin/users/show_users.php +++ b/style/FeatherBB/view/admin/users/show_users.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -51,12 +51,12 @@ if (isset($info['user_data'][$cur_poster['poster_id']])) { ?>
    - + - +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/delete.php b/style/FeatherBB/view/delete.php index 8a2d6959..be4aa85c 100644 --- a/style/FeatherBB/view/delete.php +++ b/style/FeatherBB/view/delete.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -27,7 +27,7 @@

    - +
    diff --git a/style/FeatherBB/view/edit.php b/style/FeatherBB/view/edit.php index 829d0c17..0cce7ef5 100644 --- a/style/FeatherBB/view/edit.php +++ b/style/FeatherBB/view/edit.php @@ -20,8 +20,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -76,7 +76,7 @@

    - +
    @@ -89,10 +89,10 @@
    diff --git a/style/FeatherBB/view/footer.new.php b/style/FeatherBB/view/footer.new.php index 13b79669..7779ef23 100644 --- a/style/FeatherBB/view/footer.new.php +++ b/style/FeatherBB/view/footer.new.php @@ -21,7 +21,7 @@ if ($active_page == 'viewforum') { echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; echo "\t\t\t".'
    '."\n"; } elseif ($active_page == 'viewtopic') { if (isset($pid)) { @@ -36,20 +36,20 @@ echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; // TODO: all - //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; + //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; } echo "\t\t\t".'
    '."\n"; @@ -67,12 +67,12 @@
    - user->g_id] as $cat_id => $cat_data) { echo "\t\t\t\t\t\t\t".''."\n"; foreach ($cat_data['cat_forums'] as $forum) { - echo "\t\t\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t\t\t".''."\n"; } echo "\t\t\t\t\t\t\t".''."\n"; } ?> diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index 2826444c..d825d4c3 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -21,7 +21,7 @@ if ($footer_style == 'viewforum') { echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; echo "\t\t\t".'
    '."\n"; } elseif ($footer_style == 'viewtopic') { if (isset($pid)) { @@ -36,20 +36,20 @@ echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; // TODO: all - //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; + //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; } echo "\t\t\t".'
    '."\n"; @@ -67,12 +67,12 @@
    - user->g_id] as $cat_id => $cat_data) { echo "\t\t\t\t\t\t\t".''."\n"; foreach ($cat_data['cat_forums'] as $forum) { - echo "\t\t\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t\t\t".''."\n"; } echo "\t\t\t\t\t\t\t".''."\n"; } ?> diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php index ff65adda..1acfb081 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/FeatherBB/view/header.new.php @@ -100,28 +100,28 @@ function process_form(the_form) echo "\t\t\t\t\t\t".''."\n"; if ($feather->user->g_read_board == '1' && $feather->user->g_view_users == '1') { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } if ($feather->forum_settings['o_rules'] == '1' && (!$feather->user->is_guest || $feather->user->g_read_board == '1' || $feather->forum_settings['o_regs_allow'] == '1')) { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } if ($feather->user->g_read_board == '1' && $feather->user->g_search == '1') { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } if ($feather->user->is_guest) { - echo "\t\t\t\t\t\t".''."\n"; - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } else { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; if ($feather->user->is_admmod) { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } // // Are there any additional navlinks we should insert into the array before imploding it? @@ -169,12 +169,12 @@ function process_form(the_form) if ($feather->user->is_admmod) { if ($feather->forum_settings['o_report_method'] == '0' || $feather->forum_settings['o_report_method'] == '2') { if ($has_reports) { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } } if ($feather->forum_settings['o_maintenance'] == '1') { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } } echo "\t\t\t\t\t".''."\n"; @@ -184,11 +184,11 @@ function process_form(the_form) echo "\t\t\t\t\t".''."\n"; } ?> diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php index d171ddab..af94b274 100644 --- a/style/FeatherBB/view/help.php +++ b/style/FeatherBB/view/help.php @@ -43,17 +43,17 @@

    [url=]forum_settings['o_board_title']) ?>[/url] forum_settings['o_board_title']) ?>

    [url][/url]

    -

    [url=/help/][/url]

    +

    [url=/help/][/url]

    [email]myname@example.com[/email] myname@example.com

    [email=myname@example.com][/email]

    -

    [topic=1][/topic]

    -

    [topic]1[/topic]

    -

    [post=1][/post]

    -

    [post]1[/post]

    -

    [forum=1][/forum]

    -

    [forum]1[/forum]

    -

    [user=2][/user]

    -

    [user]2[/user]

    +

    [topic=1][/topic]

    +

    [topic]1[/topic] url->get_link('topic/1/') ?>

    +

    [post=1][/post]

    +

    [post]1[/post] url->get_link('post/1/#p1') ?>

    +

    [forum=1][/forum]

    +

    [forum]1[/forum] url->get_link('forum/1/') ?>

    +

    [user=2][/user]

    +

    [user]2[/user] url->get_link('user/2/') ?>

    diff --git a/style/FeatherBB/view/login/form.php b/style/FeatherBB/view/login/form.php index 13d1744b..76d9cb3d 100644 --- a/style/FeatherBB/view/login/form.php +++ b/style/FeatherBB/view/login/form.php @@ -16,7 +16,7 @@

    - +
    @@ -32,7 +32,7 @@

    -

    +

    diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/FeatherBB/view/login/password_forgotten.php index 41c0a121..d9617fe9 100644 --- a/style/FeatherBB/view/login/password_forgotten.php +++ b/style/FeatherBB/view/login/password_forgotten.php @@ -39,7 +39,7 @@

    - +
    diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php index 06f96f55..b4ed730d 100644 --- a/style/FeatherBB/view/misc/email.php +++ b/style/FeatherBB/view/misc/email.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/misc/report.php b/style/FeatherBB/view/misc/report.php index 252042c7..1b55893b 100644 --- a/style/FeatherBB/view/misc/report.php +++ b/style/FeatherBB/view/misc/report.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -27,7 +27,7 @@

    - +
    diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php index 8b636222..f6819d21 100644 --- a/style/FeatherBB/view/moderate/moderator_forum.php +++ b/style/FeatherBB/view/moderate/moderator_forum.php @@ -18,7 +18,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    @@ -28,7 +28,7 @@
    - +
    @@ -92,7 +92,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/FeatherBB/view/moderate/posts_view.php index 482a1c49..ad68aa3d 100644 --- a/style/FeatherBB/view/moderate/posts_view.php +++ b/style/FeatherBB/view/moderate/posts_view.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -42,7 +42,7 @@ echo ' blockpost1'; } ?>"> -

    #

    +

    #

    @@ -85,8 +85,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php index ee2531da..1030f8d3 100644 --- a/style/FeatherBB/view/post.php +++ b/style/FeatherBB/view/post.php @@ -18,10 +18,10 @@
    • -
    • » 
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • -
    • » 
    • +
    • » 
    • » 
    @@ -121,10 +121,10 @@
    diff --git a/style/FeatherBB/view/profile/change_mail.php b/style/FeatherBB/view/profile/change_mail.php index f8d25e99..0c97e20c 100644 --- a/style/FeatherBB/view/profile/change_mail.php +++ b/style/FeatherBB/view/profile/change_mail.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/change_pass.php b/style/FeatherBB/view/profile/change_pass.php index 3f4285fb..39cd0ed1 100644 --- a/style/FeatherBB/view/profile/change_pass.php +++ b/style/FeatherBB/view/profile/change_pass.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/delete_user.php b/style/FeatherBB/view/profile/delete_user.php index 0fd42f52..c950017c 100644 --- a/style/FeatherBB/view/profile/delete_user.php +++ b/style/FeatherBB/view/profile/delete_user.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/menu.php b/style/FeatherBB/view/profile/menu.php index 12b3b47f..73f384c8 100644 --- a/style/FeatherBB/view/profile/menu.php +++ b/style/FeatherBB/view/profile/menu.php @@ -22,32 +22,32 @@ > + ?>> > + ?>> > + ?>> forum_settings['o_avatars'] == '1' || $feather->forum_settings['o_signatures'] == '1'): ?> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
    diff --git a/style/FeatherBB/view/profile/section_admin.php b/style/FeatherBB/view/profile/section_admin.php index 18ba2f12..05d190f4 100644 --- a/style/FeatherBB/view/profile/section_admin.php +++ b/style/FeatherBB/view/profile/section_admin.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php index ced4459f..209bf9b5 100644 --- a/style/FeatherBB/view/profile/section_display.php +++ b/style/FeatherBB/view/profile/section_display.php @@ -16,7 +16,7 @@

    - +

    - +
    @@ -24,7 +24,7 @@
    -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

    +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

    @@ -241,7 +241,7 @@
    -

    user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

    +

    user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

    diff --git a/style/FeatherBB/view/profile/section_messaging.php b/style/FeatherBB/view/profile/section_messaging.php index d944ee43..91532065 100644 --- a/style/FeatherBB/view/profile/section_messaging.php +++ b/style/FeatherBB/view/profile/section_messaging.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/section_personal.php b/style/FeatherBB/view/profile/section_personal.php index a765e0aa..f9d9fea8 100644 --- a/style/FeatherBB/view/profile/section_personal.php +++ b/style/FeatherBB/view/profile/section_personal.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/section_personality.php b/style/FeatherBB/view/profile/section_personality.php index 2b8f9c82..a1df5d8d 100644 --- a/style/FeatherBB/view/profile/section_personality.php +++ b/style/FeatherBB/view/profile/section_personality.php @@ -16,7 +16,7 @@

    - +
    forum_settings['o_avatars'] == '1'): ?>
    @@ -39,10 +39,10 @@
    diff --git a/style/FeatherBB/view/profile/section_privacy.php b/style/FeatherBB/view/profile/section_privacy.php index 1d972113..b3262b07 100644 --- a/style/FeatherBB/view/profile/section_privacy.php +++ b/style/FeatherBB/view/profile/section_privacy.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/upload_avatar.php b/style/FeatherBB/view/profile/upload_avatar.php index 91fb9425..a1cda00a 100644 --- a/style/FeatherBB/view/profile/upload_avatar.php +++ b/style/FeatherBB/view/profile/upload_avatar.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/register/rules.php b/style/FeatherBB/view/register/rules.php index 7f986063..edb24b38 100644 --- a/style/FeatherBB/view/register/rules.php +++ b/style/FeatherBB/view/register/rules.php @@ -17,7 +17,7 @@

    - +
    diff --git a/style/FeatherBB/view/search/footer.php b/style/FeatherBB/view/search/footer.php index a73ed5aa..1a77744e 100644 --- a/style/FeatherBB/view/search/footer.php +++ b/style/FeatherBB/view/search/footer.php @@ -31,7 +31,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    '.implode(' - ', $search['forum_actions']).'

    '."\n" : '') ?> diff --git a/style/FeatherBB/view/search/header.php b/style/FeatherBB/view/search/header.php index 01af597a..5d6eed99 100644 --- a/style/FeatherBB/view/search/header.php +++ b/style/FeatherBB/view/search/header.php @@ -17,7 +17,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/search/posts.php b/style/FeatherBB/view/search/posts.php index c575f9c2..def30d38 100644 --- a/style/FeatherBB/view/search/posts.php +++ b/style/FeatherBB/view/search/posts.php @@ -22,7 +22,7 @@ } ?>">

    # »  » 

    +} ?> »  » 
    @@ -46,8 +46,8 @@
      -
    • -
    • +
    • +
    diff --git a/style/FeatherBB/view/search/topics.php b/style/FeatherBB/view/search/topics.php index af843193..fc7df148 100644 --- a/style/FeatherBB/view/search/topics.php +++ b/style/FeatherBB/view/search/topics.php @@ -25,5 +25,5 @@
    - + \ No newline at end of file diff --git a/style/FeatherBB/view/userlist.php b/style/FeatherBB/view/userlist.php index 26c24027..fb8dd579 100644 --- a/style/FeatherBB/view/userlist.php +++ b/style/FeatherBB/view/userlist.php @@ -87,7 +87,7 @@ foreach ($userlist_data as $user) { ?> - +
    • -
    • » 
    • +
    • » 
    @@ -92,7 +92,7 @@
    • -
    • » 
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?>
    diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php index e982045b..cfd4c4c5 100644 --- a/style/FeatherBB/view/viewtopic.php +++ b/style/FeatherBB/view/viewtopic.php @@ -18,8 +18,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    @@ -40,7 +40,7 @@ echo ' blockpost1'; } ?>"> -

    #

    +

    #

    @@ -108,8 +108,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    @@ -126,7 +126,7 @@

    - +
    @@ -163,13 +163,13 @@
    diff --git a/view/admin/bans/admin_bans.php b/view/admin/bans/admin_bans.php index 3d714e7f..50e72e76 100644 --- a/view/admin/bans/admin_bans.php +++ b/view/admin/bans/admin_bans.php @@ -16,7 +16,7 @@

    - +
    @@ -39,7 +39,7 @@

    - +

    diff --git a/view/admin/bans/search_ban.php b/view/admin/bans/search_ban.php index 0d057182..676b3e63 100644 --- a/view/admin/bans/search_ban.php +++ b/view/admin/bans/search_ban.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -55,8 +55,8 @@
    - - + +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/view/admin/categories.php b/view/admin/categories.php index c8786528..370838ac 100644 --- a/view/admin/categories.php +++ b/view/admin/categories.php @@ -16,7 +16,7 @@

    - +
    @@ -27,7 +27,7 @@
    '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), - $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>url->get_link('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get_link('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get_link('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    '.feather_escape($user['username']).'' ?>url->get_link('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?> '.__('Results view IP link').' | '.__('Results show posts link').'' ?>url->get_link('admin/users/ip-stats/id/'.$user['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    '.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?>url->get_link('user/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?> '.__('Results view IP link').' | '.__('Results show posts link').'' ?>url->get_link('admin/users/ip-stats/id/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    '.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>url->get_link('post/'.$cur_search['last_post_id'].'/#p'.$cur_search['last_post_id']).'">'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
    '.feather_escape($user['username']).'' ?>url->get_link('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?> '.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>'.__('Edit').' | '.__('Remove').'' ?>url->get_link('user/'.$cur_ban['ban_creator'].'/').'">'.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>url->get_link('admin/bans/edit/'.$cur_ban['id'].'/').'">'.__('Edit').' | '.__('Remove').'' ?>
    - '.__('Forums').'') ?> + url->get_link('admin/forums').'">'.__('Forums').'') ?>
    @@ -39,7 +39,7 @@

    - +
    @@ -71,7 +71,7 @@

    - +
    diff --git a/view/admin/censoring.php b/view/admin/censoring.php index cf080869..69977dfa 100644 --- a/view/admin/censoring.php +++ b/view/admin/censoring.php @@ -16,13 +16,13 @@

    - +
    -

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    +

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    diff --git a/view/admin/forums/admin_forums.php b/view/admin/forums/admin_forums.php index e966e6f5..cbd5a6c0 100644 --- a/view/admin/forums/admin_forums.php +++ b/view/admin/forums/admin_forums.php @@ -16,7 +16,7 @@

    - +

    - +

    - + diff --git a/view/admin/forums/delete_forum.php b/view/admin/forums/delete_forum.php index 6a5263ba..86954f4d 100644 --- a/view/admin/forums/delete_forum.php +++ b/view/admin/forums/delete_forum.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/forums/permissions.php b/view/admin/forums/permissions.php index df092f46..8f358170 100644 --- a/view/admin/forums/permissions.php +++ b/view/admin/forums/permissions.php @@ -16,7 +16,7 @@

    - +

    diff --git a/view/admin/groups/admin_groups.php b/view/admin/groups/admin_groups.php index aff5db98..d776239e 100644 --- a/view/admin/groups/admin_groups.php +++ b/view/admin/groups/admin_groups.php @@ -18,7 +18,7 @@
    - +
    @@ -51,7 +51,7 @@
    - +
    @@ -95,7 +95,7 @@
    | |
    '."\n"; + echo "\t\t\t\t\t\t\t\t".''."\n"; } ?> diff --git a/view/admin/groups/confirm_delete.php b/view/admin/groups/confirm_delete.php index ca595ab3..df490091 100644 --- a/view/admin/groups/confirm_delete.php +++ b/view/admin/groups/confirm_delete.php @@ -16,10 +16,10 @@

    - +
    - +
    diff --git a/view/admin/groups/delete_group.php b/view/admin/groups/delete_group.php index aea315d0..a878dcbb 100644 --- a/view/admin/groups/delete_group.php +++ b/view/admin/groups/delete_group.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/index.php b/view/admin/index.php index f369b039..710a0e0e 100644 --- a/view/admin/index.php +++ b/view/admin/index.php @@ -35,7 +35,7 @@

    -

    '.__('Delete install file').'') ?>

    +

    url->get_link('admin/action/remove_install_file/').'">'.__('Delete install file').'') ?>

    @@ -45,11 +45,11 @@
    - forum_settings['o_cur_version'], ''.__('Check for upgrade').'') ?> + forum_settings['o_cur_version'], ''.__('Check for upgrade').'') ?>
    - +
    diff --git a/view/admin/maintenance/admin_maintenance.php b/view/admin/maintenance/admin_maintenance.php index 068b914b..6bd9ade5 100644 --- a/view/admin/maintenance/admin_maintenance.php +++ b/view/admin/maintenance/admin_maintenance.php @@ -16,13 +16,13 @@

    - +
    -

    '.__('Maintenance mode').'') ?>

    +

    url->get_link('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
    @@ -52,7 +52,7 @@ - +
    @@ -87,7 +87,7 @@
    -

    '.__('Maintenance mode').'') ?>

    +

    url->get_link('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    diff --git a/view/admin/maintenance/prune.php b/view/admin/maintenance/prune.php index 9e3b0d2b..fcfd7918 100644 --- a/view/admin/maintenance/prune.php +++ b/view/admin/maintenance/prune.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/maintenance/rebuild.php b/view/admin/maintenance/rebuild.php index 5bd6ffc0..b4f9434b 100644 --- a/view/admin/maintenance/rebuild.php +++ b/view/admin/maintenance/rebuild.php @@ -6,33 +6,12 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; } ?> - - - - - - -<?php echo generate_page_title($page_title) ?> - - - -

    -
    \ No newline at end of file + +

    url->get_link('admin/maintenance/').$query_str.'">'.__('Click here').'')?>

    diff --git a/view/admin/menu.php b/view/admin/menu.php index d958a4ab..abc7f7ed 100644 --- a/view/admin/menu.php +++ b/view/admin/menu.php @@ -22,20 +22,20 @@ > + ?>> > + ?>> user->g_mod_ban_users == '1'): ?> > + ?>> forum_settings['o_report_method'] == '0' || $feather->forum_settings['o_report_method'] == '2'): ?> > + ?>>
    @@ -51,35 +51,35 @@ > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>>
    @@ -97,7 +97,7 @@ $plugin) { - echo "\t\t\t\t\t".''.str_replace('_', ' ', $plugin).''."\n"; + echo "\t\t\t\t\t".''.str_replace('_', ' ', $plugin).''."\n"; } ?> diff --git a/view/admin/options.php b/view/admin/options.php index 88c2c0b6..161058ea 100644 --- a/view/admin/options.php +++ b/view/admin/options.php @@ -16,7 +16,7 @@

    - +

    @@ -421,7 +421,7 @@ - '.__('Censoring').'') ?> + url->get_link('admin/censoring/').'">'.__('Censoring').'') ?>
    - - + + @@ -74,14 +74,14 @@ ?>
    - '.feather_escape($report['zapped_by']).'' : __('NA')) ?> + url->get_link('user/'.$report['zapped_by_id'].'/').'">'.feather_escape($report['zapped_by']).'' : __('NA')) ?>
    '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), - $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>url->get_link('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get_link('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get_link('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    - - + + diff --git a/view/admin/statistics.php b/view/admin/statistics.php index 5306b027..d7e779d6 100644 --- a/view/admin/statistics.php +++ b/view/admin/statistics.php @@ -25,7 +25,7 @@ user->g_id == FEATHER_ADMIN): ?>

    - '.__('Show info').'') ?>
    + url->get_link('admin/phpinfo/').'">'.__('Show info').'') ?>
    diff --git a/view/admin/users/admin_users.php b/view/admin/users/admin_users.php index 27e99a16..20b0a521 100644 --- a/view/admin/users/admin_users.php +++ b/view/admin/users/admin_users.php @@ -16,7 +16,7 @@

    - +

    @@ -150,7 +150,7 @@

    - +
    diff --git a/view/admin/users/ban_users.php b/view/admin/users/ban_users.php index e929c043..1d7bebd2 100644 --- a/view/admin/users/ban_users.php +++ b/view/admin/users/ban_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/users/delete_users.php b/view/admin/users/delete_users.php index a82c22ec..29630f72 100644 --- a/view/admin/users/delete_users.php +++ b/view/admin/users/delete_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/users/find_users.php b/view/admin/users/find_users.php index d426177d..168ff16b 100644 --- a/view/admin/users/find_users.php +++ b/view/admin/users/find_users.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -28,7 +28,7 @@
    - +

    @@ -54,12 +54,12 @@ foreach ($user_data as $user) { ?>
    - + - + @@ -90,8 +90,8 @@ ?>
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/view/admin/users/move_users.php b/view/admin/users/move_users.php index d43303e8..ee7e6419 100644 --- a/view/admin/users/move_users.php +++ b/view/admin/users/move_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/users/search_ip.php b/view/admin/users/search_ip.php index a17e7ac5..ad3ce72a 100644 --- a/view/admin/users/search_ip.php +++ b/view/admin/users/search_ip.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -45,10 +45,10 @@ foreach ($ip_data as $ip) { ?>
    - + - +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/view/admin/users/show_users.php b/view/admin/users/show_users.php index 4ab008c7..b662779c 100644 --- a/view/admin/users/show_users.php +++ b/view/admin/users/show_users.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -51,12 +51,12 @@ if (isset($info['user_data'][$cur_poster['poster_id']])) { ?>
    - + - +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/view/delete.php b/view/delete.php index 8a2d6959..be4aa85c 100644 --- a/view/delete.php +++ b/view/delete.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -27,7 +27,7 @@

    - +
    diff --git a/view/edit.php b/view/edit.php index 829d0c17..0cce7ef5 100644 --- a/view/edit.php +++ b/view/edit.php @@ -20,8 +20,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -76,7 +76,7 @@

    - +
    @@ -89,10 +89,10 @@
    diff --git a/view/footer.php b/view/footer.php index 470d5c6b..b02351ce 100644 --- a/view/footer.php +++ b/view/footer.php @@ -72,7 +72,7 @@ foreach ($quickjump[(int) $feather->user->g_id] as $cat_id => $cat_data) { echo "\t\t\t\t\t\t\t".''."\n"; foreach ($cat_data['cat_forums'] as $forum) { - echo "\t\t\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t\t\t".''."\n"; } echo "\t\t\t\t\t\t\t".''."\n"; } ?> diff --git a/view/help.php b/view/help.php index d171ddab..af94b274 100644 --- a/view/help.php +++ b/view/help.php @@ -43,17 +43,17 @@

    [url=]forum_settings['o_board_title']) ?>[/url] forum_settings['o_board_title']) ?>

    [url][/url]

    -

    [url=/help/][/url]

    +

    [url=/help/][/url]

    [email]myname@example.com[/email] myname@example.com

    [email=myname@example.com][/email]

    -

    [topic=1][/topic]

    -

    [topic]1[/topic]

    -

    [post=1][/post]

    -

    [post]1[/post]

    -

    [forum=1][/forum]

    -

    [forum]1[/forum]

    -

    [user=2][/user]

    -

    [user]2[/user]

    +

    [topic=1][/topic]

    +

    [topic]1[/topic] url->get_link('topic/1/') ?>

    +

    [post=1][/post]

    +

    [post]1[/post] url->get_link('post/1/#p1') ?>

    +

    [forum=1][/forum]

    +

    [forum]1[/forum] url->get_link('forum/1/') ?>

    +

    [user=2][/user]

    +

    [user]2[/user] url->get_link('user/2/') ?>

    diff --git a/view/login/form.php b/view/login/form.php index 13d1744b..76d9cb3d 100644 --- a/view/login/form.php +++ b/view/login/form.php @@ -16,7 +16,7 @@

    - +
    @@ -32,7 +32,7 @@

    -

    +

    diff --git a/view/login/password_forgotten.php b/view/login/password_forgotten.php index 41c0a121..d9617fe9 100644 --- a/view/login/password_forgotten.php +++ b/view/login/password_forgotten.php @@ -39,7 +39,7 @@

    - +
    diff --git a/view/misc/email.php b/view/misc/email.php index 06f96f55..b4ed730d 100644 --- a/view/misc/email.php +++ b/view/misc/email.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/misc/report.php b/view/misc/report.php index 252042c7..1b55893b 100644 --- a/view/misc/report.php +++ b/view/misc/report.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -27,7 +27,7 @@

    - +
    diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index 8b636222..f6819d21 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -18,7 +18,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    @@ -28,7 +28,7 @@
    - +
    @@ -92,7 +92,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    diff --git a/view/moderate/posts_view.php b/view/moderate/posts_view.php index 482a1c49..ad68aa3d 100644 --- a/view/moderate/posts_view.php +++ b/view/moderate/posts_view.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -42,7 +42,7 @@ echo ' blockpost1'; } ?>"> -

    #

    +

    #

    @@ -85,8 +85,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    diff --git a/view/post.php b/view/post.php index ee2531da..1030f8d3 100644 --- a/view/post.php +++ b/view/post.php @@ -18,10 +18,10 @@
    • -
    • » 
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • -
    • » 
    • +
    • » 
    • » 
    @@ -121,10 +121,10 @@
    diff --git a/view/profile/change_mail.php b/view/profile/change_mail.php index f8d25e99..0c97e20c 100644 --- a/view/profile/change_mail.php +++ b/view/profile/change_mail.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/change_pass.php b/view/profile/change_pass.php index 3f4285fb..39cd0ed1 100644 --- a/view/profile/change_pass.php +++ b/view/profile/change_pass.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/delete_user.php b/view/profile/delete_user.php index 0fd42f52..c950017c 100644 --- a/view/profile/delete_user.php +++ b/view/profile/delete_user.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/menu.php b/view/profile/menu.php index 12b3b47f..73f384c8 100644 --- a/view/profile/menu.php +++ b/view/profile/menu.php @@ -22,32 +22,32 @@ > + ?>> > + ?>> > + ?>> forum_settings['o_avatars'] == '1' || $feather->forum_settings['o_signatures'] == '1'): ?> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
    diff --git a/view/profile/section_admin.php b/view/profile/section_admin.php index 18ba2f12..05d190f4 100644 --- a/view/profile/section_admin.php +++ b/view/profile/section_admin.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/section_display.php b/view/profile/section_display.php index ced4459f..209bf9b5 100644 --- a/view/profile/section_display.php +++ b/view/profile/section_display.php @@ -16,7 +16,7 @@

    - +

    - +
    @@ -24,7 +24,7 @@
    -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

    +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

    @@ -241,7 +241,7 @@
    -

    user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

    +

    user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

    diff --git a/view/profile/section_messaging.php b/view/profile/section_messaging.php index d944ee43..91532065 100644 --- a/view/profile/section_messaging.php +++ b/view/profile/section_messaging.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/section_personal.php b/view/profile/section_personal.php index a765e0aa..f9d9fea8 100644 --- a/view/profile/section_personal.php +++ b/view/profile/section_personal.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/section_personality.php b/view/profile/section_personality.php index 2b8f9c82..a1df5d8d 100644 --- a/view/profile/section_personality.php +++ b/view/profile/section_personality.php @@ -16,7 +16,7 @@

    - +
    forum_settings['o_avatars'] == '1'): ?>
    @@ -39,10 +39,10 @@
    diff --git a/view/profile/section_privacy.php b/view/profile/section_privacy.php index 1d972113..b3262b07 100644 --- a/view/profile/section_privacy.php +++ b/view/profile/section_privacy.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/upload_avatar.php b/view/profile/upload_avatar.php index 91fb9425..a1cda00a 100644 --- a/view/profile/upload_avatar.php +++ b/view/profile/upload_avatar.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/register/rules.php b/view/register/rules.php index 7f986063..edb24b38 100644 --- a/view/register/rules.php +++ b/view/register/rules.php @@ -17,7 +17,7 @@

    - +
    diff --git a/view/search/footer.php b/view/search/footer.php index a73ed5aa..1a77744e 100644 --- a/view/search/footer.php +++ b/view/search/footer.php @@ -31,7 +31,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    '.implode(' - ', $search['forum_actions']).'

    '."\n" : '') ?> diff --git a/view/search/header.php b/view/search/header.php index 01af597a..5d6eed99 100644 --- a/view/search/header.php +++ b/view/search/header.php @@ -17,7 +17,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    diff --git a/view/search/posts.php b/view/search/posts.php index c575f9c2..def30d38 100644 --- a/view/search/posts.php +++ b/view/search/posts.php @@ -22,7 +22,7 @@ } ?>">

    # »  » 

    +} ?> »  » 
    @@ -46,8 +46,8 @@
      -
    • -
    • +
    • +
    diff --git a/view/search/topics.php b/view/search/topics.php index af843193..fc7df148 100644 --- a/view/search/topics.php +++ b/view/search/topics.php @@ -25,5 +25,5 @@
    - + \ No newline at end of file diff --git a/view/userlist.php b/view/userlist.php index 26c24027..fb8dd579 100644 --- a/view/userlist.php +++ b/view/userlist.php @@ -87,7 +87,7 @@ foreach ($userlist_data as $user) { ?> - +
    • -
    • » 
    • +
    • » 
    @@ -92,7 +92,7 @@
    • -
    • » 
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?>
    diff --git a/view/viewtopic.php b/view/viewtopic.php index e982045b..cfd4c4c5 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -18,8 +18,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    @@ -40,7 +40,7 @@ echo ' blockpost1'; } ?>"> -

    #

    +

    #

    @@ -108,8 +108,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    @@ -126,7 +126,7 @@

    - +
    @@ -163,13 +163,13 @@
    From 42a8cc3f73007cfe99fead385ba0fbd57c3b73a7 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 28 Aug 2015 22:04:23 +0200 Subject: [PATCH 236/353] Rename get_link --- controller/admin/categories.php | 16 ++++---- controller/admin/forums.php | 18 ++++----- controller/admin/index.php | 2 +- controller/admin/parser.php | 6 +-- controller/edit.php | 2 +- controller/install.php | 2 +- controller/misc.php | 2 +- controller/moderate.php | 10 ++--- controller/post.php | 8 ++-- controller/profile.php | 8 ++-- controller/register.php | 2 +- controller/search.php | 2 +- controller/viewforum.php | 8 ++-- controller/viewtopic.php | 6 +-- extern.php | 14 +++---- include/classes/url.class.php | 4 +- include/parser.php | 2 +- model/admin/bans.php | 4 +- model/admin/censoring.php | 6 +-- model/admin/groups.php | 8 ++-- model/admin/maintenance.php | 2 +- model/admin/options.php | 2 +- model/admin/permissions.php | 2 +- model/admin/reports.php | 2 +- model/admin/users.php | 6 +-- model/delete.php | 4 +- model/index.php | 14 +++---- model/login.php | 4 +- model/misc.php | 14 +++---- model/moderate.php | 26 ++++++------ model/post.php | 18 ++++----- model/profile.php | 40 +++++++++---------- model/register.php | 10 ++--- model/search.php | 20 +++++----- model/viewforum.php | 16 ++++---- model/viewtopic.php | 30 +++++++------- plugins/test/plugintest.php | 4 +- .../FeatherBB/view/admin/bans/admin_bans.php | 4 +- .../FeatherBB/view/admin/bans/search_ban.php | 12 +++--- style/FeatherBB/view/admin/categories.php | 8 ++-- style/FeatherBB/view/admin/censoring.php | 4 +- .../view/admin/forums/admin_forums.php | 6 +-- .../view/admin/forums/delete_forum.php | 2 +- .../view/admin/forums/permissions.php | 2 +- .../view/admin/groups/admin_groups.php | 6 +-- .../view/admin/groups/confirm_delete.php | 4 +- .../view/admin/groups/delete_group.php | 2 +- style/FeatherBB/view/admin/index.php | 6 +-- .../admin/maintenance/admin_maintenance.php | 8 ++-- .../view/admin/maintenance/prune.php | 2 +- .../view/admin/maintenance/rebuild.php | 4 +- style/FeatherBB/view/admin/menu.php | 26 ++++++------ style/FeatherBB/view/admin/options.php | 4 +- style/FeatherBB/view/admin/parser.php | 2 +- style/FeatherBB/view/admin/permissions.php | 2 +- style/FeatherBB/view/admin/reports.php | 20 +++++----- style/FeatherBB/view/admin/statistics.php | 2 +- .../view/admin/users/admin_users.php | 4 +- .../FeatherBB/view/admin/users/ban_users.php | 2 +- .../view/admin/users/delete_users.php | 2 +- .../FeatherBB/view/admin/users/find_users.php | 14 +++---- .../FeatherBB/view/admin/users/move_users.php | 2 +- .../FeatherBB/view/admin/users/search_ip.php | 12 +++--- .../FeatherBB/view/admin/users/show_users.php | 12 +++--- style/FeatherBB/view/delete.php | 6 +-- style/FeatherBB/view/edit.php | 14 +++---- style/FeatherBB/view/footer.new.php | 18 ++++----- style/FeatherBB/view/footer.php | 18 ++++----- style/FeatherBB/view/header.new.php | 28 ++++++------- style/FeatherBB/view/help.php | 18 ++++----- style/FeatherBB/view/login/form.php | 4 +- .../view/login/password_forgotten.php | 2 +- style/FeatherBB/view/misc/email.php | 2 +- style/FeatherBB/view/misc/report.php | 6 +-- .../view/moderate/moderator_forum.php | 6 +-- style/FeatherBB/view/moderate/posts_view.php | 10 ++--- style/FeatherBB/view/post.php | 12 +++--- style/FeatherBB/view/profile/change_mail.php | 2 +- style/FeatherBB/view/profile/change_pass.php | 2 +- style/FeatherBB/view/profile/delete_user.php | 2 +- style/FeatherBB/view/profile/menu.php | 14 +++---- .../FeatherBB/view/profile/section_admin.php | 2 +- .../view/profile/section_display.php | 2 +- .../view/profile/section_essentials.php | 6 +-- .../view/profile/section_messaging.php | 2 +- .../view/profile/section_personal.php | 2 +- .../view/profile/section_personality.php | 10 ++--- .../view/profile/section_privacy.php | 2 +- .../FeatherBB/view/profile/upload_avatar.php | 2 +- style/FeatherBB/view/register/rules.php | 2 +- style/FeatherBB/view/search/footer.php | 2 +- style/FeatherBB/view/search/header.php | 2 +- style/FeatherBB/view/search/posts.php | 6 +-- style/FeatherBB/view/search/topics.php | 2 +- style/FeatherBB/view/userlist.php | 2 +- style/FeatherBB/view/viewforum.php | 4 +- style/FeatherBB/view/viewtopic.php | 20 +++++----- view/admin/bans/admin_bans.php | 4 +- view/admin/bans/search_ban.php | 12 +++--- view/admin/categories.php | 8 ++-- view/admin/censoring.php | 4 +- view/admin/forums/admin_forums.php | 6 +-- view/admin/forums/delete_forum.php | 2 +- view/admin/forums/permissions.php | 2 +- view/admin/groups/admin_groups.php | 6 +-- view/admin/groups/confirm_delete.php | 4 +- view/admin/groups/delete_group.php | 2 +- view/admin/index.php | 6 +-- view/admin/maintenance/admin_maintenance.php | 8 ++-- view/admin/maintenance/prune.php | 2 +- view/admin/maintenance/rebuild.php | 4 +- view/admin/menu.php | 26 ++++++------ view/admin/options.php | 4 +- view/admin/parser.php | 2 +- view/admin/permissions.php | 2 +- view/admin/reports.php | 20 +++++----- view/admin/statistics.php | 2 +- view/admin/users/admin_users.php | 4 +- view/admin/users/ban_users.php | 2 +- view/admin/users/delete_users.php | 2 +- view/admin/users/find_users.php | 14 +++---- view/admin/users/move_users.php | 2 +- view/admin/users/search_ip.php | 12 +++--- view/admin/users/show_users.php | 12 +++--- view/delete.php | 6 +-- view/edit.php | 14 +++---- view/footer.php | 18 ++++----- view/help.php | 18 ++++----- view/login/form.php | 4 +- view/login/password_forgotten.php | 2 +- view/misc/email.php | 2 +- view/misc/report.php | 6 +-- view/moderate/moderator_forum.php | 6 +-- view/moderate/posts_view.php | 10 ++--- view/post.php | 12 +++--- view/profile/change_mail.php | 2 +- view/profile/change_pass.php | 2 +- view/profile/delete_user.php | 2 +- view/profile/menu.php | 14 +++---- view/profile/section_admin.php | 2 +- view/profile/section_display.php | 2 +- view/profile/section_essentials.php | 6 +-- view/profile/section_messaging.php | 2 +- view/profile/section_personal.php | 2 +- view/profile/section_personality.php | 10 ++--- view/profile/section_privacy.php | 2 +- view/profile/upload_avatar.php | 2 +- view/register/rules.php | 2 +- view/search/footer.php | 2 +- view/search/header.php | 2 +- view/search/posts.php | 6 +-- view/search/topics.php | 2 +- view/userlist.php | 2 +- view/viewforum.php | 4 +- view/viewtopic.php | 20 +++++----- 155 files changed, 555 insertions(+), 555 deletions(-) diff --git a/controller/admin/categories.php b/controller/admin/categories.php index 4da8c180..5ad70ca7 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -31,13 +31,13 @@ public function add_category() { $cat_name = feather_trim($this->request->post('cat_name')); if ($cat_name == '') { - redirect($this->feather->url->get_link('admin/categories/'), __('Must enter name message')); + redirect($this->feather->url->get('admin/categories/'), __('Must enter name message')); } if ($this->model->add_category($cat_name)) { - redirect($this->feather->url->get_link('admin/categories/'), __('Category added redirect')); + redirect($this->feather->url->get('admin/categories/'), __('Category added redirect')); } else { //TODO, add error message - redirect($this->feather->url->get_link('admin/categories/'), __('Category added redirect')); + redirect($this->feather->url->get('admin/categories/'), __('Category added redirect')); } } @@ -52,7 +52,7 @@ public function edit_categories() 'name' => feather_escape($properties['name']), 'order' => (int) $properties['order'], ); if ($category['name'] == '') { - redirect($this->feather->url->get_link('admin/categories/'), __('Must enter name message')); + redirect($this->feather->url->get('admin/categories/'), __('Must enter name message')); } $this->model->update_category($category); } @@ -60,7 +60,7 @@ public function edit_categories() // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect($this->feather->url->get_link('admin/categories/'), __('Categories updated redirect')); + redirect($this->feather->url->get('admin/categories/'), __('Categories updated redirect')); } public function delete_category() @@ -72,13 +72,13 @@ public function delete_category() } if (intval($this->request->post('disclaimer')) != 1) { - redirect($this->feather->url->get_link('admin/categories/'), __('Delete category not validated')); + redirect($this->feather->url->get('admin/categories/'), __('Delete category not validated')); } if ($this->model->delete_category($cat_to_delete)) { - redirect($this->feather->url->get_link('admin/categories/'), __('Category deleted redirect')); + redirect($this->feather->url->get('admin/categories/'), __('Category deleted redirect')); } else { - redirect($this->feather->url->get_link('admin/categories/'), __('Unable to delete category')); + redirect($this->feather->url->get('admin/categories/'), __('Unable to delete category')); } } diff --git a/controller/admin/forums.php b/controller/admin/forums.php index 55e3df55..d7902cd4 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -36,15 +36,15 @@ public function add_forum() $cat_id = (int) $this->request->post('cat'); if ($cat_id < 1) { - redirect($this->feather->url->get_link('admin/forums/'), __('Must be valid category')); + redirect($this->feather->url->get('admin/forums/'), __('Must be valid category')); } if ($fid = $this->model->add_forum($cat_id, __('New forum'))) { // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect($this->feather->url->get_link('admin/forums/edit/'.$fid.'/'), __('Forum added redirect')); + redirect($this->feather->url->get('admin/forums/edit/'.$fid.'/'), __('Forum added redirect')); } else { - redirect($this->feather->url->get_link('admin/forums/'), __('Unable to add forum')); + redirect($this->feather->url->get('admin/forums/'), __('Unable to add forum')); } } @@ -61,10 +61,10 @@ public function edit_forum($forum_id) 'redirect_url' => url_valid($this->request->post('redirect_url')) ? feather_escape($this->request->post('redirect_url')) : NULL); if ($forum_data['forum_name'] == '') { - redirect($this->feather->url->get_link('admin/forums/edit/'.$forum_id.'/'), __('Must enter name message')); + redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Must enter name message')); } if ($forum_data['cat_id'] < 1) { - redirect($this->feather->url->get_link('admin/forums/edit/'.$forum_id.'/'), __('Must be valid category')); + redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Must be valid category')); } $this->model->update_forum($forum_id, $forum_data); @@ -100,7 +100,7 @@ public function edit_forum($forum_id) // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect($this->feather->url->get_link('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); + redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); } elseif ($this->request->post('revert_perms')) { $this->model->delete_permissions($forum_id); @@ -108,7 +108,7 @@ public function edit_forum($forum_id) // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect($this->feather->url->get_link('admin/forums/edit/'.$forum_id.'/'), __('Perms reverted redirect')); + redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Perms reverted redirect')); } } else { @@ -134,7 +134,7 @@ public function delete_forum($forum_id) // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect($this->feather->url->get_link('admin/forums/'), __('Forum deleted redirect')); + redirect($this->feather->url->get('admin/forums/'), __('Forum deleted redirect')); } else { // If the user hasn't confirmed @@ -162,7 +162,7 @@ public function edit_positions() // Regenerate the quick jump cache $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); - redirect($this->feather->url->get_link('admin/forums/'), __('Forums updated redirect')); + redirect($this->feather->url->get('admin/forums/'), __('Forums updated redirect')); } public function display() diff --git a/controller/admin/index.php b/controller/admin/index.php index 6ecdb650..d4f46e6b 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -65,7 +65,7 @@ public function display($action = null) $deleted = $this->remove_install_folder($this->feather->forum_env['FEATHER_ROOT'].'install'); if ($deleted) { - redirect($this->feather->url->get_link('admin/'), __('Deleted install.php redirect')); + redirect($this->feather->url->get('admin/'), __('Deleted install.php redirect')); } else { message(__('Delete install.php failed')); } diff --git a/controller/admin/parser.php b/controller/admin/parser.php index 3889a2c4..c7886c16 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -41,7 +41,7 @@ public function display() if ($this->request->post('reset') || !file_exists($cache_file)) { require_once(FEATHER_ROOT.'include/bbcd_source.php'); require_once(FEATHER_ROOT.'include/bbcd_compile.php'); - redirect($this->feather->url->get_link('admin/parser/'), $lang_admin_parser['reset_success']); + redirect($this->feather->url->get('admin/parser/'), $lang_admin_parser['reset_success']); } // Load the current BBCode $pd array from include/parser_data.inc.php. @@ -65,7 +65,7 @@ public function display() if (preg_match('%^image/%', $f['type'])) { // If we have an image file type? if ($f['size'] > 0 && $f['size'] <= $this->config['o_avatars_size']) { if (move_uploaded_file($f['tmp_name'], FEATHER_ROOT .'img/smilies/'. $name)) { - redirect($this->feather->url->get_link('admin/parser/'), $lang_admin_parser['upload success']); + redirect($this->feather->url->get('admin/parser/'), $lang_admin_parser['upload success']); } else { // Error #1: 'Smiley upload failed. Unable to move to smiley folder.'. message($lang_admin_parser['upload_err_1']); } @@ -199,7 +199,7 @@ public function display() } require_once('include/bbcd_compile.php'); // Compile $bbcd and save into $pd['bbcd'] - redirect($this->feather->url->get_link('admin/parser/'), $lang_admin_parser['save_success']); + redirect($this->feather->url->get('admin/parser/'), $lang_admin_parser['save_success']); } \FeatherBB\AdminUtils::generateAdminMenu('parser'); diff --git a/controller/edit.php b/controller/edit.php index 8fbdeef5..2a8afaae 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -76,7 +76,7 @@ public function editpost($id) // Edit the post $this->model->edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod); - redirect($this->feather->url->get_link('post/'.$id.'/#p'.$id), __('Post redirect')); + redirect($this->feather->url->get('post/'.$id.'/#p'.$id), __('Post redirect')); } } else { $post = ''; diff --git a/controller/install.php b/controller/install.php index bdc8cf24..fc11fe6a 100644 --- a/controller/install.php +++ b/controller/install.php @@ -203,7 +203,7 @@ public function create_db(array $data) $flash->save(); // Redirect to homepage - redirect($this->feather->url->get_link('/')); + redirect($this->feather->url->get('/')); } public function write_config($json) diff --git a/controller/misc.php b/controller/misc.php index 77f6491b..4f887129 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -55,7 +55,7 @@ public function markforumread($id) $tracked_topics['forums'][$id] = time(); set_tracked_topics($tracked_topics); - redirect($this->feather->url->get_link('forum/'.$id.'/'), __('Mark forum read redirect')); + redirect($this->feather->url->get('forum/'.$id.'/'), __('Mark forum read redirect')); } public function subscribeforum($id) diff --git a/controller/moderate.php b/controller/moderate.php index 758ad1c4..a8cd1761 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -99,7 +99,7 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = if ($action == 'stick') { $this->model->stick_topic($id, $fid); - redirect($this->feather->url->get_link('topic/'.$id.'/'), __('Stick topic redirect')); + redirect($this->feather->url->get('topic/'.$id.'/'), __('Stick topic redirect')); } @@ -107,21 +107,21 @@ public function moderatetopic($id = null, $fid = null, $action = null, $param = if ($action == 'unstick') { $this->model->unstick_topic($id, $fid); - redirect($this->feather->url->get_link('topic/'.$id.'/'), __('Unstick topic redirect')); + redirect($this->feather->url->get('topic/'.$id.'/'), __('Unstick topic redirect')); } // Open a topic if ($action == 'open') { $this->model->open_topic($id, $fid); - redirect($this->feather->url->get_link('topic/'.$id.'/'), __('Open topic redirect')); + redirect($this->feather->url->get('topic/'.$id.'/'), __('Open topic redirect')); } // Close a topic if ($action == 'close') { $this->model->close_topic($id, $fid); - redirect($this->feather->url->get_link('topic/'.$id.'/'), __('Close topic redirect')); + redirect($this->feather->url->get('topic/'.$id.'/'), __('Close topic redirect')); } $cur_topic = $this->model->get_topic_info($fid, $id); @@ -352,7 +352,7 @@ public function dealposts($fid) $this->model->close_multiple_topics($action, $topics, $fid); $redirect_msg = ($action) ? __('Close topics redirect') : __('Open topics redirect'); - redirect($this->feather->url->get_link('moderate/forum/'.$fid.'/'), $redirect_msg); + redirect($this->feather->url->get('moderate/forum/'.$fid.'/'), $redirect_msg); } } } diff --git a/controller/post.php b/controller/post.php index ec676380..9a27fdd4 100644 --- a/controller/post.php +++ b/controller/post.php @@ -120,7 +120,7 @@ public function newpost($fid = null, $tid = null, $qid = null) $this->model->increment_post_count($post, $new['tid']); } - redirect($this->feather->url->get_link('post/'.$new['pid'].'/#p'.$new['pid']), __('Post redirect')); + redirect($this->feather->url->get('post/'.$new['pid'].'/#p'.$new['pid']), __('Post redirect')); } } @@ -129,18 +129,18 @@ public function newpost($fid = null, $tid = null, $qid = null) // If a topic ID was specified in the url (it's a reply) if ($tid) { $action = __('Post a reply'); - $form = ''; + $form = ''; // If a quote ID was specified in the url if (isset($qid)) { $quote = $this->model->get_quote_message($qid, $tid); - $form = ''; + $form = ''; } } // If a forum ID was specified in the url (new topic) elseif ($fid) { $action = __('Post new topic'); - $form = ''; + $form = ''; } else { message(__('Bad request'), '404'); } diff --git a/controller/profile.php b/controller/profile.php index a05d9b5f..c0baa91a 100644 --- a/controller/profile.php +++ b/controller/profile.php @@ -166,13 +166,13 @@ public function display($id, $section = null) message(__('Bad request'), '404'); } - $avatar_field = ''.__('Change avatar').''; + $avatar_field = ''.__('Change avatar').''; $user_avatar = generate_avatar_markup($id); if ($user_avatar) { - $avatar_field .= ' '.__('Delete avatar').''; + $avatar_field .= ' '.__('Delete avatar').''; } else { - $avatar_field = ''.__('Upload avatar').''; + $avatar_field = ''.__('Upload avatar').''; } if ($user['signature'] != '') { @@ -312,7 +312,7 @@ public function action($id, $action) $this->model->delete_avatar($id); - redirect($this->feather->url->get_link('user/'.$id.'/section/personality/'), __('Avatar deleted redirect')); + redirect($this->feather->url->get('user/'.$id.'/section/personality/'), __('Avatar deleted redirect')); } elseif ($action == 'promote') { if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_promote_users == '0')) { message(__('No permission'), '403'); diff --git a/controller/register.php b/controller/register.php index e2963cee..0223fd76 100644 --- a/controller/register.php +++ b/controller/register.php @@ -98,7 +98,7 @@ public function rules() } if ($this->config['o_rules'] != '1') { - redirect($this->feather->url->get_link('register/agree/')); + redirect($this->feather->url->get('register/agree/')); } $this->feather->view2->setPageInfo(array( diff --git a/controller/search.php b/controller/search.php index 9405fbeb..d96cba10 100644 --- a/controller/search.php +++ b/controller/search.php @@ -90,6 +90,6 @@ public function display() public function quicksearches($show) { - redirect($this->feather->url->get_link('search/?action=show_'.$show)); + redirect($this->feather->url->get('search/?action=show_'.$show)); } } diff --git a/controller/viewforum.php b/controller/viewforum.php index f1f07a67..694c4712 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -50,7 +50,7 @@ public function display($id, $name = null, $page = null) // Can we or can we not post new topics? if (($cur_forum['post_topics'] == '' && $this->feather->user->g_post_topics == '1') || $cur_forum['post_topics'] == '1' || $is_admmod) { - $post_link = "\t\t\t".''."\n"; + $post_link = "\t\t\t".''."\n"; } else { $post_link = ''; } @@ -67,13 +67,13 @@ public function display($id, $name = null, $page = null) $forum_actions = $this->model->get_forum_actions($id, $this->feather->forum_settings['o_forum_subscriptions'], $cur_forum['is_subscribed']); - $this->feather->view2->addAsset('canonical', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/')); + $this->feather->view2->addAsset('canonical', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/')); if ($num_pages > 1) { if ($p > 1) { - $this->feather->view2->addAsset('prev', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); + $this->feather->view2->addAsset('prev', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); } if ($p < $num_pages) { - $this->feather->view2->addAsset('next', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); + $this->feather->view2->addAsset('next', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); } } diff --git a/controller/viewtopic.php b/controller/viewtopic.php index a8bf757a..17fb2608 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -91,13 +91,13 @@ public function display($id = null, $name = null, $page = null, $pid = null) 'promptQuote' => __('promptQuote') ); - $this->feather->view2->addAsset('canonical', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/')); + $this->feather->view2->addAsset('canonical', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/')); if ($num_pages > 1) { if ($p > 1) { - $this->feather->view2->addAsset('prev', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); + $this->feather->view2->addAsset('prev', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); } if ($p < $num_pages) { - $this->feather->view2->addAsset('next', $this->feather->url->get_link('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); + $this->feather->view2->addAsset('next', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); } } diff --git a/extern.php b/extern.php index 656aa1ea..94076507 100644 --- a/extern.php +++ b/extern.php @@ -484,7 +484,7 @@ function output_html($feed) // Setup the feed $feed = array( 'title' => $feather->forum_settings['o_board_title'].__('Title separator').$cur_topic['subject'], - 'link' => get_link('topic/'.$tid.'/'.url_friendly($cur_topic['subject']).'/'), + 'link' => get('topic/'.$tid.'/'.url_friendly($cur_topic['subject']).'/'), 'description' => sprintf(__('RSS description topic'), $cur_topic['subject']), 'items' => array(), 'type' => 'posts' @@ -508,7 +508,7 @@ function output_html($feed) $item = array( 'id' => $cur_post['id'], 'title' => $cur_topic['first_post_id'] == $cur_post['id'] ? $cur_topic['subject'] : __('RSS reply').$cur_topic['subject'], - 'link' => get_link('post/'.$cur_post['id'].'/#p'.$cur_post['id']), + 'link' => get('post/'.$cur_post['id'].'/#p'.$cur_post['id']), 'description' => $cur_post['message'], 'author' => array( 'name' => $cur_post['poster'], @@ -521,7 +521,7 @@ function output_html($feed) $item['author']['email'] = $cur_post['email']; } - $item['author']['uri'] = get_link('user/'.$cur_post['poster_id'].'/'); + $item['author']['uri'] = get('user/'.$cur_post['poster_id'].'/'); } elseif ($cur_post['poster_email'] != '' && !$feather->user->is_guest) { $item['author']['email'] = $cur_post['poster_email']; } @@ -626,7 +626,7 @@ function output_html($feed) $item = array( 'id' => $cur_topic['id'], 'title' => $cur_topic['subject'], - 'link' => get_link('topic/'.$cur_topic['id'].'/'.url_friendly($cur_topic['subject']).'/').($order_posted ? '' : '/action/new/'), + 'link' => get('topic/'.$cur_topic['id'].'/'.url_friendly($cur_topic['subject']).'/').($order_posted ? '' : '/action/new/'), 'description' => $cur_topic['message'], 'author' => array( 'name' => $order_posted ? $cur_topic['poster'] : $cur_topic['last_poster'] @@ -639,7 +639,7 @@ function output_html($feed) $item['author']['email'] = $cur_topic['email']; } - $item['author']['uri'] = get_link('user/'.$cur_topic['poster_id'].'/'); + $item['author']['uri'] = get('user/'.$cur_topic['poster_id'].'/'); } elseif ($cur_topic['poster_email'] != '' && !$feather->user->is_guest) { $item['author']['email'] = $cur_topic['poster_email']; } @@ -700,7 +700,7 @@ function output_html($feed) foreach ($result as $feather_user_online) { if ($feather_user_online['user_id'] > 1) { - $users[] = ($feather->user->g_view_users == '1') ? ''.feather_escape($feather_user_online['ident']).'' : feather_escape($feather_user_online['ident']); + $users[] = ($feather->user->g_view_users == '1') ? ''.feather_escape($feather_user_online['ident']).'' : feather_escape($feather_user_online['ident']); ++$num_users; } else { ++$num_guests; @@ -748,7 +748,7 @@ function output_html($feed) header('Pragma: public'); echo sprintf(__('No of users'), forum_number_format($stats['total_users'])).'
    '."\n"; - echo sprintf(__('Newest user'), (($feather->user->g_view_users == '1') ? ''.feather_escape($stats['last_user']['username']).'' : feather_escape($stats['last_user']['username']))).'
    '."\n"; + echo sprintf(__('Newest user'), (($feather->user->g_view_users == '1') ? ''.feather_escape($stats['last_user']['username']).'' : feather_escape($stats['last_user']['username']))).'
    '."\n"; echo sprintf(__('No of topics'), forum_number_format($stats['total_topics'])).'
    '."\n"; echo sprintf(__('No of posts'), forum_number_format($stats['total_posts'])).'
    '."\n"; diff --git a/include/classes/url.class.php b/include/classes/url.class.php index f9340f33..87a43f76 100644 --- a/include/classes/url.class.php +++ b/include/classes/url.class.php @@ -726,7 +726,7 @@ public function url_friendly($str) // Generate link to another page on the forum // Inspired by (c) Panther // - public function get_link($link, $args = null) + public function get($link, $args = null) { if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) { // If we have Apache's mod_rewrite enabled $base_url = get_base_url(); @@ -758,7 +758,7 @@ private function get_sublink($link, $sublink, $subarg, $args = null) $base_url = get_base_url(); if ($sublink == 'p$1' && $subarg == 1) { - return $this->get_link($link, $args); + return $this->get($link, $args); } $gen_link = $link; diff --git a/include/parser.php b/include/parser.php index 69ee422d..331ab973 100644 --- a/include/parser.php +++ b/include/parser.php @@ -881,7 +881,7 @@ function _parse_bbcode_callback($matches) $attribute = preg_replace('/\s*#\d++$/S', '', $attribute); // Strip post id from attribute. $attribute .= ' '. __('wrote'); // Append language-specific "wrote:". if ($pd['config']['quote_links']) { - $attribute = ' '. $attribute .''; + $attribute = ' '. $attribute .''; } } else { $attribute .= ' '. __('wrote'); diff --git a/model/admin/bans.php b/model/admin/bans.php index f89d6054..42feda83 100644 --- a/model/admin/bans.php +++ b/model/admin/bans.php @@ -276,7 +276,7 @@ public function insert_ban() // Regenerate the bans cache $this->feather->cache->store('bans', \model\cache::get_bans()); - redirect($this->feather->url->get_link('admin/bans/'), __('Ban edited redirect')); + redirect($this->feather->url->get('admin/bans/'), __('Ban edited redirect')); } public function remove_ban($ban_id) @@ -291,7 +291,7 @@ public function remove_ban($ban_id) // Regenerate the bans cache $this->feather->cache->store('bans', \model\cache::get_bans()); - redirect($this->feather->url->get_link('admin/bans/'), __('Ban removed redirect')); + redirect($this->feather->url->get('admin/bans/'), __('Ban removed redirect')); } public function find_ban($start_from = false) diff --git a/model/admin/censoring.php b/model/admin/censoring.php index 488e94be..1385e7b1 100644 --- a/model/admin/censoring.php +++ b/model/admin/censoring.php @@ -46,7 +46,7 @@ public function add_word() $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); - redirect($this->feather->url->get_link('admin/censoring/'), __('Word added redirect')); + redirect($this->feather->url->get('admin/censoring/'), __('Word added redirect')); } public function update_word() @@ -74,7 +74,7 @@ public function update_word() $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); - redirect($this->feather->url->get_link('admin/censoring/'), __('Word updated redirect')); + redirect($this->feather->url->get('admin/censoring/'), __('Word updated redirect')); } public function remove_word() @@ -90,7 +90,7 @@ public function remove_word() $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); - redirect($this->feather->url->get_link('admin/censoring/'), __('Word removed redirect')); + redirect($this->feather->url->get('admin/censoring/'), __('Word removed redirect')); } public function get_words() diff --git a/model/admin/groups.php b/model/admin/groups.php index 88ac1247..e52208c5 100644 --- a/model/admin/groups.php +++ b/model/admin/groups.php @@ -258,9 +258,9 @@ public function add_edit_group($groups) $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); if ($this->request->post('mode') == 'edit') { - redirect($this->feather->url->get_link('admin/groups/'), __('Group edited redirect')); + redirect($this->feather->url->get('admin/groups/'), __('Group edited redirect')); } else { - redirect($this->feather->url->get_link('admin/groups/'), __('Group added redirect')); + redirect($this->feather->url->get('admin/groups/'), __('Group added redirect')); } } @@ -285,7 +285,7 @@ public function set_default_group($groups) // Regenerate the config cache $this->feather->cache->store('config', \model\cache::get_config()); - redirect($this->feather->url->get_link('admin/groups/'), __('Default group redirect')); + redirect($this->feather->url->get('admin/groups/'), __('Default group redirect')); } public function check_members($group_id) @@ -328,7 +328,7 @@ public function delete_group($group_id) DB::for_table('groups')->where('g_promote_next_group', $group_id) ->update_many('g_promote_next_group', 0); - redirect($this->feather->url->get_link('admin/groups/'), __('Group removed redirect')); + redirect($this->feather->url->get('admin/groups/'), __('Group removed redirect')); } public function get_group_title($group_id) diff --git a/model/admin/maintenance.php b/model/admin/maintenance.php index 5d9636a5..2ae02599 100644 --- a/model/admin/maintenance.php +++ b/model/admin/maintenance.php @@ -211,7 +211,7 @@ public function prune_comply($prune_from, $prune_sticky) ->delete_many(); } - redirect($this->feather->url->get_link('admin/maintenance/'), __('Posts pruned redirect')); + redirect($this->feather->url->get('admin/maintenance/'), __('Posts pruned redirect')); } public function get_info_prune($prune_sticky, $prune_from) diff --git a/model/admin/options.php b/model/admin/options.php index c0adf8c3..d79e37b3 100644 --- a/model/admin/options.php +++ b/model/admin/options.php @@ -230,7 +230,7 @@ public function update_options() $this->feather->cache->store('config', \model\cache::get_config()); $this->clear_feed_cache(); - redirect($this->feather->url->get_link('admin/options/'), __('Options updated redirect')); + redirect($this->feather->url->get('admin/options/'), __('Options updated redirect')); } public function clear_feed_cache() diff --git a/model/admin/permissions.php b/model/admin/permissions.php index 42a3ea46..5267b64b 100644 --- a/model/admin/permissions.php +++ b/model/admin/permissions.php @@ -48,6 +48,6 @@ public function update_permissions() generate_config_cache(); - redirect($this->feather->url->get_link('admin/permissions/'), __('Perms updated redirect')); + redirect($this->feather->url->get('admin/permissions/'), __('Perms updated redirect')); } } diff --git a/model/admin/reports.php b/model/admin/reports.php index af24e0fd..23c768dc 100644 --- a/model/admin/reports.php +++ b/model/admin/reports.php @@ -58,7 +58,7 @@ public function zap_report() ->delete_many(); } - redirect($this->feather->url->get_link('admin/reports/'), __('Report zapped redirect')); + redirect($this->feather->url->get('admin/reports/'), __('Report zapped redirect')); } public function get_reports() diff --git a/model/admin/users.php b/model/admin/users.php index 0ac78492..e14f0034 100644 --- a/model/admin/users.php +++ b/model/admin/users.php @@ -237,7 +237,7 @@ public function move_users() DB::for_table('users')->where_in('id', $move['user_ids']) ->update_many('group_id', $new_group); - redirect($this->feather->url->get_link('admin/users/'), __('Users move redirect')); + redirect($this->feather->url->get('admin/users/'), __('Users move redirect')); } $move = $this->hook->fire('model.users.move_users.move', $move); @@ -402,7 +402,7 @@ public function delete_users() $stats = $this->feather->cache->retrieve('users_info'); - redirect($this->feather->url->get_link('admin/users/'), __('Users delete redirect')); + redirect($this->feather->url->get('admin/users/'), __('Users delete redirect')); } return $user_ids; @@ -521,7 +521,7 @@ public function ban_users() // Regenerate the bans cache $this->feather->cache->store('bans', \model\cache::get_bans()); - redirect($this->feather->url->get_link('admin/users/'), __('Users banned redirect')); + redirect($this->feather->url->get('admin/users/'), __('Users banned redirect')); } } return $user_ids; diff --git a/model/delete.php b/model/delete.php index 1ef9b86b..8033ab21 100644 --- a/model/delete.php +++ b/model/delete.php @@ -65,7 +65,7 @@ public function handle_deletion($is_topic_post, $id, $tid, $fid) delete_topic($tid); update_forum($fid); - redirect($this->feather->url->get_link('forum/'.$fid.'/'), __('Topic del redirect')); + redirect($this->feather->url->get('forum/'.$fid.'/'), __('Topic del redirect')); } else { $this->hook->fire('handle_deletion', $tid, $fid, $id); @@ -84,7 +84,7 @@ public function handle_deletion($is_topic_post, $id, $tid, $fid) $post = $post->find_one(); - redirect($this->feather->url->get_link('post/'.$post['id'].'/#p'.$post['id']), __('Post del redirect')); + redirect($this->feather->url->get('post/'.$post['id'].'/#p'.$post['id']), __('Post del redirect')); } } } diff --git a/model/index.php b/model/index.php index 978d7363..488e18ff 100644 --- a/model/index.php +++ b/model/index.php @@ -49,7 +49,7 @@ public function get_forum_actions() // Display a "mark all as read" link if (!$this->user->is_guest) { - $forum_actions[] = ''.__('Mark all as read').''; + $forum_actions[] = ''.__('Mark all as read').''; } $forum_actions = $this->hook->fire('get_forum_actions', $forum_actions); @@ -177,7 +177,7 @@ public function print_categories_forums() // Are there new posts since our last visit? if (isset($new_topics[$cur_forum->fid])) { $cur_forum->item_status .= ' inew'; - $forum_field_new = '[ '.__('New posts').' ]'; + $forum_field_new = '[ '.__('New posts').' ]'; $cur_forum->icon_type = 'icon icon-new'; } @@ -188,7 +188,7 @@ public function print_categories_forums() $cur_forum->item_status .= ' iredirect'; $cur_forum->icon_type = 'icon'; } else { - $cur_forum->forum_field = '

    '.feather_escape($cur_forum->forum_name).''.(!empty($forum_field_new) ? ' '.$forum_field_new : '').'

    '; + $cur_forum->forum_field = '

    '.feather_escape($cur_forum->forum_name).''.(!empty($forum_field_new) ? ' '.$forum_field_new : '').'

    '; $cur_forum->num_topics_formatted = $cur_forum->num_topics; $cur_forum->num_posts_formatted = $cur_forum->num_posts; } @@ -199,7 +199,7 @@ public function print_categories_forums() // If there is a last_post/last_poster if ($cur_forum->last_post != '') { - $cur_forum->last_post_formatted = ''.format_time($cur_forum->last_post).' '.__('by').' '.feather_escape($cur_forum->last_poster).''; + $cur_forum->last_post_formatted = ''.format_time($cur_forum->last_post).' '.__('by').' '.feather_escape($cur_forum->last_poster).''; } elseif ($cur_forum->redirect_url != '') { $cur_forum->last_post_formatted = '- - -'; } else { @@ -212,7 +212,7 @@ public function print_categories_forums() foreach ($mods_array as $mod_username => $mod_id) { if ($this->user->g_view_users == '1') { - $moderators[] = ''.feather_escape($mod_username).''; + $moderators[] = ''.feather_escape($mod_username).''; } else { $moderators[] = feather_escape($mod_username); } @@ -256,7 +256,7 @@ public function collect_stats() $stats['total_posts'] = intval($query['total_posts']); if ($this->user->g_view_users == '1') { - $stats['newest_user'] = ''.feather_escape($stats['last_user']['username']).''; + $stats['newest_user'] = ''.feather_escape($stats['last_user']['username']).''; } else { $stats['newest_user'] = feather_escape($stats['last_user']['username']); } @@ -291,7 +291,7 @@ public function fetch_users_online() foreach($query as $user_online) { if ($user_online->user_id > 1) { if ($this->user->g_view_users == '1') { - $online['users'][] = "\n\t\t\t\t".'
    '.feather_escape($user_online->ident).''; + $online['users'][] = "\n\t\t\t\t".'
    '.feather_escape($user_online->ident).''; } else { $online['users'][] = "\n\t\t\t\t".'
    '.feather_escape($user_online->ident); } diff --git a/model/login.php b/model/login.php index 78f743e3..472bc4f7 100644 --- a/model/login.php +++ b/model/login.php @@ -49,7 +49,7 @@ public function login() $authorized = $this->hook->fire('authorized_login', $authorized); if (!$authorized) { - message(__('Wrong user/pass').' '.__('Forgotten pass').''); + message(__('Wrong user/pass').' '.__('Forgotten pass').''); } // Update the status if this is the first time the user logged in @@ -186,7 +186,7 @@ public function password_forgotten() // Do the user specific replacements to the template $cur_mail_message = str_replace('', $cur_hit->username, $mail_message); - $cur_mail_message = str_replace('', $this->feather->url->get_link('user/'.$cur_hit->id.'/action/change_pass/?key='.$new_password_key), $cur_mail_message); + $cur_mail_message = str_replace('', $this->feather->url->get('user/'.$cur_hit->id.'/action/change_pass/?key='.$new_password_key), $cur_mail_message); $cur_mail_message = str_replace('', $new_password, $cur_mail_message); $cur_mail_message = $this->hook->fire('cur_mail_message_password_forgotten', $cur_mail_message); diff --git a/model/misc.php b/model/misc.php index 208a059a..75125f4c 100644 --- a/model/misc.php +++ b/model/misc.php @@ -123,7 +123,7 @@ public function get_redirect_url($recipient_id) } if (!isset($redirect_url)) { - $redirect_url = $this->feather->url->get_link('user/'.$recipient_id.'/'); + $redirect_url = $this->feather->url->get('user/'.$recipient_id.'/'); } elseif (preg_match('%viewtopic\.php\?pid=(\d+)$%', $redirect_url, $matches)) { $redirect_url .= '#p'.$matches[1]; } @@ -205,7 +205,7 @@ public function insert_report($post_id) $mail_subject = str_replace('', $report['forum_id'], $mail_subject); $mail_subject = str_replace('', $report['subject'], $mail_subject); $mail_message = str_replace('', $this->user->username, $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('post/'.$post_id.'/#p'.$post_id), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('post/'.$post_id.'/#p'.$post_id), $mail_message); $mail_message = str_replace('', $reason, $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); @@ -221,7 +221,7 @@ public function insert_report($post_id) $last_report_sent = $this->hook->fireDB('insert_last_report_sent', $last_report_sent); $last_report_sent = $last_report_sent->save(); - redirect($this->feather->url->get_link('forum/'.$report['forum_id'].'/'.$this->feather->url->url_friendly($report['subject']).'/'), __('Report redirect')); + redirect($this->feather->url->get('forum/'.$report['forum_id'].'/'.$this->feather->url->url_friendly($report['subject']).'/'), __('Report redirect')); } public function get_info_report($post_id) @@ -305,7 +305,7 @@ public function subscribe_topic($topic_id) $subscription = $this->hook->fireDB('subscribe_topic_query', $subscription); $subscription = $subscription->save(); - redirect($this->feather->url->get_link('topic/'.$topic_id.'/'), __('Subscribe redirect')); + redirect($this->feather->url->get('topic/'.$topic_id.'/'), __('Subscribe redirect')); } public function unsubscribe_topic($topic_id) @@ -333,7 +333,7 @@ public function unsubscribe_topic($topic_id) $delete = $this->hook->fireDB('unsubscribe_topic_query', $delete); $delete = $delete->delete_many(); - redirect($this->feather->url->get_link('topic/'.$topic_id.'/'), __('Unsubscribe redirect')); + redirect($this->feather->url->get('topic/'.$topic_id.'/'), __('Unsubscribe redirect')); } public function unsubscribe_forum($forum_id) @@ -361,7 +361,7 @@ public function unsubscribe_forum($forum_id) $delete = $this->hook->fireDB('unsubscribe_forum_query', $delete); $delete = $delete->delete_many(); - redirect($this->feather->url->get_link('forum/'.$forum_id.'/'), __('Unsubscribe redirect')); + redirect($this->feather->url->get('forum/'.$forum_id.'/'), __('Unsubscribe redirect')); } public function subscribe_forum($forum_id) @@ -412,6 +412,6 @@ public function subscribe_forum($forum_id) $subscription = $this->hook->fireDB('subscribe_forum_query', $subscription); $subscription = $subscription->save(); - redirect($this->feather->url->get_link('forum/'.$forum_id.'/'), __('Subscribe redirect')); + redirect($this->feather->url->get('forum/'.$forum_id.'/'), __('Subscribe redirect')); } } diff --git a/model/moderate.php b/model/moderate.php index eade841e..0adda595 100644 --- a/model/moderate.php +++ b/model/moderate.php @@ -27,7 +27,7 @@ public function __construct() public function display_ip_info($ip) { $ip = $this->hook->fire('display_ip_info', $ip); - message(sprintf(__('Host info 1'), $ip).'
    '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

    '.__('Show more users').''); + message(sprintf(__('Host info 1'), $ip).'
    '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

    '.__('Show more users').''); } public function display_ip_address_post($pid) @@ -45,7 +45,7 @@ public function display_ip_address_post($pid) $ip = $this->hook->fire('display_ip_address_post', $ip); - message(sprintf(__('Host info 1'), $ip).'
    '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

    '.__('Show more users').''); + message(sprintf(__('Host info 1'), $ip).'
    '.sprintf(__('Host info 2'), @gethostbyaddr($ip)).'

    '.__('Show more users').''); } public function get_moderators($fid) @@ -155,7 +155,7 @@ public function delete_posts($tid, $fid, $p = null) update_forum($fid); - redirect($this->feather->url->get_link('topic/'.$tid.'/'), __('Delete posts redirect')); + redirect($this->feather->url->get('topic/'.$tid.'/'), __('Delete posts redirect')); } $posts = $this->hook->fire('delete_posts', $posts); @@ -316,7 +316,7 @@ public function split_posts($tid, $fid, $p = null) update_forum($fid); update_forum($move_to_forum); - redirect($this->feather->url->get_link('topic/'.$new_tid.'/'), __('Split posts redirect')); + redirect($this->feather->url->get('topic/'.$new_tid.'/'), __('Split posts redirect')); } $posts = $this->hook->fire('split_posts', $posts); @@ -460,7 +460,7 @@ public function display_posts_view($tid, $start_from) // If the poster is a registered user if ($cur_post->poster_id > 1) { if ($this->user->g_view_users == '1') { - $cur_post->poster_disp = ''.feather_escape($cur_post->poster).''; + $cur_post->poster_disp = ''.feather_escape($cur_post->poster).''; } else { $cur_post->poster_disp = feather_escape($cur_post->poster); } @@ -585,7 +585,7 @@ public function move_topics_to($fid, $tfid = null, $param = null) $redirect_msg = (count($topics) > 1) ? __('Move topics redirect') : __('Move topic redirect'); $redirect_msg = $this->hook->fire('move_topics_to_redirect_message', $redirect_msg); - redirect($this->feather->url->get_link('forum/'.$move_to_forum.'/'), $redirect_msg); + redirect($this->feather->url->get('forum/'.$move_to_forum.'/'), $redirect_msg); } public function check_move_possible() @@ -737,7 +737,7 @@ public function merge_topics($fid) // Update the forum FROM which the topic was moved and redirect update_forum($fid); - redirect($this->feather->url->get_link('forum/'.$fid.'/'), __('Merge topics redirect')); + redirect($this->feather->url->get('forum/'.$fid.'/'), __('Merge topics redirect')); } public function delete_topics($topics, $fid) @@ -821,7 +821,7 @@ public function delete_topics($topics, $fid) $this->hook->fire('delete_topics'); - redirect($this->feather->url->get_link('forum/'.$fid.'/'), __('Delete topics redirect')); + redirect($this->feather->url->get('forum/'.$fid.'/'), __('Delete topics redirect')); } public function get_forum_info($fid) @@ -921,7 +921,7 @@ public function display_topics($fid, $sort_by, $start_from) $url_topic = $this->feather->url->url_friendly($cur_topic['subject']); if (is_null($cur_topic['moved_to'])) { - $cur_topic['last_post_disp'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; + $cur_topic['last_post_disp'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; $cur_topic['ghost_topic'] = false; } else { $cur_topic['last_post_disp'] = '- - -'; @@ -938,13 +938,13 @@ public function display_topics($fid, $sort_by, $start_from) } if ($cur_topic['moved_to'] != 0) { - $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.__('Moved').''; $cur_topic['item_status'] .= ' imoved'; } elseif ($cur_topic['closed'] == '0') { - $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; } else { - $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_disp'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.__('Closed').''; $cur_topic['item_status'] .= ' iclosed'; } @@ -953,7 +953,7 @@ public function display_topics($fid, $sort_by, $start_from) $cur_topic['item_status'] .= ' inew'; $cur_topic['icon_type'] = 'icon icon-new'; $cur_topic['subject_disp'] = ''.$cur_topic['subject_disp'].''; - $subject_new_posts = '[ '.__('New posts').' ]'; + $subject_new_posts = '[ '.__('New posts').' ]'; } else { $subject_new_posts = null; } diff --git a/model/post.php b/model/post.php index c65589fb..3071793a 100644 --- a/model/post.php +++ b/model/post.php @@ -408,8 +408,8 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) $mail_subject = str_replace('', $cur_posting['subject'], $mail_subject); $mail_message = str_replace('', $cur_posting['subject'], $mail_message); $mail_message = str_replace('', $post['username'], $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('unsubscribe/topic/'.$tid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('post/'.$new_pid.'/#p'.$new_pid), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('unsubscribe/topic/'.$tid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('send_notifications_reply_mail_message', $mail_message); @@ -417,8 +417,8 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) $mail_message_full = str_replace('', $cur_posting['subject'], $mail_message_full); $mail_message_full = str_replace('', $post['username'], $mail_message_full); $mail_message_full = str_replace('', $cleaned_message, $mail_message_full); - $mail_message_full = str_replace('', $this->feather->url->get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message_full); - $mail_message_full = str_replace('', $this->feather->url->get_link('unsubscribe/topic/'.$tid.'/'), $mail_message_full); + $mail_message_full = str_replace('', $this->feather->url->get('post/'.$new_pid.'/#p'.$new_pid), $mail_message_full); + $mail_message_full = str_replace('', $this->feather->url->get('unsubscribe/topic/'.$tid.'/'), $mail_message_full); $mail_message_full = str_replace('', $this->config['o_board_title'], $mail_message_full); $mail_message_full = $this->hook->fire('send_notifications_reply_mail_message_full', $mail_message_full); @@ -616,8 +616,8 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) $mail_message = str_replace('', $this->config['o_censoring'] == '1' ? $censored_subject : $post['subject'], $mail_message); $mail_message = str_replace('', $cur_posting['forum_name'], $mail_message); $mail_message = str_replace('', $post['username'], $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('topic/'.$new_tid.'/'), $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('topic/'.$new_tid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('send_notifications_new_topic_mail_message', $mail_message); @@ -626,8 +626,8 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) $mail_message_full = str_replace('', $cur_posting['forum_name'], $mail_message_full); $mail_message_full = str_replace('', $post['username'], $mail_message_full); $mail_message_full = str_replace('', $cleaned_message, $mail_message_full); - $mail_message_full = str_replace('', $this->feather->url->get_link('topic/'.$new_tid.'/'), $mail_message_full); - $mail_message_full = str_replace('', $this->feather->url->get_link('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message_full); + $mail_message_full = str_replace('', $this->feather->url->get('topic/'.$new_tid.'/'), $mail_message_full); + $mail_message_full = str_replace('', $this->feather->url->get('unsubscribe/topic/'.$cur_posting['id'].'/'), $mail_message_full); $mail_message_full = str_replace('', $this->config['o_board_title'], $mail_message_full); $mail_message_full = $this->hook->fire('send_notifications_new_topic_mail_message_full', $mail_message_full); @@ -670,7 +670,7 @@ public function warn_banned_user($post, $new_pid) $mail_message = str_replace('', $post['username'], $mail_message); $mail_message = str_replace('', $post['email'], $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('post/'.$new_pid.'/#p'.$new_pid), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('post/'.$new_pid.'/#p'.$new_pid), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('warn_banned_user_mail_message', $mail_message); diff --git a/model/profile.php b/model/profile.php index c09c70d5..4dd5cad7 100644 --- a/model/profile.php +++ b/model/profile.php @@ -136,7 +136,7 @@ public function change_pass($id) $this->hook->fire('change_pass'); - redirect($this->feather->url->get_link('user/'.$id.'/section/essentials/'), __('Pass updated redirect')); + redirect($this->feather->url->get('user/'.$id.'/section/essentials/'), __('Pass updated redirect')); } } @@ -226,7 +226,7 @@ public function change_email($id) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', $new_email, $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('user/'.$id.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_message', $mail_message); @@ -263,7 +263,7 @@ public function change_email($id) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', implode(', ', $dupe_list), $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('user/'.$id.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('user/'.$id.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_dupe_message', $mail_message); @@ -300,7 +300,7 @@ public function change_email($id) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); $mail_message = str_replace('', get_base_url(), $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('user/'.$id.'/action/change_email/?key='.$new_email_key), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('user/'.$id.'/action/change_email/?key='.$new_email_key), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_activate_message', $mail_message); @@ -402,7 +402,7 @@ public function upload_avatar($id, $files_data) $uploaded_file = $this->hook->fire('upload_avatar', $uploaded_file); - redirect($this->feather->url->get_link('user/'.$id.'/section/personality/'), __('Avatar upload redirect')); + redirect($this->feather->url->get('user/'.$id.'/section/personality/'), __('Avatar upload redirect')); } public function update_group_membership($id) @@ -469,7 +469,7 @@ public function update_group_membership($id) $id = $this->hook->fire('update_group_membership', $id); - redirect($this->feather->url->get_link('user/'.$id.'/section/admin/'), __('Group membership redirect')); + redirect($this->feather->url->get('user/'.$id.'/section/admin/'), __('Group membership redirect')); } public function get_username($id) @@ -539,7 +539,7 @@ public function update_mod_forums($id) $id = $this->hook->fire('update_mod_forums', $id); - redirect($this->feather->url->get_link('user/'.$id.'/section/admin/'), __('Update forums redirect')); + redirect($this->feather->url->get('user/'.$id.'/section/admin/'), __('Update forums redirect')); } public function ban_user($id) @@ -558,9 +558,9 @@ public function ban_user($id) $ban_id = $ban_id->find_one_col('id'); if ($ban_id) { - redirect($this->feather->url->get_link('admin/bans/edit/'.$ban_id.'/'), __('Ban redirect')); + redirect($this->feather->url->get('admin/bans/edit/'.$ban_id.'/'), __('Ban redirect')); } else { - redirect($this->feather->url->get_link('admin/bans/add/'.$id.'/'), __('Ban redirect')); + redirect($this->feather->url->get('admin/bans/add/'.$id.'/'), __('Ban redirect')); } } @@ -592,7 +592,7 @@ public function promote_user($id) $pid = $this->hook->fire('promote_user', $pid); - redirect($this->feather->url->get_link('post/'.$pid.'/#p'.$pid), __('User promote redirect')); + redirect($this->feather->url->get('post/'.$pid.'/#p'.$pid), __('User promote redirect')); } public function delete_user($id) @@ -1086,7 +1086,7 @@ public function update_profile($id, $info, $section) $section = $this->hook->fireDB('update_profile', $section, $id); - redirect($this->feather->url->get_link('user/'.$id.'/section/'.$section.'/'), __('Profile redirect')); + redirect($this->feather->url->get('user/'.$id.'/section/'.$section.'/'), __('Profile redirect')); } public function get_user_info($id) @@ -1140,7 +1140,7 @@ public function parse_user_info($user) if ($user['email_setting'] == '0' && !$this->user->is_guest && $this->user->g_send_email == '1') { $user['email_field'] = ''.feather_escape($user['email']).''; } elseif ($user['email_setting'] == '1' && !$this->user->is_guest && $this->user->g_send_email == '1') { - $user['email_field'] = ''.__('Send email').''; + $user['email_field'] = ''.__('Send email').''; } else { $user['email_field'] = ''; } @@ -1196,11 +1196,11 @@ public function parse_user_info($user) if ($this->user->g_search == '1') { $quick_searches = array(); if ($user['num_posts'] > 0) { - $quick_searches[] = ''.__('Show topics').''; - $quick_searches[] = ''.__('Show posts').''; + $quick_searches[] = ''.__('Show topics').''; + $quick_searches[] = ''.__('Show posts').''; } if ($this->user->is_admmod && $this->config['o_topic_subscriptions'] == '1') { - $quick_searches[] = ''.__('Show subscriptions').''; + $quick_searches[] = ''.__('Show subscriptions').''; } if (!empty($quick_searches)) { @@ -1238,12 +1238,12 @@ public function edit_essentials($id, $user) $user_disp['username_field'] = '

    '.sprintf(__('Username info'), feather_escape($user['username'])).'

    '."\n"; } - $user_disp['email_field'] = '

    '."\n"; + $user_disp['email_field'] = '

    '."\n"; } else { $user_disp['username_field'] = '

    '.__('Username').': '.feather_escape($user['username']).'

    '."\n"; if ($this->config['o_regs_verify'] == '1') { - $user_disp['email_field'] = '

    '.sprintf(__('Email info'), feather_escape($user['email']).' - '.__('Change email').'').'

    '."\n"; + $user_disp['email_field'] = '

    '.sprintf(__('Email info'), feather_escape($user['email']).' - '.__('Change email').'').'

    '."\n"; } else { $user_disp['email_field'] = ''."\n"; } @@ -1259,11 +1259,11 @@ public function edit_essentials($id, $user) } if ($this->user->g_search == '1' || $this->user->g_id == FEATHER_ADMIN) { - $posts_actions[] = ''.__('Show topics').''; - $posts_actions[] = ''.__('Show posts').''; + $posts_actions[] = ''.__('Show topics').''; + $posts_actions[] = ''.__('Show posts').''; if ($this->config['o_topic_subscriptions'] == '1') { - $posts_actions[] = ''.__('Show subscriptions').''; + $posts_actions[] = ''.__('Show subscriptions').''; } } diff --git a/model/register.php b/model/register.php index bc5e2467..57bbbe0c 100644 --- a/model/register.php +++ b/model/register.php @@ -190,7 +190,7 @@ public function insert_user($user) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', $user['email1'], $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('user/'.$new_uid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_banned_mail_message', $mail_message); @@ -211,7 +211,7 @@ public function insert_user($user) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', implode(', ', $dupe_list), $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('user/'.$new_uid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_dupe_mail_message', $mail_message); @@ -232,8 +232,8 @@ public function insert_user($user) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', get_base_url().'/', $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('user/'.$new_uid.'/'), $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('user/'.$new_uid.'/section/admin/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('user/'.$new_uid.'/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('user/'.$new_uid.'/section/admin/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_new_mail_message', $mail_message); @@ -257,7 +257,7 @@ public function insert_user($user) $mail_message = str_replace('', get_base_url().'/', $mail_message); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', $user['password1'], $mail_message); - $mail_message = str_replace('', $this->feather->url->get_link('login/'), $mail_message); + $mail_message = str_replace('', $this->feather->url->get('login/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('insert_user_welcome_mail_message', $mail_message); diff --git a/model/search.php b/model/search.php index 5c1c713f..b454cb25 100644 --- a/model/search.php +++ b/model/search.php @@ -569,7 +569,7 @@ public function get_search_results() // If we're on the new posts search, display a "mark all as read" link if (!$this->user->is_guest && $search_type[0] == 'action' && $search_type[1] == 'show_new') { - $search['forum_actions'][] = ''.__('Mark all as read').''; + $search['forum_actions'][] = ''.__('Mark all as read').''; } // Fetch results to display @@ -643,9 +643,9 @@ public function get_search_results() if ($search_type[0] == 'action') { if ($search_type[1] == 'show_user_topics') { - $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_user_topics'), feather_escape($search['search_set'][0]['poster'])).''; + $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_user_topics'), feather_escape($search['search_set'][0]['poster'])).''; } elseif ($search_type[1] == 'show_user_posts') { - $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_user_posts'), feather_escape($search['search_set'][0]['pposter'])).''; + $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_user_posts'), feather_escape($search['search_set'][0]['pposter'])).''; } elseif ($search_type[1] == 'show_subscriptions') { // Fetch username of subscriber $subscriber_id = $search_type[2]; @@ -658,10 +658,10 @@ public function get_search_results() message(__('Bad request'), '404'); } - $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_subscriptions'), feather_escape($subscriber_name)).''; + $search['crumbs_text']['search_type'] = ''.sprintf(__('Quick search show_subscriptions'), feather_escape($subscriber_name)).''; } else { $search_url = str_replace('_', '/', $search_type[1]); - $search['crumbs_text']['search_type'] = ''.__('Quick search '.$search_type[1]).''; + $search['crumbs_text']['search_type'] = ''.__('Quick search '.$search_type[1]).''; } } else { $keywords = $author = ''; @@ -677,7 +677,7 @@ public function get_search_results() $search['crumbs_text']['search_type'] = sprintf(__('By user show as '.$show_as), feather_escape($author)); } - $search['crumbs_text']['search_type'] = ''.$search['crumbs_text']['search_type'].''; + $search['crumbs_text']['search_type'] = ''.$search['crumbs_text']['search_type'].''; } } @@ -702,7 +702,7 @@ public function display_search_results($search) $post_count = $topic_count = 0; foreach ($search['search_set'] as $cur_search) { - $forum = ''.feather_escape($cur_search['forum_name']).''; + $forum = ''.feather_escape($cur_search['forum_name']).''; $url_topic = $this->feather->url->url_friendly($cur_search['subject']); if ($this->config['o_censoring'] == '1') { @@ -730,7 +730,7 @@ public function display_search_results($search) $pposter = feather_escape($cur_search['pposter']); if ($cur_search['poster_id'] > 1 && $this->user->g_view_users == '1') { - $cur_search['pposter_disp'] = ''.$pposter.''; + $cur_search['pposter_disp'] = ''.$pposter.''; } else { $cur_search['pposter_disp'] = ''.$pposter.''; } @@ -748,7 +748,7 @@ public function display_search_results($search) $cur_search['item_status'] = ($topic_count % 2 == 0) ? 'roweven' : 'rowodd'; $cur_search['icon_type'] = 'icon'; - $subject = ''.feather_escape($cur_search['subject']).' '.__('by').' '.feather_escape($cur_search['poster']).''; + $subject = ''.feather_escape($cur_search['subject']).' '.__('by').' '.feather_escape($cur_search['poster']).''; if ($cur_search['sticky'] == '1') { $cur_search['item_status'] .= ' isticky'; @@ -764,7 +764,7 @@ public function display_search_results($search) $cur_search['item_status'] .= ' inew'; $cur_search['icon_type'] = 'icon icon-new'; $subject = ''.$subject.''; - $subject_new_posts = '[ '.__('New posts').' ]'; + $subject_new_posts = '[ '.__('New posts').' ]'; } else { $subject_new_posts = null; } diff --git a/model/viewforum.php b/model/viewforum.php index 779d6999..0044e4a8 100644 --- a/model/viewforum.php +++ b/model/viewforum.php @@ -103,13 +103,13 @@ public function get_forum_actions($forum_id, $subscriptions, $is_subscribed) if (!$this->user->is_guest) { if ($subscriptions == 1) { if ($is_subscribed) { - $forum_actions[] = ''.__('Is subscribed').' - '.__('Unsubscribe').''; + $forum_actions[] = ''.__('Is subscribed').' - '.__('Unsubscribe').''; } else { - $forum_actions[] = ''.__('Subscribe').''; + $forum_actions[] = ''.__('Subscribe').''; } } - $forum_actions[] = ''.__('Mark forum read').''; + $forum_actions[] = ''.__('Mark forum read').''; } $forum_actions = $this->hook->fire('get_page_head', $forum_actions); @@ -187,7 +187,7 @@ public function print_topics($forum_id, $sort_by, $start_from) $url_subject = $this->feather->url->url_friendly($cur_topic['subject']); if (is_null($cur_topic['moved_to'])) { - $cur_topic['last_post_formatted'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; + $cur_topic['last_post_formatted'] = ''.format_time($cur_topic['last_post']).' '.__('by').' '.feather_escape($cur_topic['last_poster']).''; } else { $cur_topic['last_post_formatted'] = '- - -'; } @@ -202,13 +202,13 @@ public function print_topics($forum_id, $sort_by, $start_from) } if ($cur_topic['moved_to'] != 0) { - $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.__('Moved').''; $cur_topic['item_status'] .= ' imoved'; } elseif ($cur_topic['closed'] == '0') { - $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; } else { - $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; + $cur_topic['subject_formatted'] = ''.feather_escape($cur_topic['subject']).' '.__('by').' '.feather_escape($cur_topic['poster']).''; $status_text[] = ''.__('Closed').''; $cur_topic['item_status'] .= ' iclosed'; } @@ -217,7 +217,7 @@ public function print_topics($forum_id, $sort_by, $start_from) $cur_topic['item_status'] .= ' inew'; $cur_topic['icon_type'] = 'icon icon-new'; $cur_topic['subject_formatted'] = ''.$cur_topic['subject_formatted'].''; - $subject_new_posts = '[ '.__('New posts').' ]'; + $subject_new_posts = '[ '.__('New posts').' ]'; } else { $subject_new_posts = null; } diff --git a/model/viewtopic.php b/model/viewtopic.php index 81ab1b86..8b913eb0 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -160,7 +160,7 @@ public function get_post_link($topic_id, $closed, $post_replies, $is_admmod) if ($closed == '0') { if (($post_replies == '' && $this->user->g_post_replies == '1') || $post_replies == '1' || $is_admmod) { - $post_link = "\t\t\t".''."\n"; + $post_link = "\t\t\t".''."\n"; } else { $post_link = ''; } @@ -168,7 +168,7 @@ public function get_post_link($topic_id, $closed, $post_replies, $is_admmod) $post_link = __('Topic closed'); if ($is_admmod) { - $post_link .= ' / '.__('Post reply').''; + $post_link .= ' / '.__('Post reply').''; } $post_link = "\t\t\t".''."\n"; @@ -206,9 +206,9 @@ public function get_subscraction($is_subscribed, $topic_id) if (!$this->user->is_guest && $this->config['o_topic_subscriptions'] == '1') { if ($is_subscribed) { // I apologize for the variable naming here. It's a mix of subscription and action I guess :-) - $subscraction = "\t\t".''."\n"; + $subscraction = "\t\t".''."\n"; } else { - $subscraction = "\t\t".''."\n"; + $subscraction = "\t\t".''."\n"; } } else { $subscraction = ''; @@ -317,7 +317,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) if ((($cur_post['email_setting'] == '0' && !$this->user->is_guest) || $this->user->is_admmod) && $this->user->g_send_email == '1') { $cur_post['user_contacts'][] = ''; } elseif ($cur_post['email_setting'] == '1' && !$this->user->is_guest && $this->user->g_send_email == '1') { - $cur_post['user_contacts'][] = ''; + $cur_post['user_contacts'][] = ''; } if ($cur_post['url'] != '') { @@ -336,7 +336,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) } if ($this->user->is_admmod) { - $cur_post['user_info'][] = '
    '.__('IP address logged').'
    '; + $cur_post['user_info'][] = '
    '.__('IP address logged').'
    '; if ($cur_post['admin_note'] != '') { $cur_post['user_info'][] = '
    '.__('Note').' '.feather_escape($cur_post['admin_note']).'
    '; @@ -349,7 +349,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) $cur_post['user_title_formatted'] = get_title($cur_post); if ($this->user->is_admmod) { - $cur_post['user_info'][] = '
    '.__('IP address logged').'
    '; + $cur_post['user_info'][] = '
    '.__('IP address logged').'
    '; } if ($this->config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$this->user->is_guest && $this->user->g_send_email == '1') { @@ -360,30 +360,30 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) // Generation post action array (quote, edit, delete etc.) if (!$is_admmod) { if (!$this->user->is_guest) { - $cur_post['post_actions'][] = '
  • '.__('Report').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Report').'
  • '; } if ($cur_topic['closed'] == '0') { if ($cur_post['poster_id'] == $this->user->id) { if ((($start_from + $post_count) == 1 && $this->user->g_delete_topics == '1') || (($start_from + $post_count) > 1 && $this->user->g_delete_posts == '1')) { - $cur_post['post_actions'][] = '
  • '.__('Delete').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Delete').'
  • '; } if ($this->user->g_edit_posts == '1') { - $cur_post['post_actions'][] = '
  • '.__('Edit').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Edit').'
  • '; } } if (($cur_topic['post_replies'] == '' && $this->user->g_post_replies == '1') || $cur_topic['post_replies'] == '1') { - $cur_post['post_actions'][] = '
  • '.__('Quote').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Quote').'
  • '; } } } else { - $cur_post['post_actions'][] = '
  • '.__('Report').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Report').'
  • '; if ($this->user->g_id == FEATHER_ADMIN || !in_array($cur_post['poster_id'], $admin_ids)) { - $cur_post['post_actions'][] = '
  • '.__('Delete').'
  • '; - $cur_post['post_actions'][] = '
  • '.__('Edit').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Delete').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Edit').'
  • '; } - $cur_post['post_actions'][] = '
  • '.__('Quote').'
  • '; + $cur_post['post_actions'][] = '
  • '.__('Quote').'
  • '; } // Perform the main parsing of the message (BBCode, smilies, censor words etc) diff --git a/plugins/test/plugintest.php b/plugins/test/plugintest.php index 20b9d907..4820e357 100644 --- a/plugins/test/plugintest.php +++ b/plugins/test/plugintest.php @@ -22,12 +22,12 @@ public function __construct() $this->hook = $this->feather->hooks; $this->hook->bind('get_forum_actions', function ($forum_actions) { - $forum_actions[] = 'Test1'; + $forum_actions[] = 'Test1'; return $forum_actions; }); $this->hook->bind('get_forum_actions', function ($forum_actions) { - $forum_actions[] = 'Test2'; + $forum_actions[] = 'Test2'; return $forum_actions; }); diff --git a/style/FeatherBB/view/admin/bans/admin_bans.php b/style/FeatherBB/view/admin/bans/admin_bans.php index 50e72e76..14b13968 100644 --- a/style/FeatherBB/view/admin/bans/admin_bans.php +++ b/style/FeatherBB/view/admin/bans/admin_bans.php @@ -16,7 +16,7 @@

    - +
    @@ -39,7 +39,7 @@

    - +

    diff --git a/style/FeatherBB/view/admin/bans/search_ban.php b/style/FeatherBB/view/admin/bans/search_ban.php index 676b3e63..b8aefcbb 100644 --- a/style/FeatherBB/view/admin/bans/search_ban.php +++ b/style/FeatherBB/view/admin/bans/search_ban.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -55,8 +55,8 @@
    - - + +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/admin/categories.php b/style/FeatherBB/view/admin/categories.php index 370838ac..7d922439 100644 --- a/style/FeatherBB/view/admin/categories.php +++ b/style/FeatherBB/view/admin/categories.php @@ -16,7 +16,7 @@

    - +
    @@ -27,7 +27,7 @@
    '.feather_escape($report['reporter']).'' : __('Deleted user')) ?> get_link('forum/'.$report['forum_id'].'/'.url_friendly($report['forum_name']).'/'), - $report['subject'] => get_link('forum/'.$report['topic_id'].'/'.url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>url->get_link('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get_link('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get_link('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    '.feather_escape($user['username']).'' ?>url->get_link('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?> '.__('Results view IP link').' | '.__('Results show posts link').'' ?>url->get_link('admin/users/ip-stats/id/'.$user['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    '.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?>url->get_link('user/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?> '.__('Results view IP link').' | '.__('Results show posts link').'' ?>url->get_link('admin/users/ip-stats/id/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    '.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>url->get_link('post/'.$cur_search['last_post_id'].'/#p'.$cur_search['last_post_id']).'">'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
    '.feather_escape($user['username']).'' ?>url->get_link('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?> url->get_link('user/'.$cur_ban['ban_creator'].'/').'">'.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>url->get_link('admin/bans/edit/'.$cur_ban['id'].'/').'">'.__('Edit').' | '.__('Remove').'' ?>url->get('user/'.$cur_ban['ban_creator'].'/').'">'.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>url->get('admin/bans/edit/'.$cur_ban['id'].'/').'">'.__('Edit').' | '.__('Remove').'' ?>
    - url->get_link('admin/forums').'">'.__('Forums').'') ?> + url->get('admin/forums').'">'.__('Forums').'') ?>
    @@ -39,7 +39,7 @@

    - +
    @@ -71,7 +71,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/censoring.php b/style/FeatherBB/view/admin/censoring.php index 69977dfa..bcd64ca5 100644 --- a/style/FeatherBB/view/admin/censoring.php +++ b/style/FeatherBB/view/admin/censoring.php @@ -16,13 +16,13 @@

    - +
    -

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    +

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    diff --git a/style/FeatherBB/view/admin/forums/admin_forums.php b/style/FeatherBB/view/admin/forums/admin_forums.php index cbd5a6c0..a2525106 100644 --- a/style/FeatherBB/view/admin/forums/admin_forums.php +++ b/style/FeatherBB/view/admin/forums/admin_forums.php @@ -16,7 +16,7 @@

    - +

    - +

    - + diff --git a/style/FeatherBB/view/admin/forums/delete_forum.php b/style/FeatherBB/view/admin/forums/delete_forum.php index 86954f4d..4a2df3f1 100644 --- a/style/FeatherBB/view/admin/forums/delete_forum.php +++ b/style/FeatherBB/view/admin/forums/delete_forum.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/forums/permissions.php b/style/FeatherBB/view/admin/forums/permissions.php index 8f358170..7b394b63 100644 --- a/style/FeatherBB/view/admin/forums/permissions.php +++ b/style/FeatherBB/view/admin/forums/permissions.php @@ -16,7 +16,7 @@

    - +

    diff --git a/style/FeatherBB/view/admin/groups/admin_groups.php b/style/FeatherBB/view/admin/groups/admin_groups.php index d776239e..10b68fa4 100644 --- a/style/FeatherBB/view/admin/groups/admin_groups.php +++ b/style/FeatherBB/view/admin/groups/admin_groups.php @@ -18,7 +18,7 @@
    - +
    @@ -51,7 +51,7 @@
    - +
    @@ -95,7 +95,7 @@
    | |
    '."\n"; + echo "\t\t\t\t\t\t\t\t".''."\n"; } ?> diff --git a/style/FeatherBB/view/admin/groups/confirm_delete.php b/style/FeatherBB/view/admin/groups/confirm_delete.php index df490091..91b0b84e 100644 --- a/style/FeatherBB/view/admin/groups/confirm_delete.php +++ b/style/FeatherBB/view/admin/groups/confirm_delete.php @@ -16,10 +16,10 @@

    - +
    - +
    diff --git a/style/FeatherBB/view/admin/groups/delete_group.php b/style/FeatherBB/view/admin/groups/delete_group.php index a878dcbb..c9cd76e8 100644 --- a/style/FeatherBB/view/admin/groups/delete_group.php +++ b/style/FeatherBB/view/admin/groups/delete_group.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/index.php b/style/FeatherBB/view/admin/index.php index 710a0e0e..4dcbbbbb 100644 --- a/style/FeatherBB/view/admin/index.php +++ b/style/FeatherBB/view/admin/index.php @@ -35,7 +35,7 @@

    -

    url->get_link('admin/action/remove_install_file/').'">'.__('Delete install file').'') ?>

    +

    url->get('admin/action/remove_install_file/').'">'.__('Delete install file').'') ?>

    @@ -45,11 +45,11 @@
    - forum_settings['o_cur_version'], ''.__('Check for upgrade').'') ?> + forum_settings['o_cur_version'], ''.__('Check for upgrade').'') ?>
    - +
    diff --git a/style/FeatherBB/view/admin/maintenance/admin_maintenance.php b/style/FeatherBB/view/admin/maintenance/admin_maintenance.php index 6bd9ade5..0e70cca3 100644 --- a/style/FeatherBB/view/admin/maintenance/admin_maintenance.php +++ b/style/FeatherBB/view/admin/maintenance/admin_maintenance.php @@ -16,13 +16,13 @@

    - +
    -

    url->get_link('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    +

    url->get('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
    @@ -52,7 +52,7 @@ - +
    @@ -87,7 +87,7 @@
    -

    url->get_link('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    +

    url->get('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    diff --git a/style/FeatherBB/view/admin/maintenance/prune.php b/style/FeatherBB/view/admin/maintenance/prune.php index fcfd7918..0232957a 100644 --- a/style/FeatherBB/view/admin/maintenance/prune.php +++ b/style/FeatherBB/view/admin/maintenance/prune.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/maintenance/rebuild.php b/style/FeatherBB/view/admin/maintenance/rebuild.php index b4f9434b..576d1ecf 100644 --- a/style/FeatherBB/view/admin/maintenance/rebuild.php +++ b/style/FeatherBB/view/admin/maintenance/rebuild.php @@ -13,5 +13,5 @@ } ?>

    - -

    url->get_link('admin/maintenance/').$query_str.'">'.__('Click here').'')?>

    + +

    url->get('admin/maintenance/').$query_str.'">'.__('Click here').'')?>

    diff --git a/style/FeatherBB/view/admin/menu.php b/style/FeatherBB/view/admin/menu.php index abc7f7ed..cadb9915 100644 --- a/style/FeatherBB/view/admin/menu.php +++ b/style/FeatherBB/view/admin/menu.php @@ -22,20 +22,20 @@ > + ?>> > + ?>> user->g_mod_ban_users == '1'): ?> > + ?>> forum_settings['o_report_method'] == '0' || $feather->forum_settings['o_report_method'] == '2'): ?> > + ?>>
    @@ -51,35 +51,35 @@ > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>>
    @@ -97,7 +97,7 @@ $plugin) { - echo "\t\t\t\t\t".''.str_replace('_', ' ', $plugin).''."\n"; + echo "\t\t\t\t\t".''.str_replace('_', ' ', $plugin).''."\n"; } ?> diff --git a/style/FeatherBB/view/admin/options.php b/style/FeatherBB/view/admin/options.php index 161058ea..867e95b1 100644 --- a/style/FeatherBB/view/admin/options.php +++ b/style/FeatherBB/view/admin/options.php @@ -16,7 +16,7 @@

    - +

    @@ -421,7 +421,7 @@ - url->get_link('admin/censoring/').'">'.__('Censoring').'') ?> + url->get('admin/censoring/').'">'.__('Censoring').'') ?> diff --git a/style/FeatherBB/view/admin/parser.php b/style/FeatherBB/view/admin/parser.php index df29eb0d..35699c2b 100644 --- a/style/FeatherBB/view/admin/parser.php +++ b/style/FeatherBB/view/admin/parser.php @@ -16,7 +16,7 @@

    - +

    diff --git a/style/FeatherBB/view/admin/permissions.php b/style/FeatherBB/view/admin/permissions.php index e8201e72..1fe92218 100644 --- a/style/FeatherBB/view/admin/permissions.php +++ b/style/FeatherBB/view/admin/permissions.php @@ -16,7 +16,7 @@

    - +

    diff --git a/style/FeatherBB/view/admin/reports.php b/style/FeatherBB/view/admin/reports.php index 163e25b0..c5249f65 100644 --- a/style/FeatherBB/view/admin/reports.php +++ b/style/FeatherBB/view/admin/reports.php @@ -16,7 +16,7 @@

    - + - - + + @@ -74,14 +74,14 @@ ?>
    - url->get_link('user/'.$report['zapped_by_id'].'/').'">'.feather_escape($report['zapped_by']).'' : __('NA')) ?> + url->get('user/'.$report['zapped_by_id'].'/').'">'.feather_escape($report['zapped_by']).'' : __('NA')) ?>
    url->get_link('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get_link('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), - $report['subject'] => $feather->url->get_link('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => $feather->url->get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>url->get('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    - - + + diff --git a/style/FeatherBB/view/admin/statistics.php b/style/FeatherBB/view/admin/statistics.php index d7e779d6..f97ff25c 100644 --- a/style/FeatherBB/view/admin/statistics.php +++ b/style/FeatherBB/view/admin/statistics.php @@ -25,7 +25,7 @@ user->g_id == FEATHER_ADMIN): ?>

    - url->get_link('admin/phpinfo/').'">'.__('Show info').'') ?>
    + url->get('admin/phpinfo/').'">'.__('Show info').'') ?>
    diff --git a/style/FeatherBB/view/admin/users/admin_users.php b/style/FeatherBB/view/admin/users/admin_users.php index 20b0a521..74a05472 100644 --- a/style/FeatherBB/view/admin/users/admin_users.php +++ b/style/FeatherBB/view/admin/users/admin_users.php @@ -16,7 +16,7 @@

    - +

    @@ -150,7 +150,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/users/ban_users.php b/style/FeatherBB/view/admin/users/ban_users.php index 1d7bebd2..8e06caff 100644 --- a/style/FeatherBB/view/admin/users/ban_users.php +++ b/style/FeatherBB/view/admin/users/ban_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/users/delete_users.php b/style/FeatherBB/view/admin/users/delete_users.php index 29630f72..1a4360c6 100644 --- a/style/FeatherBB/view/admin/users/delete_users.php +++ b/style/FeatherBB/view/admin/users/delete_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/users/find_users.php b/style/FeatherBB/view/admin/users/find_users.php index 168ff16b..390c8eaf 100644 --- a/style/FeatherBB/view/admin/users/find_users.php +++ b/style/FeatherBB/view/admin/users/find_users.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -28,7 +28,7 @@
    - +

    @@ -54,12 +54,12 @@ foreach ($user_data as $user) { ?>
    - + - + @@ -90,8 +90,8 @@ ?>
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/admin/users/move_users.php b/style/FeatherBB/view/admin/users/move_users.php index ee7e6419..54ebe40f 100644 --- a/style/FeatherBB/view/admin/users/move_users.php +++ b/style/FeatherBB/view/admin/users/move_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/admin/users/search_ip.php b/style/FeatherBB/view/admin/users/search_ip.php index ad3ce72a..58d2bda8 100644 --- a/style/FeatherBB/view/admin/users/search_ip.php +++ b/style/FeatherBB/view/admin/users/search_ip.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -45,10 +45,10 @@ foreach ($ip_data as $ip) { ?>
    - + - +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/admin/users/show_users.php b/style/FeatherBB/view/admin/users/show_users.php index b662779c..aa5b74d1 100644 --- a/style/FeatherBB/view/admin/users/show_users.php +++ b/style/FeatherBB/view/admin/users/show_users.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -51,12 +51,12 @@ if (isset($info['user_data'][$cur_poster['poster_id']])) { ?>
    - + - +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/delete.php b/style/FeatherBB/view/delete.php index be4aa85c..3bce4ce2 100644 --- a/style/FeatherBB/view/delete.php +++ b/style/FeatherBB/view/delete.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -27,7 +27,7 @@

    - +
    diff --git a/style/FeatherBB/view/edit.php b/style/FeatherBB/view/edit.php index 0cce7ef5..0d4943d2 100644 --- a/style/FeatherBB/view/edit.php +++ b/style/FeatherBB/view/edit.php @@ -20,8 +20,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -76,7 +76,7 @@

    - +
    @@ -89,10 +89,10 @@
    diff --git a/style/FeatherBB/view/footer.new.php b/style/FeatherBB/view/footer.new.php index 7779ef23..f55a6e59 100644 --- a/style/FeatherBB/view/footer.new.php +++ b/style/FeatherBB/view/footer.new.php @@ -21,7 +21,7 @@ if ($active_page == 'viewforum') { echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; echo "\t\t\t".'
    '."\n"; } elseif ($active_page == 'viewtopic') { if (isset($pid)) { @@ -36,20 +36,20 @@ echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; // TODO: all - //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; + //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; } echo "\t\t\t".'
    '."\n"; @@ -67,7 +67,7 @@
    - user->g_id] as $cat_id => $cat_data) { echo "\t\t\t\t\t\t\t".''."\n"; diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index d825d4c3..75897053 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -21,7 +21,7 @@ if ($footer_style == 'viewforum') { echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; echo "\t\t\t".'
    '."\n"; } elseif ($footer_style == 'viewtopic') { if (isset($pid)) { @@ -36,20 +36,20 @@ echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; // TODO: all - //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; + //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; } echo "\t\t\t".'
    '."\n"; @@ -67,7 +67,7 @@
    - user->g_id] as $cat_id => $cat_data) { echo "\t\t\t\t\t\t\t".''."\n"; diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php index 1acfb081..89ea8cec 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/FeatherBB/view/header.new.php @@ -100,28 +100,28 @@ function process_form(the_form) echo "\t\t\t\t\t\t".''."\n"; if ($feather->user->g_read_board == '1' && $feather->user->g_view_users == '1') { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } if ($feather->forum_settings['o_rules'] == '1' && (!$feather->user->is_guest || $feather->user->g_read_board == '1' || $feather->forum_settings['o_regs_allow'] == '1')) { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } if ($feather->user->g_read_board == '1' && $feather->user->g_search == '1') { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } if ($feather->user->is_guest) { - echo "\t\t\t\t\t\t".''."\n"; - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } else { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; if ($feather->user->is_admmod) { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } // // Are there any additional navlinks we should insert into the array before imploding it? @@ -169,12 +169,12 @@ function process_form(the_form) if ($feather->user->is_admmod) { if ($feather->forum_settings['o_report_method'] == '0' || $feather->forum_settings['o_report_method'] == '2') { if ($has_reports) { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } } if ($feather->forum_settings['o_maintenance'] == '1') { - echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; } } echo "\t\t\t\t\t".''."\n"; @@ -184,11 +184,11 @@ function process_form(the_form) echo "\t\t\t\t\t".''."\n"; } ?> diff --git a/style/FeatherBB/view/help.php b/style/FeatherBB/view/help.php index af94b274..2e8ab828 100644 --- a/style/FeatherBB/view/help.php +++ b/style/FeatherBB/view/help.php @@ -43,17 +43,17 @@

    [url=]forum_settings['o_board_title']) ?>[/url] forum_settings['o_board_title']) ?>

    [url][/url]

    -

    [url=/help/][/url]

    +

    [url=/help/][/url]

    [email]myname@example.com[/email] myname@example.com

    [email=myname@example.com][/email]

    -

    [topic=1][/topic]

    -

    [topic]1[/topic] url->get_link('topic/1/') ?>

    -

    [post=1][/post]

    -

    [post]1[/post] url->get_link('post/1/#p1') ?>

    -

    [forum=1][/forum]

    -

    [forum]1[/forum] url->get_link('forum/1/') ?>

    -

    [user=2][/user]

    -

    [user]2[/user] url->get_link('user/2/') ?>

    +

    [topic=1][/topic]

    +

    [topic]1[/topic] url->get('topic/1/') ?>

    +

    [post=1][/post]

    +

    [post]1[/post] url->get('post/1/#p1') ?>

    +

    [forum=1][/forum]

    +

    [forum]1[/forum] url->get('forum/1/') ?>

    +

    [user=2][/user]

    +

    [user]2[/user] url->get('user/2/') ?>

    diff --git a/style/FeatherBB/view/login/form.php b/style/FeatherBB/view/login/form.php index 76d9cb3d..1ad355cd 100644 --- a/style/FeatherBB/view/login/form.php +++ b/style/FeatherBB/view/login/form.php @@ -16,7 +16,7 @@

    - +
    @@ -32,7 +32,7 @@

    -

    +

    diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/FeatherBB/view/login/password_forgotten.php index d9617fe9..432f9aee 100644 --- a/style/FeatherBB/view/login/password_forgotten.php +++ b/style/FeatherBB/view/login/password_forgotten.php @@ -39,7 +39,7 @@

    - +
    diff --git a/style/FeatherBB/view/misc/email.php b/style/FeatherBB/view/misc/email.php index b4ed730d..2c9921bd 100644 --- a/style/FeatherBB/view/misc/email.php +++ b/style/FeatherBB/view/misc/email.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/misc/report.php b/style/FeatherBB/view/misc/report.php index 1b55893b..cf8aa64c 100644 --- a/style/FeatherBB/view/misc/report.php +++ b/style/FeatherBB/view/misc/report.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -27,7 +27,7 @@

    - +
    diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/FeatherBB/view/moderate/moderator_forum.php index f6819d21..dfd1c431 100644 --- a/style/FeatherBB/view/moderate/moderator_forum.php +++ b/style/FeatherBB/view/moderate/moderator_forum.php @@ -18,7 +18,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    @@ -28,7 +28,7 @@
    - +
    @@ -92,7 +92,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/FeatherBB/view/moderate/posts_view.php index ad68aa3d..d71fad09 100644 --- a/style/FeatherBB/view/moderate/posts_view.php +++ b/style/FeatherBB/view/moderate/posts_view.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -42,7 +42,7 @@ echo ' blockpost1'; } ?>"> -

    #

    +

    #

    @@ -85,8 +85,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/post.php b/style/FeatherBB/view/post.php index 1030f8d3..b4df1f8e 100644 --- a/style/FeatherBB/view/post.php +++ b/style/FeatherBB/view/post.php @@ -18,10 +18,10 @@
    • -
    • » 
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • -
    • » 
    • +
    • » 
    • » 
    @@ -121,10 +121,10 @@
    diff --git a/style/FeatherBB/view/profile/change_mail.php b/style/FeatherBB/view/profile/change_mail.php index 0c97e20c..1e59ab54 100644 --- a/style/FeatherBB/view/profile/change_mail.php +++ b/style/FeatherBB/view/profile/change_mail.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/change_pass.php b/style/FeatherBB/view/profile/change_pass.php index 39cd0ed1..1bacb173 100644 --- a/style/FeatherBB/view/profile/change_pass.php +++ b/style/FeatherBB/view/profile/change_pass.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/delete_user.php b/style/FeatherBB/view/profile/delete_user.php index c950017c..5b22471a 100644 --- a/style/FeatherBB/view/profile/delete_user.php +++ b/style/FeatherBB/view/profile/delete_user.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/menu.php b/style/FeatherBB/view/profile/menu.php index 73f384c8..a46fef80 100644 --- a/style/FeatherBB/view/profile/menu.php +++ b/style/FeatherBB/view/profile/menu.php @@ -22,32 +22,32 @@ > + ?>> > + ?>> > + ?>> forum_settings['o_avatars'] == '1' || $feather->forum_settings['o_signatures'] == '1'): ?> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
    diff --git a/style/FeatherBB/view/profile/section_admin.php b/style/FeatherBB/view/profile/section_admin.php index 05d190f4..a73c3fb9 100644 --- a/style/FeatherBB/view/profile/section_admin.php +++ b/style/FeatherBB/view/profile/section_admin.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/section_display.php b/style/FeatherBB/view/profile/section_display.php index 209bf9b5..3277bf29 100644 --- a/style/FeatherBB/view/profile/section_display.php +++ b/style/FeatherBB/view/profile/section_display.php @@ -16,7 +16,7 @@

    - +

    - +
    @@ -24,7 +24,7 @@
    -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

    +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

    @@ -241,7 +241,7 @@
    -

    user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

    +

    user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

    diff --git a/style/FeatherBB/view/profile/section_messaging.php b/style/FeatherBB/view/profile/section_messaging.php index 91532065..8597a115 100644 --- a/style/FeatherBB/view/profile/section_messaging.php +++ b/style/FeatherBB/view/profile/section_messaging.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/section_personal.php b/style/FeatherBB/view/profile/section_personal.php index f9d9fea8..80c19741 100644 --- a/style/FeatherBB/view/profile/section_personal.php +++ b/style/FeatherBB/view/profile/section_personal.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/section_personality.php b/style/FeatherBB/view/profile/section_personality.php index a1df5d8d..f2692e75 100644 --- a/style/FeatherBB/view/profile/section_personality.php +++ b/style/FeatherBB/view/profile/section_personality.php @@ -16,7 +16,7 @@

    - +
    forum_settings['o_avatars'] == '1'): ?>
    @@ -39,10 +39,10 @@
    diff --git a/style/FeatherBB/view/profile/section_privacy.php b/style/FeatherBB/view/profile/section_privacy.php index b3262b07..d978904e 100644 --- a/style/FeatherBB/view/profile/section_privacy.php +++ b/style/FeatherBB/view/profile/section_privacy.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/profile/upload_avatar.php b/style/FeatherBB/view/profile/upload_avatar.php index a1cda00a..ba880454 100644 --- a/style/FeatherBB/view/profile/upload_avatar.php +++ b/style/FeatherBB/view/profile/upload_avatar.php @@ -16,7 +16,7 @@

    - +
    diff --git a/style/FeatherBB/view/register/rules.php b/style/FeatherBB/view/register/rules.php index edb24b38..326c96ad 100644 --- a/style/FeatherBB/view/register/rules.php +++ b/style/FeatherBB/view/register/rules.php @@ -17,7 +17,7 @@

    - +
    diff --git a/style/FeatherBB/view/search/footer.php b/style/FeatherBB/view/search/footer.php index 1a77744e..c76aaa97 100644 --- a/style/FeatherBB/view/search/footer.php +++ b/style/FeatherBB/view/search/footer.php @@ -31,7 +31,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    '.implode(' - ', $search['forum_actions']).'

    '."\n" : '') ?> diff --git a/style/FeatherBB/view/search/header.php b/style/FeatherBB/view/search/header.php index 5d6eed99..00b4385c 100644 --- a/style/FeatherBB/view/search/header.php +++ b/style/FeatherBB/view/search/header.php @@ -17,7 +17,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    diff --git a/style/FeatherBB/view/search/posts.php b/style/FeatherBB/view/search/posts.php index def30d38..d0eab7cc 100644 --- a/style/FeatherBB/view/search/posts.php +++ b/style/FeatherBB/view/search/posts.php @@ -22,7 +22,7 @@ } ?>">

    # »  » 

    +} ?> »  » 
    @@ -46,8 +46,8 @@
      -
    • -
    • +
    • +
    diff --git a/style/FeatherBB/view/search/topics.php b/style/FeatherBB/view/search/topics.php index fc7df148..7cead694 100644 --- a/style/FeatherBB/view/search/topics.php +++ b/style/FeatherBB/view/search/topics.php @@ -25,5 +25,5 @@
    - + \ No newline at end of file diff --git a/style/FeatherBB/view/userlist.php b/style/FeatherBB/view/userlist.php index fb8dd579..a686ba5b 100644 --- a/style/FeatherBB/view/userlist.php +++ b/style/FeatherBB/view/userlist.php @@ -87,7 +87,7 @@ foreach ($userlist_data as $user) { ?> - +
    • -
    • » 
    • +
    • » 
    @@ -92,7 +92,7 @@
    • -
    • » 
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?>
    diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php index cfd4c4c5..76324e67 100644 --- a/style/FeatherBB/view/viewtopic.php +++ b/style/FeatherBB/view/viewtopic.php @@ -18,8 +18,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    @@ -40,7 +40,7 @@ echo ' blockpost1'; } ?>"> -

    #

    +

    #

    @@ -108,8 +108,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    @@ -126,7 +126,7 @@

    - +
    @@ -163,13 +163,13 @@
    diff --git a/view/admin/bans/admin_bans.php b/view/admin/bans/admin_bans.php index 50e72e76..14b13968 100644 --- a/view/admin/bans/admin_bans.php +++ b/view/admin/bans/admin_bans.php @@ -16,7 +16,7 @@

    - +
    @@ -39,7 +39,7 @@

    - +

    diff --git a/view/admin/bans/search_ban.php b/view/admin/bans/search_ban.php index 676b3e63..b8aefcbb 100644 --- a/view/admin/bans/search_ban.php +++ b/view/admin/bans/search_ban.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -55,8 +55,8 @@
    - - + +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/view/admin/categories.php b/view/admin/categories.php index 370838ac..7d922439 100644 --- a/view/admin/categories.php +++ b/view/admin/categories.php @@ -16,7 +16,7 @@

    - +
    @@ -27,7 +27,7 @@
    url->get_link('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get_link('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), - $report['subject'] => $feather->url->get_link('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => $feather->url->get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>url->get('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    url->get_link('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?>url->get('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?> url->get_link('admin/users/ip-stats/id/'.$user['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>url->get('admin/users/ip-stats/id/'.$user['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    url->get_link('user/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?>url->get('user/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?> url->get_link('admin/users/ip-stats/id/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>url->get('admin/users/ip-stats/id/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    url->get_link('post/'.$cur_search['last_post_id'].'/#p'.$cur_search['last_post_id']).'">'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>url->get('post/'.$cur_search['last_post_id'].'/#p'.$cur_search['last_post_id']).'">'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
    url->get_link('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?>url->get('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?> url->get_link('user/'.$cur_ban['ban_creator'].'/').'">'.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>url->get_link('admin/bans/edit/'.$cur_ban['id'].'/').'">'.__('Edit').' | '.__('Remove').'' ?>url->get('user/'.$cur_ban['ban_creator'].'/').'">'.feather_escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>url->get('admin/bans/edit/'.$cur_ban['id'].'/').'">'.__('Edit').' | '.__('Remove').'' ?>
    - url->get_link('admin/forums').'">'.__('Forums').'') ?> + url->get('admin/forums').'">'.__('Forums').'') ?>
    @@ -39,7 +39,7 @@

    - +
    @@ -71,7 +71,7 @@

    - +
    diff --git a/view/admin/censoring.php b/view/admin/censoring.php index 69977dfa..bcd64ca5 100644 --- a/view/admin/censoring.php +++ b/view/admin/censoring.php @@ -16,13 +16,13 @@

    - +
    -

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    +

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    diff --git a/view/admin/forums/admin_forums.php b/view/admin/forums/admin_forums.php index cbd5a6c0..a2525106 100644 --- a/view/admin/forums/admin_forums.php +++ b/view/admin/forums/admin_forums.php @@ -16,7 +16,7 @@

    - +

    - +

    - + diff --git a/view/admin/forums/delete_forum.php b/view/admin/forums/delete_forum.php index 86954f4d..4a2df3f1 100644 --- a/view/admin/forums/delete_forum.php +++ b/view/admin/forums/delete_forum.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/forums/permissions.php b/view/admin/forums/permissions.php index 8f358170..7b394b63 100644 --- a/view/admin/forums/permissions.php +++ b/view/admin/forums/permissions.php @@ -16,7 +16,7 @@

    - +

    diff --git a/view/admin/groups/admin_groups.php b/view/admin/groups/admin_groups.php index d776239e..10b68fa4 100644 --- a/view/admin/groups/admin_groups.php +++ b/view/admin/groups/admin_groups.php @@ -18,7 +18,7 @@
    - +
    @@ -51,7 +51,7 @@
    - +
    @@ -95,7 +95,7 @@
    | |
    '."\n"; + echo "\t\t\t\t\t\t\t\t".''."\n"; } ?> diff --git a/view/admin/groups/confirm_delete.php b/view/admin/groups/confirm_delete.php index df490091..91b0b84e 100644 --- a/view/admin/groups/confirm_delete.php +++ b/view/admin/groups/confirm_delete.php @@ -16,10 +16,10 @@

    - +
    - +
    diff --git a/view/admin/groups/delete_group.php b/view/admin/groups/delete_group.php index a878dcbb..c9cd76e8 100644 --- a/view/admin/groups/delete_group.php +++ b/view/admin/groups/delete_group.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/index.php b/view/admin/index.php index 710a0e0e..4dcbbbbb 100644 --- a/view/admin/index.php +++ b/view/admin/index.php @@ -35,7 +35,7 @@

    -

    url->get_link('admin/action/remove_install_file/').'">'.__('Delete install file').'') ?>

    +

    url->get('admin/action/remove_install_file/').'">'.__('Delete install file').'') ?>

    @@ -45,11 +45,11 @@
    - forum_settings['o_cur_version'], ''.__('Check for upgrade').'') ?> + forum_settings['o_cur_version'], ''.__('Check for upgrade').'') ?>
    - +
    diff --git a/view/admin/maintenance/admin_maintenance.php b/view/admin/maintenance/admin_maintenance.php index 6bd9ade5..0e70cca3 100644 --- a/view/admin/maintenance/admin_maintenance.php +++ b/view/admin/maintenance/admin_maintenance.php @@ -16,13 +16,13 @@

    - +
    -

    url->get_link('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    +

    url->get('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.feather_escape($cur_group['g_title']).'
    @@ -52,7 +52,7 @@ - +
    @@ -87,7 +87,7 @@
    -

    url->get_link('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    +

    url->get('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    diff --git a/view/admin/maintenance/prune.php b/view/admin/maintenance/prune.php index fcfd7918..0232957a 100644 --- a/view/admin/maintenance/prune.php +++ b/view/admin/maintenance/prune.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/maintenance/rebuild.php b/view/admin/maintenance/rebuild.php index b4f9434b..576d1ecf 100644 --- a/view/admin/maintenance/rebuild.php +++ b/view/admin/maintenance/rebuild.php @@ -13,5 +13,5 @@ } ?>

    - -

    url->get_link('admin/maintenance/').$query_str.'">'.__('Click here').'')?>

    + +

    url->get('admin/maintenance/').$query_str.'">'.__('Click here').'')?>

    diff --git a/view/admin/menu.php b/view/admin/menu.php index abc7f7ed..cadb9915 100644 --- a/view/admin/menu.php +++ b/view/admin/menu.php @@ -22,20 +22,20 @@ > + ?>> > + ?>> user->g_mod_ban_users == '1'): ?> > + ?>> forum_settings['o_report_method'] == '0' || $feather->forum_settings['o_report_method'] == '2'): ?> > + ?>>
    @@ -51,35 +51,35 @@ > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>> > + ?>>
    @@ -97,7 +97,7 @@ $plugin) { - echo "\t\t\t\t\t".''.str_replace('_', ' ', $plugin).''."\n"; + echo "\t\t\t\t\t".''.str_replace('_', ' ', $plugin).''."\n"; } ?> diff --git a/view/admin/options.php b/view/admin/options.php index 161058ea..867e95b1 100644 --- a/view/admin/options.php +++ b/view/admin/options.php @@ -16,7 +16,7 @@

    - +

    @@ -421,7 +421,7 @@ - url->get_link('admin/censoring/').'">'.__('Censoring').'') ?> + url->get('admin/censoring/').'">'.__('Censoring').'') ?> diff --git a/view/admin/parser.php b/view/admin/parser.php index df29eb0d..35699c2b 100644 --- a/view/admin/parser.php +++ b/view/admin/parser.php @@ -16,7 +16,7 @@

    - +

    diff --git a/view/admin/permissions.php b/view/admin/permissions.php index e8201e72..1fe92218 100644 --- a/view/admin/permissions.php +++ b/view/admin/permissions.php @@ -16,7 +16,7 @@

    - +

    diff --git a/view/admin/reports.php b/view/admin/reports.php index 163e25b0..c5249f65 100644 --- a/view/admin/reports.php +++ b/view/admin/reports.php @@ -16,7 +16,7 @@

    - + - - + + @@ -74,14 +74,14 @@ ?>
    - url->get_link('user/'.$report['zapped_by_id'].'/').'">'.feather_escape($report['zapped_by']).'' : __('NA')) ?> + url->get('user/'.$report['zapped_by_id'].'/').'">'.feather_escape($report['zapped_by']).'' : __('NA')) ?>
    url->get_link('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get_link('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), - $report['subject'] => $feather->url->get_link('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => $feather->url->get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>url->get('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    - - + + diff --git a/view/admin/statistics.php b/view/admin/statistics.php index d7e779d6..f97ff25c 100644 --- a/view/admin/statistics.php +++ b/view/admin/statistics.php @@ -25,7 +25,7 @@ user->g_id == FEATHER_ADMIN): ?>

    - url->get_link('admin/phpinfo/').'">'.__('Show info').'') ?>
    + url->get('admin/phpinfo/').'">'.__('Show info').'') ?>
    diff --git a/view/admin/users/admin_users.php b/view/admin/users/admin_users.php index 20b0a521..74a05472 100644 --- a/view/admin/users/admin_users.php +++ b/view/admin/users/admin_users.php @@ -16,7 +16,7 @@

    - +

    @@ -150,7 +150,7 @@

    - +
    diff --git a/view/admin/users/ban_users.php b/view/admin/users/ban_users.php index 1d7bebd2..8e06caff 100644 --- a/view/admin/users/ban_users.php +++ b/view/admin/users/ban_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/users/delete_users.php b/view/admin/users/delete_users.php index 29630f72..1a4360c6 100644 --- a/view/admin/users/delete_users.php +++ b/view/admin/users/delete_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/users/find_users.php b/view/admin/users/find_users.php index 168ff16b..390c8eaf 100644 --- a/view/admin/users/find_users.php +++ b/view/admin/users/find_users.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -28,7 +28,7 @@
    - +

    @@ -54,12 +54,12 @@ foreach ($user_data as $user) { ?>
    - + - + @@ -90,8 +90,8 @@ ?>
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/view/admin/users/move_users.php b/view/admin/users/move_users.php index ee7e6419..54ebe40f 100644 --- a/view/admin/users/move_users.php +++ b/view/admin/users/move_users.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/admin/users/search_ip.php b/view/admin/users/search_ip.php index ad3ce72a..58d2bda8 100644 --- a/view/admin/users/search_ip.php +++ b/view/admin/users/search_ip.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -45,10 +45,10 @@ foreach ($ip_data as $ip) { ?>
    - + - +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/view/admin/users/show_users.php b/view/admin/users/show_users.php index b662779c..aa5b74d1 100644 --- a/view/admin/users/show_users.php +++ b/view/admin/users/show_users.php @@ -16,8 +16,8 @@
      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    @@ -51,12 +51,12 @@ if (isset($info['user_data'][$cur_poster['poster_id']])) { ?>
    - + - +

      -
    • -
    • » 
    • +
    • +
    • » 
    • » 
    diff --git a/view/delete.php b/view/delete.php index be4aa85c..3bce4ce2 100644 --- a/view/delete.php +++ b/view/delete.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -27,7 +27,7 @@

    - +
    diff --git a/view/edit.php b/view/edit.php index 0cce7ef5..0d4943d2 100644 --- a/view/edit.php +++ b/view/edit.php @@ -20,8 +20,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -76,7 +76,7 @@

    - +
    @@ -89,10 +89,10 @@
    diff --git a/view/footer.php b/view/footer.php index b02351ce..7fa865c4 100644 --- a/view/footer.php +++ b/view/footer.php @@ -21,7 +21,7 @@ if ($footer_style == 'viewforum') { echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; echo "\t\t\t".'
    '."\n"; } elseif ($footer_style == 'viewtopic') { if (isset($pid)) { @@ -36,20 +36,20 @@ echo "\t\t\t".'
    '."\n"; echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; // TODO: all - //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; - echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; + //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; if ($cur_topic['closed'] == '1') { - echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; } if ($cur_topic['sticky'] == '1') { - echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; } else { - echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; } echo "\t\t\t".'
    '."\n"; @@ -67,7 +67,7 @@
    - user->g_id] as $cat_id => $cat_data) { echo "\t\t\t\t\t\t\t".''."\n"; diff --git a/view/help.php b/view/help.php index af94b274..2e8ab828 100644 --- a/view/help.php +++ b/view/help.php @@ -43,17 +43,17 @@

    [url=]forum_settings['o_board_title']) ?>[/url] forum_settings['o_board_title']) ?>

    [url][/url]

    -

    [url=/help/][/url]

    +

    [url=/help/][/url]

    [email]myname@example.com[/email] myname@example.com

    [email=myname@example.com][/email]

    -

    [topic=1][/topic]

    -

    [topic]1[/topic] url->get_link('topic/1/') ?>

    -

    [post=1][/post]

    -

    [post]1[/post] url->get_link('post/1/#p1') ?>

    -

    [forum=1][/forum]

    -

    [forum]1[/forum] url->get_link('forum/1/') ?>

    -

    [user=2][/user]

    -

    [user]2[/user] url->get_link('user/2/') ?>

    +

    [topic=1][/topic]

    +

    [topic]1[/topic] url->get('topic/1/') ?>

    +

    [post=1][/post]

    +

    [post]1[/post] url->get('post/1/#p1') ?>

    +

    [forum=1][/forum]

    +

    [forum]1[/forum] url->get('forum/1/') ?>

    +

    [user=2][/user]

    +

    [user]2[/user] url->get('user/2/') ?>

    diff --git a/view/login/form.php b/view/login/form.php index 76d9cb3d..1ad355cd 100644 --- a/view/login/form.php +++ b/view/login/form.php @@ -16,7 +16,7 @@

    - +
    @@ -32,7 +32,7 @@

    -

    +

    diff --git a/view/login/password_forgotten.php b/view/login/password_forgotten.php index d9617fe9..432f9aee 100644 --- a/view/login/password_forgotten.php +++ b/view/login/password_forgotten.php @@ -39,7 +39,7 @@

    - +
    diff --git a/view/misc/email.php b/view/misc/email.php index b4ed730d..2c9921bd 100644 --- a/view/misc/email.php +++ b/view/misc/email.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/misc/report.php b/view/misc/report.php index 1b55893b..cf8aa64c 100644 --- a/view/misc/report.php +++ b/view/misc/report.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -27,7 +27,7 @@

    - +
    diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index f6819d21..dfd1c431 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -18,7 +18,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    @@ -28,7 +28,7 @@
    - +
    @@ -92,7 +92,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    diff --git a/view/moderate/posts_view.php b/view/moderate/posts_view.php index ad68aa3d..d71fad09 100644 --- a/view/moderate/posts_view.php +++ b/view/moderate/posts_view.php @@ -17,8 +17,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    @@ -42,7 +42,7 @@ echo ' blockpost1'; } ?>"> -

    #

    +

    #

    @@ -85,8 +85,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    • » 
    diff --git a/view/post.php b/view/post.php index 1030f8d3..b4df1f8e 100644 --- a/view/post.php +++ b/view/post.php @@ -18,10 +18,10 @@
    • -
    • » 
    • +
    • » 
    • request->post('req_subject')): ?>
    • » request->post('req_subject')) ?>
    • -
    • » 
    • +
    • » 
    • » 
    @@ -121,10 +121,10 @@
    diff --git a/view/profile/change_mail.php b/view/profile/change_mail.php index 0c97e20c..1e59ab54 100644 --- a/view/profile/change_mail.php +++ b/view/profile/change_mail.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/change_pass.php b/view/profile/change_pass.php index 39cd0ed1..1bacb173 100644 --- a/view/profile/change_pass.php +++ b/view/profile/change_pass.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/delete_user.php b/view/profile/delete_user.php index c950017c..5b22471a 100644 --- a/view/profile/delete_user.php +++ b/view/profile/delete_user.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/menu.php b/view/profile/menu.php index 73f384c8..a46fef80 100644 --- a/view/profile/menu.php +++ b/view/profile/menu.php @@ -22,32 +22,32 @@ > + ?>> > + ?>> > + ?>> forum_settings['o_avatars'] == '1' || $feather->forum_settings['o_signatures'] == '1'): ?> > + ?>> > + ?>> > + ?>> user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > + ?>>
    diff --git a/view/profile/section_admin.php b/view/profile/section_admin.php index 05d190f4..a73c3fb9 100644 --- a/view/profile/section_admin.php +++ b/view/profile/section_admin.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/section_display.php b/view/profile/section_display.php index 209bf9b5..3277bf29 100644 --- a/view/profile/section_display.php +++ b/view/profile/section_display.php @@ -16,7 +16,7 @@

    - +

    - +
    @@ -24,7 +24,7 @@
    -user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

    +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

    @@ -241,7 +241,7 @@
    -

    user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

    +

    user->is_admmod) ? ' ('.feather_escape($user['registration_ip']).')' : '')) ?>

    diff --git a/view/profile/section_messaging.php b/view/profile/section_messaging.php index 91532065..8597a115 100644 --- a/view/profile/section_messaging.php +++ b/view/profile/section_messaging.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/section_personal.php b/view/profile/section_personal.php index f9d9fea8..80c19741 100644 --- a/view/profile/section_personal.php +++ b/view/profile/section_personal.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/section_personality.php b/view/profile/section_personality.php index a1df5d8d..f2692e75 100644 --- a/view/profile/section_personality.php +++ b/view/profile/section_personality.php @@ -16,7 +16,7 @@

    - +
    forum_settings['o_avatars'] == '1'): ?>
    @@ -39,10 +39,10 @@
    diff --git a/view/profile/section_privacy.php b/view/profile/section_privacy.php index b3262b07..d978904e 100644 --- a/view/profile/section_privacy.php +++ b/view/profile/section_privacy.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/profile/upload_avatar.php b/view/profile/upload_avatar.php index a1cda00a..ba880454 100644 --- a/view/profile/upload_avatar.php +++ b/view/profile/upload_avatar.php @@ -16,7 +16,7 @@

    - +
    diff --git a/view/register/rules.php b/view/register/rules.php index edb24b38..326c96ad 100644 --- a/view/register/rules.php +++ b/view/register/rules.php @@ -17,7 +17,7 @@

    - +
    diff --git a/view/search/footer.php b/view/search/footer.php index 1a77744e..c76aaa97 100644 --- a/view/search/footer.php +++ b/view/search/footer.php @@ -31,7 +31,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    '.implode(' - ', $search['forum_actions']).'

    '."\n" : '') ?> diff --git a/view/search/header.php b/view/search/header.php index 5d6eed99..00b4385c 100644 --- a/view/search/header.php +++ b/view/search/header.php @@ -17,7 +17,7 @@
    • -
    • » 
    • +
    • » 
    • » 
    diff --git a/view/search/posts.php b/view/search/posts.php index def30d38..d0eab7cc 100644 --- a/view/search/posts.php +++ b/view/search/posts.php @@ -22,7 +22,7 @@ } ?>">

    # »  » 

    +} ?> »  » 
    @@ -46,8 +46,8 @@
      -
    • -
    • +
    • +
    diff --git a/view/search/topics.php b/view/search/topics.php index fc7df148..7cead694 100644 --- a/view/search/topics.php +++ b/view/search/topics.php @@ -25,5 +25,5 @@
    - + \ No newline at end of file diff --git a/view/userlist.php b/view/userlist.php index fb8dd579..a686ba5b 100644 --- a/view/userlist.php +++ b/view/userlist.php @@ -87,7 +87,7 @@ foreach ($userlist_data as $user) { ?> - +
    • -
    • » 
    • +
    • » 
    @@ -92,7 +92,7 @@
    • -
    • » 
    • +
    • » 
    '.implode(' - ', $forum_actions).'

    '."\n" : '') ?>
    diff --git a/view/viewtopic.php b/view/viewtopic.php index cfd4c4c5..76324e67 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -18,8 +18,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    @@ -40,7 +40,7 @@ echo ' blockpost1'; } ?>"> -

    #

    +

    #

    @@ -108,8 +108,8 @@
    • -
    • » 
    • -
    • » 
    • +
    • » 
    • +
    • » 
    @@ -126,7 +126,7 @@

    - +
    @@ -163,13 +163,13 @@
    From 3e58666e263aec4ceeeac25c7486d9560558c6f6 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 28 Aug 2015 22:23:43 +0200 Subject: [PATCH 237/353] Add more URL methods --- controller/admin/forums.php | 2 +- controller/edit.php | 18 +- controller/login.php | 6 +- controller/misc.php | 2 +- controller/register.php | 6 +- extern.php | 6 +- include/bbcd_compile.php | 2 +- include/classes/email.class.php | 2 +- include/classes/url.class.php | 176 ++++++++++++++++- include/functions.php | 181 +----------------- include/parser.php | 9 +- include/routes.php | 4 +- model/login.php | 12 +- model/misc.php | 2 +- model/profile.php | 8 +- model/register.php | 6 +- model/viewtopic.php | 8 +- style/FeatherBB/view/edit.php | 6 +- style/FeatherBB/view/footer.new.php | 14 +- style/FeatherBB/view/footer.php | 14 +- style/FeatherBB/view/header.new.php | 10 +- style/FeatherBB/view/header.php | 6 +- style/FeatherBB/view/help.php | 6 +- style/FeatherBB/view/misc/report.php | 2 +- .../view/moderate/moderator_forum.php | 4 +- style/FeatherBB/view/moderate/posts_view.php | 4 +- style/FeatherBB/view/post.php | 6 +- style/FeatherBB/view/search/footer.php | 2 +- style/FeatherBB/view/search/header.php | 2 +- style/FeatherBB/view/viewforum.php | 4 +- style/FeatherBB/view/viewtopic.php | 8 +- view/edit.php | 6 +- view/footer.php | 14 +- view/header.php | 6 +- view/help.php | 6 +- view/misc/report.php | 2 +- view/moderate/moderator_forum.php | 4 +- view/moderate/posts_view.php | 4 +- view/post.php | 6 +- view/search/footer.php | 2 +- view/search/header.php | 2 +- view/viewforum.php | 4 +- view/viewtopic.php | 8 +- 43 files changed, 297 insertions(+), 305 deletions(-) diff --git a/controller/admin/forums.php b/controller/admin/forums.php index d7902cd4..8b8cb1c1 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -58,7 +58,7 @@ public function edit_forum($forum_id) 'forum_desc' => $this->request->post('forum_desc') ? feather_linebreaks(feather_trim($this->request->post('forum_desc'))) : NULL, 'cat_id' => (int) $this->request->post('cat_id'), 'sort_by' => (int) $this->request->post('sort_by'), - 'redirect_url' => url_valid($this->request->post('redirect_url')) ? feather_escape($this->request->post('redirect_url')) : NULL); + 'redirect_url' => $this->feather->url->is_valid($this->request->post('redirect_url')) ? feather_escape($this->request->post('redirect_url')) : NULL); if ($forum_data['forum_name'] == '') { redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Must enter name message')); diff --git a/controller/edit.php b/controller/edit.php index 2a8afaae..1787e8ed 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -18,8 +18,6 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - - $this->model = new \model\edit(); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); @@ -82,13 +80,6 @@ public function editpost($id) $post = ''; } - - $page_title = array(feather_escape($this->config['o_board_title']), __('Edit post')); - $required_fields = array('req_subject' => __('Subject'), 'req_message' => __('Message')); - $focus_element = array('edit', 'req_message'); - - $this->header->setTitle($page_title)->setActivePage('edit')->setFocusElement($focus_element)->setRequiredFields($required_fields)->display(); - if ($this->request->post('preview')) { require_once FEATHER_ROOT.'include/parser.php'; $preview_message = parse_message($post['message'], $post['hide_smilies']); @@ -115,7 +106,10 @@ public function editpost($id) 'promptQuote' => __('promptQuote') ); - $this->feather->render('edit.php', array( + $this->feather->view2->setPageInfo(array( + 'title' => array(feather_escape($this->config['o_board_title']), __('Edit post')), + 'required_fields' => array('req_subject' => __('Subject'), 'req_message' => __('Message')), + 'focus_element' => array('edit', 'req_message'), 'cur_post' => $cur_post, 'errors' => $errors, 'preview_message' => $preview_message, @@ -125,8 +119,6 @@ public function editpost($id) 'lang_bbeditor' => $lang_bbeditor, 'post' => $post, ) - ); - - + )->addTemplate('edit.php')->display(); } } diff --git a/controller/login.php b/controller/login.php index 30c9c5f3..0b2879c8 100644 --- a/controller/login.php +++ b/controller/login.php @@ -32,7 +32,7 @@ public function __autoload($class_name) public function display() { if (!$this->user->is_guest) { - header('Location: '.get_base_url()); + header('Location: '.$this->feather->url->base()); exit; } @@ -54,7 +54,7 @@ public function logmein() define('FEATHER_QUIET_VISIT', 1); if (!$this->user->is_guest) { - header('Location: '.get_base_url()); + header('Location: '.$this->feather->url->base()); exit; } @@ -73,7 +73,7 @@ public function forget() define('FEATHER_QUIET_VISIT', 1); if (!$this->user->is_guest) { - header('Location: '.get_base_url()); + header('Location: '.$this->feather->url->base()); exit; } diff --git a/controller/misc.php b/controller/misc.php index 4f887129..f576043f 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -42,7 +42,7 @@ public function markread() // Reset tracked topics set_tracked_topics(null); - redirect(get_base_url(), __('Mark read redirect')); + redirect($this->feather->url->base(), __('Mark read redirect')); } public function markforumread($id) diff --git a/controller/register.php b/controller/register.php index 0223fd76..98249519 100644 --- a/controller/register.php +++ b/controller/register.php @@ -34,7 +34,7 @@ public function __autoload($class_name) public function display() { if (!$this->user->is_guest) { - header('Location: '.get_base_url()); + header('Location: '.$this->feather->url->base()); exit; } @@ -79,7 +79,7 @@ public function display() public function cancel() { - redirect(get_base_url()); + redirect($this->feather->url->base()); } public function rules() @@ -88,7 +88,7 @@ public function rules() // If we are logged in, we shouldn't be here if (!$this->user->is_guest) { - header('Location: '.get_base_url()); + header('Location: '.$this->feather->url->base()); exit; } diff --git a/extern.php b/extern.php index 94076507..ee7ba6ef 100644 --- a/extern.php +++ b/extern.php @@ -664,13 +664,13 @@ function output_html($feed) } // Prepend the current base URL onto some links. Done after caching to handle http/https correctly - $feed['link'] = get_base_url(true).$feed['link']; + $feed['link'] = base(true).$feed['link']; foreach ($feed['items'] as $key => $item) { - $feed['items'][$key]['link'] = get_base_url(true).$item['link']; + $feed['items'][$key]['link'] = base(true).$item['link']; if (isset($item['author']['uri'])) { - $feed['items'][$key]['author']['uri'] = get_base_url(true).$item['author']['uri']; + $feed['items'][$key]['author']['uri'] = base(true).$item['author']['uri']; } } diff --git a/include/bbcd_compile.php b/include/bbcd_compile.php index bb02f705..b860102a 100644 --- a/include/bbcd_compile.php +++ b/include/bbcd_compile.php @@ -181,7 +181,7 @@ // Validate and compute replacement texts for smilies array. $re_keys = array(); // Array of regex-safe smiley texts. $file_path = FEATHER_ROOT . 'img/smilies/'; // File system path to smilies. -$url_path = get_base_url(true); // Convert abs URL to relative URL. +$url_path = base(true); // Convert abs URL to relative URL. $url_path = preg_replace('%^https?://[^/]++(.*)$%i', '$1', $url_path) . '/img/smilies/'; foreach ($smilies as $smiley_text => $smiley_img) { // Loop through all smilieys in array. $file = $file_path . $smiley_img['file']; // Local file system address of smiley. diff --git a/include/classes/email.class.php b/include/classes/email.class.php index 4c6b7869..0727326a 100644 --- a/include/classes/email.class.php +++ b/include/classes/email.class.php @@ -121,7 +121,7 @@ public function bbcode2email($text, $wrap_length = 72) static $base_url; if (!isset($base_url)) { - $base_url = get_base_url(); + $base_url = base(); } $text = feather_trim($text, "\t\n "); diff --git a/include/classes/url.class.php b/include/classes/url.class.php index 87a43f76..0798aa2d 100644 --- a/include/classes/url.class.php +++ b/include/classes/url.class.php @@ -729,9 +729,9 @@ public function url_friendly($str) public function get($link, $args = null) { if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) { // If we have Apache's mod_rewrite enabled - $base_url = get_base_url(); + $base_url = $this->base(); } else { - $base_url = get_base_url().'/index.php'; + $base_url = $this->base().'/index.php'; } $gen_link = $link; @@ -755,7 +755,7 @@ public function get($link, $args = null) // private function get_sublink($link, $sublink, $subarg, $args = null) { - $base_url = get_base_url(); + $base_url = $this->base(); if ($sublink == 'p$1' && $subarg == 1) { return $this->get($link, $args); @@ -774,4 +774,174 @@ private function get_sublink($link, $sublink, $subarg, $args = null) return $gen_link; } + + // + // Fetch the current protocol in use - http or https + // + public function protocol() + { + $protocol = 'http'; + + // Check if the server is claiming to using HTTPS + if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') { + $protocol = 'https'; + } + + // If we are behind a reverse proxy try to decide which protocol it is using + if (defined('FORUM_BEHIND_REVERSE_PROXY')) { + // Check if we are behind a Microsoft based reverse proxy + if (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) != 'off') { + $protocol = 'https'; + } + + // Check if we're behind a "proper" reverse proxy, and what protocol it's using + if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) { + $protocol = strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']); + } + } + + return $protocol; + } + + // + // Fetch the base_url, optionally support HTTPS and HTTP + // + public function base($support_https = false) + { + static $base_url; + + $feather = \Slim\Slim::getInstance(); + + if (!$support_https) { + return $feather->config['o_base_url']; + } + + if (!isset($base_url)) { + // Make sure we are using the correct protocol + $base_url = str_replace(array('http://', 'https://'), $this->protocol().'://', $feather->config['o_base_url']); + } + + return $base_url; + } + + // + // function is_valid($url) { + // + // Return associative array of valid URI components, or FALSE if $url is not + // RFC-3986 compliant. If the passed URL begins with: "www." or "ftp.", then + // "http://" or "ftp://" is prepended and the corrected full-url is stored in + // the return array with a key name "url". This value should be used by the caller. + // + // Return value: FALSE if $url is not valid, otherwise array of URI components: + // e.g. + // Given: "http://www.jmrware.com:80/articles?height=10&width=75#fragone" + // Array( + // [scheme] => http + // [authority] => www.jmrware.com:80 + // [userinfo] => + // [host] => www.jmrware.com + // [IP_literal] => + // [IPV6address] => + // [ls32] => + // [IPvFuture] => + // [IPv4address] => + // [regname] => www.jmrware.com + // [port] => 80 + // [path_abempty] => /articles + // [query] => height=10&width=75 + // [fragment] => fragone + // [url] => http://www.jmrware.com:80/articles?height=10&width=75#fragone + // ) + public function is_valid($url) + { + if (strpos($url, 'www.') === 0) { + $url = 'http://'. $url; + } + if (strpos($url, 'ftp.') === 0) { + $url = 'ftp://'. $url; + } + if (!preg_match('/# Valid absolute URI having a non-empty, valid DNS host. + ^ + (?P[A-Za-z][A-Za-z0-9+\-.]*):\/\/ + (?P + (?:(?P(?:[A-Za-z0-9\-._~!$&\'()*+,;=:]|%[0-9A-Fa-f]{2})*)@)? + (?P + (?P + \[ + (?: + (?P + (?: (?:[0-9A-Fa-f]{1,4}:){6} + | ::(?:[0-9A-Fa-f]{1,4}:){5} + | (?: [0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4} + | (?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3} + | (?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2} + | (?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?:: [0-9A-Fa-f]{1,4}: + | (?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?:: + ) + (?P[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4} + | (?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3} + (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) + ) + | (?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?:: [0-9A-Fa-f]{1,4} + | (?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?:: + ) + | (?P[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&\'()*+,;=:]+) + ) + \] + ) + | (?P(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3} + (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)) + | (?P(?:[A-Za-z0-9\-._~!$&\'()*+,;=]|%[0-9A-Fa-f]{2})+) + ) + (?::(?P[0-9]*))? + ) + (?P(?:\/(?:[A-Za-z0-9\-._~!$&\'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*) + (?:\?(?P (?:[A-Za-z0-9\-._~!$&\'()*+,;=:@\\/?]|%[0-9A-Fa-f]{2})*))? + (?:\#(?P (?:[A-Za-z0-9\-._~!$&\'()*+,;=:@\\/?]|%[0-9A-Fa-f]{2})*))? + $ + /mx', $url, $m)) { + return false; + } + switch ($m['scheme']) { + case 'https': + case 'http': + if ($m['userinfo']) { + return false; + } // HTTP scheme does not allow userinfo. + break; + case 'ftps': + case 'ftp': + break; + default: + return false; // Unrecognised URI scheme. Default to FALSE. + } + // Validate host name conforms to DNS "dot-separated-parts". + if ($m{'regname'}) { + // If host regname specified, check for DNS conformance. + + if (!preg_match('/# HTTP DNS host name. + ^ # Anchor to beginning of string. + (?!.{256}) # Overall host length is less than 256 chars. + (?: # Group dot separated host part alternatives. + [0-9A-Za-z]\. # Either a single alphanum followed by dot + | # or... part has more than one char (63 chars max). + [0-9A-Za-z] # Part first char is alphanum (no dash). + [\-0-9A-Za-z]{0,61} # Internal chars are alphanum plus dash. + [0-9A-Za-z] # Part last char is alphanum (no dash). + \. # Each part followed by literal dot. + )* # One or more parts before top level domain. + (?: # Top level domains + [A-Za-z]{2,63}| # Country codes are exactly two alpha chars. + xn--[0-9A-Za-z]{4,59}) # Internationalized Domain Name (IDN) + $ # Anchor to end of string. + /ix', $m['host'])) { + return false; + } + } + $m['url'] = $url; + for ($i = 0; isset($m[$i]); ++$i) { + unset($m[$i]); + } + return $m; // return TRUE == array of useful named $matches plus the valid $url. + } } \ No newline at end of file diff --git a/include/functions.php b/include/functions.php index d29a8d6c..5e46afff 100644 --- a/include/functions.php +++ b/include/functions.php @@ -19,56 +19,6 @@ function get_microtime() } -// -// Fetch the current protocol in use - http or https -// -function get_current_protocol() -{ - $protocol = 'http'; - - // Check if the server is claiming to using HTTPS - if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') { - $protocol = 'https'; - } - - // If we are behind a reverse proxy try to decide which protocol it is using - if (defined('FORUM_BEHIND_REVERSE_PROXY')) { - // Check if we are behind a Microsoft based reverse proxy - if (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) != 'off') { - $protocol = 'https'; - } - - // Check if we're behind a "proper" reverse proxy, and what protocol it's using - if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) { - $protocol = strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']); - } - } - - return $protocol; -} - - -// -// Fetch the base_url, optionally support HTTPS and HTTP -// -function get_base_url($support_https = false) -{ - global $feather_config; - static $base_url; - - if (!$support_https) { - return $feather_config['o_base_url']; - } - - if (!isset($base_url)) { - // Make sure we are using the correct protocol - $base_url = str_replace(array('http://', 'https://'), get_current_protocol().'://', $feather_config['o_base_url']); - } - - return $base_url; -} - - // // Fetch admin IDs // @@ -147,16 +97,16 @@ function check_username($username, $errors, $exclude_id = null) // function generate_avatar_markup($user_id) { - global $feather_config; + $feather = \Slim\Slim::getInstance(); $filetypes = array('jpg', 'gif', 'png'); $avatar_markup = ''; foreach ($filetypes as $cur_type) { - $path = $feather_config['o_avatars_dir'].'/'.$user_id.'.'.$cur_type; + $path = $feather->config['o_avatars_dir'].'/'.$user_id.'.'.$cur_type; if (file_exists(FEATHER_ROOT.$path) && $img_size = getimagesize(FEATHER_ROOT.$path)) { - $avatar_markup = ''; + $avatar_markup = ''; break; } } @@ -596,6 +546,7 @@ function random_key($len, $readable = false, $hash = false) function validate_redirect($redirect_url, $fallback_url) { $referrer = parse_url(strtolower($redirect_url)); + $feather = \Slim\Slim::getInstance(); // Make sure the host component exists if (!isset($referrer['host'])) { @@ -612,7 +563,7 @@ function validate_redirect($redirect_url, $fallback_url) $referrer['path'] = ''; } - $valid = parse_url(strtolower(get_base_url())); + $valid = parse_url(strtolower($feather->url->base())); // Remove www subdomain if it exists if (strpos($valid['host'], 'www.') === 0) { @@ -793,128 +744,6 @@ function forum_list_langs() return $languages; } - -// -// function url_valid($url) { -// -// Return associative array of valid URI components, or FALSE if $url is not -// RFC-3986 compliant. If the passed URL begins with: "www." or "ftp.", then -// "http://" or "ftp://" is prepended and the corrected full-url is stored in -// the return array with a key name "url". This value should be used by the caller. -// -// Return value: FALSE if $url is not valid, otherwise array of URI components: -// e.g. -// Given: "http://www.jmrware.com:80/articles?height=10&width=75#fragone" -// Array( -// [scheme] => http -// [authority] => www.jmrware.com:80 -// [userinfo] => -// [host] => www.jmrware.com -// [IP_literal] => -// [IPV6address] => -// [ls32] => -// [IPvFuture] => -// [IPv4address] => -// [regname] => www.jmrware.com -// [port] => 80 -// [path_abempty] => /articles -// [query] => height=10&width=75 -// [fragment] => fragone -// [url] => http://www.jmrware.com:80/articles?height=10&width=75#fragone -// ) -function url_valid($url) -{ - if (strpos($url, 'www.') === 0) { - $url = 'http://'. $url; - } - if (strpos($url, 'ftp.') === 0) { - $url = 'ftp://'. $url; - } - if (!preg_match('/# Valid absolute URI having a non-empty, valid DNS host. - ^ - (?P[A-Za-z][A-Za-z0-9+\-.]*):\/\/ - (?P - (?:(?P(?:[A-Za-z0-9\-._~!$&\'()*+,;=:]|%[0-9A-Fa-f]{2})*)@)? - (?P - (?P - \[ - (?: - (?P - (?: (?:[0-9A-Fa-f]{1,4}:){6} - | ::(?:[0-9A-Fa-f]{1,4}:){5} - | (?: [0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4} - | (?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3} - | (?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2} - | (?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?:: [0-9A-Fa-f]{1,4}: - | (?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?:: - ) - (?P[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4} - | (?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3} - (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) - ) - | (?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?:: [0-9A-Fa-f]{1,4} - | (?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?:: - ) - | (?P[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&\'()*+,;=:]+) - ) - \] - ) - | (?P(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3} - (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)) - | (?P(?:[A-Za-z0-9\-._~!$&\'()*+,;=]|%[0-9A-Fa-f]{2})+) - ) - (?::(?P[0-9]*))? - ) - (?P(?:\/(?:[A-Za-z0-9\-._~!$&\'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*) - (?:\?(?P (?:[A-Za-z0-9\-._~!$&\'()*+,;=:@\\/?]|%[0-9A-Fa-f]{2})*))? - (?:\#(?P (?:[A-Za-z0-9\-._~!$&\'()*+,;=:@\\/?]|%[0-9A-Fa-f]{2})*))? - $ - /mx', $url, $m)) { - return false; - } - switch ($m['scheme']) { - case 'https': - case 'http': - if ($m['userinfo']) { - return false; - } // HTTP scheme does not allow userinfo. - break; - case 'ftps': - case 'ftp': - break; - default: - return false; // Unrecognised URI scheme. Default to FALSE. - } - // Validate host name conforms to DNS "dot-separated-parts". - if ($m{'regname'}) { - // If host regname specified, check for DNS conformance. - - if (!preg_match('/# HTTP DNS host name. - ^ # Anchor to beginning of string. - (?!.{256}) # Overall host length is less than 256 chars. - (?: # Group dot separated host part alternatives. - [0-9A-Za-z]\. # Either a single alphanum followed by dot - | # or... part has more than one char (63 chars max). - [0-9A-Za-z] # Part first char is alphanum (no dash). - [\-0-9A-Za-z]{0,61} # Internal chars are alphanum plus dash. - [0-9A-Za-z] # Part last char is alphanum (no dash). - \. # Each part followed by literal dot. - )* # One or more parts before top level domain. - (?: # Top level domains - [A-Za-z]{2,63}| # Country codes are exactly two alpha chars. - xn--[0-9A-Za-z]{4,59}) # Internationalized Domain Name (IDN) - $ # Anchor to end of string. - /ix', $m['host'])) { - return false; - } - } - $m['url'] = $url; - for ($i = 0; isset($m[$i]); ++$i) { - unset($m[$i]); - } - return $m; // return TRUE == array of useful named $matches plus the valid $url. -} - // // Replace string matching regular expression // diff --git a/include/parser.php b/include/parser.php index 331ab973..fa9f2215 100644 --- a/include/parser.php +++ b/include/parser.php @@ -86,8 +86,9 @@ function linkify($text) } function _linkify_callback($m) { // Only linkify valid urls. + $feather = \Slim\Slim::getInstance(); $url = $m[2] . $m[5] . $m[8] . $m[11] . $m[14]; - if (is_array($u = url_valid($url))) { + if (is_array($u = $feather->url->is_valid($url))) { if (preg_match('%\.(?:jpe?g|gif|png)$%Si', $u['path_abempty'])) { return $m[1].$m[4].$m[7].$m[10].$m[13] .'[img]'. $u['url'] .'[/img]'. $m[3].$m[6].$m[9].$m[12]; } else { @@ -268,7 +269,7 @@ function _preparse_bbcode_callback($matches) if ($feather->user->g_post_links != '1') { $new_errors[] = __('BBerr cannot post URLs'); } - else if (($m = url_valid($contents))) { + else if (($m = $feather->url->is_valid($contents))) { $contents = $m['url']; // Fetch possibly more complete url address. } else { // Error #10a: 'Invalid URL name: %s'. $new_errors[] = sprintf(__('BBerr Invalid URL name'), $contents); @@ -305,7 +306,7 @@ function _preparse_bbcode_callback($matches) break; case 'url': - if (($m = url_valid($attribute))) { + if (($m = $feather->url->is_valid($attribute))) { $attribute = $m['url']; // Fetch possibly more complete url address. } else { // Error #10b: 'Invalid URL name: %s'. $new_errors[] = sprintf(__('BBerr Invalid URL name'), $attribute); @@ -334,7 +335,7 @@ function _preparse_bbcode_callback($matches) switch ($tagname) { case 'img': // Handle bad image url, file too big, then scale-to-fit within forum defaults if too large. if ($tag['depth'] === 1) { // Check if not overly nested? - if (($pd['ipass'] === 2) && $pd['config']['valid_imgs'] && url_valid($contents)) { // Valid URI? + if (($pd['ipass'] === 2) && $pd['config']['valid_imgs'] && $feather->url->is_valid($contents)) { // Valid URI? // Yes. Fetch file headers containing file type and size ("Content-Type" and "Content-Length"). if (($http = @get_headers($contents)) !== false && is_array($http)) { if (preg_match('/\b200\s++OK\s*+$/i', $http[0])) { // Good response header? diff --git a/include/routes.php b/include/routes.php index 8d2c54e3..c2180bbd 100644 --- a/include/routes.php +++ b/include/routes.php @@ -81,7 +81,7 @@ */ $isAdmmod = function() use ($feather) { if(!$feather->user->is_admmod) { - redirect(get_base_url(), __('No permission')); + redirect(base(), __('No permission')); } }; @@ -103,7 +103,7 @@ */ $isAdmin = function() use ($feather) { if($feather->user->g_id != FEATHER_ADMIN) { - redirect(get_base_url(), __('No permission')); + redirect(base(), __('No permission')); } }; diff --git a/model/login.php b/model/login.php index 472bc4f7..91ce85a6 100644 --- a/model/login.php +++ b/model/login.php @@ -81,7 +81,7 @@ public function login() set_tracked_topics(null); // Try to determine if the data in redirect_url is valid (if not, we redirect to index.php after login) - $redirect_url = validate_redirect($this->request->post('redirect_url'), get_base_url()); + $redirect_url = validate_redirect($this->request->post('redirect_url'), $this->feather->url->base()); $redirect_url = $this->hook->fire('redirect_url_login', $redirect_url); redirect(feather_escape($redirect_url), __('Login redirect')); @@ -92,7 +92,7 @@ public function logout($id, $token) $token = $this->hook->fire('logout_start', $token, $id); if ($this->user->is_guest || !isset($id) || $id != $this->user->id || !isset($token) || $token != feather_hash($this->user->id.feather_hash($this->request->getIp()))) { - header('Location: '.get_base_url()); + header('Location: '.$this->feather->url->base()); exit; } @@ -114,7 +114,7 @@ public function logout($id, $token) $this->auth->feather_setcookie(1, feather_hash(uniqid(rand(), true)), time() + 31536000); - redirect(get_base_url(), __('Logout redirect')); + redirect($this->feather->url->base(), __('Logout redirect')); } public function password_forgotten() @@ -122,7 +122,7 @@ public function password_forgotten() $this->hook->fire('password_forgotten_start'); if (!$this->user->is_guest) { - header('Location: '.get_base_url()); + header('Location: '.$this->feather->url->base()); exit; } // Start with a clean slate @@ -156,7 +156,7 @@ public function password_forgotten() $mail_message = trim(substr($mail_tpl, $first_crlf)); // Do the generic replacements first (they apply to all emails sent out here) - $mail_message = str_replace('', get_base_url().'/', $mail_message); + $mail_message = str_replace('', $this->feather->url->base().'/', $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('mail_message_password_forgotten', $mail_message); @@ -214,7 +214,7 @@ public function get_redirect_url() } if (!isset($redirect_url)) { - $redirect_url = get_base_url(); + $redirect_url = $this->feather->url->base(); } elseif (preg_match('%viewtopic\.php\?pid=(\d+)$%', $redirect_url, $matches)) { // TODO $redirect_url .= '#p'.$matches[1]; } diff --git a/model/misc.php b/model/misc.php index 75125f4c..74930372 100644 --- a/model/misc.php +++ b/model/misc.php @@ -109,7 +109,7 @@ public function send_email($mail) // Try to determine if the data in redirect_url is valid (if not, we redirect to index.php after the email is sent) TODO //$redirect_url = validate_redirect($this->request->post('redirect_url'), 'index.php'); - redirect(get_base_url(), __('Email sent redirect')); + redirect($this->feather->url->base(), __('Email sent redirect')); } public function get_redirect_url($recipient_id) diff --git a/model/profile.php b/model/profile.php index 4dd5cad7..5939a52d 100644 --- a/model/profile.php +++ b/model/profile.php @@ -36,7 +36,7 @@ public function change_pass($id) // If the user is already logged in we shouldn't be here :) if (!$this->user->is_guest) { - header('Location: '.get_base_url()); + header('Location: '.$this->feather->url->base()); exit; } @@ -299,7 +299,7 @@ public function change_email($id) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $this->user->username, $mail_message); - $mail_message = str_replace('', get_base_url(), $mail_message); + $mail_message = str_replace('', $this->feather->url->base(), $mail_message); $mail_message = str_replace('', $this->feather->url->get('user/'.$id.'/action/change_email/?key='.$new_email_key), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); $mail_message = $this->hook->fire('change_email_mail_activate_message', $mail_message); @@ -732,7 +732,7 @@ public function delete_user($id) $this->hook->fire('delete_user'); - redirect(get_base_url(), __('User delete redirect')); + redirect($this->feather->url->base(), __('User delete redirect')); } } @@ -833,7 +833,7 @@ public function update_profile($id, $info, $section) // Add http:// if the URL doesn't contain it already (while allowing https://, too) if ($this->user->g_post_links == '1') { if ($form['url'] != '') { - $url = url_valid($form['url']); + $url = $this->feather->url->is_valid($form['url']); if ($url === false) { message(__('Invalid website URL')); diff --git a/model/register.php b/model/register.php index 57bbbe0c..072ad320 100644 --- a/model/register.php +++ b/model/register.php @@ -231,7 +231,7 @@ public function insert_user($user) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_message = str_replace('', $user['username'], $mail_message); - $mail_message = str_replace('', get_base_url().'/', $mail_message); + $mail_message = str_replace('', $this->feather->url->base().'/', $mail_message); $mail_message = str_replace('', $this->feather->url->get('user/'.$new_uid.'/'), $mail_message); $mail_message = str_replace('', $this->feather->url->get('user/'.$new_uid.'/section/admin/'), $mail_message); $mail_message = str_replace('', $this->config['o_board_title'], $mail_message); @@ -254,7 +254,7 @@ public function insert_user($user) $mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_subject = str_replace('', $this->config['o_board_title'], $mail_subject); - $mail_message = str_replace('', get_base_url().'/', $mail_message); + $mail_message = str_replace('', $this->feather->url->base().'/', $mail_message); $mail_message = str_replace('', $user['username'], $mail_message); $mail_message = str_replace('', $user['password1'], $mail_message); $mail_message = str_replace('', $this->feather->url->get('login/'), $mail_message); @@ -270,6 +270,6 @@ public function insert_user($user) $this->hook->fire('insert_user'); - redirect(get_base_url(), __('Reg complete')); + redirect($this->feather->url->base(), __('Reg complete')); } } diff --git a/model/viewtopic.php b/model/viewtopic.php index 8b913eb0..30a900b5 100644 --- a/model/viewtopic.php +++ b/model/viewtopic.php @@ -78,7 +78,7 @@ public function handle_actions($topic_id, $action) $first_new_post_id = $this->hook->fire('handle_actions_first_new', $first_new_post_id); if ($first_new_post_id) { - header('Location: '.get_base_url().'/post/'.$first_new_post_id.'/#p'.$first_new_post_id); + header('Location: '.$this->feather->url->base().'/post/'.$first_new_post_id.'/#p'.$first_new_post_id); exit; } } @@ -96,7 +96,7 @@ public function handle_actions($topic_id, $action) $last_post_id = $this->hook->fire('handle_actions_last_post', $last_post_id); if ($last_post_id) { - header('Location: '.get_base_url().'/post/'.$last_post_id.'/#p'.$last_post_id); + header('Location: '.$this->feather->url->base().'/post/'.$last_post_id.'/#p'.$last_post_id); exit; } } @@ -275,7 +275,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) // If the poster is a registered user if ($cur_post['poster_id'] > 1) { if ($this->user->g_view_users == '1') { - $cur_post['username_formatted'] = ''.feather_escape($cur_post['username']).''; + $cur_post['username_formatted'] = ''.feather_escape($cur_post['username']).''; } else { $cur_post['username_formatted'] = feather_escape($cur_post['username']); } @@ -331,7 +331,7 @@ public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod) if ($this->user->g_id == FEATHER_ADMIN || ($this->user->g_moderator == '1' && $this->user->g_mod_promote_users == '1')) { if ($cur_post['g_promote_next_group']) { - $cur_post['user_info'][] = '
    '.__('Promote user').'
    '; + $cur_post['user_info'][] = '
    '.__('Promote user').'
    '; } } diff --git a/style/FeatherBB/view/edit.php b/style/FeatherBB/view/edit.php index 0d4943d2..3b248d18 100644 --- a/style/FeatherBB/view/edit.php +++ b/style/FeatherBB/view/edit.php @@ -19,7 +19,7 @@
      -
    • +
    • » 
    • » 
    • » 
    • @@ -69,10 +69,10 @@ ?> - +

      diff --git a/style/FeatherBB/view/footer.new.php b/style/FeatherBB/view/footer.new.php index f55a6e59..1dc36f2c 100644 --- a/style/FeatherBB/view/footer.new.php +++ b/style/FeatherBB/view/footer.new.php @@ -88,21 +88,21 @@ if ($active_page == 'index') { if ($feather->forum_settings['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($active_page == 'viewforum') { if ($feather->forum_settings['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($active_page == 'viewtopic') { if ($feather->forum_settings['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } @@ -147,6 +147,6 @@ foreach ($script['params'] as $key => $value) { echo $key.'="'.$value.'" '; } - echo 'href="'.get_base_url().'/'.$script['file'].'"/>'."\n"; + echo 'href="'.$feather->url->base().'/'.$script['file'].'"/>'."\n"; } ?> diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index 75897053..e70ef72a 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -88,21 +88,21 @@ if ($footer_style == 'index') { if ($feather->forum_settings['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewforum') { if ($feather->forum_settings['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewtopic') { if ($feather->forum_settings['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather->forum_settings['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } @@ -141,7 +141,7 @@ - + diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php index 89ea8cec..784fcf2f 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/FeatherBB/view/header.new.php @@ -30,14 +30,14 @@ foreach ($item['params'] as $key => $value) { echo $key.'="'.$value.'" '; } - echo 'href="'.get_base_url().'/'.$item['file'].'">'."\n"; + echo 'href="'.$feather->url->base().'/'.$item['file'].'">'."\n"; } } if ($admin_console) { if (file_exists($feather->forum_env['FEATHER_ROOT'].'style/'.$feather->user->style.'/base_admin.css')) { - echo "\t".''."\n"; + echo "\t".''."\n"; } else { - echo "\t".''."\n"; + echo "\t".''."\n"; } } if (isset($required_fields)) : @@ -97,7 +97,7 @@ function process_form(the_form)
        '.__('Index').''."\n"; +echo "\t\t\t\t\t\t".''."\n"; if ($feather->user->g_read_board == '1' && $feather->user->g_view_users == '1') { echo "\t\t\t\t\t\t".''."\n"; @@ -150,7 +150,7 @@ function process_form(the_form)

        - +

        forum_settings['o_board_title']) ?>

        forum_settings['o_board_desc']) ?>
        diff --git a/style/FeatherBB/view/header.php b/style/FeatherBB/view/header.php index 0068a5f6..a5cba96e 100644 --- a/style/FeatherBB/view/header.php +++ b/style/FeatherBB/view/header.php @@ -15,7 +15,7 @@ <?php echo generate_page_title($page_title, $p) ?> - +

        - +

        forum_settings['o_board_title']) ?>

        forum_settings['o_board_desc']) ?>
        @@ -112,7 +112,7 @@ function process_form(the_form)

        - + - +

        diff --git a/style/FeatherBB/view/search/footer.php b/style/FeatherBB/view/search/footer.php index c76aaa97..0dd6fc5e 100644 --- a/style/FeatherBB/view/search/footer.php +++ b/style/FeatherBB/view/search/footer.php @@ -30,7 +30,7 @@
          -
        • +
        • » 
        • » 
        diff --git a/style/FeatherBB/view/search/header.php b/style/FeatherBB/view/search/header.php index 00b4385c..de5e1f0a 100644 --- a/style/FeatherBB/view/search/header.php +++ b/style/FeatherBB/view/search/header.php @@ -16,7 +16,7 @@
          -
        • +
        • » 
        • » 
        diff --git a/style/FeatherBB/view/viewforum.php b/style/FeatherBB/view/viewforum.php index e8370fe7..0855bd20 100644 --- a/style/FeatherBB/view/viewforum.php +++ b/style/FeatherBB/view/viewforum.php @@ -16,7 +16,7 @@
          -
        • +
        • » 
        @@ -91,7 +91,7 @@
          -
        • +
        • » 
        '.implode(' - ', $forum_actions).'

        '."\n" : '') ?> diff --git a/style/FeatherBB/view/viewtopic.php b/style/FeatherBB/view/viewtopic.php index 76324e67..7e7c088b 100644 --- a/style/FeatherBB/view/viewtopic.php +++ b/style/FeatherBB/view/viewtopic.php @@ -17,7 +17,7 @@
          -
        • +
        • » 
        • » 
        @@ -107,7 +107,7 @@
          -
        • +
        • » 
        • » 
        @@ -155,10 +155,10 @@ ?> - + diff --git a/view/edit.php b/view/edit.php index 0d4943d2..3b248d18 100644 --- a/view/edit.php +++ b/view/edit.php @@ -19,7 +19,7 @@
          -
        • +
        • » 
        • » 
        • » 
        • @@ -69,10 +69,10 @@ ?> - +

          diff --git a/view/footer.php b/view/footer.php index 7fa865c4..1e95637f 100644 --- a/view/footer.php +++ b/view/footer.php @@ -88,21 +88,21 @@ if ($footer_style == 'index') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewforum') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } elseif ($footer_style == 'viewtopic') { if ($feather_config['o_feed_type'] == '1') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } elseif ($feather_config['o_feed_type'] == '2') { - echo "\t\t\t\t".''."\n"; + echo "\t\t\t\t".''."\n"; } } @@ -141,7 +141,7 @@ - + diff --git a/view/header.php b/view/header.php index 9da121c2..7d751f35 100644 --- a/view/header.php +++ b/view/header.php @@ -15,7 +15,7 @@ <?php echo generate_page_title($page_title, $p) ?> - +

          - +

          @@ -112,7 +112,7 @@ function process_form(the_form)

          - +

          ×

          diff --git a/view/help.php b/view/help.php index 2e8ab828..06e642f2 100644 --- a/view/help.php +++ b/view/help.php @@ -41,8 +41,8 @@

          -

          [url=]forum_settings['o_board_title']) ?>[/url] forum_settings['o_board_title']) ?>

          -

          [url][/url]

          +

          [url=url->base(true).'/') ?>]forum_settings['o_board_title']) ?>[/url] forum_settings['o_board_title']) ?>

          +

          [url]url->base(true).'/') ?>[/url] url->base(true).'/') ?>

          [url=/help/][/url]

          [email]myname@example.com[/email] myname@example.com

          [email=myname@example.com][/email]

          @@ -57,7 +57,7 @@

          -

          [img=]/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

          +

          [img=]url->base(true)) ?>/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

          diff --git a/view/misc/report.php b/view/misc/report.php index cf8aa64c..acb6c729 100644 --- a/view/misc/report.php +++ b/view/misc/report.php @@ -16,7 +16,7 @@
            -
          • +
          • » 
          • » 
          • » 
          • diff --git a/view/moderate/moderator_forum.php b/view/moderate/moderator_forum.php index dfd1c431..b61c3104 100644 --- a/view/moderate/moderator_forum.php +++ b/view/moderate/moderator_forum.php @@ -17,7 +17,7 @@
              -
            • +
            • » 
            • » 
            @@ -91,7 +91,7 @@
              -
            • +
            • » 
            • » 
            diff --git a/view/moderate/posts_view.php b/view/moderate/posts_view.php index d71fad09..a2c6ecea 100644 --- a/view/moderate/posts_view.php +++ b/view/moderate/posts_view.php @@ -16,7 +16,7 @@
              -
            • +
            • » 
            • » 
            • » 
            • @@ -84,7 +84,7 @@
              -
            • +
            • » 
            • » 
            • » 
            • diff --git a/view/post.php b/view/post.php index b4df1f8e..72264f67 100644 --- a/view/post.php +++ b/view/post.php @@ -17,7 +17,7 @@
                -
              • +
              • » 
              • request->post('req_subject')): ?>
              • » request->post('req_subject')) ?>
              • @@ -81,10 +81,10 @@ ?> - +

                diff --git a/view/search/footer.php b/view/search/footer.php index c76aaa97..0dd6fc5e 100644 --- a/view/search/footer.php +++ b/view/search/footer.php @@ -30,7 +30,7 @@
                  -
                • +
                • » 
                • » 
                diff --git a/view/search/header.php b/view/search/header.php index 00b4385c..de5e1f0a 100644 --- a/view/search/header.php +++ b/view/search/header.php @@ -16,7 +16,7 @@
                  -
                • +
                • » 
                • » 
                diff --git a/view/viewforum.php b/view/viewforum.php index e8370fe7..0855bd20 100644 --- a/view/viewforum.php +++ b/view/viewforum.php @@ -16,7 +16,7 @@
                  -
                • +
                • » 
                @@ -91,7 +91,7 @@
                  -
                • +
                • » 
                '.implode(' - ', $forum_actions).'

                '."\n" : '') ?> diff --git a/view/viewtopic.php b/view/viewtopic.php index 76324e67..7e7c088b 100644 --- a/view/viewtopic.php +++ b/view/viewtopic.php @@ -17,7 +17,7 @@
                  -
                • +
                • » 
                • » 
                @@ -107,7 +107,7 @@
                  -
                • +
                • » 
                • » 
                @@ -155,10 +155,10 @@ ?> - + From 139e5ea134d17aeb8fdb80f61597427aafeabcff Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 28 Aug 2015 22:40:16 +0200 Subject: [PATCH 238/353] Add debug class --- include/classes/core.class.php | 4 ++ include/classes/debug.class.php | 77 +++++++++++++++++++++++++++++ include/functions.php | 48 ------------------ style/FeatherBB/view/footer.new.php | 18 +------ style/FeatherBB/view/footer.php | 18 +------ view/footer.php | 19 ++----- 6 files changed, 88 insertions(+), 96 deletions(-) create mode 100644 include/classes/debug.class.php diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 78811653..70f6e681 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -208,6 +208,10 @@ public function call() $this->app->container->singleton('email', function () { return new \FeatherBB\Email(); }); + // Load FeatherBB debug class + $this->app->container->singleton('debug', function () { + return new \FeatherBB\Debug(); + }); // This is the very first hook fired $this->app->hooks->fire('core.start'); diff --git a/include/classes/debug.class.php b/include/classes/debug.class.php new file mode 100644 index 00000000..ef0d63e8 --- /dev/null +++ b/include/classes/debug.class.php @@ -0,0 +1,77 @@ + +
                +

                +
                +
                +

    url->get_link('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get_link('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), - $report['subject'] => $feather->url->get_link('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), - sprintf(__('Post ID'), $report['pid']) => $feather->url->get_link('post/'.$report['pid'].'/#p'.$report['pid']))) ?>url->get('users/'.$report['reported_by'].'/').'">'.feather_escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    url->get_link('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?>url->get('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?> url->get_link('admin/users/ip-stats/id/'.$user['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>url->get('admin/users/ip-stats/id/'.$user['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    url->get_link('user/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?>url->get('user/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.feather_escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?> url->get_link('admin/users/ip-stats/id/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>url->get('admin/users/ip-stats/id/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    url->get_link('post/'.$cur_search['last_post_id'].'/#p'.$cur_search['last_post_id']).'">'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>url->get('post/'.$cur_search['last_post_id'].'/#p'.$cur_search['last_post_id']).'">'.format_time($cur_search['last_post']).' '.__('by').' '.feather_escape($cur_search['last_poster']) ?>
    url->get_link('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?>url->get('user/'.$user['id'].'/').'">'.feather_escape($user['username']).'' ?>
    + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + [ '; + + // Calculate script generation time + $time_diff = sprintf('%.3f', get_microtime() - $feather->start); + echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); + + if (function_exists('memory_get_usage')) { + echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); + + if (function_exists('memory_get_peak_usage')) { + echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); + } + } + + echo ' ]

    '."\n"; + } +} \ No newline at end of file diff --git a/include/functions.php b/include/functions.php index 5e46afff..316e88d5 100644 --- a/include/functions.php +++ b/include/functions.php @@ -833,51 +833,3 @@ function breadcrumbs_admin(array $links) return implode(' » ', $tmp); } - - -// DEBUG FUNCTIONS BELOW - -// -// Display executed queries (if enabled) -// -function display_saved_queries() -{ - ?> - -
    -

    -
    -
    - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -forum_env['FEATHER_SHOW_INFO']) { - echo '

    [ '; - - // Calculate script generation time - $time_diff = sprintf('%.3f', get_microtime() - $feather->start); - echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); - - if (function_exists('memory_get_usage')) { - echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); - - if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); - } - } - - echo ' ]

    '."\n"; + $feather->debug->info(); } // Display executed queries (if enabled) if ($feather->forum_env['FEATHER_SHOW_QUERIES']) { - display_saved_queries(); + $feather->debug->queries(); } ?> diff --git a/style/FeatherBB/view/footer.php b/style/FeatherBB/view/footer.php index e70ef72a..e149e22e 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/FeatherBB/view/footer.php @@ -117,25 +117,11 @@ // Display debug info (if enabled/defined) if ($feather->forum_env['FEATHER_SHOW_INFO']) { - echo '

    [ '; - - // Calculate script generation time - $time_diff = sprintf('%.3f', get_microtime() - $feather_start); - echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); - - if (function_exists('memory_get_usage')) { - echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); - - if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); - } - } - - echo ' ]

    '."\n"; + $feather->debug->info(); } // Display executed queries (if enabled) if ($feather->forum_env['FEATHER_SHOW_QUERIES']) { - display_saved_queries(); + $feather->debug->queries(); } ?> diff --git a/view/footer.php b/view/footer.php index 1e95637f..2cad803c 100644 --- a/view/footer.php +++ b/view/footer.php @@ -117,25 +117,12 @@ // Display debug info (if enabled/defined) if ($feather->forum_env['FEATHER_SHOW_INFO']) { - echo '

    [ '; - - // Calculate script generation time - $time_diff = sprintf('%.3f', get_microtime() - $feather_start); - echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); - - if (function_exists('memory_get_usage')) { - echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); - - if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); - } - } - - echo ' ]

    '."\n"; + $feather->debug->info(); } + // Display executed queries (if enabled) if ($feather->forum_env['FEATHER_SHOW_QUERIES']) { - display_saved_queries(); + $feather->debug->queries(); } ?> From 984d495301936fb26a42ff45247cc41a094bbfd2 Mon Sep 17 00:00:00 2001 From: adaur Date: Fri, 28 Aug 2015 22:40:48 +0200 Subject: [PATCH 239/353] Use DB --- include/classes/debug.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/classes/debug.class.php b/include/classes/debug.class.php index ef0d63e8..d5c0ca02 100644 --- a/include/classes/debug.class.php +++ b/include/classes/debug.class.php @@ -62,7 +62,7 @@ public function info() { // Calculate script generation time $time_diff = sprintf('%.3f', get_microtime() - $feather->start); - echo sprintf(__('Querytime'), $time_diff, count(\DB::get_query_log()[0])); + echo sprintf(__('Querytime'), $time_diff, count(DB::get_query_log()[0])); if (function_exists('memory_get_usage')) { echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); From 2ad5d1cd6b5df2a5f33d52a91b29d86c8566edf4 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 11:32:39 +0200 Subject: [PATCH 240/353] Tweak debug mode --- include/classes/core.class.php | 4 -- include/classes/debug.class.php | 77 ----------------------------- include/classes/view.class.php | 7 +++ model/debug.php | 36 ++++++++++++++ style/FeatherBB/view/footer.new.php | 40 +++++++++++---- 5 files changed, 74 insertions(+), 90 deletions(-) delete mode 100644 include/classes/debug.class.php create mode 100644 model/debug.php diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 70f6e681..78811653 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -208,10 +208,6 @@ public function call() $this->app->container->singleton('email', function () { return new \FeatherBB\Email(); }); - // Load FeatherBB debug class - $this->app->container->singleton('debug', function () { - return new \FeatherBB\Debug(); - }); // This is the very first hook fired $this->app->hooks->fire('core.start'); diff --git a/include/classes/debug.class.php b/include/classes/debug.class.php deleted file mode 100644 index d5c0ca02..00000000 --- a/include/classes/debug.class.php +++ /dev/null @@ -1,77 +0,0 @@ - -
    -

    -
    -
    - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - [ '; - - // Calculate script generation time - $time_diff = sprintf('%.3f', get_microtime() - $feather->start); - echo sprintf(__('Querytime'), $time_diff, count(DB::get_query_log()[0])); - - if (function_exists('memory_get_usage')) { - echo ' - '.sprintf(__('Memory usage'), file_size(memory_get_usage())); - - if (function_exists('memory_get_peak_usage')) { - echo ' '.sprintf(__('Peak usage'), file_size(memory_get_peak_usage())); - } - } - - echo ' ]

    '."\n"; - } -} \ No newline at end of file diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 4259cda6..4140bd34 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -374,6 +374,13 @@ protected function getDefaultPageInfo() $data['has_reports'] = \model\header::get_reports(); } + if ($this->app->forum_env['FEATHER_SHOW_INFO']) { + $data['exec_info'] = \model\debug::get_info(); + if ($this->app->forum_env['FEATHER_SHOW_QUERIES']) { + $data['queries_info'] = \model\debug::get_queries(); + } + } + return $data; } diff --git a/model/debug.php b/model/debug.php new file mode 100644 index 00000000..42209dba --- /dev/null +++ b/model/debug.php @@ -0,0 +1,36 @@ + count(DB::get_query_log()[0]), + 'exec_time' => (get_microtime() - self::$app->start)); + $data['mem_usage'] = (function_exists('memory_get_usage')) ? file_size(memory_get_usage()) : 'N/A'; + $data['mem_peak_usage'] = (function_exists('memory_get_peak_usage')) ? file_size(memory_get_peak_usage()) : 'N/A'; + return $data; + } +} diff --git a/style/FeatherBB/view/footer.new.php b/style/FeatherBB/view/footer.new.php index 1fc50bef..7565a387 100644 --- a/style/FeatherBB/view/footer.new.php +++ b/style/FeatherBB/view/footer.new.php @@ -116,15 +116,37 @@ forum_env['FEATHER_SHOW_INFO']) { - $feather->debug->info(); -} -// Display executed queries (if enabled) -if ($feather->forum_env['FEATHER_SHOW_QUERIES']) { - $feather->debug->queries(); -} -?> - +if (!empty($exec_info)) { ?> +

    [ ]

    + +
    +

    +
    +
    + + + + + + + + + $sql) { + echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; +} ?> + + + + +
    '.feather_escape(round($time, 8)).''.feather_escape($sql).'
    +
    +
    +
    + From a688b6aa005c492022a2d71674004aeeb9669a16 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 12:10:21 +0200 Subject: [PATCH 241/353] Add nested parameter in view class to disable header/footer rendering --- include/classes/view.class.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 4140bd34..8f1c61c0 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -209,13 +209,14 @@ public function getTemplatePathname($file) * Rendering *******************************************************************************/ - public function display($data = null) + public function display($nested = true) { - echo $this->fetch($data); + echo $this->fetch($nested); } - public function fetch($data = null) + protected function fetch($nested = true) { + $data = array(); // Force flash messages if (isset($this->app->environment['slim.flash'])) { $this->data->set('flash', $this->app->environment['slim.flash']); @@ -224,19 +225,23 @@ public function fetch($data = null) $data['feather'] = \Slim\Slim::getInstance(); $data['assets'] = $this->getAssets(); $data = $this->app->hooks->fire('view.alter_data', $data); - return $this->render($data); + return $this->render($data, $nested); } - protected function render($data = null) + protected function render($data = null, $nested = true) { extract($data); ob_start(); - require $this->getTemplatePathname('header.new.php'); + if ($nested) { + require $this->getTemplatePathname('header.new.php'); + } foreach ($this->getTemplates() as $tpl) { require $tpl; } - require $this->getTemplatePathname('footer.new.php'); + if ($nested) { + require $this->getTemplatePathname('footer.new.php'); + } return ob_get_clean(); } @@ -370,7 +375,7 @@ protected function getDefaultPageInfo() 'tid' => null, ); - if ($this->app->user->is_admmod) { + if (is_object($this->app->user) && $this->app->user->is_admmod) { $data['has_reports'] = \model\header::get_reports(); } From f111c98d7ce850bb8f4949d5afed28c4d5f45ed3 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 12:10:29 +0200 Subject: [PATCH 242/353] Update installer to new view --- controller/install.php | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/controller/install.php b/controller/install.php index fc11fe6a..69b16ee9 100644 --- a/controller/install.php +++ b/controller/install.php @@ -28,6 +28,7 @@ public function __construct() $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\install(); $this->available_langs = forum_list_langs(); + $this->feather->view2->setStyle('FeatherBB'); } public function run() @@ -113,13 +114,12 @@ public function run() // End validation and check errors if (!empty($this->errors)) { - $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); - $this->feather->view()->display('install.php', array( + $this->feather->view2->setPageInfo(array( 'languages' => $this->available_langs, 'supported_dbs' => $this->supported_dbs, 'data' => $data, 'errors' => $this->errors, - )); + ))->addTemplate('install.php')->display(false); } else { $data['default_style'] = $this->default_style; $data['avatars'] = in_array(strtolower(@ini_get('file_uploads')), array('on', 'true', '1')) ? 1 : 0; @@ -131,15 +131,12 @@ public function run() 'description' => __('Description'), 'base_url' => $base_url, 'default_lang' => $this->install_lang); - if (isset($this->environment['slim.flash'])) { - $this->feather->view()->set('flash', $this->environment['slim.flash']); - } - $this->feather->view()->setTemplatesDirectory($this->feather->forum_env['FEATHER_ROOT'].'style/FeatherBB/view'); - $this->feather->view()->display('install.php', array( - 'languages' => $this->available_langs, - 'supported_dbs' => $this->supported_dbs, - 'data' => $data, - 'alerts' => array())); + $this->feather->view2->setPageInfo(array( + 'languages' => $this->available_langs, + 'supported_dbs' => $this->supported_dbs, + 'data' => $data, + 'alerts' => array(), + ))->addTemplate('install.php')->display(false); } } @@ -157,7 +154,7 @@ public function create_config(array $data) 'cookie_seed' => random_key(16, false, true))); // ... And write it on disk - if ($this->write_config(json_encode($config, JSON_PRETTY_PRINT))) { + if ($this->write_config($config)) { $this->create_db($data); } } @@ -206,9 +203,9 @@ public function create_db(array $data) redirect($this->feather->url->get('/')); } - public function write_config($json) + public function write_config($array) { - return file_put_contents($this->feather->forum_env['FORUM_CONFIG_FILE'], $json); + return file_put_contents($this->feather->forum_env['FORUM_CONFIG_FILE'], ' Date: Sat, 29 Aug 2015 12:10:41 +0200 Subject: [PATCH 243/353] Change config format from JSON to PHP --- include/classes/core.class.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 78811653..97ab83f1 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -167,7 +167,7 @@ public function set_headers() public function call() { - global $forum_time_formats, $forum_date_formats, $feather_config; // Legacy + global $forum_time_formats, $forum_date_formats; // Legacy // Set headers $this->set_headers(); @@ -219,9 +219,9 @@ public function call() } // Load config from disk - $config_file = json_decode(file_get_contents($this->forum_env['FORUM_CONFIG_FILE']), true); - if (!is_null($config_file)) { - $this->forum_settings = array_merge(self::load_default_forum_settings(), $config_file); + include $this->forum_env['FORUM_CONFIG_FILE']; + if (isset($featherbb_config) && is_array($featherbb_config)) { + $this->forum_settings = array_merge(self::load_default_forum_settings(), $featherbb_config); } else { $this->app->response->setStatus(500); // Send forbidden header return $this->app->response->setBody('Wrong config file format'); @@ -237,9 +237,8 @@ public function call() $this->app->cache->store('config', \model\cache::get_config()); } - $feather_config = $this->app->cache->retrieve('config'); // Finalize forum_settings array - $this->forum_settings = array_merge($feather_config, $this->forum_settings); + $this->forum_settings = array_merge($this->app->cache->retrieve('config'), $this->forum_settings); // Set default style and assets $this->app->view2->setStyle($this->forum_settings['o_default_style']); From 3a2db58ca9eb9cb3fef336ca0bbe8cf4150ef8b8 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 12:10:55 +0200 Subject: [PATCH 244/353] Add checks in model\debug --- model/debug.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/model/debug.php b/model/debug.php index 42209dba..d753fb8c 100644 --- a/model/debug.php +++ b/model/debug.php @@ -16,6 +16,9 @@ class debug public static function get_queries() { + if (empty(DB::get_query_log())) { + return null; + } $data = array(); $data['raw'] = array_combine(DB::get_query_log()[0], DB::get_query_log()[1]); $data['total_time'] = array_sum(array_keys($data['raw'])); @@ -26,9 +29,8 @@ public static function get_info() { self::$app = \Slim\Slim::getInstance(); - $data = array( - 'nb_queries' => count(DB::get_query_log()[0]), - 'exec_time' => (get_microtime() - self::$app->start)); + $data = array('exec_time' => (get_microtime() - self::$app->start)); + $data['nb_queries'] = (isset(DB::get_query_log()[0])) ? count(DB::get_query_log()[0]) : 'N/A'; $data['mem_usage'] = (function_exists('memory_get_usage')) ? file_size(memory_get_usage()) : 'N/A'; $data['mem_peak_usage'] = (function_exists('memory_get_peak_usage')) ? file_size(memory_get_peak_usage()) : 'N/A'; return $data; From d6fbe36b1212aaf07ef019d9d7e30e089ae96d61 Mon Sep 17 00:00:00 2001 From: beaver Date: Sat, 29 Aug 2015 12:53:47 +0200 Subject: [PATCH 245/353] Various fixes --- Plugins/Test.php | 4 ++-- controller/admin/plugins.php | 8 ++++---- include/routes.php | 3 ++- index.php | 4 ++-- style/FeatherBB/view/admin/menu.php | 4 ++++ style/FeatherBB/view/admin/plugins.php | 4 ++-- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Plugins/Test.php b/Plugins/Test.php index 4a927277..a0a8cf37 100644 --- a/Plugins/Test.php +++ b/Plugins/Test.php @@ -32,12 +32,12 @@ public function runHooks() public function run() { $this->hooks->bind('get_forum_actions', function ($forum_actions) { - $forum_actions[] = 'Test1'; + $forum_actions[] = 'Test1'; return $forum_actions; }); $this->hooks->bind('get_forum_actions', function ($forum_actions) { - $forum_actions[] = 'Test2'; + $forum_actions[] = 'Test2'; return $forum_actions; }); } diff --git a/controller/admin/plugins.php b/controller/admin/plugins.php index fbb3295e..237a1410 100644 --- a/controller/admin/plugins.php +++ b/controller/admin/plugins.php @@ -67,10 +67,10 @@ public function activate() try { $plugin->activate($class); } catch (\Exception $e) { - redirect(get_link('admin/plugins/'), feather_escape($e->getMessage())); + redirect($this->feather->url->get('admin/plugins/'), feather_escape($e->getMessage())); } // Plugin has been activated, confirm and redirect - redirect(get_link('admin/plugins/'), 'Plugin "'.$class::$name.'" activated!'); + redirect($this->feather->url->get('admin/plugins/'), 'Plugin "'.$class::$name.'" activated!'); } public function deactivate() @@ -85,10 +85,10 @@ public function deactivate() try { $plugin->deactivate($class); } catch (\Exception $e) { - redirect(get_link('admin/plugins/'), feather_escape($e->getMessage())); + redirect($this->feather->url->get('admin/plugins/'), feather_escape($e->getMessage())); } // Plugin has been activated, confirm and redirect - redirect(get_link('admin/plugins/'), 'Plugin "'.$class::$name.'" deactivated!'); + redirect($this->feather->url->get('admin/plugins/'), 'Plugin "'.$class::$name.'" deactivated!'); } public function display() diff --git a/include/routes.php b/include/routes.php index 6c80aac8..60f8c8cf 100644 --- a/include/routes.php +++ b/include/routes.php @@ -163,6 +163,7 @@ $feather->group('/plugins', function() use ($feather) { $feather->map('/(/)', '\controller\admin\plugins:index')->via('GET', 'POST'); $feather->map('/activate(/)', '\controller\admin\plugins:activate')->via('GET'); + $feather->map('/deactivate(/)', '\controller\admin\plugins:deactivate')->via('GET'); // $feather->map('/loader(/)', '\controller\admin\plugins:display')->via('GET', 'POST'); }); @@ -184,4 +185,4 @@ // 404 not found $feather->notFound(function () { message(__('Bad request'), '404'); -}); \ No newline at end of file +}); diff --git a/index.php b/index.php index 630afa88..15b38fb4 100644 --- a/index.php +++ b/index.php @@ -21,8 +21,8 @@ require 'vendor/autoload.php'; // Load FeatherBB -// require 'include/classes/autoload.class.php'; -// \FeatherBB\Loader::registerAutoloader(); +require 'include/classes/autoload.class.php'; +\FeatherBB\Loader::registerAutoloader(); // Instantiate Slim and add CSRF $feather = new \Slim\Slim(); diff --git a/style/FeatherBB/view/admin/menu.php b/style/FeatherBB/view/admin/menu.php index bf468a21..da238ac6 100644 --- a/style/FeatherBB/view/admin/menu.php +++ b/style/FeatherBB/view/admin/menu.php @@ -68,6 +68,10 @@ echo ' class="isactive"'; } ?>> + > From 6d9889c4a4002381cc628b22fa0b8773c7aaed1e Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 12:55:00 +0200 Subject: [PATCH 246/353] First attempt to handle Exceptions --- include/routes.php | 14 ++++++++++++-- index.php | 2 +- model/viewforum.php | 3 ++- style/FeatherBB.css | 7 +++++++ style/FeatherBB/view/message.php | 6 +++--- view/message.php | 6 +++--- 6 files changed, 28 insertions(+), 10 deletions(-) diff --git a/include/routes.php b/include/routes.php index c2180bbd..460566a6 100644 --- a/include/routes.php +++ b/include/routes.php @@ -178,6 +178,16 @@ }); // 404 not found -$feather->notFound(function () { - message(__('Bad request'), '404'); +$feather->notFound(function () use ($feather){ + throw new \Exception('Page not found', 404); +}); + +$feather->error(function (\Exception $e) use ($feather) { + $feather->response->setStatus($e->getCode()); + $feather->view2->setPageInfo(array( + 'title' => array(feather_escape($feather->config['o_board_title']), __('Error')), + 'msg' => $e->getMessage(), + 'no_back_link' => false, + ))->addTemplate('message.php')->display(); + $feather->stop(); }); diff --git a/index.php b/index.php index 277c67d2..30191ae2 100644 --- a/index.php +++ b/index.php @@ -27,7 +27,7 @@ $feather_settings = array('config_file' => 'include/config.php', 'cache_dir' => 'cache/', - 'debug' => 'all'); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) + 'debug' => false); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) $feather->add(new \FeatherBB\Auth()); $feather->add(new \FeatherBB\Core($feather_settings)); diff --git a/model/viewforum.php b/model/viewforum.php index 0044e4a8..d1f57e7e 100644 --- a/model/viewforum.php +++ b/model/viewforum.php @@ -60,7 +60,8 @@ public function get_info_forum($id) $cur_forum = $cur_forum->find_one(); if (!$cur_forum) { - message(__('Bad request'), '404'); + //message(__('Bad request'), '404'); + throw new \Exception(__('Bad request'), '404'); } $cur_forum = $this->hook->fire('get_info_forum', $cur_forum); diff --git a/style/FeatherBB.css b/style/FeatherBB.css index be3f9568..ae505380 100644 --- a/style/FeatherBB.css +++ b/style/FeatherBB.css @@ -1261,6 +1261,13 @@ footer .footer-link a { border: 1px solid #ebccd1; color: #a94442 } + +.error { + background-color: #f2dede !important; + border: 1px solid #ebccd1 !important; + color: #a94442 !important +} + .flashmsg { position: fixed; min-width: 220px; diff --git a/style/FeatherBB/view/message.php b/style/FeatherBB/view/message.php index 740b040e..e3d23d0e 100644 --- a/style/FeatherBB/view/message.php +++ b/style/FeatherBB/view/message.php @@ -13,11 +13,11 @@ } ?> -
    -

    +
    +

    -

    +

    diff --git a/view/message.php b/view/message.php index 740b040e..e3d23d0e 100644 --- a/view/message.php +++ b/view/message.php @@ -13,11 +13,11 @@ } ?> -
    -

    +
    +

    -

    +

    From 803cbeadc1f562677bdc5da2a8bac0c1bc354966 Mon Sep 17 00:00:00 2001 From: beaver Date: Sat, 29 Aug 2015 13:54:34 +0200 Subject: [PATCH 247/353] Fix conflicts on admin/groups controller --- controller/admin/groups.php | 16 ---------------- include/classes/core.class.php | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/controller/admin/groups.php b/controller/admin/groups.php index fdec86a0..dea27bee 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -67,11 +67,7 @@ public function delete($id) if ($this->request->post('del_group_comply') || $this->request->post('del_group')) { $this->model->delete_group($id); } else { -<<<<<<< HEAD - generate_admin_menu('groups'); -======= \FeatherBB\AdminUtils::generateAdminMenu('groups'); ->>>>>>> development $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), @@ -84,11 +80,7 @@ public function delete($id) } } -<<<<<<< HEAD - generate_admin_menu('groups'); -======= \FeatherBB\AdminUtils::generateAdminMenu('groups'); ->>>>>>> development $this->feather->view2->setPageInfo(array( 'title' => array(feather_escape($this->config['o_board_title']), __('Admin'), __('User groups')), @@ -113,11 +105,7 @@ public function addedit($id = '') // Add/edit a group (stage 1) elseif ($this->request->post('add_group') || isset($id)) { -<<<<<<< HEAD - generate_admin_menu('groups'); -======= \FeatherBB\AdminUtils::generateAdminMenu('groups'); ->>>>>>> development $group = $this->model->info_add_group($groups, $id); @@ -132,11 +120,7 @@ public function addedit($id = '') 'id' => $id, 'group_list' => $this->model->get_group_list($groups, $group), ) -<<<<<<< HEAD - )->addTemplate('admin/groups/delete_group.php')->display(); -======= )->addTemplate('admin/groups/add_edit_group.php')->display(); ->>>>>>> development } } } diff --git a/include/classes/core.class.php b/include/classes/core.class.php index 921ebdcb..79c413fc 100644 --- a/include/classes/core.class.php +++ b/include/classes/core.class.php @@ -249,7 +249,7 @@ public function call() $this->app->config = $this->forum_settings; // Legacy extract($this->forum_settings); // Legacy - // new \plugin\plugintest(); + // Run hooks of activated plugins \FeatherBB\Plugin::runActivePlugins(); // Define time formats From 0de9e16090fde86de0c10aa04e7e611078ae48f1 Mon Sep 17 00:00:00 2001 From: beaver Date: Sat, 29 Aug 2015 14:05:35 +0200 Subject: [PATCH 248/353] Change util files case --- include/classes/{AdminUtils.class.php => adminutils.class.php} | 0 include/classes/{Utils.class.php => utils.class.php} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename include/classes/{AdminUtils.class.php => adminutils.class.php} (100%) rename include/classes/{Utils.class.php => utils.class.php} (100%) diff --git a/include/classes/AdminUtils.class.php b/include/classes/adminutils.class.php similarity index 100% rename from include/classes/AdminUtils.class.php rename to include/classes/adminutils.class.php diff --git a/include/classes/Utils.class.php b/include/classes/utils.class.php similarity index 100% rename from include/classes/Utils.class.php rename to include/classes/utils.class.php From d3a718f51a9d8771df71535a50ccd947a1e199bc Mon Sep 17 00:00:00 2001 From: adaur Date: Sat, 29 Aug 2015 14:20:05 +0200 Subject: [PATCH 249/353] Fix short tag --- style/FeatherBB/view/footer.new.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style/FeatherBB/view/footer.new.php b/style/FeatherBB/view/footer.new.php index 7565a387..48d8e705 100644 --- a/style/FeatherBB/view/footer.new.php +++ b/style/FeatherBB/view/footer.new.php @@ -146,7 +146,7 @@
    - + From 7f31516d823703b5816875b169962e34a8bd86d6 Mon Sep 17 00:00:00 2001 From: beaver Date: Sat, 29 Aug 2015 15:47:08 +0200 Subject: [PATCH 250/353] Small fixes for new installations --- img/avatars/.gitkeep | 0 include/bbcd_compile.php | 3 ++- include/classes/view.class.php | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 img/avatars/.gitkeep diff --git a/img/avatars/.gitkeep b/img/avatars/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/include/bbcd_compile.php b/include/bbcd_compile.php index b860102a..89f002c2 100644 --- a/include/bbcd_compile.php +++ b/include/bbcd_compile.php @@ -178,10 +178,11 @@ $pd['config']['valid_imgs'] = false; } +$feather = \Slim\Slim::getInstance(); // Validate and compute replacement texts for smilies array. $re_keys = array(); // Array of regex-safe smiley texts. $file_path = FEATHER_ROOT . 'img/smilies/'; // File system path to smilies. -$url_path = base(true); // Convert abs URL to relative URL. +$url_path = $feather->url->base(true); // Convert abs URL to relative URL. $url_path = preg_replace('%^https?://[^/]++(.*)$%i', '$1', $url_path) . '/img/smilies/'; foreach ($smilies as $smiley_text => $smiley_img) { // Loop through all smilieys in array. $file = $file_path . $smiley_img['file']; // Local file system address of smiley. diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 8f1c61c0..1a5507a1 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -354,7 +354,8 @@ public function __call($method, $args) protected function getDefaultPageInfo() { - if (!$this->app->cache->isCached('quickjump')) { + // Check if config file exists to avoid error when installing forum + if (!$this->app->cache->isCached('quickjump') && is_file($this->app->forum_env['FORUM_CONFIG_FILE'])) { $this->app->cache->store('quickjump', \model\cache::get_quickjump()); } From 448fe66cdc0c2c2a1752f31050c5c7268cd2bb38 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 16:22:04 +0200 Subject: [PATCH 251/353] Add custom FeatherBB\Error class --- controller/admin/bans.php | 2 +- controller/admin/categories.php | 4 ++-- controller/admin/groups.php | 4 ++-- controller/admin/index.php | 4 ++-- include/classes/error.class.php | 18 ++++++++++++++++++ include/routes.php | 3 ++- 6 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 include/classes/error.class.php diff --git a/controller/admin/bans.php b/controller/admin/bans.php index b10c6e67..964ca2c9 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -22,7 +22,7 @@ public function __construct() load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/bans.mo'); if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { - message(__('No permission'), '403'); + throw new \FeatherBB\Error(__('No permission'), '403'); } } diff --git a/controller/admin/categories.php b/controller/admin/categories.php index 5ad70ca7..da164cdb 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -44,7 +44,7 @@ public function add_category() public function edit_categories() { if (empty($this->request->post('cat'))) { - message(__('Bad request'), '404'); + throw new \FeatherBB\Error(__('Bad request'), '400'); } foreach ($this->request->post('cat') as $cat_id => $properties) { @@ -68,7 +68,7 @@ public function delete_category() $cat_to_delete = (int) $this->request->post('cat_to_delete'); if ($cat_to_delete < 1) { - message(__('Bad request'), '404'); + throw new \FeatherBB\Error(__('Bad request'), '400'); } if (intval($this->request->post('disclaimer')) != 1) { diff --git a/controller/admin/groups.php b/controller/admin/groups.php index dea27bee..2386b2a6 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -51,12 +51,12 @@ public function display() public function delete($id) { if ($id < 5) { - message(__('Bad request'), '404'); + throw new \FeatherBB\Error(__('Bad request'), 403); } // Make sure we don't remove the default group if ($id == $this->config['o_default_user_group']) { - message(__('Cannot remove default message')); + throw new \FeatherBB\Error(__('Cannot remove default message'), 403); } // Check if this group has any members diff --git a/controller/admin/index.php b/controller/admin/index.php index d4f46e6b..a8589548 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -51,11 +51,11 @@ public function display($action = null) $latest_version = trim(@file_get_contents('http://featherbb.org/latest_version')); if (empty($latest_version)) { - message(__('Upgrade check failed message')); + throw new \FeatherBB\Error(__('Upgrade check failed message'), 500); } if (version_compare($this->config['o_cur_version'], $latest_version, '>=')) { - message(__('Running latest version message')); + message(__('Running latest version message'), 200); } else { message(sprintf(__('New version available message'), 'FeatherBB.org')); } diff --git a/include/classes/error.class.php b/include/classes/error.class.php new file mode 100644 index 00000000..68142588 --- /dev/null +++ b/include/classes/error.class.php @@ -0,0 +1,18 @@ +notFound(function () use ($feather){ - throw new \Exception('Page not found', 404); + throw new \FeatherBB\Error('Page not found', 404); }); $feather->error(function (\Exception $e) use ($feather) { $feather->response->setStatus($e->getCode()); $feather->view2->setPageInfo(array( 'title' => array(feather_escape($feather->config['o_board_title']), __('Error')), + 'msg_title' => __('Error'); 'msg' => $e->getMessage(), 'no_back_link' => false, ))->addTemplate('message.php')->display(); From 79a2d39ae90cf58a2b8c3f9669c5f21236711f3e Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 16:22:36 +0200 Subject: [PATCH 252/353] Update view forum and rename message.php --- model/viewforum.php | 3 +-- style/FeatherBB/view/{message.php => error.php} | 17 +++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) rename style/FeatherBB/view/{message.php => error.php} (52%) diff --git a/model/viewforum.php b/model/viewforum.php index d1f57e7e..126ee3dc 100644 --- a/model/viewforum.php +++ b/model/viewforum.php @@ -60,8 +60,7 @@ public function get_info_forum($id) $cur_forum = $cur_forum->find_one(); if (!$cur_forum) { - //message(__('Bad request'), '404'); - throw new \Exception(__('Bad request'), '404'); + throw new \FeatherBB\Error(__('Bad request'), '404'); } $cur_forum = $this->hook->fire('get_info_forum', $cur_forum); diff --git a/style/FeatherBB/view/message.php b/style/FeatherBB/view/error.php similarity index 52% rename from style/FeatherBB/view/message.php rename to style/FeatherBB/view/error.php index e3d23d0e..d638a206 100644 --- a/style/FeatherBB/view/message.php +++ b/style/FeatherBB/view/error.php @@ -14,12 +14,13 @@ ?>
    -

    -
    -
    -

    -

    -
    -
    +

    +
    +
    +

    + '.__('Go back').'

    '; + } ?> +
    +
    From 5d5ebc7a5a5aea2d3ac5f544946fc628a52f5478 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 16:23:40 +0200 Subject: [PATCH 253/353] Patch error handling --- include/routes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/routes.php b/include/routes.php index 81cf2749..657909cf 100644 --- a/include/routes.php +++ b/include/routes.php @@ -191,9 +191,9 @@ $feather->response->setStatus($e->getCode()); $feather->view2->setPageInfo(array( 'title' => array(feather_escape($feather->config['o_board_title']), __('Error')), - 'msg_title' => __('Error'); + 'msg_title' => __('Error'), 'msg' => $e->getMessage(), 'no_back_link' => false, - ))->addTemplate('message.php')->display(); + ))->addTemplate('error.php')->display(); $feather->stop(); }); From 777e048cba33264f91e06942e029bcd9170e343a Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 16:31:48 +0200 Subject: [PATCH 254/353] Add addMessage helper in view --- include/classes/view.class.php | 11 +++++++++-- include/functions.php | 3 +-- style/FeatherBB/view/header.new.php | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 1a5507a1..b557f6ae 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -20,12 +20,10 @@ class View $validation = array( 'page_number' => 'intval', 'active_page' => 'strval', - //'focus_element' => 'strval', 'is_indexed' => 'boolval', 'admin_console' => 'boolval', 'has_reports' => 'boolval', 'paging_links' => 'strval', - //'required_fields' => 'strval', 'has_reports' => 'boolval', 'footer_style' => 'strval', 'fid' => 'intval', @@ -340,6 +338,15 @@ public function getTemplates() return $output; } + public function addMessage($msg, $type = 'info') + { + if (isset($this->environment['slim.flash'])) { + if (in_array($type, array('info', 'error'))) { + $this->environment['slim.flash']->set($type, (string) $msg); + } + } + } + public function __call($method, $args) { $method = mb_substr(preg_replace_callback('/([A-Z])/', function ($c) { diff --git a/include/functions.php b/include/functions.php index 316e88d5..6c27ec5e 100644 --- a/include/functions.php +++ b/include/functions.php @@ -674,7 +674,7 @@ function redirect($destination_url, $message = null) $feather = \Slim\Slim::getInstance(); // Add a flash message - $feather->flash('message', $message); + $feather->flash('info', $message); $feather->redirect($destination_url); } @@ -832,4 +832,3 @@ function breadcrumbs_admin(array $links) } return implode(' » ', $tmp); } - diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php index 784fcf2f..8efb1869 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/FeatherBB/view/header.new.php @@ -220,7 +220,7 @@ function process_form(the_form)

    ×

    -

    +

    From eef24523820854f64cc739083bd66bf3617fef03 Mon Sep 17 00:00:00 2001 From: capkokoon Date: Sat, 29 Aug 2015 16:59:13 +0200 Subject: [PATCH 255/353] Fix typos --- include/classes/view.class.php | 4 ++-- style/FeatherBB/view/header.new.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index b557f6ae..d63e8881 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -340,9 +340,9 @@ public function getTemplates() public function addMessage($msg, $type = 'info') { - if (isset($this->environment['slim.flash'])) { + if (isset($this->app->environment['slim.flash'])) { if (in_array($type, array('info', 'error'))) { - $this->environment['slim.flash']->set($type, (string) $msg); + $this->app->environment['slim.flash']->now($type, (string) $msg); } } } diff --git a/style/FeatherBB/view/header.new.php b/style/FeatherBB/view/header.new.php index 8efb1869..57687b3c 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/FeatherBB/view/header.new.php @@ -206,8 +206,8 @@ function process_form(the_form)
    - - + + @@ -84,10 +84,10 @@
    +
    +
    -
    \ No newline at end of file +
    diff --git a/style/FeatherBB/view/admin/parser.php b/style/themes/FeatherBB/view/admin/parser.php similarity index 100% rename from style/FeatherBB/view/admin/parser.php rename to style/themes/FeatherBB/view/admin/parser.php diff --git a/style/FeatherBB/view/admin/permissions.php b/style/themes/FeatherBB/view/admin/permissions.php similarity index 100% rename from style/FeatherBB/view/admin/permissions.php rename to style/themes/FeatherBB/view/admin/permissions.php diff --git a/style/FeatherBB/view/admin/plugins.php b/style/themes/FeatherBB/view/admin/plugins.php similarity index 100% rename from style/FeatherBB/view/admin/plugins.php rename to style/themes/FeatherBB/view/admin/plugins.php diff --git a/style/FeatherBB/view/admin/reports.php b/style/themes/FeatherBB/view/admin/reports.php similarity index 100% rename from style/FeatherBB/view/admin/reports.php rename to style/themes/FeatherBB/view/admin/reports.php diff --git a/style/FeatherBB/view/admin/statistics.php b/style/themes/FeatherBB/view/admin/statistics.php similarity index 100% rename from style/FeatherBB/view/admin/statistics.php rename to style/themes/FeatherBB/view/admin/statistics.php diff --git a/style/FeatherBB/view/admin/users/admin_users.php b/style/themes/FeatherBB/view/admin/users/admin_users.php similarity index 100% rename from style/FeatherBB/view/admin/users/admin_users.php rename to style/themes/FeatherBB/view/admin/users/admin_users.php diff --git a/style/FeatherBB/view/admin/users/ban_users.php b/style/themes/FeatherBB/view/admin/users/ban_users.php similarity index 100% rename from style/FeatherBB/view/admin/users/ban_users.php rename to style/themes/FeatherBB/view/admin/users/ban_users.php diff --git a/style/FeatherBB/view/admin/users/delete_users.php b/style/themes/FeatherBB/view/admin/users/delete_users.php similarity index 100% rename from style/FeatherBB/view/admin/users/delete_users.php rename to style/themes/FeatherBB/view/admin/users/delete_users.php diff --git a/style/FeatherBB/view/admin/users/find_users.php b/style/themes/FeatherBB/view/admin/users/find_users.php similarity index 100% rename from style/FeatherBB/view/admin/users/find_users.php rename to style/themes/FeatherBB/view/admin/users/find_users.php diff --git a/style/FeatherBB/view/admin/users/move_users.php b/style/themes/FeatherBB/view/admin/users/move_users.php similarity index 100% rename from style/FeatherBB/view/admin/users/move_users.php rename to style/themes/FeatherBB/view/admin/users/move_users.php diff --git a/style/FeatherBB/view/admin/users/search_ip.php b/style/themes/FeatherBB/view/admin/users/search_ip.php similarity index 100% rename from style/FeatherBB/view/admin/users/search_ip.php rename to style/themes/FeatherBB/view/admin/users/search_ip.php diff --git a/style/FeatherBB/view/admin/users/show_users.php b/style/themes/FeatherBB/view/admin/users/show_users.php similarity index 100% rename from style/FeatherBB/view/admin/users/show_users.php rename to style/themes/FeatherBB/view/admin/users/show_users.php diff --git a/style/FeatherBB/view/delete.php b/style/themes/FeatherBB/view/delete.php similarity index 100% rename from style/FeatherBB/view/delete.php rename to style/themes/FeatherBB/view/delete.php diff --git a/style/FeatherBB/view/edit.php b/style/themes/FeatherBB/view/edit.php similarity index 100% rename from style/FeatherBB/view/edit.php rename to style/themes/FeatherBB/view/edit.php diff --git a/style/FeatherBB/view/error.php b/style/themes/FeatherBB/view/error.php similarity index 100% rename from style/FeatherBB/view/error.php rename to style/themes/FeatherBB/view/error.php diff --git a/style/FeatherBB/view/footer.new.php b/style/themes/FeatherBB/view/footer.new.php similarity index 98% rename from style/FeatherBB/view/footer.new.php rename to style/themes/FeatherBB/view/footer.new.php index 770c3f0a..b66f807c 100644 --- a/style/FeatherBB/view/footer.new.php +++ b/style/themes/FeatherBB/view/footer.new.php @@ -155,6 +155,6 @@ foreach ($script['params'] as $key => $value) { echo $key.'="'.$value.'" '; } - echo 'href="'.$feather->url->base().'/'.$script['file'].'"/>'."\n"; + echo 'src="'.$feather->url->base().'/'.$script['file'].'"/>'."\n"; } ?> diff --git a/style/FeatherBB/view/footer.php b/style/themes/FeatherBB/view/footer.php similarity index 98% rename from style/FeatherBB/view/footer.php rename to style/themes/FeatherBB/view/footer.php index 4932ccfa..9e19de90 100644 --- a/style/FeatherBB/view/footer.php +++ b/style/themes/FeatherBB/view/footer.php @@ -127,7 +127,7 @@ - + diff --git a/style/themes/FeatherBB/view/header.new.php b/style/themes/FeatherBB/view/header.new.php new file mode 100644 index 00000000..cba067ee --- /dev/null +++ b/style/themes/FeatherBB/view/header.new.php @@ -0,0 +1,233 @@ + + + + + + + + +'."\n"; +} ?> + <?php echo generate_page_title($title, $page_number) ?> + $items) { + if ($type == 'js') { + continue; + } + echo "\t".''."\n"; + foreach ($items as $item) { + echo "\t".' $value) { + echo $key.'="'.$value.'" '; + } + echo 'href="'.$feather->url->base().'/'.$item['file'].'">'."\n"; + } +} +if ($admin_console) { + if (file_exists($feather->forum_env['FEATHER_ROOT'].'style/themes/'.$feather->user->style.'/base_admin.css')) { + echo "\t".''."\n"; + } else { + echo "\t".''."\n"; + } +} +if (isset($required_fields)) : + // Output JavaScript to validate form (make sure required fields are filled out) + + ?> + + + + +> +
    + + +
    +
    +

    + +

    utils->escape($feather->forum_settings['o_board_title']) ?>

    +
    +
    forum_settings['o_board_desc']) ?>
    +

    +
    +
    + +user->is_guest) { ?> +

    +'; + echo "\t\t\t\t\t\t".'
  • '.__('Logged in as').' '.$feather->utils->escape($feather->user->username).'
  • '."\n"; + echo "\t\t\t\t\t\t".'
  • '.sprintf(__('Last visit'), $feather->utils->format_time($feather->user->last_visit)).'
  • '."\n"; + + if ($feather->user->is_admmod) { + if ($feather->forum_settings['o_report_method'] == '0' || $feather->forum_settings['o_report_method'] == '2') { + if ($has_reports) { + echo "\t\t\t\t\t\t".''."\n"; + } + } + + if ($feather->forum_settings['o_maintenance'] == '1') { + echo "\t\t\t\t\t\t".''."\n"; + } + } + echo "\t\t\t\t\t".''."\n"; +} + +if ($feather->user->g_read_board == '1' && $feather->user->g_search == '1') { + echo "\t\t\t\t\t".''."\n"; +} ?> +
    +
    +
    +
    +
    + user->g_read_board == '1' && $feather->forum_settings['o_announcement'] == '1') : ?> +
    +

    +
    +
    +
    forum_settings['o_announcement_message'] ?>
    +
    +
    +
    + + getMessages())) : ?> + + getMessages() as $type => $message) { ?> +
    +

    ×

    +

    utils->escape($message) ?>

    +
    + + +
    +
    + +
    +
    diff --git a/style/FeatherBB/view/header.php b/style/themes/FeatherBB/view/header.php similarity index 100% rename from style/FeatherBB/view/header.php rename to style/themes/FeatherBB/view/header.php diff --git a/style/FeatherBB/view/help.php b/style/themes/FeatherBB/view/help.php similarity index 100% rename from style/FeatherBB/view/help.php rename to style/themes/FeatherBB/view/help.php diff --git a/style/FeatherBB/view/index.php b/style/themes/FeatherBB/view/index.php similarity index 100% rename from style/FeatherBB/view/index.php rename to style/themes/FeatherBB/view/index.php diff --git a/style/FeatherBB/view/install.php b/style/themes/FeatherBB/view/install.php similarity index 100% rename from style/FeatherBB/view/install.php rename to style/themes/FeatherBB/view/install.php diff --git a/style/FeatherBB/view/login/form.php b/style/themes/FeatherBB/view/login/form.php similarity index 100% rename from style/FeatherBB/view/login/form.php rename to style/themes/FeatherBB/view/login/form.php diff --git a/style/FeatherBB/view/login/password_forgotten.php b/style/themes/FeatherBB/view/login/password_forgotten.php similarity index 100% rename from style/FeatherBB/view/login/password_forgotten.php rename to style/themes/FeatherBB/view/login/password_forgotten.php diff --git a/style/FeatherBB/view/misc/email.php b/style/themes/FeatherBB/view/misc/email.php similarity index 100% rename from style/FeatherBB/view/misc/email.php rename to style/themes/FeatherBB/view/misc/email.php diff --git a/style/FeatherBB/view/misc/report.php b/style/themes/FeatherBB/view/misc/report.php similarity index 100% rename from style/FeatherBB/view/misc/report.php rename to style/themes/FeatherBB/view/misc/report.php diff --git a/style/FeatherBB/view/misc/rules.php b/style/themes/FeatherBB/view/misc/rules.php similarity index 100% rename from style/FeatherBB/view/misc/rules.php rename to style/themes/FeatherBB/view/misc/rules.php diff --git a/style/FeatherBB/view/moderate/delete_posts.php b/style/themes/FeatherBB/view/moderate/delete_posts.php similarity index 100% rename from style/FeatherBB/view/moderate/delete_posts.php rename to style/themes/FeatherBB/view/moderate/delete_posts.php diff --git a/style/FeatherBB/view/moderate/delete_topics.php b/style/themes/FeatherBB/view/moderate/delete_topics.php similarity index 100% rename from style/FeatherBB/view/moderate/delete_topics.php rename to style/themes/FeatherBB/view/moderate/delete_topics.php diff --git a/style/FeatherBB/view/moderate/merge_topics.php b/style/themes/FeatherBB/view/moderate/merge_topics.php similarity index 100% rename from style/FeatherBB/view/moderate/merge_topics.php rename to style/themes/FeatherBB/view/moderate/merge_topics.php diff --git a/style/FeatherBB/view/moderate/moderator_forum.php b/style/themes/FeatherBB/view/moderate/moderator_forum.php similarity index 100% rename from style/FeatherBB/view/moderate/moderator_forum.php rename to style/themes/FeatherBB/view/moderate/moderator_forum.php diff --git a/style/FeatherBB/view/moderate/move_topics.php b/style/themes/FeatherBB/view/moderate/move_topics.php similarity index 100% rename from style/FeatherBB/view/moderate/move_topics.php rename to style/themes/FeatherBB/view/moderate/move_topics.php diff --git a/style/FeatherBB/view/moderate/posts_view.php b/style/themes/FeatherBB/view/moderate/posts_view.php similarity index 100% rename from style/FeatherBB/view/moderate/posts_view.php rename to style/themes/FeatherBB/view/moderate/posts_view.php diff --git a/style/FeatherBB/view/moderate/split_posts.php b/style/themes/FeatherBB/view/moderate/split_posts.php similarity index 100% rename from style/FeatherBB/view/moderate/split_posts.php rename to style/themes/FeatherBB/view/moderate/split_posts.php diff --git a/style/FeatherBB/view/post.php b/style/themes/FeatherBB/view/post.php similarity index 100% rename from style/FeatherBB/view/post.php rename to style/themes/FeatherBB/view/post.php diff --git a/style/FeatherBB/view/profile/change_mail.php b/style/themes/FeatherBB/view/profile/change_mail.php similarity index 100% rename from style/FeatherBB/view/profile/change_mail.php rename to style/themes/FeatherBB/view/profile/change_mail.php diff --git a/style/FeatherBB/view/profile/change_pass.php b/style/themes/FeatherBB/view/profile/change_pass.php similarity index 100% rename from style/FeatherBB/view/profile/change_pass.php rename to style/themes/FeatherBB/view/profile/change_pass.php diff --git a/style/FeatherBB/view/profile/delete_user.php b/style/themes/FeatherBB/view/profile/delete_user.php similarity index 100% rename from style/FeatherBB/view/profile/delete_user.php rename to style/themes/FeatherBB/view/profile/delete_user.php diff --git a/style/FeatherBB/view/profile/menu.php b/style/themes/FeatherBB/view/profile/menu.php similarity index 100% rename from style/FeatherBB/view/profile/menu.php rename to style/themes/FeatherBB/view/profile/menu.php diff --git a/style/FeatherBB/view/profile/section_admin.php b/style/themes/FeatherBB/view/profile/section_admin.php similarity index 100% rename from style/FeatherBB/view/profile/section_admin.php rename to style/themes/FeatherBB/view/profile/section_admin.php diff --git a/style/FeatherBB/view/profile/section_display.php b/style/themes/FeatherBB/view/profile/section_display.php similarity index 98% rename from style/FeatherBB/view/profile/section_display.php rename to style/themes/FeatherBB/view/profile/section_display.php index 8fc83a15..7cce9e3c 100644 --- a/style/FeatherBB/view/profile/section_display.php +++ b/style/themes/FeatherBB/view/profile/section_display.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -21,7 +21,7 @@
    -
    \ No newline at end of file +
    diff --git a/style/FeatherBB/view/profile/section_essentials.php b/style/themes/FeatherBB/view/profile/section_essentials.php similarity index 99% rename from style/FeatherBB/view/profile/section_essentials.php rename to style/themes/FeatherBB/view/profile/section_essentials.php index 3d82ca0b..b45114f6 100644 --- a/style/FeatherBB/view/profile/section_essentials.php +++ b/style/themes/FeatherBB/view/profile/section_essentials.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -209,7 +209,7 @@ 1) { @@ -255,4 +255,4 @@
    -
    \ No newline at end of file +
    diff --git a/style/FeatherBB/view/profile/section_messaging.php b/style/themes/FeatherBB/view/profile/section_messaging.php similarity index 100% rename from style/FeatherBB/view/profile/section_messaging.php rename to style/themes/FeatherBB/view/profile/section_messaging.php diff --git a/style/FeatherBB/view/profile/section_personal.php b/style/themes/FeatherBB/view/profile/section_personal.php similarity index 100% rename from style/FeatherBB/view/profile/section_personal.php rename to style/themes/FeatherBB/view/profile/section_personal.php diff --git a/style/FeatherBB/view/profile/section_personality.php b/style/themes/FeatherBB/view/profile/section_personality.php similarity index 100% rename from style/FeatherBB/view/profile/section_personality.php rename to style/themes/FeatherBB/view/profile/section_personality.php diff --git a/style/FeatherBB/view/profile/section_privacy.php b/style/themes/FeatherBB/view/profile/section_privacy.php similarity index 100% rename from style/FeatherBB/view/profile/section_privacy.php rename to style/themes/FeatherBB/view/profile/section_privacy.php diff --git a/style/FeatherBB/view/profile/upload_avatar.php b/style/themes/FeatherBB/view/profile/upload_avatar.php similarity index 100% rename from style/FeatherBB/view/profile/upload_avatar.php rename to style/themes/FeatherBB/view/profile/upload_avatar.php diff --git a/style/FeatherBB/view/profile/view_profile.php b/style/themes/FeatherBB/view/profile/view_profile.php similarity index 100% rename from style/FeatherBB/view/profile/view_profile.php rename to style/themes/FeatherBB/view/profile/view_profile.php diff --git a/style/FeatherBB/view/register/email.php b/style/themes/FeatherBB/view/register/email.php similarity index 100% rename from style/FeatherBB/view/register/email.php rename to style/themes/FeatherBB/view/register/email.php diff --git a/style/FeatherBB/view/register/form.php b/style/themes/FeatherBB/view/register/form.php similarity index 100% rename from style/FeatherBB/view/register/form.php rename to style/themes/FeatherBB/view/register/form.php diff --git a/style/FeatherBB/view/register/rules.php b/style/themes/FeatherBB/view/register/rules.php similarity index 100% rename from style/FeatherBB/view/register/rules.php rename to style/themes/FeatherBB/view/register/rules.php diff --git a/style/FeatherBB/view/search/footer.php b/style/themes/FeatherBB/view/search/footer.php similarity index 100% rename from style/FeatherBB/view/search/footer.php rename to style/themes/FeatherBB/view/search/footer.php diff --git a/style/FeatherBB/view/search/form.php b/style/themes/FeatherBB/view/search/form.php similarity index 100% rename from style/FeatherBB/view/search/form.php rename to style/themes/FeatherBB/view/search/form.php diff --git a/style/FeatherBB/view/search/header.php b/style/themes/FeatherBB/view/search/header.php similarity index 100% rename from style/FeatherBB/view/search/header.php rename to style/themes/FeatherBB/view/search/header.php diff --git a/style/FeatherBB/view/search/posts.php b/style/themes/FeatherBB/view/search/posts.php similarity index 100% rename from style/FeatherBB/view/search/posts.php rename to style/themes/FeatherBB/view/search/posts.php diff --git a/style/FeatherBB/view/search/topics.php b/style/themes/FeatherBB/view/search/topics.php similarity index 100% rename from style/FeatherBB/view/search/topics.php rename to style/themes/FeatherBB/view/search/topics.php diff --git a/style/FeatherBB/view/userlist.php b/style/themes/FeatherBB/view/userlist.php similarity index 100% rename from style/FeatherBB/view/userlist.php rename to style/themes/FeatherBB/view/userlist.php diff --git a/style/FeatherBB/view/viewforum.php b/style/themes/FeatherBB/view/viewforum.php similarity index 100% rename from style/FeatherBB/view/viewforum.php rename to style/themes/FeatherBB/view/viewforum.php diff --git a/style/FeatherBB/view/viewtopic.php b/style/themes/FeatherBB/view/viewtopic.php similarity index 100% rename from style/FeatherBB/view/viewtopic.php rename to style/themes/FeatherBB/view/viewtopic.php diff --git a/style/themes/MyFeatherBB/base_admin.css b/style/themes/MyFeatherBB/base_admin.css new file mode 100644 index 00000000..c86ecfa6 --- /dev/null +++ b/style/themes/MyFeatherBB/base_admin.css @@ -0,0 +1 @@ +#adminmenu{float:left;width:27.5%}#adminconsole .block{width:70%;margin:0 0 0 30%}#adminconsole .block h2{border:1px solid #d8d8d8;border-bottom:none;padding:5px;margin:0;text-indent:10px;font-weight:400;font-size:18px;background-color:#f5f5f5;border-radius:3px 3px 0 0}#adminconsole .block .box{border-radius:0 0 3px 3px;border:1px solid #d8d8d8;background-color:#fff;margin-bottom:15px}#adminconsole .block .box .inbox,#adminconsole.block2col div.block div#adalerts.box p{padding:15px}#adminconsole .block #adintro p{padding:0 0 7px}#adminconsole .block #adstats dl{margin:0}#adminconsole .block #adstats dl dt{font-weight:700;padding:2px}#adminconsole .block #adstats dl dd{padding:2px;margin:0 0 7px}#adminconsole .blockform{width:70%;margin:0 0 0 30%}#adminconsole .blockform .box{margin-bottom:15px}#adminconsole .blockform .box .inbox{padding:15px}#adminconsole .blockform .box #stopspamforum span{font-weight:700}#adminconsole .blockform .box .submitend,#adminconsole .blockform .box .submittop{margin:7px;text-align: center;}#adminconsole .blockform .box .infldset tr{border-top:2px solid #d8d8d8;border-bottom:2px solid #d8d8d8}#adminconsole .blockform .box .infldset tr:first-child{border-top:none}#adminconsole .blockform .box .infldset tr:last-child{border-bottom:none}#adminconsole .blockform .box .infldset tr th{width:15em;vertical-align:top;text-align:left;padding:7px;font-weight:400}#adminconsole .blockform .box .infldset tr td{padding:7px}#adminconsole .blockform .box .infldset tr td input{box-shadow:inset 0 1px 2px rgba(0,0,0,.075);border:1px solid #ccc;border-radius:3px;background-color:#fafafa;padding:6px 8px;margin:6px 0}#adminconsole .blockform .box .infldset tr td input:focus{border:1px solid #51a7e8;background-color:#fff;box-shadow:0 0 5px rgba(81,167,232,.5);outline:0}#adminconsole .blockform .box .infldset tr td textarea{margin:7px 0;box-shadow:inset 0 1px 2px rgba(0,0,0,.075);border:1px solid #ccc;border-radius:3px;background-color:#fafafa;padding:7px 8px}#adminconsole .blockform .box .infldset tr td textarea:focus{border:1px solid #51a7e8;background-color:#fff;box-shadow:0 0 5px rgba(81,167,232,.5);outline:0}#adminconsole .blockform .box .infldset tr td label,#adminconsole .blockform .box .infldset tr td span{display:block}#adminconsole .blockform .box .infldset tr td .conl{display:inline-block;margin-left:3px}#adminconsole .blockform .box .infldset tr .location span{display:inline}#adminconsole .clearer{clear:both}input[type=radio]:focus{box-shadow:none!important}@media only screen and (max-width:768px){.block,.blockform{margin:0!important}.block{width:100%!important}.block label input{width:80%!important}.blockform{width:100%!important}.blockform td,.blockform th{display:block}.blockform input,.blockform textarea{width:80%}.blockform input[type=checkbox]{width:7%!important}} \ No newline at end of file diff --git a/style/themes/MyFeatherBB/fonts/BebasNeue-webfont.eot b/style/themes/MyFeatherBB/fonts/BebasNeue-webfont.eot new file mode 100644 index 0000000000000000000000000000000000000000..6170eea058e048efde81c3818aa506d0a806a5cc GIT binary patch literal 16442 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 z⪚;^>^Ws_cMDY69W-y7!idFCXx+1k$Vy149@*a4dHe4>|qXO2=1hYDZ`p@2B;KN*0Y~vhj&cXG}q+y zMBx7!KT@s!RULsBv%*a_L)6Fr<@aiS-pjp zXMDWEuBt(GVeo|{nUqX4ip-`yMk#Xqb!Svw5jH(a zFo3UKy`y6t1;&||2qqC?*ee_&YrjF}{-$ItFE-`saeq<#T;xA1mO0Ucv-wwwlj~Q<~|UYuvZv zE)h12Kzsr zS>PM=R7!jsvxo#TwrjV|8%Ik&eS5FPSnUz*TO*`A-rx3}ck2KYt2F&NY)>DJ<*~h_ zD=K>OY$I??#-0xBIe*EnwofDpyuXjVCa^mdt4x|`R?bVOAM!{^R6bKv;V<0+vFx@= z2c^4dc+eSF{ll?&on@e{>=92W}iQ=UAx zas3q*RkE3$2^b5v3%G|NA3U8{AdEy?R1BW7UEzE47|btE=x%sIeR`sAJJ`AO`djn7 zJ)n)uHB%8uxH=pfG|B%FXOK8Y_oYIrru1&H_Nf8r;^VmNwJ|%`c|%dp_t4#k5yy9f zDWp+Bm48og4*Navcvg;e!!lXP7dR_(;l$Z2t`K-Kfc_js z<1OtecKBqh)Lx(_p3W*m(AW96zi*hK3k=oGAISX~KnIFv9Fvxc;9;B(ZnNMP+RG1p zMWXDPhAMb;(NI}y`xl6)rSX32UgP*y0`PZhxM|e4yTFaO16Jm5lj z29VufvB-!d%=x)%mk)7IB{7H?^w<{HZQeSYS^54YXWyX1v+!KYNGS)-!62{c1#(!U z%>4ZwC`R>}3`ACl6wE~)HDa23Ex^$u8ZD3{XC+%eb0(x+_Zh}!So|INNj{+i4kz-J z7oWtW)GvZFQaZKuLbb=sRiH0a;iDcc6uCt_G81hQbCEvnoHEB>vUKt%m?l5-3Jv!C zo{4=gl5Hs@?Y*BO{D)N0!U`` zcQlx59gQtc4bZhJDV3+}gxwPwBrxoMYpFB{K#!VB9nj-&Tx1p}-TojTqSKZE)I^1` z6adE1E!qTQ#jITRAc0DjV9s%K#$)sj4_Cnz@X4=@YU=IFioXXOroIhvBuZM`{W#(uX)~!m0ZM2O4UBBS)tRugNyDKihzhGX zU^qL&jQ+rDR_{m0kLzUEJMQtQb}B+6cQ}=3RYSA1crfeAZoxn%UYxi-gSRmLi=LhA zT^_N4z4oq*NKkQ;r}uYd)OPFYPp0z+7YVH$*3ZOjvyYe!~zPO4EK zF^fER(!lh7XzeU0zJ{V*dr+x(D(~$}Z6~|3UxnFsHu(Sr9xK;zxTL4K%re<$!A% zNEhQCg4&K`Ul>1G=wAC}BIvW$@y4)4@PaYLxIdF}7eo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/style/themes/MyFeatherBB/fonts/BebasNeue-webfont.ttf b/style/themes/MyFeatherBB/fonts/BebasNeue-webfont.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7e0927722594fd4b98cb97ef8d845f8ed63c8099 GIT binary patch literal 48968 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 K_s@sV+5ZGUad}k$ literal 0 HcmV?d00001 diff --git a/style/themes/MyFeatherBB/fonts/BebasNeue-webfont.woff b/style/themes/MyFeatherBB/fonts/BebasNeue-webfont.woff new file mode 100644 index 0000000000000000000000000000000000000000..15b116f051c39b88e32b9ace8caeadb783896b35 GIT binary patch literal 17824 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 literal 0 HcmV?d00001 diff --git a/style/themes/MyFeatherBB/img/closed.png b/style/themes/MyFeatherBB/img/closed.png new file mode 100644 index 0000000000000000000000000000000000000000..ea86846740ef8bd1ef9eb6bc8c55e870369a7b0c GIT binary patch literal 1835 zcmZ{lXE+;b8^>eMv?xVY#fZ@;ky=HOnkli45L*zVC>gJ+RaGm58m(1ZjZ@<&)e1_5 zW46`QIt?{yl}4O$&^pG6^L~0iyw`L8pWk!c*Yp41&$owUXJY~6zrYUw0DuTfQwJ77 zr{d*i?S!bPzgXb*v9d4)oSd%m*R{E<4qv#X3xP$;e`P)#YMqk2gM~U zt2)9I?uhQ&bPBf4b(SzxX1}TO7q!~i)h)}xmCl}&=TJWD%D>{EOirH;B^9R6oUPLE zA7{+NKIb5Fu}_ThC?Pn)aGpn8AemsK>2E_(eqmM)T6n2yrH#Bu?c6`Ai|?2CJmFQk zjGXyxEw*$m_I-3WK_XhaG$UY1)*`{~!16nqv;>9yvhpLnCk>o>?hpEef}mkC=t2xr z@+gH6czgCl_y#E$+BLFE2GWf?icAP9DR@5LcU7q*L^kvxrQmra2493;Rm*)g_o;eVFWR*B@7;FUtyM(&`rftR z-r3)CDu32j{~q4Vv&u(Q^fM5yI|`|6<-P$x)j#ZC<)lxGt5rCCO|!AZ#%r-G9s zJ?lc0><+_Y=YAAcCQz)jA%gjzK#t7#tWmy-jhnoa?I3sOBzxeZ>tRE007^{gnev13 zR#9cvv-(od3FNnU>Z&eN=NUa3oj@C?AJck`2hAHq4)~XVKg!lhCy!WR+CTEaNLww)Q;wK-X8Ypc&_?Oj=ZlnUZB zFRwCG*w?`&PIu~i-&!IF&}R5@J=hA2?N3wk04 zab`1JT~N?dUrpw;`7D3wo2Av%=?9*Qkd1BNN8)Dc#Y0~aB@Q=d-qHD z;A#QU{^xzJQTHVoR4|(gzITc-TXxXE1x0s>I^Rt59>P2T?Y-fRI1H@fk&Ba|GgE>@ zHCicBw?p8vmWGqk@d%=K7guy|I*@ezDtXjmhS=O5F1&-s^&UpY2oBg;KBWPt-J~#jAK0%-H$o@p1asec zrbY%YUbsC7MTI~TAW4c}$Hv_HMai+<)+SFREhF+x0wp0uVL9Zpm_a@WA2_s~zYGI%EQ4JsxwmiaCYJ}_@E9+{g63_^UI_;ovz+hx__Z%ulc(TDZpAA0kV z0%uF~{~JZ(lgE|yY2RyV58RV#U7xaleLTiNXN($BHtJxgxnwg^MH{*CyaD4o`8=)g zxY7ZcsZb#yUwSK43^wU`uV%I1x#qBk8Uc~k-QfWy4+*$jTZ`8EG|%lwe+XIGh|O`N z$PlaxMz>IP1=eJgz|)hX^QQR%`Ksr}ZpC$}d3@hki#nPYSFNE;w-62<2c_A(Gza2(1j`n2_r{^i;z`GNLmQS&~LSo4#hN&>W%OH6=;g>Lf;vEbg3xNBD`CvhaP)q>U0gLgwiyOuo Qur2`*W;UixH@p-60p!+4F#rGn literal 0 HcmV?d00001 diff --git a/style/themes/MyFeatherBB/img/new.png b/style/themes/MyFeatherBB/img/new.png new file mode 100644 index 0000000000000000000000000000000000000000..1fb470cd49621d62b9a8a9b8fe47aff83d9f0186 GIT binary patch literal 1897 zcmZ{ldpr~R8^%7=YM64rosn{Fnp>NDwKF>An$cu*HVrd!Nz8FQgv4_DxnyoB zRLX5(61C(~mb~0%i3lN=-#Y*O{`kF~=kt9(ujlpsJkOsG-Oc5^l*BO!001C`M%i8z z5cW$zQNc^5Qr86#^>;jP3pn@{CC{sJ1Re3~sLNylQUA)GeGT!eNx6;;5)k&Ul6Q)V z1y&;37K!ob`HGEl$_Y|9I9KB9SuZD|V=|!XPAF}On{4@wNdmqkr+ALob~=IYN-L#C zPW9a``<|*vCi8K51)zK@i@kKd$ZR#pX7ZRs7?ZR zdjEsAG7GeNbY zn98SHH2#`?Av|THBY)*M>%lyQZU>_xxOe9~Jkj~j`L9PYWWu^FQl!0Z@ zCr%&;a9`s?ezGm5QOInngH9MFZ-*XNwhJx4mAiNhy;*<84$bxbM-`|>bw0@=jwF(z zPpN$+B(YJ2)M{Z)2E}^ktpUn{Bd#rGaW2t%M~<1-WZ&%OuMsoTO#ZXD*~IDGNnIG__YctuLY)%T>rz{SlR-#n) zqa@Cmniyw}ja#ugL<;NVRorlvvmT?P2*yrv+W8ioUf1U={h7`N2Xv}CZX8ts!b|4K0vNIIeD-q78f))10dUHlq0RU%9voE0hEn32l?gddf+A0Lh7 z`=2t%{JA7E*cxb`=F7ZpovlTviyaip-_d@nB9zcb;kfdVFQi|^c^b+^$J=H>bV3}| zH|=)!&rmjGJPSQqt+69Ez893XVmu^osXORhYgEj~oP!3^?j0bc&VPtD(ty6po=_JBdkH9zltiA?HdMDRozqu73o+oi6oj_k2+c*u2)hz-V5se|55}sU-+kxqM}?jTX&lHoXKc<1Q3E;s-U{6^m7A z{WclHUaQTV{cW-MHiva>)4JAhC!>`2G0t=f#pWhW5azKg_4PhxEHy zMLo@%^ed*=?pE^27I|I8$wKJKhaZR14V4Jn*sxhBh)SlzE#dt;=hDES8dYo1Fwe@h z2j^+Cd>jJn%~G)5%>`tR>3>eo=ny*GRE@pN$y*g%AoXxNkMID$aJ=~y5?%m+5gcx& zFG#~v7()|tINaROL>F!(C}_qahyKSv3=1FxM*V+-6rufvz@YeR!=XMZ8}?)L(48rQj0)ZRcWJZ|$4#Us_0OEC2ui literal 0 HcmV?d00001 diff --git a/style/themes/MyFeatherBB/img/old.png b/style/themes/MyFeatherBB/img/old.png new file mode 100644 index 0000000000000000000000000000000000000000..48294fc51bbd2e3bfe5d92bd4c68b55bc5b5465b GIT binary patch literal 1551 zcmZ{kdpHw%7{}+*(8bhrV`;4tJIXdXV~VD^M~=%#%CJkNWo#i7lFQVRTkAq8xpcHC zl2kJ?b7@A0L^>KtB%9WDT&J`8@BDF|_x=7p@AE#t@B9AuGQGWARxLML4gdgFxw+ze z)P(+&E>Qi__@HGeYUt7sgLpYbs{*Q3`B` z0J;uB289dT-d)ZWluG)9P1JDQzH5r+)U*sExR?LZKgzikz78S0eYLrW(OrvO}9=pGO~oVqao`K*Vvn3kW-?C9j|mIjSa2b zOLL`CX<2O$M}x=Xt=Q)=qfm6amu5Lz*bw#ZQv|zAu#&zAQRLv=HD)VvtU`?Pf~UQ{ zeS7i@*un@1Sl_7$+$YMKQ7T`nRH~IUki>SVWb=H@qtnV&Jx(pH){-%1;q0A1zR{gc zOiLVL;d2v~pF8+_5~LuObF+4}IoYLatqBA|L|9u3f^~qvmE>-aX`p^^lb%%ZAo$Ef z>vWm11&;!SZ|^aK?efG2;gQ{aea^8HX#<2Sk46m6k55k{_M%W>fTd>L2+i~X3&b96 z$x`u)Ftf#$(Wku+61S#mP^u`iwpH!?XZQezzdJYD#wvoNbT6}5$PJq}Q@AB1B_evC z;JwAe)Ga+xXqgh-#T^=L<+C;E4O0zTX`QtG`o{5r$2B8hFjz4Z_*FfF{Q$>cEx^h~2ujciz||MRYlGO=^F9A(;cGAPZ=4ragxtTb$IsBp#p{7ynfL47SUyn+Tk5=^Sai;a^rYg?V@SVUBm5tMF zXt;x&$_@h?KL>;&Vz)%EhuX~`lJh@)*8%~7(q!84Eu@!qw?de4u(HKmefieyGUb(O z42!S%F!2X2wAbA9tM3uqZhOQr? z|5<&)=gw2^{zD{t7c%n1suo@6ewcNmxnmF#OP`!?y#*+sWcHUkyn?*W{qTZC_X zA*|DHd|y$;0~lH}ijQ*e@HVt%ftn_^fhSP1UVR?p%54r!mo>i+eBE_=%*OQ0|aVh`OFjy*9$!#FjDy z*Ps{1uJ&=CS4StoZg%u8X~`=m>t>xCuZU#wP3<wM)O_FL7E1V-UkBJ;1q;t;Fevehn6D zOSN5j=oHJ8+a?Y3l(^4#WD%9wM}F6`*FHEo+>Deo^a8Kes&x872E-koIU4Faxt-w@ z$RLI?NSN?wk{SRM0%5yTok%M`BpQQ2V30PyAyDcfE0Hnz9|JX#c$|FZ{|yUUL;-5U u#-AH}Bgu@|&}b3>ONqURfvF)f0fG5 z%NJOcF(@lnj~;H8=SA0$6aD92LA&ZCAV#~nDQ~h<=&ejc10%hjQ)W0T#rx#n8PU}x zR-!)<%4^WiwQ#%TZeDC$^^LG`k$pc_1BPW1He=Dy3A-|$-H_vPn?+ieFxBW~{8oq< zpwrE^ZyX+O6Ubp1XBq0F`xc(Svlbr94!aJ+E_!OPPJO_H zO588Ma9IKxoWpU7HdHRmhTtp8suHcArupX2&F_Zr_llpL`jJ4PzM!it630XM8A+vv zu&kvq@9{Xj?Ax#cqdV<;n1X_5eq^u-$EOoVR^P=>Y}`Swnk{i!cO$~d>KQwHr)A+| zSU8+l+C=6b9|CdBdjdvO6dg#R`e6^VW{4*nRTZ23v^#@OmuWW^=OITtBg5CvO-{wC zcPE&)wB7$W8=BnxTw(LYBk7x56VdfL>!?cW#9boO%BfHuWRm-ml`Dcw1s?t8rZXh@ zh%y~W3yq+Uf_KWDFO4<*Jx1Hj9}8Bd?EdnSl_~PxM{du=v*;5UX2YDHmC~A3w+t2T%! zLrpieoIt(_{pE-MJeZjIXIhMNjKDxFraW!#FyPt&T~)p!IYlDK{aI`>L8G1vw&F!gL2B%L z?c~3hNer_qLdKe);|$B&>Y}TtxnOb1IeY2Gl$6(A@2EL37 z2Y=-`3T@8i2xIS|bfw~o_>9Xi0z#EqQ4G2G!b9THhDh<;EP!1Avc_uma=L1qfC~u> zE-s|?fzR?R}~y3zGEh0klMWu-16H9qPmc>X8( z+r_b1>R={;(ed%t9q9vu@9^ZrdskW%sC)-B_Qq>*PQN!6`jJ|4#ch*dh$gVKW+`08 zQ|I5+4bNOwXq0?{0XrsHGVOlU63Ufhb-Sy4%c<>TiDyb|2rujd0>fI*XgplMP6d(twx<6GHPx%fJtawY*lZ%w+9$3l;KshsFEw{WU<(_$_;Qo zupRz*V@UM13cN0oO>I2}oJ0YznGOGxig!4_A|W*@p!x)mLq9NoI!)EsVX+7HNN8Ba z-f67$lF0iG8!cs6nhaYEDpgRQd>Go2u$wFVr`IIGID6)apT~2mH=8!4(`n14e1X(r z)U{Kiw`8;Q1_E~WqFQ@#Ctj>%eJN%CEZacr)BnuAD-&chWOcn{^Pw0>_)D+({JV^a z!2PO(?=dEWxIJH|wGxfoiM~D~v3LYb*65f1W-Zgi98MYIO$0sn*9u0U@6{!pL#Uq1 zheitLy`~&a3d(~>{C1W%cdW|GEU(#~d4XJCw1gJ+$omiffnR;^TLjI9dSHkbt#OnWxP7dkzWmWad54~JL0cF z1DV*K6cVfc0FgT79RS}~t%M{NgotW%X;!Ry96lPH^nv`6-~r<-TPk8KM3Twpp?;0-UcnPg~ald}j&ARcxu|y=fX_Dh(n8 z2jg@s+9Ni|KNb%UjKK>4fEpNFI4ej)BUi)oa03Ilp{cF`R8XWR#;*O3A(9vr799Wo z4f|@t?g9h&Xo3qdIQE)<3?5(=L=3<~Fp>TtcxSwSP<-?N{%8#V2JMKdLHZ^C7mOrA A!~g&Q literal 0 HcmV?d00001 diff --git a/style/themes/MyFeatherBB/phone.min.js b/style/themes/MyFeatherBB/phone.min.js new file mode 100644 index 00000000..4cbfc6e4 --- /dev/null +++ b/style/themes/MyFeatherBB/phone.min.js @@ -0,0 +1 @@ +"use strict";var getHeight=function(t){var e=window.getComputedStyle(t),i=e.display,l=e.position,s=e.visibility,o=e.maxHeight.replace("px","").replace("%",""),a=0;return"none"!==i&&"0"!==o?t.offsetHeight:(t.style.position="absolute",t.style.visibility="hidden",t.style.display="block",a=t.offsetHeight,t.style.display=i,t.style.position=l,t.style.visibility=s,a)},toggleSlide=function(t){var e=0;t.getAttribute("data-max-height")?t.style.maxHeight="0"===t.style.maxHeight.replace("px","").replace("%","")?t.getAttribute("data-max-height"):"0":(e=getHeight(t)+"px",t.style.transition="max-height 0.5s ease-in-out",t.style.overflowY="hidden",t.style.maxHeight="0",t.setAttribute("data-max-height",e),t.style.display="block",setTimeout(function(){t.style.maxHeight=e},10))};document.querySelector("#phone-button").addEventListener("click",function(){toggleSlide(document.querySelector("#phone"))},!1); \ No newline at end of file diff --git a/style/themes/MyFeatherBB/style.css b/style/themes/MyFeatherBB/style.css new file mode 100644 index 00000000..3a3015e9 --- /dev/null +++ b/style/themes/MyFeatherBB/style.css @@ -0,0 +1,1841 @@ +/* + * FeatherBB default style + * + * Responsive, classy and modern! + * + * Based on awesome work from Magicalex and Jedediah (mondedie.fr) + * +*/ + + +img, +legend { + border: 0 +} +legend, +td, +th { + padding: 0 +} +#brdfooter .clearer, +#brdstats .clearb, +#brdstats .clearer, +.blockpost .box .postfoot .clearc, +.container-title-status .clear, +.linksb .crumbs, +.linkst .clearer { + clear: both +} +#announce, +#msg, +#posterror { + text-shadow: 0 1px 0 rgba(255, 255, 255, .5) +} +html { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100% +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline +} +audio:not([controls]) { + display: none; + height: 0 +} +[hidden], +template { + display: none +} +a { + background-color: transparent +} +a:active, +a:hover { + outline: 0 +} +abbr[title] { + border-bottom: 1px dotted +} +b, +optgroup, +strong { + font-weight: 700 +} +dfn { + font-style: italic +} +h1 { + font-size: 2em; + margin: .67em 0 +} +mark { + background: #ff0; + color: #000 +} +small { + font-size: 80% +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline +} +sup { + top: -.5em +} +sub { + bottom: -.25em +} +svg:not(:root) { + overflow: hidden +} +figure { + margin: 1em 40px +} +hr { + box-sizing: content-box; + border: none; + border-top: 1px solid #d8d8d8; + height: 0; + width: 100% +} +pre, +textarea { + overflow: auto +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em +} +button, +input, +optgroup, +select, +textarea { + color: inherit; + font: inherit; + margin: 0 +} +button { + overflow: visible +} +button, +select { + text-transform: none +} +button, +html input[type=button], +input[type=reset], +input[type=submit] { + -webkit-appearance: button; + cursor: pointer +} +button[disabled], +html input[disabled] { + cursor: default +} +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0 +} +input { + line-height: normal +} +input[type=checkbox], +input[type=radio] { + box-sizing: border-box; + padding: 0 +} +input[type=number]::-webkit-inner-spin-button, +input[type=number]::-webkit-outer-spin-button { + height: auto +} +input[type=search] { + -webkit-appearance: textfield; + box-sizing: content-box +} +input[type=search]::-webkit-search-cancel-button, +input[type=search]::-webkit-search-decoration { + -webkit-appearance: none +} +fieldset { + border: 1px solid silver; + margin: 0 2px; + padding: .35em .625em .75em +} +body, +li, +nav ul, +p, +ul { + margin: 0 +} +table { + border-collapse: collapse; + border-spacing: 0 +} +* { + box-sizing: border-box +} +body { + font-size: 14px; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + line-height: 1.25; + color: #333; + background-color: #f9f9f9; + padding-top: 60px +} +.container-title-status .title-site .site-name, +nav ul li a { + font-weight: 400; + font-family: bebas_neueregular, Arial, Helvetica, sans-serif +} +a { + text-decoration: none; + color: red +} +a:hover { + text-decoration: underline; + color: #2a6496 +} +nav { + position: fixed; + z-index: 10; + top: 0; + left: 0; + right: 0; + line-height: 50px; + height: 50px; + background-color: #03a9f4; + box-shadow: 0 0 3px #000 +} +nav ul { + padding: 0; + float: left; + list-style-type: none +} +nav ul li { + display: inline-block; + padding: 0 5px; + margin: 0 +} +nav ul li a { + display: block; + color: #fff; + font-size: 1.5em; + text-decoration: none +} +nav ul li a:hover { + color: rgba(255, 255, 255, .9); + text-decoration: none +} +nav ul .isactive { + background-color: rgba(255, 255, 255, .3) +} +nav ul .isactive a:hover { + color: #fff +} +.container-title-status .status-avatar .avatar, +.container-title-status .status-avatar .inbox { + display: inline-block; + vertical-align: middle +} +nav .navbar-right { + float: right +} +nav .navbar-right input { + width: 100%; + height: 1.8rem; + padding: 7px 10px; + border-radius: 3px; + background-color: #fff; + border: none +} +nav .navbar-right input:focus { + outline: 0 +} +.container-title-status { + margin: 0 0 15px +} +.container-title-status .title-site { + margin: 0; + float: left +} +.container-title-status .title-site .site-name { + color: #90a4ae; + font-size: 80px; + line-height: 1; + text-decoration: none +} +.container-title-status .title-site .site-name p:first-letter { + color: #03a9f4 +} +.container-title-status .title-site #brddesc { + color: #999; + font-size: 14px; + font-weight: 400; + font-style: italic; + line-height: 1; + margin: 0; + padding: 0; + text-align: center +} +.container-title-status .status-avatar { + float: right +} +.container-title-status .status-avatar .inbox p, +.container-title-status .status-avatar .inbox ul { + margin: 0 15px 0 0; + padding: 0; + color: #5a5a5a +} +.container-title-status .status-avatar .inbox p li, +.container-title-status .status-avatar .inbox ul li { + list-style-type: none; + text-align: right +} +.container-title-status .status-avatar .avatar img { + height: 90px; + width: 90px; + border-radius: 50%; + border: 1px solid #d1d1d1 +} +#announce { + margin: 0 0 15px; + padding: 8px 35px 8px 14px; + color: #3a87ad; + background-color: #d9edf7; + border: 1px solid #bce8f1; + border-radius: 4px +} +#announce h2 { + margin: 0 0 4px; + font-size: 18px +} +section .blocktable .box table thead th, +section .blocktable h2 { + font-weight: 400; + font-size: 20px; + font-family: bebas_neueregular, Arial, Helvetica, sans-serif; + color: #fff +} +#announce p { + margin: 0 0 2px +} +section { + margin-top: 15px; + margin-bottom: 20px +} +section .blocktable { + position: relative; + margin-bottom: 24px +} +section .blocktable h2 { + position: absolute; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 56%; + left: 0; + top: 0; + z-index: 1; + padding: 9px; + margin: 0 +} +section .blocktable .box table { + table-layout: fixed; + text-align: left; + width: 100% +} +section .blocktable .box table thead th { + height: 40px; + background-color: #039be5; + border: 1px solid #039be5; + line-height: 40px +} +section .blocktable .box table thead th.tcl { + font-size: 0 +} +section .blocktable .box table thead th.tcr { + width: 16%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-left: 8px +} +section .blocktable .box table thead th.tc2, +section .blocktable .box table thead th.tc3, +section .blocktable .box table thead th.tcmod { + text-align: center; + width: 11% +} +section .blocktable .box table tbody tr { + background-color: #fff +} +section .blocktable .box table tbody tr td { + width: 100%; + border: 1px solid #d1d1d1; + color: #5a5a5a +} +section .blocktable .box table tbody tr .tc2, +section .blocktable .box table tbody tr .tc3, +section .blocktable .box table tbody tr .tcmod { + text-align: center; + width: 11% +} +section .blocktable .box table tbody tr .tcl { + padding: 7px 8px +} +section .blocktable .box table tbody tr .tcl .icon { + background-image: url(img/old.png); + height: 32px; + width: 32px; + margin-right: 5px; + float: left; +} +section .blocktable .box table tbody tr .tcl .icon .nosize { + display: none +} +section .blocktable .box table tbody tr .tcl .icon-new { + background-image: url(img/new.png); +} +section .blocktable .box table tbody tr .tcl .icon-sticky { + background-image: url(img/sticky.png); +} +section .blocktable .box table tbody tr .tcl .icon-closed { + background-image: url(img/closed.png); +} +section .blocktable .box table tbody tr .tcl .tclcon { + margin-left: 35px; + overflow: hidden +} +section .blocktable .box table tbody tr .tcl .tclcon h3 { + margin: 0 0 4px; + font-size: 16px +} +section .blocktable .box table tbody tr .tcl .tclcon h3 a { + text-decoration: none; + color: #03a9f4 +} +section .blocktable .box table tbody tr .tcl .tclcon h3 a:hover { + text-decoration: underline +} +section .blocktable .box table tbody tr .tcl .tclcon h3 .newtext { + font-size: 14px; + font-weight: 400 +} +section .blocktable .box table tbody tr .tcl .tclcon h3 .newtext a { + text-decoration: none; + color: #428bca +} +section .blocktable .box table tbody tr .tcl .tclcon h3 .newtext a:hover { + text-decoration: underline; + color: #2a6496 +} +section .blocktable .box table tbody tr .tcl .tclcon .forumdesc { + font-size: 12px +} +section .blocktable .box table tbody tr .tcr { + width: 20%; + padding: 7px 8px +} +section .blocktable .box table tbody tr .tcr .byuser { + display: block +} +#vf { + margin-bottom: 0 +} +#vf .tclcon { + color: #5a5a5a +} +#vf .tclcon .byuser { + display: inline-block +} +#vf .tclcon .newtext, +#vf .tclcon .pagestext { + display: inline-block; + font-size: 14px +} +#vf .tclcon a { + text-decoration: none; + color: #428bca +} +#vf .tclcon a:hover { + text-decoration: underline; + color: #2a6496 +} +#vf .roweven { + background-color: #fafafa +} +#vf .closedtext { + color: #a94442 +} +#vf .stickytext { + color: #3c763d +} +#vf .isticky { + background-color: #dff0d8 +} +.last-topic { + margin-bottom: 24px!important +} +.linksb .crumbs, +.linkst .crumbs, +.postlinksb .crumbs { + background-color: #fff; + padding: 10px; + border: 1px solid #d8d8d8; + border-radius: 4px +} +.linksb .crumbs li, +.linkst .crumbs li, +.postlinksb .crumbs li { + display: inline-block; + color: #428bca +} +.linksb .crumbs li span, +.linkst .crumbs li span, +.postlinksb .crumbs li span { + color: #ccc +} +.linksb .crumbs li strong, +.linksb .crumbs li strong a, +.linkst .crumbs li strong, +.linkst .crumbs li strong a, +.postlinksb .crumbs li strong, +.postlinksb .crumbs li strong a { + color: #777 +} +.linksb .crumbs li strong a:hover, +.linkst .crumbs li strong a:hover, +.postlinksb .crumbs li strong a:hover { + color: #777; + text-decoration: none +} +.linksb .pagepost .postlink.conr, +.linkst .pagepost .postlink.conr, +.postlinksb .pagepost .postlink.conr { + display: block; + margin-top: 15px; + text-align: center +} +.linksb .pagepost .pagelink.conl, +.linkst .pagepost .pagelink.conl, +.postlinksb .pagepost .pagelink.conl { + padding-left: 1px; + overflow: auto +} +@media only screen and (min-width: 768px) { + .linksb .pagepost .pagelink.conl, + .linkst .pagepost .pagelink.conl, + .postlinksb .pagepost .pagelink.conl { + float: left + } + .linksb .pagepost .postlink.conr, + .linkst .pagepost .postlink.conr, + .postlinksb .pagepost .postlink.conr { + float: right; + margin: 0 + } + .linksb .pagepost .modbuttons, + .linkst .pagepost .modbuttons, + .postlinksb .pagepost .modbuttons { + text-align: right + } + .linksb .pagepost .pagepost:after, + .linkst .pagepost .pagepost:after, + .postlinksb .pagepost .pagepost:after { + content: ""; + display: block; + height: 0; + font-size: 0; + clear: both; + visibility: hidden + } +} +.linksb .pagepost .modbuttons, +.linkst .pagepost .modbuttons, +.postlinksb .pagepost .modbuttons { + display: block; + text-align: right +} +.linksb .pagepost, +.linkst .pagepost, +.postlinksb .pagepost { + overflow: auto; + margin: 10px 0; + padding: 10px 0 +} +.linksb .pagepost .pagelink.conl a, +.linksb .pagepost .pagelink.conl span, +.linksb .pagepost .pagelink.conl strong, +.linkst .pagepost .pagelink.conl a, +.linkst .pagepost .pagelink.conl span, +.linkst .pagepost .pagelink.conl strong, +.postlinksb .pagepost .pagelink.conl a, +.postlinksb .pagepost .pagelink.conl span, +.postlinksb .pagepost .pagelink.conl strong { + position: relative; + float: left; + margin: 0 0 0 -1px; + padding: 6px 12px; + border: 1px solid #ddd; + background-color: #fff +} +.linksb .pagepost .pagelink.conl a:hover, +.linksb .pagepost .pagelink.conl span:hover, +.linksb .pagepost .pagelink.conl strong:hover, +.linkst .pagepost .pagelink.conl a:hover, +.linkst .pagepost .pagelink.conl span:hover, +.linkst .pagepost .pagelink.conl strong:hover, +.postlinksb .pagepost .pagelink.conl a:hover, +.postlinksb .pagepost .pagelink.conl span:hover, +.postlinksb .pagepost .pagelink.conl strong:hover { + text-decoration: none; + background-color: #fafafa +} +.linksb .pagepost .pagelink.conl .spacer, +.linkst .pagepost .pagelink.conl .spacer, +.postlinksb .pagepost .pagelink.conl .spacer { + background-color: #fafafa; + cursor: default; + color: #d3d3d3 +} +.linksb .pagepost .pagelink.conl .spacer:hover, +.linkst .pagepost .pagelink.conl .spacer:hover, +.postlinksb .pagepost .pagelink.conl .spacer:hover { + background-color: #fafafa +} +.linksb .pagepost .pagelink.conl strong, +.linkst .pagepost .pagelink.conl strong, +.postlinksb .pagepost .pagelink.conl strong { + font-weight: 400; + background-color: #fafafa; + cursor: default +} +.linksb .pagepost .pagelink.conl .pages-label, +.linkst .pagepost .pagelink.conl .pages-label, +.postlinksb .pagepost .pagelink.conl .pages-label { + display: none +} +.postlinksb { + margin-bottom: 5px +} +.linksb .subscribelink { + margin: 15px 0; + text-align: right +} +.blockpost { + background-color: #fff +} +.blockpost h2 { + margin: 0; + padding: 10px; + font-size: 14px; + font-weight: 400; + background-color: #039be5 +} +.blockpost h2 span>.conr, +.blockpost h2 span>a { + padding: 7px; + color: #fff +} +.blockpost .box { + border: 1px solid #d8d8d8; + border-top: none +} +#postpreview .postbody, +.blockmenu ul li, +footer .footer-link { + border-top: 1px solid #d8d8d8 +} +.blockpost .box .postleft { + float: left; + width: 20%; + padding: 7px 15px +} +.blockpost .box .postleft dl { + margin: 0; + color: #333 +} +.blockpost .box .postleft dl dt strong a, +.blockpost .box .postleft dl dt strong span { + font-size: 1.3rem; + font-weight: 400 +} +.blockpost .box .postleft dl dt strong a:hover, +.blockpost .box .postleft dl dt strong span:hover { + text-decoration: none +} +.blockpost .box .postleft dl dd { + margin: 5px 0 +} +.blockpost .box .postright { + float: right; + line-height: 1.4; + width: 80%; + padding: 15px; + color: #333; + word-wrap: break-word +} +.blockpost .box .postright h3 { + display: none; + text-align: center +} +.blockpost .box .postright .postedit { + font-size: 12px; + margin-top: 7px +} +.blockpost .box .postright .postsignature hr { + margin: 15px 0 +} +.blockpost .box .postfoot { + clear: both; + overflow: auto +} +.blockpost .box .postfoot .postfootleft { + float: left; + width: 20%; + padding: 7px 15px; + color: #333 +} +.blockpost .box .postfoot .postfootleft strong { + border: none; + font-size: 12px; + height: 17px; + line-height: 17px; + padding: 0 5px; + font-weight: 700; + text-transform: uppercase; + color: #fff; + background-color: #009688 +} +.blockpost .box .postfoot .postfootright { + float: right; + width: 80%; + padding: 7px 15px; + text-align: right +} +.blockpost .box .postfoot .postfootright ul { + visibility: hidden; + padding: 7px; + list-style-type: none +} +.blockpost .box .postfoot .postfootright ul li { + display: inline-block +} +.blockpost .box:hover .postfoot .postfootright ul { + visibility: visible +} +.firstpost { + margin: 0 0 4px +} +.firstpost .box { + border: 1px solid #039be5 +} +.firstpost .postbody .postright>h3 { + display: block; + margin: 0 0 15px; + color: #777; + font-weight: 400; + font-size: 1.3rem +} +#editform .box fieldset .bblinks, +#postform .box fieldset .bblinks, +#punsearch .linksb .pagepost .pagelink .pages-label, +#punsearch .linkst .pagepost .pagelink .pages-label, +#punsearch .postlinksb .pagepost .pagelink .pages-label, +#quickpost .box fieldset .bblinks, +#reportform .box fieldset .bblinks { + display: none +} +.pagepost .postlink.conr a, +.postfootright a, +.subscribelink a { + border-radius: 3px; + border: 2px solid #00acc1; + color: #00acc1; + background-color: transparent; + padding: 4px; + text-decoration: none +} +.pagepost .postlink.conr a:hover, +.postfootright a:hover, +.subscribelink a:hover { + border: 2px solid rgba(0, 172, 193, .6); + color: rgba(0, 172, 193, .6) +} +.pagepost .postlink.conr a:active, +.postfootright a:active, +.subscribelink a:active { + border: 2px solid #0097a7; + color: #0097a7; + box-shadow: inset 0 3px 4px rgba(0, 0, 0, .2) +} +.pagepost .postlink.conr a:focus, +.postfootright a:focus, +.subscribelink a:focus { + outline: 0 +} +.subscribelink { + margin: 15px 0; + text-align: right +} +#editform h2, +#postform h2, +#quickpost h2, +#reportform h2 { + border: 1px solid #d8d8d8; + border-bottom: none; + padding: 5px; + margin: 0; + text-indent: 10px; + font-weight: 400; + font-size: 18px; + background-color: #f5f5f5; + border-radius: 3px 3px 0 0 +} +#editform .box, +#postform .box, +#quickpost .box, +#reportform .box { + border: 1px solid #d8d8d8; + border-radius: 0 0 3px 3px; + background-color: #fff; + padding: 15px +} +#editform .box .inform, +#postform .box .inform, +#quickpost .box .inform, +#reportform .box .inform { + border: none +} +#editform .box fieldset, +#postform .box fieldset, +#quickpost .box fieldset, +#reportform .box fieldset { + border: none; + color: #666 +} +#editform .box fieldset legend, +#postform .box fieldset legend, +#quickpost .box fieldset legend, +#reportform .box fieldset legend { + font-size: 16px; + margin: 0 0 7px; + font-weight: 700; + color: #666 +} +#editform .box fieldset textarea, +#postform .box fieldset textarea, +#quickpost .box fieldset textarea, +#reportform .box fieldset textarea { + margin: 7px 0; + width: 100%; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .075); + border: 1px solid #ccc; + border-radius: 3px; + background-color: #fafafa; + padding: 7px 8px +} +#editform .box fieldset textarea:focus, +#postform .box fieldset textarea:focus, +#quickpost .box fieldset textarea:focus, +#reportform .box fieldset textarea:focus { + border: 1px solid #51a7e8; + background-color: #fff; + box-shadow: 0 0 5px rgba(81, 167, 232, .5); + outline: 0 +} +#postform { + margin: 15px 0 0 +} +#postpreview, +#postreview, +.blockform { + margin-top: 15px +} +#postform .rbox input { + margin-right: 7px +} +#postreview { + overflow: auto +} +#postreview .blockpost { + overflow: auto; + border: 1px solid #d8d8d8; + background-color: #f9f9f9 +} +#postreview .blockpost .box { + border: none +} +#postpreview { + overflow: auto +} +#postpreview h2 { + border: 1px solid #d8d8d8; + border-bottom: none; + padding: 5px; + margin: 0; + text-indent: 10px; + font-weight: 400; + font-size: 18px; + background-color: #f5f5f5; + border-radius: 3px 3px 0 0 +} +#postpreview .postbody { + overflow: auto; + background-color: #fff +} +#postpreview .postbody .postright { + width: 100%; + float: none +} +#punsearch .blockpost h2 { + color: #fff +} +#punsearch .linksb .pagepost, +#punsearch .linkst .pagepost, +#punsearch .postlinksb .pagepost { + margin: 10px 0; + padding: 10px 1px +} +#punsearch .linksb .pagepost .pagelink a, +#punsearch .linksb .pagepost .pagelink span, +#punsearch .linksb .pagepost .pagelink strong, +#punsearch .linkst .pagepost .pagelink a, +#punsearch .linkst .pagepost .pagelink span, +#punsearch .linkst .pagepost .pagelink strong, +#punsearch .postlinksb .pagepost .pagelink a, +#punsearch .postlinksb .pagepost .pagelink span, +#punsearch .postlinksb .pagepost .pagelink strong { + position: relative; + float: left; + margin: 0 0 0 -1px; + padding: 6px 12px; + border: 1px solid #ddd; + background-color: #fff +} +#punsearch .linksb .pagepost .pagelink a:hover, +#punsearch .linksb .pagepost .pagelink span:hover, +#punsearch .linksb .pagepost .pagelink strong:hover, +#punsearch .linkst .pagepost .pagelink a:hover, +#punsearch .linkst .pagepost .pagelink span:hover, +#punsearch .linkst .pagepost .pagelink strong:hover, +#punsearch .postlinksb .pagepost .pagelink a:hover, +#punsearch .postlinksb .pagepost .pagelink span:hover, +#punsearch .postlinksb .pagepost .pagelink strong:hover { + text-decoration: none; + background-color: #fafafa +} +#punsearch .linksb .pagepost .pagelink .spacer, +#punsearch .linkst .pagepost .pagelink .spacer, +#punsearch .postlinksb .pagepost .pagelink .spacer { + background-color: #fafafa; + cursor: default; + color: #d3d3d3 +} +#punsearch .linksb .pagepost .pagelink .spacer:hover, +#punsearch .linkst .pagepost .pagelink .spacer:hover, +#punsearch .postlinksb .pagepost .pagelink .spacer:hover { + background-color: #fafafa +} +#punsearch .linksb .pagepost .pagelink strong, +#punsearch .linkst .pagepost .pagelink strong, +#punsearch .postlinksb .pagepost .pagelink strong { + font-weight: 400; + background-color: #fafafa; + cursor: default +} +#brdfooter, +#brdstats { + padding: 10px; + border: 1px solid #d8d8d8; + border-radius: 3px; + background-color: #fff +} +#searchform #search .checklist { + margin: 10px 0; + overflow: auto; + width: 20em; + max-height: 9em; + border: 1px solid #d8d8d8 +} +#searchform #search .checklist legend { + font-size: 16px; + margin: 0 +} +#searchform #search .checklist label { + text-indent: 10px; + display: block; + margin: 0 +} +#brdstats .conl dt, +#brdstats .conr dt, +#brdstats h2 { + display: none +} +#brdstats .conl, +#brdstats .conr { + margin: 0 0 10px; + color: #5a5a5a; + font-size: 12px +} +#brdstats .conl dd, +#brdstats .conr dd { + margin: 0 +} +#brdstats .conr { + text-align: right; + float: right +} +#brdstats .conl { + text-align: left; + float: left +} +#brdstats #onlinelist { + margin: 0; + font-size: 12px +} +#brdstats #onlinelist dd, +#brdstats #onlinelist dt { + display: inline-block; + margin: 0 +} +#brdfooter { + margin: 15px 0; + font-size: 12px +} +#brdfooter h2 { + display: none +} +#brdfooter .conr { + text-align: right; + float: right +} +#brdfooter .conl { + text-align: left; + float: left; + width: 20%; +} +#brdfooter select { + width: 80% +} +footer .footer-link { + position: relative; + font-size: 12px; + padding: 10px; + color: #5a5a5a +} +footer .footer-link #useful-links { + font-size: 14px; + font-weight: 700; + display: block; + margin-bottom: 7px +} +.blockform h2, +.blockmenu h2 { + text-indent: 10px; + border: 1px solid #d8d8d8; + font-size: 18px +} +footer .footer-link #copyright { + position: absolute; + bottom: 10px; + right: 10px +} +footer .footer-link a { + display: block +} +.blockmenu h2 { + border-bottom-width: 0; + padding: 5px; + margin: 0; + font-weight: 400; + background-color: #f5f5f5; + border-radius: 3px 3px 0 0 +} +.blockmenu ul { + margin: 0 0 15px; + padding: 0; + list-style-type: none; + border-radius: 0 0 3px 3px; + border: 1px solid #d8d8d8; + background-color: #fff +} +.blockmenu ul li:first-child { + border-top: none +} +.blockmenu ul li a { + text-decoration: none; + color: #555; + display: block; + padding: 10px +} +#punuserlist .pagelink .pages-label, +.blockform .box .inform fieldset .bblinks { + display: none +} +.blockmenu ul li a:hover { + background-color: #edf7fa +} +.blockmenu ul .isactive a { + background-color: #edf7fa; + color: #0084B4; + font-weight: 700 +} +.blockform h2 { + border-bottom: none; + padding: 5px; + margin: 0; + font-weight: 400; + background-color: #f5f5f5; + border-radius: 3px 3px 0 0 +} +.blockform .box { + border: 1px solid #d8d8d8; + border-radius: 0 0 3px 3px; + background-color: #fff +} +.blockform .box .inform { + border-bottom: 1px solid #d8d8d8; + padding: 10px +} +.blockform .box .inform fieldset { + border: none; + color: #666; + padding: 5px 10px; + margin: 0 +} +.blockform .box .inform fieldset legend { + font-size: 16px; + margin: 0 0 7px; + font-weight: 700; + color: #666 +} +#viewprofile h2, +.blockform .box .inform fieldset label strong { + font-weight: 400 +} +.blockform .box .inform fieldset p { + margin: 4px 0 +} +.blockform .box .inform fieldset label { + margin: 6px 0; + display: inline-block; + padding-right: 12px; +} +.blockform .box .inform fieldset input { + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .075); + border: 1px solid #ccc; + border-radius: 3px; + background-color: #fafafa; + padding: 7px 8px; + margin: 7px 0 +} +.blockform .box .inform fieldset input:focus { + border: 1px solid #51a7e8; + background-color: #fff; + box-shadow: 0 0 5px rgba(81, 167, 232, .5); + outline: 0 +} +.blockform .box .inform fieldset label select { + margin: 6px 0 +} +.blockform .box .inform fieldset .rbox input { + margin-right: 7px +} +.blockform .box .inform fieldset .rbox input:focus { + box-shadow: none +} +.blockform .box .inform fieldset textarea { + margin: 7px 0; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .075); + border: 1px solid #ccc; + border-radius: 3px; + background-color: #fafafa; + padding: 7px 8px +} +.blockform .box .inform fieldset textarea:focus { + border: 1px solid #51a7e8; + background-color: #fff; + box-shadow: 0 0 5px rgba(81, 167, 232, .5); + outline: 0 +} +.blockform .box .buttons { + margin: 7px +} +#profile { + overflow: auto +} +#profile .blockform { + width: 70%; + margin: 0 0 0 30% +} +#profile .blockmenu { + float: left; + width: 27.5% +} +#viewprofile h2 { + border: 1px solid #d8d8d8; + border-bottom: none; + padding: 5px; + margin: 0; + text-indent: 10px; + font-size: 18px; + background-color: #f5f5f5; + border-radius: 3px 3px 0 0 +} +#viewprofile .fakeform { + border: 1px solid #d8d8d8; + border-radius: 0 0 3px 3px; + background-color: #fff +} +#viewprofile .fakeform .inform { + border-bottom: 1px solid #d8d8d8; + padding: 10px +} +#viewprofile .fakeform .inform fieldset { + border: none; + color: #666 +} +#viewprofile .fakeform .inform fieldset legend { + font-size: 18px; + font-weight: 700; + color: #666 +} +#viewprofile .fakeform .inform fieldset dt { + font-size: 15px; + margin-bottom: 4px; + font-weight: 700 +} +#viewprofile .fakeform .inform fieldset dd { + margin: 0 0 15px +} +#msg, +#posterror { + margin: 15px 0; + padding: 8px 35px 8px 14px; + color: #c09853; + background-color: #fcf8e3; + border: 1px solid #fbeed5; + border-radius: 4px +} +#msg h2, +#posterror h2 { + margin: 0 0 4px; + font-size: 18px +} +#msg p, +#posterror p { + margin: 0 0 2px +} +#posterror { + background-color: #f2dede; + border: 1px solid #ebccd1; + color: #a94442 +} + +.error { + background-color: #f2dede !important; + border: 1px solid #ebccd1 !important; + color: #a94442 !important +} + + +.flashmsg { + position: fixed; + min-width: 220px; + max-width: 500px; + top: 5%; + right: 5%; + margin-left: -250px; + padding: 1em; + z-index: 100; + opacity: 0; + pointer-events: none; + box-shadow: 0 3px 6px rgba(0,0,0,0.25); + border: 1px solid #bbb; + -webkit-transform: translateY(-100%); + -moz-transform: translateY(-100%); + -ms-transform: translateY(-100%); + -o-transform: translateY(-100%); + transform: translateY(-100%); + -webkit-transition: all 0.75s ease-out; + -moz-transition: all 0.75s ease-out; + -ms-transition: all 0.75s ease-out; + -o-transition: all 0.75s ease-out; + transition: all 0.75s ease-out; +} +.flashmsg h2 { + margin: 0 0 4px; + font-size: 18px +} +.flashmsg.error { + background: #ebccd1; + background: -webkit-linear-gradient(top, #f2dede, #ebccd1); + background: -moz-linear-gradient(top, #f2dede, #ebccd1); + background: linear-gradient(top, #f2dede, #ebccd1); + color: #a94442 !important +} +.flashmsg.info { + background: #b3e1e4; + background: -webkit-linear-gradient(top, #d2ecea, #b3e1e4); + background: -moz-linear-gradient(top, #d2ecea, #b3e1e4); + background: linear-gradient(top, #d2ecea, #b3e1e4); + color: #147880 !important; +} +.flashmsg.warning { + background: #edc58c; + background: -webkit-linear-gradient(top, #e8d1af, #edc58c); + background: -moz-linear-gradient(top, #f0ad4e, #f0ad4e); + background: linear-gradient(top, #f0ad4e, #f0ad4e); + color: #8c5a13 !important; +} +.flashmsg.success { + background: #a1e9a1; + background: -webkit-linear-gradient(top, #cde9cd, #a1e9a1); + background: -moz-linear-gradient(top, #cde9cd, #a1e9a1); + background: linear-gradient(top, #cde9cd, #a1e9a1); + color: #2c752c !important; +} +.flashmsg.show { + opacity: 1; + pointer-events: auto; + -webkit-transform: translateY(0%); + -moz-transform: translateY(0%); + -ms-transform: translateY(0%); + -o-transform: translateY(0%); + transform: translateY(0%); +} + +input[type=submit] { + border-radius: 3px; + border: 2px solid #00acc1; + color: #00acc1; + background-color: transparent; + padding: 4px; + margin-right: 4px +} +input[type=submit]:hover { + border: 2px solid rgba(0, 172, 193, .6); + color: rgba(0, 172, 193, .6) +} +input[type=submit]:active { + border: 2px solid #0097a7; + color: #0097a7; + box-shadow: inset 0 3px 4px rgba(0, 0, 0, .2) +} +input[type=submit]:focus { + outline: 0 +} +#regform .forminfo { + padding: 5px 10px; + color: #666 +} +#regform .forminfo h3 { + font-size: 18px; + margin: 0 0 7px; + font-weight: 700 +} +#regform .forminfo p { + margin: 4px 0 +} +#punuserlist .blocktable { + margin: 0 +} +#punuserlist .blocktable table thead .tc2, +#punuserlist .blocktable table thead .tc3, +#punuserlist .blocktable table thead .tcl, +#punuserlist .blocktable table thead .tcr { + width: 25% +} +#punuserlist .pagelink { + overflow: auto; + margin: 10px 0; + padding: 10px 0 10px 1px +} +#punuserlist .pagelink a, +#punuserlist .pagelink span, +#punuserlist .pagelink strong { + position: relative; + float: left; + margin: 0 0 0 -1px; + padding: 6px 12px; + border: 1px solid #ddd; + background-color: #fff +} +#punuserlist .pagelink a:hover, +#punuserlist .pagelink span:hover, +#punuserlist .pagelink strong:hover { + text-decoration: none; + background-color: #fafafa +} +#punuserlist .pagelink .spacer { + background-color: #fafafa; + cursor: default; + color: #d3d3d3 +} +#punuserlist .pagelink .spacer:hover { + background-color: #fafafa +} +#punuserlist .pagelink strong { + font-weight: 400; + background-color: #fafafa; + cursor: default +} +@font-face { + font-family: bebas_neueregular; + src: url(fonts/BebasNeue-webfont.eot); + src: url(fonts/BebasNeue-webfont.eot?#iefix)format("embedded-opentype"), url(fonts/BebasNeue-webfont.woff)format("woff"), url(fonts/BebasNeue-webfont.ttf)format("truetype"), url(fonts/BebasNeue-webfont.svg#bebas_neueregular)format("svg"); + font-weight: 400; + font-style: normal +} +code { + padding: 15px!important; +} +img { + max-width: 100%; + height: auto +} +.blockpost .box .postright p { + padding: 7px 0 +} +.blockpost .box .postright pre { + margin: 0 +} +.blockpost .box .postright code { + padding: 15px!important; + background-color: #272822 +} +.blockpost .box .postright acronym { + cursor: help; + border-bottom: 1px dotted #777 +} +.blockpost .box .postright .bbu { + text-decoration: underline +} +.blockpost .box .postright .bbs { + text-decoration: line-through +} +.blockpost .box .postright h5 { + font-size: 1.25rem; + margin: 15px 0; + color: #333 +} +.blockpost .box .postright .codebox { + word-wrap: normal; + margin-bottom: 15px +} +.blockpost .box .postright .codebox .vscroll { + height: 32em; + overflow: auto +} +.blockpost .box .postright .quotebox { + border: 1px solid #00BCD4; + border-left: 3px solid #00BCD4; + background-color: #fafdff; + padding: 5px 10px; + margin: 10px 20px +} +.blockpost .box .postright .quotebox cite { + font-weight: 700; + color: #357082 +} +.blockpost .box .postright .quotebox blockquote { + margin: 0 +} +.container { + width: 100% +} +@media only screen and (min-width: 768px) { + .container { + margin: 0 auto; + padding: 0 15px + } +} +@media only screen and (min-width: 768px)and (max-width: 991px) { + .container { + width: 750px + } +} +@media only screen and (min-width: 992px)and (max-width: 1199px) { + .container { + width: 970px + } +} +@media only screen and (min-width: 1200px) { + .container { + width: 1075px + } +} +@media only screen and (max-width: 768px) { + body { + padding-top: 0 + } + .phone-menu { + position: relative; + display: block; + width: 55px; + height: 55px; + cursor: pointer + } + .phone-menu .button-phone:after { + content: ""; + display: block; + position: absolute; + top: 11px; + left: 16.25px; + width: 22.5px; + height: 0; + box-shadow: 0 10px 0 1px #fff, 0 16px 0 1px #fff, 0 22px 0 1px #fff + } + nav { + position: static; + line-height: normal; + height: 100% + } + #phone { + display: none; + border-top: 1px solid rgba(255, 255, 255, .3); + background-color: #29b6f6 + } + #phone ul { + margin: 0; + float: none + } + #phone .navbar-right { + padding: 8px; + float: none + } + #phone .navbar-right input { + margin: auto; + display: block + } + #phone li { + display: block; + font-size: 14px; + padding: 0; + border-bottom: 1px solid rgba(255, 255, 255, .3) + } + #phone li a { + display: block; + text-align: center; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + line-height: 40px + } + #phone .isactive { + border: none + } +} +@media only screen and (min-width: 768px) { + nav .navbar-right input { + width: 100px + } +} +@media only screen and (min-width: 992px) { + nav .navbar-right input { + width: 250px + } +} +@media only screen and (max-width: 992px) { + .status-avatar, + .title-site { + float: none!important; + text-align: center + } + .status-avatar { + margin-top: 10px + } + .status-avatar .conl li, + .status-avatar .conr li { + text-align: center!important + } +} +@media only screen and (max-width: 768px) { + .blocktable .box table .tc2, + .blocktable .box table .tc3 { + display: none + } + .blocktable .box table .tcr { + width: 35%!important + } + .blockpost .box .postfoot .postfootright, + .blockpost .box .postright { + float: none; + width: 100% + } + #punsearch .blockpost h2 span:nth-child(2), + #punsearch .blockpost h2 span:nth-child(3), + .blockpost .box .postleft dl dd { + display: none + } + .blockpost { + position: relative + } + .blockpost .box .postleft { + float: none + } + .blockpost .box .postleft dl dt { + position: absolute; + top: 4px; + right: 7px + } + .blockpost .box .postleft dl dt span { + color: #fff + } + .blockpost .box .postfoot .postfootleft { + float: none; + display: none + } + .blockpost .box .postfoot .postfootright ul { + visibility: visible + } + .blockmenu { + float: none!important; + width: 100%!important; + text-align: center + } + .blockform { + width: 100%!important; + margin: 0!important + } + .blockform label input { + width: 80%!important + } + .blockform label input[type=checkbox] { + width: 7%!important + } + .blockform textarea { + width: 100% + } + #brdstats .conl, + #brdstats .conr { + text-align: center; + display: block; + width: 100% + } + #brdstats .clearb, + #brdstats .clearer { + clear: none + } +} +#changelog h2 { + border: 1px solid #d8d8d8; + border-bottom: none; + padding: 5px; + margin: 0; + text-indent: 10px; + font-weight: 400; + font-size: 18px; + background-color: #f5f5f5; + border-radius: 3px 3px 0 0 +} +#changelog .box { + border: 1px solid #d8d8d8; + border-radius: 0 0 3px 3px; + background-color: #fff +} +#changelog .box .change { + margin: 10px; + border-bottom: 2px solid #d8d8d8 +} +#changelog .box .change:last-child { + border-bottom: none +} +#changelog .box .change h3 { + margin: 10px 10px 0; + font-size: 16px; + font-weight: 400 +} +#changelog .box .change p { + font-size: 14px; + margin: 5px 10px 10px +} +#changelog .box .change li { + margin: 10px +} + +#modcontrols.inbox { + font-size: 14px; + text-align: center; +} +#modcontrols.inbox dl dt { + margin-bottom: 5px; +} + +#modcontrols.inbox dl dd { + display: inline; + margin-left: 0; + padding: 5px; +} + +#debugtime { + margin-bottom: 10px; + text-align: center; +} + +#debug.blocktable div.box div.inbox table { + table-layout: auto; +} +#debug.blocktable .box table tbody tr .tcl { + width: 20%; +} +#debug.blocktable .box table tbody tr .tcr { + width: 80%; +} + +#searchform #search.multiselect { + float: left; + padding-bottom: 7px; +} + +#profile.block2col div.blockform div.box form#profile1 div.inform fieldset div.infldset label, +#profile.block2col div.blockform div.box form#profile2 div.inform fieldset div.infldset label, +#profile.block2col div.blockform div.box form#profile3 div.inform fieldset div.infldset label, +#profile.block2col div.blockform div.box form#profile5 div.inform fieldset div.infldset div.rbox label, +#profile.block2col div.blockform div.box form#profile6 div.inform fieldset div.infldset div.rbox label, +#profile.block2col div.blockform div.box form#profile7 div.inform fieldset div.infldset div.conl div.rbox label, +#quickpost.blockform div.box form#quickpostform div.inform fieldset div.infldset.txtarea label, +#postform.blockform div.box form#post div.inform fieldset div.infldset.txtarea label.required, +#editform.blockform div.box form#edit div.inform fieldset div.infldset.txtarea label.required, +#editform.blockform div.box form#edit div.inform fieldset div.infldset div.rbox label, +#regform.blockform div.box form#register div.inform fieldset div.infldset div.rbox label{ + display: block; +} +#redir { + text-align: center; +} +#vf.blocktable div.box div.inbox table tbody tr td.tcl div.tclcon { + margin-top: 7px; +} +#searchform.blockform div.box form#search div.inform fieldset div.infldset div.conl.multiselect { + display: inline-block; + float: left; +} +#searchform.blockform div.box form#search div.inform fieldset div.infldset label.conl { + padding: 5px; +} +#searchform.blockform div.box form#search div.inform fieldset div.infldset p.clearl { + margin-top: 100px; +} +#searchform.blockform div.box form#search div.inform fieldset div.infldset label.conl { + margin-top: -2px; +} +#searchform.blockform div.box form#search div.inform fieldset div.infldset label.conl select#search_in { + margin-top: 7px; +} +body #puninstall { + padding-bottom: 60px; +} +#puninstall .blockform .box .inform fieldset { + margin-top: 15px; +} +#puninstall h3 { + font-size: 22px; + text-align: center; +} +.forminfo p, #install p.buttons, html body div#puninstall.pun div.punwrap section.container div#brdheader.block div.box div#brdtitle.inbox { + text-align: center; +} +#install p.buttons { + font-size: 22px; +} +#puninstall .blockform .box .inform fieldset label { + display: block; +} +#puninstall .blockform .box .inform fieldset legend { + margin-bottom: 0; +} +#puninstall.pun div.punwrap section.container div#brdmain div.blockform div.box form#install div.inform fieldset div.infldset p{ + margin-bottom: 12px; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} +td, +th { + padding: 0; +} +table { + background-color: transparent; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #777777; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #dddddd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #dddddd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} diff --git a/style/themes/MyFeatherBB/view/admin/bans/add_ban.php b/style/themes/MyFeatherBB/view/admin/bans/add_ban.php new file mode 100644 index 00000000..1bda2c69 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/bans/add_ban.php @@ -0,0 +1,96 @@ + + +
    +

    +
    +
    +
    + + + + + +
    + +
    + + + + + + + + + + + + + +
    + + +
    + + '.__('here').''); + } ?> +
    + + +
    +

    +
    +
    +
    +
    +
    + +
    + + + + + + + + + +
    + + +
    + + +
    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/bans/admin_bans.php b/style/themes/MyFeatherBB/view/admin/bans/admin_bans.php new file mode 100644 index 00000000..14b13968 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/bans/admin_bans.php @@ -0,0 +1,102 @@ + + +
    +

    +
    +
    + +
    +
    + +
    + + + + + +
    + + +
    +
    +
    +
    +
    +
    + +

    +
    +
    + +

    +
    +
    + +
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +     + +
    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/bans/search_ban.php b/style/themes/MyFeatherBB/view/admin/bans/search_ban.php new file mode 100644 index 00000000..356a0baa --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/bans/search_ban.php @@ -0,0 +1,87 @@ + + +
    +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    + +
    +
    +
    +
    + + +
    +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +'."\n"; + } + +?> + +
    utils->escape($cur_ban['username']) : ' ' ?>utils->escape($cur_ban['email']) : ' ' ?>utils->escape($cur_ban['ip']) : ' ' ?>utils->format_time($cur_ban['expire'], true) ?>utils->escape($cur_ban['message']) : ' ' ?>url->get('user/'.$cur_ban['ban_creator'].'/').'">'.$feather->utils->escape($cur_ban['ban_creator_username']).'' : __('Unknown') ?>url->get('admin/bans/edit/'.$cur_ban['id'].'/').'">'.__('Edit').' | '.__('Remove').'' ?>
    '.__('No match').'
    +
    +
    +
    + +
    +
    +
    + +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/categories.php b/style/themes/MyFeatherBB/view/admin/categories.php new file mode 100644 index 00000000..3a2057b7 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/categories.php @@ -0,0 +1,111 @@ + +
    +

    +
    +
    +
    +
    + +
    + + + + + +
    + + + url->get('admin/forums').'">'.__('Forums').'') ?> +
    +
    +
    +
    +
    +
    + +

    +
    +
    + +
    +
    + +
    + + + + + +
    + + +
    +
    +
    +
    +
    +
    + + +

    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/censoring.php b/style/themes/MyFeatherBB/view/admin/censoring.php new file mode 100644 index 00000000..54a063a6 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/censoring.php @@ -0,0 +1,84 @@ + + +
    +

    +
    +
    + +
    +
    + +
    +

    forum_settings['o_censoring'] == '1' ? sprintf(__('Censoring enabled'), ''.__('Options').'') : sprintf(__('Censoring disabled'), ''.__('Options').'')) ?>

    + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + +'."\n"; + } + + ?> + +
     
    +'.__('No words in list').'

    '."\n"; +} + +?> +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/forums/admin_forums.php b/style/themes/MyFeatherBB/view/admin/forums/admin_forums.php new file mode 100644 index 00000000..abcd2bf7 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/forums/admin_forums.php @@ -0,0 +1,114 @@ + + +
    +

    +
    +
    + + +
    +
    + +
    + + + + + +
    + + +
    +
    +
    +
    + +
    +
    + +
    +

    +
    +
    +
    + +
    +
    + +

    +
    +
    + +

    + $cat_data) { + ?> +
    +
    + utils->escape($cat_data['cat_name']) ?> +
    + + + + + + + + + + + + + + + + + +
    | utils->escape($forum['forum_name']) ?>
    +
    +
    +
    + +

    +
    +
    +
    +
    +
    + diff --git a/style/themes/MyFeatherBB/view/admin/forums/delete_forum.php b/style/themes/MyFeatherBB/view/admin/forums/delete_forum.php new file mode 100644 index 00000000..4a2df3f1 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/forums/delete_forum.php @@ -0,0 +1,35 @@ + + +
    +

    +
    +
    + +
    +
    + +
    +

    +

    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/forums/permissions.php b/style/themes/MyFeatherBB/view/admin/forums/permissions.php new file mode 100644 index 00000000..8368cfa9 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/forums/permissions.php @@ -0,0 +1,137 @@ + + +
    +

    +
    +
    + +

    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    utils->escape($cur_forum['redirect_url']).'" tabindex="5" />'; ?>
    +
    +
    +
    +
    +
    + +
    +

    '.__('User groups').'') ?>

    + + + + + + + + + + + + + + > + + tabindex="" /> + + > + + tabindex="" /> + + > + + tabindex="" /> + + + + +
     
    utils->escape($perm['g_title']) ?>
    +
    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/groups/add_edit_group.php b/style/themes/MyFeatherBB/view/admin/groups/add_edit_group.php new file mode 100644 index 00000000..f09d4255 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/groups/add_edit_group.php @@ -0,0 +1,311 @@ + + +
    +

    +
    +
    + +

    +
    + + + +
    + +
    +

    + + + + + + + + + + + + + +forum_settings['o_default_user_group'] != $group['info']['g_id']): ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + +
    + + +
    + + +
    + + +
    +

    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/groups/admin_groups.php b/style/themes/MyFeatherBB/view/admin/groups/admin_groups.php new file mode 100644 index 00000000..6d43231a --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/groups/admin_groups.php @@ -0,0 +1,110 @@ + + +
    +

    +
    +
    +
    +
    + + +
    + + + + + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + + + + +
    + + +
    +
    +
    +
    +
    +
    + +

    +
    +
    +
    +
    + +
    +

    + +'."\n"; +} + +?> +
    '.__('Edit link').''.(($cur_group['g_id'] > FEATHER_MEMBER) ? ' | '.__('Delete link').'' : '').''.$feather->utils->escape($cur_group['g_title']).'
    +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/groups/confirm_delete.php b/style/themes/MyFeatherBB/view/admin/groups/confirm_delete.php new file mode 100644 index 00000000..2ea97c75 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/groups/confirm_delete.php @@ -0,0 +1,36 @@ + + +
    +

    +
    +
    + +
    + +
    + +
    +

    utils->escape($group_title)) ?>

    +

    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/groups/delete_group.php b/style/themes/MyFeatherBB/view/admin/groups/delete_group.php new file mode 100644 index 00000000..be55e2a4 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/groups/delete_group.php @@ -0,0 +1,39 @@ + + +
    +

    +
    +
    + +
    +
    + +
    +

    utils->escape($group_info['title']), $feather->utils->forum_number_format($group_info['members'])) ?>

    + +
    +
    +
    +

    +
    +
    +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/admin/index.php b/style/themes/MyFeatherBB/view/admin/index.php new file mode 100644 index 00000000..4dcbbbbb --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/index.php @@ -0,0 +1,63 @@ + + +
    +

    +
    +
    +

    +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    +
    +
    + + +

    +
    +

    url->get('admin/action/remove_install_file/').'">'.__('Delete install file').'') ?>

    +
    + + +

    +
    +
    +
    +
    +
    + forum_settings['o_cur_version'], ''.__('Check for upgrade').'') ?> +
    +
    +
    + +
    +
    +
    + - +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/loader.php b/style/themes/MyFeatherBB/view/admin/loader.php new file mode 100644 index 00000000..6a61c22f --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/loader.php @@ -0,0 +1,17 @@ + + +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/maintenance/admin_maintenance.php b/style/themes/MyFeatherBB/view/admin/maintenance/admin_maintenance.php new file mode 100644 index 00000000..0e70cca3 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/maintenance/admin_maintenance.php @@ -0,0 +1,99 @@ + + +
    +

    +
    +
    +
    + +
    + +
    +

    url->get('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    + + + + + + + + + + + + + +
    + + +
    + + +
    + +
    +

    +
    +
    +
    +
    +
    + +
    + +
    + +
    + +
    + + + + + + + + + + + + + +
    + + +
    + + + +
    + + +
    +

    url->get('admin/options/#maintenance').'">'.__('Maintenance mode').'') ?>

    +
    +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/maintenance/prune.php b/style/themes/MyFeatherBB/view/admin/maintenance/prune.php new file mode 100644 index 00000000..fa4aea34 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/maintenance/prune.php @@ -0,0 +1,39 @@ + + +
    +

    +
    +
    + +
    + + + + +
    + +
    +

    utils->forum_number_format($prune['num_topics'])) ?>

    +

    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/maintenance/rebuild.php b/style/themes/MyFeatherBB/view/admin/maintenance/rebuild.php new file mode 100644 index 00000000..576d1ecf --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/maintenance/rebuild.php @@ -0,0 +1,17 @@ + +

    + +

    url->get('admin/maintenance/').$query_str.'">'.__('Click here').'')?>

    diff --git a/style/themes/MyFeatherBB/view/admin/menu.php b/style/themes/MyFeatherBB/view/admin/menu.php new file mode 100644 index 00000000..da238ac6 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/menu.php @@ -0,0 +1,116 @@ + +
    +
    +

    +
    +
    +
      + > + > +user->g_mod_ban_users == '1'): ?> > +forum_settings['o_report_method'] == '0' || $feather->forum_settings['o_report_method'] == '2'): ?> > +
    +
    +
    + +

    +
    +
    +
      + > + > + > + > + > + > + > + > + > +
    +
    +
    + +

    +
    +
    + +
    +
    + +
    diff --git a/style/themes/MyFeatherBB/view/admin/options.php b/style/themes/MyFeatherBB/view/admin/options.php new file mode 100644 index 00000000..78ed0fa6 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/options.php @@ -0,0 +1,840 @@ + + +
    +

    +
    +
    + +

    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + +
    + + +
    + + +
    + + + +
    + + +
    + + +
    +
    +
    +
    +user->timezone + $feather->user->dst) * 3600; + $timestamp = time() + $diff; + +?> +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + forum_settings['o_time_format'], $timestamp), ''.__('PHP manual').'') ?> +
    + + forum_settings['o_date_format'], $timestamp), ''.__('PHP manual').'') ?> +
    + + +
    + + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + url->get('admin/censoring/').'">'.__('Censoring').'') ?> +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + +
    + + + + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + +
    + + + + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + +
    + + +
    + + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + +
    + + + +
    + + + +
    + + +
    + + +
    + +forum_settings['o_smtp_pass']) ? random_key($feather->utils->strlen($feather->forum_settings['o_smtp_pass']), true) : ''; ?> + + + +
    + + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + +
    + + + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + +
    + + + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + +
    + + + +
    + + +
    +
    +
    +
    +

    +
    +
    +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/admin/parser.php b/style/themes/MyFeatherBB/view/admin/parser.php new file mode 100644 index 00000000..35ee0cbe --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/parser.php @@ -0,0 +1,299 @@ + + +
    +

    +
    +
    + +

    + + +

    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + /> /> + + +
    + /> /> + + +
    + /> /> + + +
    + /> /> + + +
    + /> + /> +
    + /> +
    + X:Width + + Y:Height + + +
    + X:Width + + Y:Height +
    + + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + $value) { + $i++; + $oldfile = $value['file']; + ?> + + + + + + + + + + + + + + + + + + + + + +
    :)
    + + + +

    New smiley text
    +
    +
    +
    +
    +
    +
    + + + +
    +
    + +
    + + + + + + + + + + + $tagdata) { + if ($tagname == '_ROOT_') { + continue; + } // Skip last pseudo-tag + $title = isset($lang_admin_parser['tag_summary'][$tagname]) ? + $lang_admin_parser['tag_summary'][$tagname] : ''; + ?> + + + + + + + + +
    + /> /> + + /> /> + + /> +
    +
    +
    +
    + + +

    + + +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/permissions.php b/style/themes/MyFeatherBB/view/admin/permissions.php new file mode 100644 index 00000000..1fe92218 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/permissions.php @@ -0,0 +1,189 @@ + + +
    +

    +
    +
    + +

    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + +
    + + + +
    + + + +
    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/plugins.php b/style/themes/MyFeatherBB/view/admin/plugins.php new file mode 100644 index 00000000..c09245ed --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/plugins.php @@ -0,0 +1,57 @@ + +
    +

    Plugins

    +
    +
    + + + + + + + + + + $class) : ?> + + + + + + +
    The following plugins are available
    ExtensionDescription
    + +
    + + Deactivate + + Activate + +
    +
    + +
    + Version | + By +
    +
    +

    éléments

    +
    +
    +
    + +
    +
    diff --git a/style/themes/MyFeatherBB/view/admin/reports.php b/style/themes/MyFeatherBB/view/admin/reports.php new file mode 100644 index 00000000..b364bfdc --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/reports.php @@ -0,0 +1,116 @@ + + +
    +

    +
    +
    + + +
    +
    + utils->format_time($report['created'])) ?> +
    + + + + + + + + + +
    url->get('users/'.$report['reported_by'].'/').'">'.$feather->utils->escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    ', $feather->utils->escape($report['message'])) ?>
    +
    +
    +
    + +
    +
    + +
    +

    +
    +
    +
    + +
    +
    +
    + +
    +

    +
    +
    + +
    +
    + utils->format_time($report['zapped']), ($report['zapped_by'] != '') ? ''.$feather->utils->escape($report['zapped_by']).'' : __('NA')) ?> +
    + + + + + + + + + +
    url->get('users/'.$report['reported_by'].'/').'">'.$feather->utils->escape($report['reporter']).'' : __('Deleted user')) ?> $feather->url->get('forum/'.$report['forum_id'].'/'.$feather->url->url_friendly($report['forum_name']).'/'), + $report['subject'] => $feather->url->get('forum/'.$report['topic_id'].'/'.$feather->url->url_friendly($report['subject'])), + sprintf(__('Post ID'), $report['pid']) => $feather->url->get('post/'.$report['pid'].'/#p'.$report['pid']))) ?>
    ', $feather->utils->escape($report['message'])) ?>
    +
    +
    +
    + +
    +
    + +
    +

    +
    +
    +
    + +
    +
    +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/admin/statistics.php b/style/themes/MyFeatherBB/view/admin/statistics.php new file mode 100644 index 00000000..f2fd7a9a --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/statistics.php @@ -0,0 +1,42 @@ + + +
    +

    +
    +
    +
    +
    +
    + +
    +user->g_id == FEATHER_ADMIN): ?>
    +
    +
    + url->get('admin/phpinfo/').'">'.__('Show info').'') ?>
    + +
    +
    +
    + utils->forum_number_format($total_records)) ?> +
    +
    + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/users/admin_users.php b/style/themes/MyFeatherBB/view/admin/users/admin_users.php new file mode 100644 index 00000000..74a05472 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/users/admin_users.php @@ -0,0 +1,172 @@ + + +
    +

    +
    +
    +

    +
    +
    + +
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +     +
    + +
    +
    +
    +
    +

    +
    +
    + +

    +
    +
    +
    +
    + +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/users/ban_users.php b/style/themes/MyFeatherBB/view/admin/users/ban_users.php new file mode 100644 index 00000000..8e06caff --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/users/ban_users.php @@ -0,0 +1,58 @@ + + +
    +

    +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + +
    + + +
    + + +
    + + + +
    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/users/delete_users.php b/style/themes/MyFeatherBB/view/admin/users/delete_users.php new file mode 100644 index 00000000..1a4360c6 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/users/delete_users.php @@ -0,0 +1,39 @@ + + +
    +

    +
    +
    + + +
    +
    + +
    +

    +
    + +
    +

    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/users/find_users.php b/style/themes/MyFeatherBB/view/admin/users/find_users.php new file mode 100644 index 00000000..3ddd2324 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/users/find_users.php @@ -0,0 +1,100 @@ + + +
    +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    + +
    +
    +
    +
    + + +
    + +
    +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +'."\n"; + } + + ?> + +
    url->get('user/'.$user['id'].'/').'">'.$feather->utils->escape($user['username']).'' ?>utils->escape($user['email']) ?>utils->forum_number_format($user['num_posts']) ?>utils->escape($user['admin_note']) : ' ' ?>url->get('admin/users/ip-stats/id/'.$user['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    '.__('No match').'
    +
    +
    +
    + +
    +
    +
    + +

    + +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/admin/users/move_users.php b/style/themes/MyFeatherBB/view/admin/users/move_users.php new file mode 100644 index 00000000..a2f96b91 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/users/move_users.php @@ -0,0 +1,47 @@ + + +
    +

    +
    +
    + + +
    +
    + +
    + + + + + +
    + + +
    +
    +
    +
    +

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/users/search_ip.php b/style/themes/MyFeatherBB/view/admin/users/search_ip.php new file mode 100644 index 00000000..a4db0174 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/users/search_ip.php @@ -0,0 +1,79 @@ + + +
    +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    + +
    +
    +
    +
    + +
    +

    +
    +
    + + + + + + + + + + + + + + + + + +'."\n"; + endif; + + ?> + +
    utils->escape($ip['poster_ip']) ?>utils->format_time($ip['last_used']) ?>
    '.__('Results no posts found').'
    +
    +
    +
    + +
    +
    +
    + +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/admin/users/show_users.php b/style/themes/MyFeatherBB/view/admin/users/show_users.php new file mode 100644 index 00000000..99fccb06 --- /dev/null +++ b/style/themes/MyFeatherBB/view/admin/users/show_users.php @@ -0,0 +1,100 @@ + + +
    +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    + +
    +
    +
    +
    + +
    +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +'."\n"; + } + + ?> + +
    url->get('user/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.$feather->utils->escape($info['user_data'][$cur_poster['poster_id']]['username']).'' ?>utils->escape($info['user_data'][$cur_poster['poster_id']]['email']) ?>utils->forum_number_format($info['user_data'][$cur_poster['poster_id']]['num_posts']) ?>utils->escape($info['user_data'][$cur_poster['poster_id']]['admin_note']) : ' ' ?>url->get('admin/users/ip-stats/id/'.$info['user_data'][$cur_poster['poster_id']]['id'].'/').'">'.__('Results view IP link').' | '.__('Results show posts link').'' ?>
    utils->escape($cur_poster['poster']) ?>    
    '.__('Results no IP found').'
    +
    +
    +
    + +
    +
    +
    + +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/delete.php b/style/themes/MyFeatherBB/view/delete.php new file mode 100644 index 00000000..abfc0a7f --- /dev/null +++ b/style/themes/MyFeatherBB/view/delete.php @@ -0,0 +1,64 @@ + + + + +
    +

    +
    +
    + +
    +
    +

    '.$feather->utils->escape($cur_post['poster']).'', $feather->utils->format_time($cur_post['posted'])) ?>

    +

    '.__('Topic warning').'' : ''.__('Warning').'' ?>

    +
    +
    +

    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    utils->escape($cur_post['poster']) ?>
    +
    utils->format_time($cur_post['posted']) ?>
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/edit.php b/style/themes/MyFeatherBB/view/edit.php new file mode 100644 index 00000000..ea9c3abe --- /dev/null +++ b/style/themes/MyFeatherBB/view/edit.php @@ -0,0 +1,119 @@ + + + + + +
    +

    +
    +
    +

    +
      +'.$cur_error.''."\n"; + } +?> +
    +
    +
    +
    +request->post('preview')): +?> +
    +

    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + + +
    +

    +
    +
    + +
    +
    + + +
    + + + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/error.php b/style/themes/MyFeatherBB/view/error.php new file mode 100644 index 00000000..d638a206 --- /dev/null +++ b/style/themes/MyFeatherBB/view/error.php @@ -0,0 +1,26 @@ + +
    +

    +
    +
    +

    + '.__('Go back').'

    '; + } ?> +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/footer.new.php b/style/themes/MyFeatherBB/view/footer.new.php new file mode 100644 index 00000000..b66f807c --- /dev/null +++ b/style/themes/MyFeatherBB/view/footer.new.php @@ -0,0 +1,160 @@ + +
    + +
    +

    +
    +user->is_admmod) { + echo "\t\t".'
    '."\n"; + + if ($active_page == 'viewforum') { + echo "\t\t\t".'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; + echo "\t\t\t".'
    '."\n"; + } elseif ($active_page == 'viewtopic') { + if (isset($pid)) { + $parameter = 'param/'.$pid.'/'; + } elseif (isset($page_number) && $page_number != 1) { + $parameter = 'param/'.$page_number.'/'; + } else { + $parameter = ''; + } + + + echo "\t\t\t".'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; + // TODO: all + //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; + + if ($cur_topic['closed'] == '1') { + echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; + } else { + echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; + } + + if ($cur_topic['sticky'] == '1') { + echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; + } else { + echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; + } + + echo "\t\t\t".'
    '."\n"; + } + + echo "\t\t\t".'
    '."\n\t\t".'
    '."\n"; +} + +?> +
    + +forum_settings['o_quickjump'] == '1' && !empty($quickjump)) { ?> +
    +
    +
    + + +
    +
    +
    + + +
    +forum_settings['o_feed_type'] == '1') { + echo "\t\t\t\t".''."\n"; + } elseif ($feather->forum_settings['o_feed_type'] == '2') { + echo "\t\t\t\t".''."\n"; + } +} elseif ($active_page == 'viewforum') { + if ($feather->forum_settings['o_feed_type'] == '1') { + echo "\t\t\t\t".''."\n"; + } elseif ($feather->forum_settings['o_feed_type'] == '2') { + echo "\t\t\t\t".''."\n"; + } +} elseif ($active_page == 'viewtopic') { + if ($feather->forum_settings['o_feed_type'] == '1') { + echo "\t\t\t\t".''."\n"; + } elseif ($feather->forum_settings['o_feed_type'] == '2') { + echo "\t\t\t\t".''."\n"; + } +} + +?> +

    FeatherBB'.(($feather->forum_settings['o_show_version'] == '1') ? ' '.$feather->forum_settings['o_cur_version'] : '')) ?>

    +
    +
    +
    +
    +
    + +

    [ ]

    + +
    +

    +
    +
    + + + + + + + + + $sql) { + echo "\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t\t".''."\n"; + echo "\t\t\t\t\t\t".''."\n"; +} ?> + + + + +
    '.$feather->utils->escape(round($time, 8)).''.$feather->utils->escape($sql).'
    +
    +
    +
    + + + + + $value) { + echo $key.'="'.$value.'" '; + } + echo 'src="'.$feather->url->base().'/'.$script['file'].'"/>'."\n"; +} ?> + diff --git a/style/themes/MyFeatherBB/view/footer.php b/style/themes/MyFeatherBB/view/footer.php new file mode 100644 index 00000000..9e19de90 --- /dev/null +++ b/style/themes/MyFeatherBB/view/footer.php @@ -0,0 +1,133 @@ + +
    + +
    +

    +
    +'."\n"; + + if ($footer_style == 'viewforum') { + echo "\t\t\t".'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate forum').'
    '."\n"; + echo "\t\t\t".'
    '."\n"; + } elseif ($footer_style == 'viewtopic') { + if (isset($pid)) { + $parameter = 'param/'.$pid.'/'; + } elseif (isset($p) && $p != 1) { + $parameter = 'param/'.$p.'/'; + } else { + $parameter = ''; + } + + + echo "\t\t\t".'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Mod controls').'
    '."\n"; + // TODO: all + //echo "\t\t\t\t".'
    '.__('Moderate topic').''.($num_pages > 1 ? ' ('.__('All').')' : '').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Moderate topic').'
    '."\n"; + echo "\t\t\t\t".'
    '.__('Move topic').'
    '."\n"; + + if ($cur_topic['closed'] == '1') { + echo "\t\t\t\t".'
    '.__('Open topic').'
    '."\n"; + } else { + echo "\t\t\t\t".'
    '.__('Close topic').'
    '."\n"; + } + + if ($cur_topic['sticky'] == '1') { + echo "\t\t\t\t".'
    '.__('Unstick topic').'
    '."\n"; + } else { + echo "\t\t\t\t".'
    '.__('Stick topic').'
    '."\n"; + } + + echo "\t\t\t".'
    '."\n"; + } + + echo "\t\t\t".'
    '."\n\t\t".'
    '."\n"; +} + +?> +
    + +forum_settings['o_quickjump'] == '1' && !empty($quickjump)) { ?> +
    +
    +
    + + +
    +
    +
    + + +
    +forum_settings['o_feed_type'] == '1') { + echo "\t\t\t\t".''."\n"; + } elseif ($feather->forum_settings['o_feed_type'] == '2') { + echo "\t\t\t\t".''."\n"; + } +} elseif ($footer_style == 'viewforum') { + if ($feather->forum_settings['o_feed_type'] == '1') { + echo "\t\t\t\t".''."\n"; + } elseif ($feather->forum_settings['o_feed_type'] == '2') { + echo "\t\t\t\t".''."\n"; + } +} elseif ($footer_style == 'viewtopic') { + if ($feather->forum_settings['o_feed_type'] == '1') { + echo "\t\t\t\t".''."\n"; + } elseif ($feather->forum_settings['o_feed_type'] == '2') { + echo "\t\t\t\t".''."\n"; + } +} + +?> +

    FeatherBB'.(($feather->forum_settings['o_show_version'] == '1') ? ' '.$feather->forum_settings['o_cur_version'] : '')) ?>

    +
    +
    +
    +
    +
    +forum_env['FEATHER_SHOW_INFO']) { + $feather->debug->info(); +} +// Display executed queries (if enabled) +if ($feather->forum_env['FEATHER_SHOW_QUERIES']) { + $feather->debug->queries(); +} +?> + + + + + + + diff --git a/style/FeatherBB/view/header.new.php b/style/themes/MyFeatherBB/view/header.new.php similarity index 98% rename from style/FeatherBB/view/header.new.php rename to style/themes/MyFeatherBB/view/header.new.php index 0299b47d..0fb8af32 100644 --- a/style/FeatherBB/view/header.new.php +++ b/style/themes/MyFeatherBB/view/header.new.php @@ -34,8 +34,8 @@ } } if ($admin_console) { - if (file_exists($feather->forum_env['FEATHER_ROOT'].'style/'.$feather->user->style.'/base_admin.css')) { - echo "\t".''."\n"; + if (file_exists($feather->forum_env['FEATHER_ROOT'].'style/themes/'.$feather->user->style.'/base_admin.css')) { + echo "\t".''."\n"; } else { echo "\t".''."\n"; } diff --git a/style/themes/MyFeatherBB/view/header.php b/style/themes/MyFeatherBB/view/header.php new file mode 100644 index 00000000..b4dfdbdd --- /dev/null +++ b/style/themes/MyFeatherBB/view/header.php @@ -0,0 +1,137 @@ + + + + + + + +<?php echo generate_page_title($page_title, $p) ?> + + + + + + +> + +
    + + + +
    +
    +

    + +

    utils->escape($feather->forum_settings['o_board_title']) ?>

    +
    +
    forum_settings['o_board_desc']) ?>
    +

    +
    + +
    +
    +
    + user->g_read_board == '1' && $feather->forum_settings['o_announcement'] == '1') : ?> +
    +

    +
    +
    +
    forum_settings['o_announcement_message'] ?>
    +
    +
    +
    + + getMessages())) : ?> + + getMessages() as $type => $message) { ?> +
    +

    ×

    +

    utils->escape($message) ?>

    +
    + + +
    + +
    + +
    +
    diff --git a/style/themes/MyFeatherBB/view/help.php b/style/themes/MyFeatherBB/view/help.php new file mode 100644 index 00000000..00669948 --- /dev/null +++ b/style/themes/MyFeatherBB/view/help.php @@ -0,0 +1,141 @@ + + +

    +
    +
    +

    +

    +
    +
    +

    +
    +
    +

    +

    [b][/b]

    +

    [u][/u]

    +

    [i][/i]

    +

    [s][/s]

    +

    [del][/del]

    +

    [ins][/ins]

    +

    [em][/em]

    +

    [color=#FF0000][/color]

    +

    [color=blue][/color]

    +

    [h][/h]

    +
    +
    +

    +
    +
    +

    +

    [url=utils->escape($feather->url->base(true).'/') ?>]utils->escape($feather->forum_settings['o_board_title']) ?>[/url] utils->escape($feather->forum_settings['o_board_title']) ?>

    +

    [url]utils->escape($feather->url->base(true).'/') ?>[/url] utils->escape($feather->url->base(true).'/') ?>

    +

    [url=/help/][/url]

    +

    [email]myname@example.com[/email] myname@example.com

    +

    [email=myname@example.com][/email]

    +

    [topic=1][/topic]

    +

    [topic]1[/topic] url->get('topic/1/') ?>

    +

    [post=1][/post]

    +

    [post]1[/post] url->get('post/1/#p1') ?>

    +

    [forum=1][/forum]

    +

    [forum]1[/forum] url->get('forum/1/') ?>

    +

    [user=2][/user]

    +

    [user]2[/user] url->get('user/2/') ?>

    +
    +
    +

    +

    [img=]utils->escape($feather->url->base(true)) ?>/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

    +
    +
    +

    +
    +
    +

    +

    [quote=James][/quote]

    +

    +
    +
    James

    +
    +

    +

    [quote][/quote]

    +

    +
    +

    +
    +

    +
    +
    +

    +
    +
    +

    +

    [code][/code]

    +

    +
    +
    +
    +
    +
    +

    +
    +
    +

    +

    [list][*][/*][*][/*][*][/*][/list] +

    +
    +
    +
    +

    [list=1][*][/*][*][/*][*][/*][/list] +

    +
    +
    +
    +

    [list=a][*][/*][*][/*][*][/*][/list] +

    +
    +
    +
    +
    +
    +

    +
    +
    +

    +

    [b][u][/u][/b]

    +
    +
    +

    +
    +
    +

    + $smiley_data) { + $smiley_groups[$smiley_data['file']][] = $smiley_text; +} + +foreach ($smiley_groups as $smiley_img => $smiley_texts) { + echo "\t\t

    ". implode(' ' .__('and'). ' ', $smiley_texts).' ' .__('produces'). ' '.$pd['smilies'][$smiley_texts[0]]['html'] .'

    '."\n"; +} + +?> +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/index.php b/style/themes/MyFeatherBB/view/index.php new file mode 100644 index 00000000..826fa47e --- /dev/null +++ b/style/themes/MyFeatherBB/view/index.php @@ -0,0 +1,111 @@ + +

    +cid != $cur_cat) : + if ($cur_cat != 0) : + ?> + + +
    +
    +
    + +
    +

    utils->escape($forum->cat_name) ?>

    +
    +
    + + + + + + + + + + + cid; + endif; + ?> + + + + + + + 0) : + ?> + +
    +
    utils->forum_number_format($forum->forum_count_formatted) ?>
    +
    +
    + forum_field."\n".$forum->moderators_formatted ?> +
    +
    +
    utils->forum_number_format($forum->num_topics_formatted) ?>utils->forum_number_format($forum->num_posts_formatted) ?>last_post_formatted ?>
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +

    +
    +
    +
    +
    +
    '.$feather->utils->forum_number_format($stats['total_users']).'') ?>
    +
    '.$feather->utils->forum_number_format($stats['total_topics']).'') ?>
    +
    '.$feather->utils->forum_number_format($stats['total_posts']).'') ?>
    +
    +
    +
    +
    + forum_settings['o_users_online'] == 1) : ?> +
    '.$feather->utils->forum_number_format($online['num_users']).'') ?>
    +
    '.$feather->utils->forum_number_format($online['num_guests']).'') ?>
    + +
    + forum_settings['o_users_online'] == 1) : + if ($online['num_users'] > 0) { + echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.__('Online').'
    '."\t\t\t\t".implode(', ', $online['users']).''."\n\t\t\t".'
    '."\n"; + } else { + echo "\t\t\t".'
    '."\n"; + } + endif; + ?> +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/install.php b/style/themes/MyFeatherBB/view/install.php new file mode 100644 index 00000000..c146b1b7 --- /dev/null +++ b/style/themes/MyFeatherBB/view/install.php @@ -0,0 +1,222 @@ + + + + + + <?php _e('FeatherBB Installation') ?> + + + + +
    +
    +
    + +
    +
    +
    +
    +

    +

    +
    +
    +
    +
    + +
    +
    + 1): ?> +
    +

    +
    +
    + +
    +
    + +
    +

    + +
    +
    +
    +

    +
    +
    +
    + + +
    +

    +
    +
    + +
    +
    +

    +
      + '.$error.''."\n"; + } + ?> +
    +
    +
    + + +
    +
    +

    +

    +
    +
    + +
    +

    + + +
    +
    +
    + +
    +
    + +
    +

    + + +
    +
    +
    + +
    +
    + +
    +

    + + +
    +
    +
    + +
    +
    + +
    +

    + + + + +
    +
    +
    +
    + +
    +
    + +
    +

    + + +
    +
    +
    + +
    +
    +

    +

    +
    +
    + +
    +

    + + + + + + + + + +
    +
    +
    + +
    +
    +

    +

    +
    +
    + +
    + + + + + + + + +
    +
    +
    + +

    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/style/themes/MyFeatherBB/view/login/form.php b/style/themes/MyFeatherBB/view/login/form.php new file mode 100644 index 00000000..59808e7f --- /dev/null +++ b/style/themes/MyFeatherBB/view/login/form.php @@ -0,0 +1,41 @@ + +
    +

    +
    +
    + +
    +
    + +
    + + + + +
    + +
    + +

    +

    +
    +
    +
    +

    +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/login/password_forgotten.php b/style/themes/MyFeatherBB/view/login/password_forgotten.php new file mode 100644 index 00000000..432f9aee --- /dev/null +++ b/style/themes/MyFeatherBB/view/login/password_forgotten.php @@ -0,0 +1,57 @@ + +
    +

    +
    +
    +

    +
      +'.$cur_error.''."\n"; + } + ?> +
    +
    +
    +
    + + +
    +

    +
    +
    + +
    +
    + +
    + + +

    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/misc/email.php b/style/themes/MyFeatherBB/view/misc/email.php new file mode 100644 index 00000000..867ac9ee --- /dev/null +++ b/style/themes/MyFeatherBB/view/misc/email.php @@ -0,0 +1,37 @@ + +
    +

    utils->escape($mail['recipient']) ?>

    +
    +
    + +
    +
    + +
    + + + +

    +
    +
    +
    +

    +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/misc/report.php b/style/themes/MyFeatherBB/view/misc/report.php new file mode 100644 index 00000000..6eeead9c --- /dev/null +++ b/style/themes/MyFeatherBB/view/misc/report.php @@ -0,0 +1,44 @@ + + + + +
    +

    +
    +
    + +
    +
    + +
    + + +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/misc/rules.php b/style/themes/MyFeatherBB/view/misc/rules.php new file mode 100644 index 00000000..feb662ad --- /dev/null +++ b/style/themes/MyFeatherBB/view/misc/rules.php @@ -0,0 +1,23 @@ + +
    +

    +
    +
    +
    forum_settings['o_rules_message'] ?>
    +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/moderate/delete_posts.php b/style/themes/MyFeatherBB/view/moderate/delete_posts.php new file mode 100644 index 00000000..00b80920 --- /dev/null +++ b/style/themes/MyFeatherBB/view/moderate/delete_posts.php @@ -0,0 +1,33 @@ + +
    +

    +
    +
    + +
    +
    + +
    + +

    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/moderate/delete_topics.php b/style/themes/MyFeatherBB/view/moderate/delete_topics.php new file mode 100644 index 00000000..d0ab1eed --- /dev/null +++ b/style/themes/MyFeatherBB/view/moderate/delete_topics.php @@ -0,0 +1,34 @@ + + +
    +

    +
    +
    + + +
    +
    + +
    +

    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/moderate/merge_topics.php b/style/themes/MyFeatherBB/view/moderate/merge_topics.php new file mode 100644 index 00000000..820cedee --- /dev/null +++ b/style/themes/MyFeatherBB/view/moderate/merge_topics.php @@ -0,0 +1,36 @@ + + +
    +

    +
    +
    + + +
    +
    + +
    +
    + +
    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/moderate/moderator_forum.php b/style/themes/MyFeatherBB/view/moderate/moderator_forum.php new file mode 100644 index 00000000..06c6987b --- /dev/null +++ b/style/themes/MyFeatherBB/view/moderate/moderator_forum.php @@ -0,0 +1,101 @@ + + +
    +
    + +
    + +
    +
    +
    +
    + +
    + + +
    +

    utils->escape($cur_forum['forum_name']) ?>

    +
    +
    + + + + + +forum_settings['o_topic_views'] == '1'): ?> + + + + + + + + + + +forum_settings['o_topic_views'] == '1'): ?> + + + + forum_settings['o_topic_views'] == '1') ? 5 : 4; + $button_status = ' disabled="disabled"'; + echo "\t\t\t\t\t".''."\n"; + endif; + ?> + +
    +
    utils->forum_number_format($topic_count + $start_from) ?>
    +
    +
    + +
    +
    +
    utils->forum_number_format($topic['num_replies']) : '-' ?>utils->forum_number_format($topic['num_views']) : '-' ?>
    '.__('Empty forum').'
    +
    +
    +
    + +
    +
    +
    + +

    /> /> /> /> />

    +
    +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/moderate/move_topics.php b/style/themes/MyFeatherBB/view/moderate/move_topics.php new file mode 100644 index 00000000..e72ae5cb --- /dev/null +++ b/style/themes/MyFeatherBB/view/moderate/move_topics.php @@ -0,0 +1,44 @@ + + +
    +

    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/moderate/posts_view.php b/style/themes/MyFeatherBB/view/moderate/posts_view.php new file mode 100644 index 00000000..0338555a --- /dev/null +++ b/style/themes/MyFeatherBB/view/moderate/posts_view.php @@ -0,0 +1,95 @@ + + + +
    + + +
    +

    # utils->format_time($post['posted']) ?>

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    +
    + + '.__('Last edit').' '.$feather->utils->escape($post['edited_by']).' ('.$feather->utils->format_time($post['edited']).')

    '."\n"; +} + ?> +
    +
    +
    +
    +
    +
    +

    ' : '

    '.__('Cannot select first').'

    ' ?>
    +
    +
    +
    +
    + + + +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/moderate/split_posts.php b/style/themes/MyFeatherBB/view/moderate/split_posts.php new file mode 100644 index 00000000..7c59b0b9 --- /dev/null +++ b/style/themes/MyFeatherBB/view/moderate/split_posts.php @@ -0,0 +1,40 @@ + +
    +

    +
    +
    + +
    +
    + +
    + + + +

    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/post.php b/style/themes/MyFeatherBB/view/post.php new file mode 100644 index 00000000..d0b60d54 --- /dev/null +++ b/style/themes/MyFeatherBB/view/post.php @@ -0,0 +1,213 @@ + + +
    +
    + +
    +
    + + +
    +

    +
    +
    +

    +
      +'.$cur_error.''."\n"; + } + ?> +
    +
    +
    +
    + +request->post('preview')) { + require_once FEATHER_ROOT.'include/parser.php'; + $preview_message = parse_message($post['message'], $post['hide_smilies']); + + ?> +
    +

    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + +
    +

    +
    + +
    +
    + +
    + + +user->is_guest) { + $email_label = ($feather->forum_settings['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_form_name = ($feather->forum_settings['p_force_guest_email'] == '1') ? 'req_email' : 'email'; + ?> + + +
    + + + + +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    + user->is_guest) : ?> +
    +
    + +
    +

    + +
    +
    +
    + +

    + +
    +
    + + +forum_settings['o_topic_review'] != '0') : +?> +
    +

    + + +
    +
    +
    +
    +
    +
    +
    utils->escape($post['poster']) ?>
    +
    utils->format_time($post['posted']) ?>
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    + diff --git a/style/themes/MyFeatherBB/view/profile/change_mail.php b/style/themes/MyFeatherBB/view/profile/change_mail.php new file mode 100644 index 00000000..1e59ab54 --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/change_mail.php @@ -0,0 +1,35 @@ + +
    +

    +
    +
    + +
    +
    + +
    + + + +

    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/profile/change_pass.php b/style/themes/MyFeatherBB/view/profile/change_pass.php new file mode 100644 index 00000000..1bacb173 --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/change_pass.php @@ -0,0 +1,39 @@ + +
    +

    +
    +
    + +
    + +
    + +
    +user->is_admmod): ?> + + +

    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/profile/delete_user.php b/style/themes/MyFeatherBB/view/profile/delete_user.php new file mode 100644 index 00000000..84a3b58d --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/delete_user.php @@ -0,0 +1,36 @@ + +
    +

    +
    +
    + +
    +
    + +
    +

    '.$feather->utils->escape($username).'.' ?>

    +
    + +
    +

    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/profile/menu.php b/style/themes/MyFeatherBB/view/profile/menu.php new file mode 100644 index 00000000..a46fef80 --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/menu.php @@ -0,0 +1,55 @@ + +
    +
    +

    +
    +
    +
      + > + > + > +forum_settings['o_avatars'] == '1' || $feather->forum_settings['o_signatures'] == '1'): ?> > + > + > +user->g_id == FEATHER_ADMIN || ($feather->user->g_moderator == '1' && $feather->user->g_mod_ban_users == '1')): ?> > +
    +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/profile/section_admin.php b/style/themes/MyFeatherBB/view/profile/section_admin.php new file mode 100644 index 00000000..f06eb7d4 --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/section_admin.php @@ -0,0 +1,87 @@ + +
    +

    utils->escape($user['username']).' - '.__('Section admin') ?>

    +
    +
    + +
    + +
    +user->g_moderator == '1') { + ?> + +
    +

    +
    +
    +
    +user->id != $id) { + ?> + +
    + + +
    + +
    +
    +
    + + +
    + +
    +
    +
    + +
    +
    + +
    +

    + +
    +
    +
    +
    + +
    + + + + +
    + \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/profile/section_display.php b/style/themes/MyFeatherBB/view/profile/section_display.php new file mode 100644 index 00000000..7cce9e3c --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/section_display.php @@ -0,0 +1,101 @@ + +
    +

    utils->escape($user['username']).' - '.__('Section display') ?>

    +
    +
    + +
    +
    '."\n"; + } elseif (count($styles) > 1) { + ?> +
    +
    + +
    + +
    +
    +
    + +forum_settings['o_smilies'] == '1' || $feather->forum_settings['o_smilies_sig'] == '1' || $feather->forum_settings['o_signatures'] == '1' || $feather->forum_settings['o_avatars'] == '1' || ($feather->forum_settings['p_message_bbcode'] == '1' && $feather->forum_settings['p_message_img_tag'] == '1')): ?> +
    +
    + +
    +

    +
    +forum_settings['o_smilies'] == '1' || $feather->forum_settings['o_smilies_sig'] == '1'): ?> +forum_settings['o_signatures'] == '1'): ?> +forum_settings['o_avatars'] == '1'): ?> +forum_settings['p_message_bbcode'] == '1' && $feather->forum_settings['p_message_img_tag'] == '1'): ?> +forum_settings['o_signatures'] == '1' && $feather->forum_settings['p_sig_bbcode'] == '1' && $feather->forum_settings['p_sig_img_tag'] == '1'): ?> + +
    +
    +
    +
    + +
    +
    + +
    + + +

    +
    +
    +
    +

    + +
    + +
    + diff --git a/style/themes/MyFeatherBB/view/profile/section_essentials.php b/style/themes/MyFeatherBB/view/profile/section_essentials.php new file mode 100644 index 00000000..b45114f6 --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/section_essentials.php @@ -0,0 +1,258 @@ + +
    +

    utils->escape($user['username']).' - '.__('Section essentials') ?>

    +
    +
    + +
    +
    + +
    + + +user->id == $id || $feather->user->g_id == FEATHER_ADMIN || ($user['g_moderator'] == '0' && $feather->user->g_mod_change_passwords == '1')): ?>

    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    +

    + +
    + +
    + + + + 1) { + ?> + + +
    +
    +
    +
    +
    + +
    +

    utils->format_time($user['registered'], true).(($feather->user->is_admmod) ? ' ('.$feather->utils->escape($user['registration_ip']).')' : '')) ?>

    +

    utils->format_time($user['last_post'])) ?>

    +

    utils->format_time($user['last_visit'])) ?>

    + +user->is_admmod): ?> +
    +
    +
    +

    +
    +
    +
    +
    + diff --git a/style/themes/MyFeatherBB/view/profile/section_messaging.php b/style/themes/MyFeatherBB/view/profile/section_messaging.php new file mode 100644 index 00000000..2d3268dd --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/section_messaging.php @@ -0,0 +1,39 @@ + +
    +

    utils->escape($user['username']).' - '.__('Section messaging') ?>

    +
    +
    + +
    +
    + +
    + + + + + + +
    +
    +
    +

    +
    +
    +
    +
    + \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/profile/section_personal.php b/style/themes/MyFeatherBB/view/profile/section_personal.php new file mode 100644 index 00000000..5ae81801 --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/section_personal.php @@ -0,0 +1,39 @@ + +
    +

    utils->escape($user['username']).' - '.__('Section personal') ?>

    +
    +
    + +
    +
    + +
    + + + + +user->g_post_links == '1' || $feather->user->g_id == FEATHER_ADMIN) : ?> + +
    +
    +
    +

    +
    +
    +
    +
    + \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/profile/section_personality.php b/style/themes/MyFeatherBB/view/profile/section_personality.php new file mode 100644 index 00000000..ae9f7b0f --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/section_personality.php @@ -0,0 +1,56 @@ + +
    +

    utils->escape($user['username']).' - '.__('Section personality') ?>

    +
    +
    + +
    +forum_settings['o_avatars'] == '1'): ?>
    +
    + +
    +
    +

    +

    +
    +
    +
    +forum_settings['o_signatures'] == '1'): ?>
    +
    + +
    +

    +
    + +
    + + +
    +
    +
    +

    +
    +
    +
    +
    + diff --git a/style/themes/MyFeatherBB/view/profile/section_privacy.php b/style/themes/MyFeatherBB/view/profile/section_privacy.php new file mode 100644 index 00000000..48715858 --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/section_privacy.php @@ -0,0 +1,62 @@ + +
    +

    utils->escape($user['username']).' - '.__('Section privacy') ?>

    +
    +
    + +
    +
    + +
    + +

    +
    + + + +
    +
    +
    +
    +forum_settings['o_forum_subscriptions'] == '1' || $feather->forum_settings['o_topic_subscriptions'] == '1'): ?>
    +
    + +
    +
    + +forum_settings['o_topic_subscriptions'] == '1'): ?> + +
    +
    +
    +
    +

    +
    +
    +
    +
    + \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/profile/upload_avatar.php b/style/themes/MyFeatherBB/view/profile/upload_avatar.php new file mode 100644 index 00000000..15261a67 --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/upload_avatar.php @@ -0,0 +1,35 @@ + +
    +

    +
    +
    + +
    +
    + +
    + + + +

    forum_settings['o_avatars_width'].' x '.$feather->forum_settings['o_avatars_height'].' '.__('pixels').' '.__('and').' '.$feather->utils->forum_number_format($feather->forum_settings['o_avatars_size']).' '.__('bytes').' ('.file_size($feather->forum_settings['o_avatars_size']).').' ?>

    +
    +
    +
    +

    +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/profile/view_profile.php b/style/themes/MyFeatherBB/view/profile/view_profile.php new file mode 100644 index 00000000..d30181fd --- /dev/null +++ b/style/themes/MyFeatherBB/view/profile/view_profile.php @@ -0,0 +1,66 @@ + +
    +

    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/register/email.php b/style/themes/MyFeatherBB/view/register/email.php new file mode 100644 index 00000000..a93188f9 --- /dev/null +++ b/style/themes/MyFeatherBB/view/register/email.php @@ -0,0 +1,39 @@ + + +
    +

    utils->escape($recipient) ?>

    +
    +
    + +
    +
    + +
    + + + + +

    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/register/form.php b/style/themes/MyFeatherBB/view/register/form.php new file mode 100644 index 00000000..d7deb65f --- /dev/null +++ b/style/themes/MyFeatherBB/view/register/form.php @@ -0,0 +1,134 @@ + +
    +

    +
    +
    +

    +
      +'.$cur_error.''."\n"; + } + ?> +
    +
    +
    +
    + + +
    +

    +
    +
    + +
    +
    +

    +

    +

    +
    +
    + +
    + + + + +
    +
    +
    +forum_settings['o_regs_verify'] == '0'): ?>
    +
    + +
    + + +

    +
    +
    +
    +
    +
    + forum_settings['o_regs_verify'] == '1') ? __('Email legend 2') : __('Email legend') ?> +
    +forum_settings['o_regs_verify'] == '1'): ?>

    + +forum_settings['o_regs_verify'] == '1'): ?> +
    +
    +
    + 1) { + ?> +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    +

    + +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/register/rules.php b/style/themes/MyFeatherBB/view/register/rules.php new file mode 100644 index 00000000..326c96ad --- /dev/null +++ b/style/themes/MyFeatherBB/view/register/rules.php @@ -0,0 +1,32 @@ + + +
    +

    +
    +
    +
    +
    + +
    +
    forum_settings['o_rules_message'] ?>
    +
    +
    +
    +

    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/search/footer.php b/style/themes/MyFeatherBB/view/search/footer.php new file mode 100644 index 00000000..0dd6fc5e --- /dev/null +++ b/style/themes/MyFeatherBB/view/search/footer.php @@ -0,0 +1,40 @@ + + + + + + + + + +
    +
    +
    + +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +'.implode(' - ', $search['forum_actions']).'

    '."\n" : '') ?> +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/search/form.php b/style/themes/MyFeatherBB/view/search/form.php new file mode 100644 index 00000000..16cd788a --- /dev/null +++ b/style/themes/MyFeatherBB/view/search/form.php @@ -0,0 +1,79 @@ + + +
    +

    +
    + +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/search/header.php b/style/themes/MyFeatherBB/view/search/header.php new file mode 100644 index 00000000..de5e1f0a --- /dev/null +++ b/style/themes/MyFeatherBB/view/search/header.php @@ -0,0 +1,48 @@ + +
    +
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    + +
    +
    +
    +
    + + +
    +

    +
    +
    + + + + + + + + + + + +
    +

    # » utils->escape($cur_search['subject']) ?> » utils->format_time($cur_search['pposted']) ?>

    +
    +
    +
    +
    +
    +
    +
    utils->forum_number_format($cur_search['num_replies']) ?>
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
      +
    • +
    • +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/search/topics.php b/style/themes/MyFeatherBB/view/search/topics.php new file mode 100644 index 00000000..265cbb27 --- /dev/null +++ b/style/themes/MyFeatherBB/view/search/topics.php @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/userlist.php b/style/themes/MyFeatherBB/view/userlist.php new file mode 100644 index 00000000..3166d107 --- /dev/null +++ b/style/themes/MyFeatherBB/view/userlist.php @@ -0,0 +1,115 @@ + + +
    +

    +
    +
    +
    +
    + +
    +user->g_search_users == '1'): ?> + + + +

    user->g_search_users == '1' ? __('User search info').' ' : '').__('User sort info'); ?>

    +
    +
    +
    +

    + +
    +
    + +
    +
    + +
    +
    +
    + +
    +

    +
    +
    +
    +
    utils->forum_number_format($topic_count + $start_from) ?>
    +
    +
    + +
    +
    +
    utils->forum_number_format($cur_search['num_replies']) ?>url->get('post/'.$cur_search['last_post_id'].'/#p'.$cur_search['last_post_id']).'">'.$feather->utils->format_time($cur_search['last_post']).' '.__('by').' '.$feather->utils->escape($cur_search['last_poster']) ?>
    + + + + + + + + + + + + + + + + + + '."\n\t\t\t\t\t".''."\n"; + } + ?> + +
    url->get('user/'.$user['id'].'/').'">'.$feather->utils->escape($user['username']).'' ?> utils->forum_number_format($user['num_posts']) ?>utils->format_time($user['registered'], true) ?>
    '.__('No hits').'
    +
    +
    +
    + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/style/themes/MyFeatherBB/view/viewforum.php b/style/themes/MyFeatherBB/view/viewforum.php new file mode 100644 index 00000000..dbf440af --- /dev/null +++ b/style/themes/MyFeatherBB/view/viewforum.php @@ -0,0 +1,100 @@ + +
    + +
    + +
    +

    utils->escape($cur_forum['forum_name']) ?>

    +
    +
    + + + + + +forum_settings['o_topic_views'] == '1'): ?> + + + + + + + + + forum_settings['o_topic_views'] == '1'): ?> + + + + + + + + +
    +
    utils->forum_number_format($topic_count + $start_from) ?>
    +
    +
    + +
    +
    +
    utils->forum_number_format($topic['num_replies']) : '-' ?>utils->forum_number_format($topic['num_views']) : '-' ?>
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + +'.implode(' - ', $forum_actions).'

    '."\n" : '') ?> +
    +
    +
    diff --git a/style/themes/MyFeatherBB/view/viewtopic.php b/style/themes/MyFeatherBB/view/viewtopic.php new file mode 100644 index 00000000..d16a862c --- /dev/null +++ b/style/themes/MyFeatherBB/view/viewtopic.php @@ -0,0 +1,204 @@ + + + + + +
    +

    # utils->format_time($post['posted']) ?>

    +
    +
    +
    +
    +
    +
    +
    +'.$post['user_avatar'].''."\n"; +} + ?> + +'.implode(' ', $post['user_contacts']).''."\n"; +} + ?> +
    +
    +
    +

    utils->escape($cur_topic['subject']) ?>

    +
    + +'.__('Last edit').' '.$feather->utils->escape($post['edited_by']).' ('.$feather->utils->format_time($post['edited']).')

    '."\n"; +} + ?> +
    +
    '.$post['signature_formatted'].'
    '."\n"; +} + ?> +
    +
    +
    +
    +
    +
    1) { + echo '

    '.$post['is_online_formatted'].'

    '; +} + ?>
    +'."\n\t\t\t\t\t".'
      '."\n\t\t\t\t\t\t".implode("\n\t\t\t\t\t\t", $post['post_actions'])."\n\t\t\t\t\t".'
    '."\n\t\t\t\t".'
    '."\n"; +} + ?> +
    +
    + + + + + + + +
    +

    +
    +
    + +
    +
    + +
    + + + +forum_settings['o_topic_subscriptions'] == '1' && ($feather->user->auto_notify == '1' || $cur_topic['is_subscribed'])): ?> +user->is_guest) { + $email_label = ($feather->forum_settings['p_force_guest_email'] == '1') ? ''.__('Email').' '.__('Required').'' : __('Email'); + $email_form_name = ($feather->forum_settings['p_force_guest_email'] == '1') ? 'req_email' : 'email'; + ?> + + +
    +'.__('Message').' '.__('Required').'
    '; + } else { + echo "\t\t\t\t\t\t".' + +
    +
    +
    + user->is_guest) : ?> +
    +
    + +
    +

    + +
    +
    +
    + +

    +
    +
    +
    + - + diff --git a/view/profile/section_display.php b/view/profile/section_display.php index 8fc83a15..7cce9e3c 100644 --- a/view/profile/section_display.php +++ b/view/profile/section_display.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -21,7 +21,7 @@
    - \ No newline at end of file + diff --git a/view/profile/section_essentials.php b/view/profile/section_essentials.php index 3d82ca0b..b45114f6 100644 --- a/view/profile/section_essentials.php +++ b/view/profile/section_essentials.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -209,7 +209,7 @@ 1) { @@ -255,4 +255,4 @@
    - \ No newline at end of file + From 33188913089dd99b4abf68a5dfc912fd11727970 Mon Sep 17 00:00:00 2001 From: beaver Date: Sun, 30 Aug 2015 22:06:32 +0200 Subject: [PATCH 277/353] Enable changing themes support --- include/classes/view.class.php | 4 ++-- style/themes/FeatherBB/view/header.new.php | 2 ++ style/themes/MyFeatherBB/view/header.new.php | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/classes/view.class.php b/include/classes/view.class.php index ecacd478..3605046c 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -208,7 +208,7 @@ public function getTemplatePathname($file) public function display($nested = true) { - // $this->setStyle($this->app->user->style); + $this->setStyle($this->app->user->style); echo $this->fetch($nested); } @@ -254,7 +254,7 @@ public function setStyle($style) } $this->data->set('style', (string) $style); $this->setTemplatesDirectory($this->app->forum_env['FEATHER_ROOT'].'style/themes/'.$style.'/view'); - $this->addAsset('css', 'style/themes/'.$style.'/style.css'); + // $this->addAsset('css', 'style/themes/'.$style.'/style.css'); return $this; } diff --git a/style/themes/FeatherBB/view/header.new.php b/style/themes/FeatherBB/view/header.new.php index cba067ee..99e56d2c 100644 --- a/style/themes/FeatherBB/view/header.new.php +++ b/style/themes/FeatherBB/view/header.new.php @@ -19,6 +19,8 @@ echo "\t".''."\n"; } ?> <?php echo generate_page_title($title, $page_number) ?> + + $items) { diff --git a/style/themes/MyFeatherBB/view/header.new.php b/style/themes/MyFeatherBB/view/header.new.php index 0fb8af32..4269d842 100644 --- a/style/themes/MyFeatherBB/view/header.new.php +++ b/style/themes/MyFeatherBB/view/header.new.php @@ -19,6 +19,8 @@ echo "\t".''."\n"; } ?> <?php echo generate_page_title($title, $page_number) ?> + + $items) { if ($type == 'js') { From d032b24daf6a6ed026f5b9f462caf131a6fedf15 Mon Sep 17 00:00:00 2001 From: beaver Date: Sun, 30 Aug 2015 22:36:21 +0200 Subject: [PATCH 278/353] Move /img into /style folder --- controller/admin/parser.php | 4 ++-- controller/install.php | 6 +++--- include/bbcd_compile.php | 4 ++-- include/bbcd_source.php | 2 +- model/admin/parser.php | 4 ++-- {img => style/img}/avatars/.gitkeep | 0 {img => style/img}/bbeditor/align-center.png | Bin {img => style/img}/bbeditor/align-justify.png | Bin {img => style/img}/bbeditor/align-left.png | Bin {img => style/img}/bbeditor/align-right.png | Bin {img => style/img}/bbeditor/bold.png | Bin {img => style/img}/bbeditor/code.png | Bin {img => style/img}/bbeditor/eyedropper.png | Bin {img => style/img}/bbeditor/file-image-o.png | Bin {img => style/img}/bbeditor/italic.png | Bin {img => style/img}/bbeditor/link.png | Bin {img => style/img}/bbeditor/list-ol.png | Bin {img => style/img}/bbeditor/list-ul.png | Bin {img => style/img}/bbeditor/quote-left.png | Bin {img => style/img}/bbeditor/underline.png | Bin {img => style/img}/logo.png | Bin {img => style/img}/smilies/big_smile.png | Bin {img => style/img}/smilies/cool.png | Bin {img => style/img}/smilies/hmm.png | Bin {img => style/img}/smilies/lol.png | Bin {img => style/img}/smilies/mad.png | Bin {img => style/img}/smilies/neutral.png | Bin {img => style/img}/smilies/roll.png | Bin {img => style/img}/smilies/sad.png | Bin {img => style/img}/smilies/smile.png | Bin {img => style/img}/smilies/tongue.png | Bin {img => style/img}/smilies/wink.png | Bin {img => style/img}/smilies/yikes.png | Bin style/themes/FeatherBB/view/help.php | 7 ++++--- style/themes/MyFeatherBB/view/help.php | 2 +- view/help.php | 2 +- 36 files changed, 16 insertions(+), 15 deletions(-) rename {img => style/img}/avatars/.gitkeep (100%) rename {img => style/img}/bbeditor/align-center.png (100%) rename {img => style/img}/bbeditor/align-justify.png (100%) rename {img => style/img}/bbeditor/align-left.png (100%) rename {img => style/img}/bbeditor/align-right.png (100%) rename {img => style/img}/bbeditor/bold.png (100%) rename {img => style/img}/bbeditor/code.png (100%) rename {img => style/img}/bbeditor/eyedropper.png (100%) rename {img => style/img}/bbeditor/file-image-o.png (100%) rename {img => style/img}/bbeditor/italic.png (100%) rename {img => style/img}/bbeditor/link.png (100%) rename {img => style/img}/bbeditor/list-ol.png (100%) rename {img => style/img}/bbeditor/list-ul.png (100%) rename {img => style/img}/bbeditor/quote-left.png (100%) rename {img => style/img}/bbeditor/underline.png (100%) rename {img => style/img}/logo.png (100%) rename {img => style/img}/smilies/big_smile.png (100%) rename {img => style/img}/smilies/cool.png (100%) rename {img => style/img}/smilies/hmm.png (100%) rename {img => style/img}/smilies/lol.png (100%) rename {img => style/img}/smilies/mad.png (100%) rename {img => style/img}/smilies/neutral.png (100%) rename {img => style/img}/smilies/roll.png (100%) rename {img => style/img}/smilies/sad.png (100%) rename {img => style/img}/smilies/smile.png (100%) rename {img => style/img}/smilies/tongue.png (100%) rename {img => style/img}/smilies/wink.png (100%) rename {img => style/img}/smilies/yikes.png (100%) diff --git a/controller/admin/parser.php b/controller/admin/parser.php index fb3244b9..6ea82ff2 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -54,7 +54,7 @@ public function display() if ($this->request->post('form_sent')) { - // Upload new smiley image to img/smilies + // Upload new smiley image to style/img/smilies if ($this->request->post('upload') && isset($_FILES['new_smiley']) && isset($_FILES['new_smiley']['error'])) { $f = $_FILES['new_smiley']; switch ($f['error']) { @@ -64,7 +64,7 @@ public function display() if (preg_match('/^[\w\-.]++$/', $name)) { // If we have a valid filename? if (preg_match('%^image/%', $f['type'])) { // If we have an image file type? if ($f['size'] > 0 && $f['size'] <= $this->config['o_avatars_size']) { - if (move_uploaded_file($f['tmp_name'], FEATHER_ROOT .'img/smilies/'. $name)) { + if (move_uploaded_file($f['tmp_name'], FEATHER_ROOT .'style/img/smilies/'. $name)) { redirect($this->feather->url->get('admin/parser/'), $lang_admin_parser['upload success']); } else { // Error #1: 'Smiley upload failed. Unable to move to smiley folder.'. throw new \FeatherBB\Error($lang_admin_parser['upload_err_1'], 500); diff --git a/controller/install.php b/controller/install.php index b959a84d..c9a6bd32 100644 --- a/controller/install.php +++ b/controller/install.php @@ -102,8 +102,8 @@ public function run() } // Check if default avatar directory is writable - if (!is_writable($this->feather->forum_env['FEATHER_ROOT'].'img/avatars/')) { - $this->errors[] = sprintf(__('Alert avatar'), $this->feather->forum_env['FEATHER_ROOT'].'img/avatars/'); + if (!is_writable($this->feather->forum_env['FEATHER_ROOT'].'style/img/avatars/')) { + $this->errors[] = sprintf(__('Alert avatar'), $this->feather->forum_env['FEATHER_ROOT'].'style/img/avatars/'); } // Validate db_prefix if existing @@ -257,7 +257,7 @@ public function load_default_config(array $data) 'o_default_email_setting' => 1, 'o_mailing_list' => $data['email'], 'o_avatars' => $data['avatars'], - 'o_avatars_dir' => 'img/avatars', + 'o_avatars_dir' => 'style/img/avatars', 'o_avatars_width' => 60, 'o_avatars_height' => 60, 'o_avatars_size' => 10240, diff --git a/include/bbcd_compile.php b/include/bbcd_compile.php index 89f002c2..02b2c3b3 100644 --- a/include/bbcd_compile.php +++ b/include/bbcd_compile.php @@ -181,9 +181,9 @@ $feather = \Slim\Slim::getInstance(); // Validate and compute replacement texts for smilies array. $re_keys = array(); // Array of regex-safe smiley texts. -$file_path = FEATHER_ROOT . 'img/smilies/'; // File system path to smilies. +$file_path = FEATHER_ROOT . 'style/img/smilies/'; // File system path to smilies. $url_path = $feather->url->base(true); // Convert abs URL to relative URL. -$url_path = preg_replace('%^https?://[^/]++(.*)$%i', '$1', $url_path) . '/img/smilies/'; +$url_path = preg_replace('%^https?://[^/]++(.*)$%i', '$1', $url_path) . '/style/img/smilies/'; foreach ($smilies as $smiley_text => $smiley_img) { // Loop through all smilieys in array. $file = $file_path . $smiley_img['file']; // Local file system address of smiley. if (!file_exists($file)) { diff --git a/include/bbcd_source.php b/include/bbcd_source.php index 4b855205..145ab959 100644 --- a/include/bbcd_source.php +++ b/include/bbcd_source.php @@ -31,7 +31,7 @@ 'smiley_size' => 100, // Percent size adjust for display of smilies. ); // End $config array. -// Array of smileys. These files are located in the img/smilies folder). +// Array of smileys. These files are located in the style/img/smilies folder). $smilies = array( ':)' => array('file' => 'smile.png'), '=)' => array('file' => 'smile.png'), diff --git a/model/admin/parser.php b/model/admin/parser.php index 71c8b6d9..a2c25a20 100644 --- a/model/admin/parser.php +++ b/model/admin/parser.php @@ -25,11 +25,11 @@ public function __construct() } // Helper public function returns array of smiley image files - // stored in the img/smilies directory. + // stored in the style/img/smilies directory. public function get_smiley_files() { $imgfiles = array(); - $filelist = scandir(FEATHER_ROOT.'img/smilies'); + $filelist = scandir(FEATHER_ROOT.'style/img/smilies'); $filelist = $this->hook->fire('parser.get_smiley_files.filelist', $filelist); foreach ($filelist as $file) { if (preg_match('/\.(?:png|gif|jpe?g)$/', $file)) { diff --git a/img/avatars/.gitkeep b/style/img/avatars/.gitkeep similarity index 100% rename from img/avatars/.gitkeep rename to style/img/avatars/.gitkeep diff --git a/img/bbeditor/align-center.png b/style/img/bbeditor/align-center.png similarity index 100% rename from img/bbeditor/align-center.png rename to style/img/bbeditor/align-center.png diff --git a/img/bbeditor/align-justify.png b/style/img/bbeditor/align-justify.png similarity index 100% rename from img/bbeditor/align-justify.png rename to style/img/bbeditor/align-justify.png diff --git a/img/bbeditor/align-left.png b/style/img/bbeditor/align-left.png similarity index 100% rename from img/bbeditor/align-left.png rename to style/img/bbeditor/align-left.png diff --git a/img/bbeditor/align-right.png b/style/img/bbeditor/align-right.png similarity index 100% rename from img/bbeditor/align-right.png rename to style/img/bbeditor/align-right.png diff --git a/img/bbeditor/bold.png b/style/img/bbeditor/bold.png similarity index 100% rename from img/bbeditor/bold.png rename to style/img/bbeditor/bold.png diff --git a/img/bbeditor/code.png b/style/img/bbeditor/code.png similarity index 100% rename from img/bbeditor/code.png rename to style/img/bbeditor/code.png diff --git a/img/bbeditor/eyedropper.png b/style/img/bbeditor/eyedropper.png similarity index 100% rename from img/bbeditor/eyedropper.png rename to style/img/bbeditor/eyedropper.png diff --git a/img/bbeditor/file-image-o.png b/style/img/bbeditor/file-image-o.png similarity index 100% rename from img/bbeditor/file-image-o.png rename to style/img/bbeditor/file-image-o.png diff --git a/img/bbeditor/italic.png b/style/img/bbeditor/italic.png similarity index 100% rename from img/bbeditor/italic.png rename to style/img/bbeditor/italic.png diff --git a/img/bbeditor/link.png b/style/img/bbeditor/link.png similarity index 100% rename from img/bbeditor/link.png rename to style/img/bbeditor/link.png diff --git a/img/bbeditor/list-ol.png b/style/img/bbeditor/list-ol.png similarity index 100% rename from img/bbeditor/list-ol.png rename to style/img/bbeditor/list-ol.png diff --git a/img/bbeditor/list-ul.png b/style/img/bbeditor/list-ul.png similarity index 100% rename from img/bbeditor/list-ul.png rename to style/img/bbeditor/list-ul.png diff --git a/img/bbeditor/quote-left.png b/style/img/bbeditor/quote-left.png similarity index 100% rename from img/bbeditor/quote-left.png rename to style/img/bbeditor/quote-left.png diff --git a/img/bbeditor/underline.png b/style/img/bbeditor/underline.png similarity index 100% rename from img/bbeditor/underline.png rename to style/img/bbeditor/underline.png diff --git a/img/logo.png b/style/img/logo.png similarity index 100% rename from img/logo.png rename to style/img/logo.png diff --git a/img/smilies/big_smile.png b/style/img/smilies/big_smile.png similarity index 100% rename from img/smilies/big_smile.png rename to style/img/smilies/big_smile.png diff --git a/img/smilies/cool.png b/style/img/smilies/cool.png similarity index 100% rename from img/smilies/cool.png rename to style/img/smilies/cool.png diff --git a/img/smilies/hmm.png b/style/img/smilies/hmm.png similarity index 100% rename from img/smilies/hmm.png rename to style/img/smilies/hmm.png diff --git a/img/smilies/lol.png b/style/img/smilies/lol.png similarity index 100% rename from img/smilies/lol.png rename to style/img/smilies/lol.png diff --git a/img/smilies/mad.png b/style/img/smilies/mad.png similarity index 100% rename from img/smilies/mad.png rename to style/img/smilies/mad.png diff --git a/img/smilies/neutral.png b/style/img/smilies/neutral.png similarity index 100% rename from img/smilies/neutral.png rename to style/img/smilies/neutral.png diff --git a/img/smilies/roll.png b/style/img/smilies/roll.png similarity index 100% rename from img/smilies/roll.png rename to style/img/smilies/roll.png diff --git a/img/smilies/sad.png b/style/img/smilies/sad.png similarity index 100% rename from img/smilies/sad.png rename to style/img/smilies/sad.png diff --git a/img/smilies/smile.png b/style/img/smilies/smile.png similarity index 100% rename from img/smilies/smile.png rename to style/img/smilies/smile.png diff --git a/img/smilies/tongue.png b/style/img/smilies/tongue.png similarity index 100% rename from img/smilies/tongue.png rename to style/img/smilies/tongue.png diff --git a/img/smilies/wink.png b/style/img/smilies/wink.png similarity index 100% rename from img/smilies/wink.png rename to style/img/smilies/wink.png diff --git a/img/smilies/yikes.png b/style/img/smilies/yikes.png similarity index 100% rename from img/smilies/yikes.png rename to style/img/smilies/yikes.png diff --git a/style/themes/FeatherBB/view/help.php b/style/themes/FeatherBB/view/help.php index 00669948..a6e83ae6 100644 --- a/style/themes/FeatherBB/view/help.php +++ b/style/themes/FeatherBB/view/help.php @@ -6,7 +6,7 @@ * and Rickard Andersson (C) 2002-2008 PunBB * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ - + // Make sure no one attempts to run this script "directly" if (!defined('FEATHER')) { exit; @@ -57,7 +57,8 @@

    -

    [img=]utils->escape($feather->url->base(true)) ?>/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

    + dede +

    [img=]utils->escape($feather->url->base(true)) ?>/style/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

    @@ -138,4 +139,4 @@ ?> - \ No newline at end of file + diff --git a/style/themes/MyFeatherBB/view/help.php b/style/themes/MyFeatherBB/view/help.php index 00669948..1e7decf9 100644 --- a/style/themes/MyFeatherBB/view/help.php +++ b/style/themes/MyFeatherBB/view/help.php @@ -57,7 +57,7 @@

    -

    [img=]utils->escape($feather->url->base(true)) ?>/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

    +

    [img=]utils->escape($feather->url->base(true)) ?>/style/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

    diff --git a/view/help.php b/view/help.php index 00669948..1e7decf9 100644 --- a/view/help.php +++ b/view/help.php @@ -57,7 +57,7 @@

    -

    [img=]utils->escape($feather->url->base(true)) ?>/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

    +

    [img=]utils->escape($feather->url->base(true)) ?>/style/img/logo.png[/img] <?php _e('FeatherBB bbcode test') ?>

    From f742a023e8ea04284260040d1ff124fe2f35be97 Mon Sep 17 00:00:00 2001 From: beaver Date: Sun, 30 Aug 2015 22:41:31 +0200 Subject: [PATCH 279/353] Move /lang folder into /app --- app/lang/English/admin/bans.mo | Bin 0 -> 4861 bytes app/lang/English/admin/bans.po | 183 ++++++ app/lang/English/admin/categories.mo | Bin 0 -> 2167 bytes app/lang/English/admin/categories.po | 84 +++ app/lang/English/admin/censoring.mo | Bin 0 -> 1551 bytes app/lang/English/admin/censoring.po | 57 ++ app/lang/English/admin/common.mo | Bin 0 -> 1802 bytes app/lang/English/admin/common.po | 117 ++++ app/lang/English/admin/forums.mo | Bin 0 -> 3548 bytes app/lang/English/admin/forums.po | 147 +++++ app/lang/English/admin/groups.mo | Bin 0 -> 8477 bytes app/lang/English/admin/groups.po | 261 ++++++++ app/lang/English/admin/index.html | 1 + app/lang/English/admin/index.mo | Bin 0 -> 4052 bytes app/lang/English/admin/index.po | 180 ++++++ app/lang/English/admin/maintenance.mo | Bin 0 -> 4083 bytes app/lang/English/admin/maintenance.po | 114 ++++ app/lang/English/admin/options.mo | Bin 0 -> 18847 bytes app/lang/English/admin/options.po | 603 ++++++++++++++++++ app/lang/English/admin/parser.mo | Bin 0 -> 5557 bytes app/lang/English/admin/parser.php | 93 +++ app/lang/English/admin/parser.po | 168 +++++ app/lang/English/admin/permissions.mo | Bin 0 -> 2836 bytes app/lang/English/admin/permissions.po | 102 +++ app/lang/English/admin/plugin_example.mo | Bin 0 -> 1137 bytes app/lang/English/admin/plugin_example.po | 45 ++ app/lang/English/admin/reports.mo | Bin 0 -> 1083 bytes app/lang/English/admin/reports.po | 57 ++ app/lang/English/admin/users.mo | Bin 0 -> 7114 bytes app/lang/English/admin/users.po | 312 +++++++++ app/lang/English/antispam.mo | Bin 0 -> 751 bytes app/lang/English/antispam.php | 23 + app/lang/English/antispam.po | 27 + app/lang/English/antispam_questions.mo | Bin 0 -> 765 bytes app/lang/English/antispam_questions.po | 43 ++ app/lang/English/bbeditor.mo | Bin 0 -> 1082 bytes app/lang/English/bbeditor.po | 63 ++ app/lang/English/common.mo | Bin 0 -> 9404 bytes app/lang/English/common.po | 473 ++++++++++++++ app/lang/English/delete.mo | Bin 0 -> 1003 bytes app/lang/English/delete.po | 42 ++ app/lang/English/forum.mo | Bin 0 -> 866 bytes app/lang/English/forum.po | 45 ++ app/lang/English/help.mo | Bin 0 -> 4261 bytes app/lang/English/help.po | 165 +++++ app/lang/English/index.mo | Bin 0 -> 1064 bytes app/lang/English/index.po | 54 ++ app/lang/English/install.mo | Bin 0 -> 9441 bytes app/lang/English/install.po | 291 +++++++++ app/lang/English/login.mo | Bin 0 -> 1877 bytes app/lang/English/login.po | 63 ++ .../English/mail_templates/activate_email.tpl | 12 + .../mail_templates/activate_password.tpl | 14 + .../mail_templates/banned_email_change.tpl | 9 + .../mail_templates/banned_email_post.tpl | 9 + .../mail_templates/banned_email_register.tpl | 9 + .../mail_templates/dupe_email_change.tpl | 9 + .../mail_templates/dupe_email_register.tpl | 9 + .../English/mail_templates/form_email.tpl | 13 + app/lang/English/mail_templates/new_reply.tpl | 11 + .../English/mail_templates/new_reply_full.tpl | 18 + .../English/mail_templates/new_report.tpl | 9 + app/lang/English/mail_templates/new_topic.tpl | 11 + .../English/mail_templates/new_topic_full.tpl | 18 + app/lang/English/mail_templates/new_user.tpl | 12 + app/lang/English/mail_templates/rename.tpl | 12 + app/lang/English/mail_templates/welcome.tpl | 12 + app/lang/English/misc.mo | Bin 0 -> 5068 bytes app/lang/English/misc.po | 225 +++++++ app/lang/English/post.mo | Bin 0 -> 2395 bytes app/lang/English/post.po | 93 +++ app/lang/English/prof_reg.mo | Bin 0 -> 5891 bytes app/lang/English/prof_reg.po | 225 +++++++ app/lang/English/profile.mo | Bin 0 -> 9585 bytes app/lang/English/profile.po | 378 +++++++++++ app/lang/English/register.mo | Bin 0 -> 3064 bytes app/lang/English/register.po | 84 +++ app/lang/English/search.mo | Bin 0 -> 4068 bytes app/lang/English/search.po | 174 +++++ app/lang/English/stopwords.txt | 175 +++++ app/lang/English/topic.mo | Bin 0 -> 1487 bytes app/lang/English/topic.po | 93 +++ app/lang/English/update.mo | Bin 0 -> 7678 bytes app/lang/English/update.po | 195 ++++++ app/lang/English/userlist.mo | Bin 0 -> 898 bytes app/lang/English/userlist.po | 33 + controller/admin/bans.php | 2 +- controller/admin/categories.php | 2 +- controller/admin/censoring.php | 2 +- controller/admin/forums.php | 2 +- controller/admin/groups.php | 2 +- controller/admin/index.php | 2 +- controller/admin/maintenance.php | 2 +- controller/admin/options.php | 2 +- controller/admin/parser.php | 2 +- controller/admin/permissions.php | 2 +- controller/admin/reports.php | 2 +- controller/admin/statistics.php | 2 +- controller/admin/users.php | 2 +- controller/auth.php | 4 +- controller/delete.php | 4 +- controller/edit.php | 8 +- controller/help.php | 2 +- controller/index.php | 2 +- controller/install.php | 4 +- controller/login.php | 2 +- controller/misc.php | 4 +- controller/moderate.php | 8 +- controller/post.php | 12 +- controller/profile.php | 6 +- controller/register.php | 8 +- controller/search.php | 6 +- controller/userlist.php | 4 +- controller/viewforum.php | 2 +- controller/viewtopic.php | 8 +- extern.php | 4 +- include/classes/auth.class.php | 4 +- include/functions.php | 6 +- model/login.php | 2 +- model/misc.php | 4 +- model/post.php | 14 +- model/profile.php | 6 +- model/register.php | 12 +- 123 files changed, 5756 insertions(+), 81 deletions(-) create mode 100644 app/lang/English/admin/bans.mo create mode 100644 app/lang/English/admin/bans.po create mode 100644 app/lang/English/admin/categories.mo create mode 100644 app/lang/English/admin/categories.po create mode 100644 app/lang/English/admin/censoring.mo create mode 100644 app/lang/English/admin/censoring.po create mode 100644 app/lang/English/admin/common.mo create mode 100644 app/lang/English/admin/common.po create mode 100644 app/lang/English/admin/forums.mo create mode 100644 app/lang/English/admin/forums.po create mode 100644 app/lang/English/admin/groups.mo create mode 100644 app/lang/English/admin/groups.po create mode 100644 app/lang/English/admin/index.html create mode 100644 app/lang/English/admin/index.mo create mode 100644 app/lang/English/admin/index.po create mode 100644 app/lang/English/admin/maintenance.mo create mode 100644 app/lang/English/admin/maintenance.po create mode 100644 app/lang/English/admin/options.mo create mode 100644 app/lang/English/admin/options.po create mode 100644 app/lang/English/admin/parser.mo create mode 100644 app/lang/English/admin/parser.php create mode 100644 app/lang/English/admin/parser.po create mode 100644 app/lang/English/admin/permissions.mo create mode 100644 app/lang/English/admin/permissions.po create mode 100644 app/lang/English/admin/plugin_example.mo create mode 100644 app/lang/English/admin/plugin_example.po create mode 100644 app/lang/English/admin/reports.mo create mode 100644 app/lang/English/admin/reports.po create mode 100644 app/lang/English/admin/users.mo create mode 100644 app/lang/English/admin/users.po create mode 100644 app/lang/English/antispam.mo create mode 100644 app/lang/English/antispam.php create mode 100644 app/lang/English/antispam.po create mode 100644 app/lang/English/antispam_questions.mo create mode 100644 app/lang/English/antispam_questions.po create mode 100644 app/lang/English/bbeditor.mo create mode 100644 app/lang/English/bbeditor.po create mode 100644 app/lang/English/common.mo create mode 100644 app/lang/English/common.po create mode 100644 app/lang/English/delete.mo create mode 100644 app/lang/English/delete.po create mode 100644 app/lang/English/forum.mo create mode 100644 app/lang/English/forum.po create mode 100644 app/lang/English/help.mo create mode 100644 app/lang/English/help.po create mode 100644 app/lang/English/index.mo create mode 100644 app/lang/English/index.po create mode 100644 app/lang/English/install.mo create mode 100644 app/lang/English/install.po create mode 100644 app/lang/English/login.mo create mode 100644 app/lang/English/login.po create mode 100644 app/lang/English/mail_templates/activate_email.tpl create mode 100644 app/lang/English/mail_templates/activate_password.tpl create mode 100644 app/lang/English/mail_templates/banned_email_change.tpl create mode 100644 app/lang/English/mail_templates/banned_email_post.tpl create mode 100644 app/lang/English/mail_templates/banned_email_register.tpl create mode 100644 app/lang/English/mail_templates/dupe_email_change.tpl create mode 100644 app/lang/English/mail_templates/dupe_email_register.tpl create mode 100644 app/lang/English/mail_templates/form_email.tpl create mode 100644 app/lang/English/mail_templates/new_reply.tpl create mode 100644 app/lang/English/mail_templates/new_reply_full.tpl create mode 100644 app/lang/English/mail_templates/new_report.tpl create mode 100644 app/lang/English/mail_templates/new_topic.tpl create mode 100644 app/lang/English/mail_templates/new_topic_full.tpl create mode 100644 app/lang/English/mail_templates/new_user.tpl create mode 100644 app/lang/English/mail_templates/rename.tpl create mode 100644 app/lang/English/mail_templates/welcome.tpl create mode 100644 app/lang/English/misc.mo create mode 100644 app/lang/English/misc.po create mode 100644 app/lang/English/post.mo create mode 100644 app/lang/English/post.po create mode 100644 app/lang/English/prof_reg.mo create mode 100644 app/lang/English/prof_reg.po create mode 100644 app/lang/English/profile.mo create mode 100644 app/lang/English/profile.po create mode 100644 app/lang/English/register.mo create mode 100644 app/lang/English/register.po create mode 100644 app/lang/English/search.mo create mode 100644 app/lang/English/search.po create mode 100644 app/lang/English/stopwords.txt create mode 100644 app/lang/English/topic.mo create mode 100644 app/lang/English/topic.po create mode 100644 app/lang/English/update.mo create mode 100644 app/lang/English/update.po create mode 100644 app/lang/English/userlist.mo create mode 100644 app/lang/English/userlist.po diff --git a/app/lang/English/admin/bans.mo b/app/lang/English/admin/bans.mo new file mode 100644 index 0000000000000000000000000000000000000000..3077c64b555429af441b4f7867c6d8ac40e68fea GIT binary patch literal 4861 zcma)0bc}tQ9(iRIYcypfNv@&zDYz71>XcAki<7p)DR#1ovP}-_YMiBnY#b3 z)Ae!A|9n)3556^42MbQVr*TFl$H^7tNt+z+fUEtlI z^yk43gUjHDz-{nOFbUu5@ckR0toNgUKLur-Ux4?5zXxTXSHU^(@8EmE|AOxWPrN(q z3(7w8pzQM)D0*yx?*X3zW&A#P0<1yV=NVA+{7%5^L8AHQ;qn^zDKl01Hs`dItOm_-#=3e;$;5e+h~me+>94DEqw$%D5A3 zdN+6rK8V;WmJ8$Jz6EXgCWdYX10?Nc#wn&2-_nZ&-DEQg%j+@$t)N{E;$#K5;So_7l2#@kC zd2l>^CcJ+fJV%q5oEOr2t!DYY$%k&OMv&{S$(^J!gYxkBJZp57 z^d}pJeye5ZH`}l2q9|);=l;mpT7_+*bzO(e*G+5qMrWY2-0KwHy*e8=hghw2uQrvM z5p_+k| zXvS^@rj6JzZr$C8{l;4(xG{y8*UWpu968>cZ=WdDK-Wn>;$>tRwYfeS7(~s)?J8wJ zcdWc3(WLKKob$4wXF$JuuOAV@G*yg%JXYIdbYJulrIbq86keCS0tii4s&Dxw=gQ)W?nkQFUijdW0^GcqxD zl07a&WT+F*_B>NN`KZ!)=W1CE?6N9`u4^x!zoh)@<@rLLzO0rOF3s&!<%OU0SLb%N_d08YkkHtXtXNjaI@ir%CPN$1HErw89wou%x-KgQU86jV zNa4<&(SxZK)nm@$D?PtOw;Pw${^#emHn%n=`!B`k=GIE$tzgyhkWFiIvtAtLIx8-z zq^~P$>dQCwu68a?#>wtIQ*}0qq?AIntS)x5x>aPE0G|75=L@DVmDh2nl+vS?;*0Sk zeDU4RZaJzFv*!0$R(_MF98Q(NC(Dtt{c@BONk$zSk|)uX>5X!A)Hj7BM}Zc~Rm+aA zmR*x*fyQ3j%4WQ8F=}}hqU78fBGE&Ff3cmKn(Ml6-Y^G~CS~aU5+pCBg}kR2*7WrlUPf_GgD91#R7l0uQdr z#L@hir!yFI(sUu3I!$DvbA;IBU(yoC6l#psN15%5d90%5O}rl~TMi5iToEL|DibFq z##Qb^D_Drtt}*J&N}gkr*CDJP3Z$`TgycV6CP>VvxA7{>H zci^}{ultlS(Q}dwdQ@Xdoh7h1Zd|YC#T~j{R#S|`>YAgwo9p604EAwC@E0SQj5fXm z%YJU-sZx*Hn>#+W?Ax%mbm3gQw8S4EWKH^xDKbh<hMZ@ucj@I%lIZzLT$Tc#-)(~ak%KO2wDU;)9 zV(DUQW+W-m>Qdmz=1S0xiQjIFJK{-dERG$O-XBwbdy=QKwbfZ)$8eG!>ztnla{f~f zC=Fx>?~;nCh6SIoy-__PAl;%ql$+Do$FA6O#YeY9?SgosDQ2_dLkjq5(=#L~8oQx4 z*gaEcoX*b3akS;HHI53Wy_>5H?xl2T=N>sd&jt@S`l6WB8_9qsD%5;q_Cg$mYmZ!X z2<53854Q)=p_IYqLezW~Cfun#HAv#j<-Dd=lLF|1hLTZIO6ts)Urkt= zBIx+wEi%cb8mEkelgiDw;g&cVH` zf{c{^3gqgZ4Hj{?BbB2bWPZ3;+NC literal 0 HcmV?d00001 diff --git a/app/lang/English/admin/bans.po b/app/lang/English/admin/bans.po new file mode 100644 index 00000000..4a126619 --- /dev/null +++ b/app/lang/English/admin/bans.po @@ -0,0 +1,183 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "No user message" +msgstr "No user by that username registered. If you want to add a ban not tied to a specific username just leave the username blank." + +msgid "No user ID message" +msgstr "No user by that ID registered." + +msgid "User is admin message" +msgstr "The user %s is an administrator and can't be banned. If you want to ban an administrator, you must first demote him/her." + +msgid "User is mod message" +msgstr "The user %s is a moderator and can't be banned. If you want to ban a moderator, you must first demote him/her." + +msgid "Must enter message" +msgstr "You must enter either a username, an IP address or an email address (at least)." + +msgid "Cannot ban guest message" +msgstr "The guest user cannot be banned." + +msgid "Invalid IP message" +msgstr "You entered an invalid IP/IP-range." + +msgid "Invalid e-mail message" +msgstr "The email address (e.g. user@domain.com) or partial email address domain (e.g. domain.com) you entered is invalid." + +msgid "Invalid date message" +msgstr "You entered an invalid expire date." + +msgid "Invalid date reasons" +msgstr "The format should be YYYY-MM-DD and the date must be at least one day in the future." + +msgid "Ban added redirect" +msgstr "Ban added." + +msgid "Ban edited redirect" +msgstr "Ban edited." + +msgid "Ban removed redirect" +msgstr "Ban removed." + +msgid "New ban head" +msgstr "New ban" + +msgid "Add ban subhead" +msgstr "Add ban" + +msgid "Username label" +msgstr "Username" + +msgid "Username help" +msgstr "The username to ban (case-insensitive)." + +msgid "Username advanced help" +msgstr "The username to ban (case-insensitive). The next page will let you enter a custom IP and email. If you just want to ban a specific IP/IP-range or email just leave it blank." + +msgid "Ban search head" +msgstr "Ban search" + +msgid "Ban search subhead" +msgstr "Enter search criteria" + +msgid "Ban search info" +msgstr "Search for bans in the database. You can enter one or more terms to search for. Wildcards in the form of asterisks (*) are accepted. To show all bans leave all fields empty." + +msgid "Date help" +msgstr "(yyyy-mm-dd)" + +msgid "Message label" +msgstr "Message" + +msgid "Expire after label" +msgstr "Expire after" + +msgid "Expire before label" +msgstr "Expire before" + +msgid "Order by label" +msgstr "Order by" + +msgid "Order by username" +msgstr "Username" + +msgid "Order by ip" +msgstr "IP" + +msgid "Order by e-mail" +msgstr "Email" + +msgid "Order by expire" +msgstr "Expire date" + +msgid "Ascending" +msgstr "Ascending" + +msgid "Descending" +msgstr "Descending" + +msgid "Submit search" +msgstr "Submit search" + +msgid "E-mail label" +msgstr "Email" + +msgid "E-mail help" +msgstr "The email or email domain you wish to ban (e.g. someone@somewhere.com or somewhere.com). See \"Allow banned email addresses\" in Permissions for more info." + +msgid "IP label" +msgstr "IP address/IP-ranges" + +msgid "IP help" +msgstr "The IP address or IP-ranges you wish to ban (e.g. 150.11.110.1 or 150.11.110). Separate addresses with spaces. If an IP is entered already it is the last known IP of this user in the database." + +msgid "IP help link" +msgstr "Click %s to see IP statistics for this user." + +msgid "Ban advanced head" +msgstr "Ban advanced settings" + +msgid "Ban advanced subhead" +msgstr "Supplement ban with IP and email" + +msgid "Ban message label" +msgstr "Ban message" + +msgid "Ban message help" +msgstr "A message that will be displayed to the banned user when he/she visits the board." + +msgid "Message expiry subhead" +msgstr "Ban message and expiry" + +msgid "Ban IP range info" +msgstr "You should be very careful when banning an IP-range because of the possibility of multiple users matching the same partial IP." + +msgid "Expire date label" +msgstr "Expire date" + +msgid "Expire date help" +msgstr "The date when this ban should be automatically removed (format: yyyy-mm-dd). Leave blank to remove manually." + +msgid "Results head" +msgstr "Search Results" + +msgid "Results username head" +msgstr "Username" + +msgid "Results e-mail head" +msgstr "Email" + +msgid "Results IP address head" +msgstr "IP/IP-ranges" + +msgid "Results expire head" +msgstr "Expires" + +msgid "Results message head" +msgstr "Message" + +msgid "Results banned by head" +msgstr "Banned by" + +msgid "Results actions head" +msgstr "Actions" + +msgid "No match" +msgstr "No match" + +msgid "Unknown" +msgstr "Unknown" diff --git a/app/lang/English/admin/categories.mo b/app/lang/English/admin/categories.mo new file mode 100644 index 0000000000000000000000000000000000000000..73ca42af061e53155923b6c77b56d277bd521e43 GIT binary patch literal 2167 zcmZ{kNsrt_6vqolSekuU!mi>lXeN@KG$PWdXC@?>O(V@f3pxl;E@ivA+r+MFRh6gH z$6Pogp&$-$LpkNfg%7}q&w#=mi3=AbPW+!;?#10$a{u~0SG~1fJzP6?kKuU@?^}3( z$GeXAhez;(=klYBy#%(wSHT1DMer851}gA5@Gkf!_zidgd;q=<{tD9mhhG1;ms^ij z_TKTl0@C^u@C~pJz6{<4Uje@Z-v%Fe{cj-o`2(c&|9E-rTxI7X*hLQeAjNm@e8r!@ zZz2B-Qv64cGxh}dB}j2b;Pc=aNO^t@!UX#sd=mT-JOuB9_)}4nD;stOU+yt+I z((CVoZOFfXWdBdkf5D58TQL3}cmj zx>T!LuT?)aIj@ZHRP{C6Th!Hw?U#O*%CM|nyk9c(Fk#)S zFd_>MwaIOVt5GT1-S@Y7^>=qe@ppH5dvm+hHTo;GGB{3x&!n-aeup1Q;fB)OxY6o< z+za*$MCgNkG{3{43qFx&DJ`v4C&Id*XN0nuaN1zeiBN+A!3RAl@;QrqMM4!6P&@TC%iPjz8pxmWq<@XE>jm|(`5 zVs9vU*%{sEC>*Ehse8dEy5M7>9Q6rf67nygh=t;%_i{Ong5NsbhC<>9Y*;BdhEk6= zLw=;m#=7;Ecwd_$FD3Xe3tq!AM6sZ&2Ybathqca6@|>Jh6CARS5GCvS31!!fEHkqO z{(haX=H?u zX^63?ytb&dWg+NBLzwYU#\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Must enter name message" +msgstr "You must enter a name for the category" + +msgid "Category added redirect" +msgstr "Category added." + +msgid "Category deleted redirect" +msgstr "Category deleted." + +msgid "Unable to delete category" +msgstr "Unable to delete category." + +msgid "Delete category head" +msgstr "Delete category (together with all forums and posts it contains)" + +msgid "Confirm delete subhead" +msgstr "Confirm delete category" + +msgid "Confirm delete info" +msgstr "Are you sure that you want to delete the category %s?" + +msgid "Delete category not validated" +msgstr "You must confirm the deletion by checking the box" + +msgid "Must enter integer message" +msgstr "Position must be a positive integer value." + +msgid "Categories updated redirect" +msgstr "Categories updated." + +msgid "Add categories head" +msgstr "Add categories" + +msgid "Add categories subhead" +msgstr "Add categories" + +msgid "Add category label" +msgstr "Add a new category" + +msgid "Add new submit" +msgstr "Add new" + +msgid "Add category help" +msgstr "The name of the new category you want to add. You can edit the name of the category later (see below). Go to %s to add forums to your new category." + +msgid "Delete categories head" +msgstr "Delete categories" + +msgid "Delete categories subhead" +msgstr "Delete categories" + +msgid "Delete category label" +msgstr "Delete a category" + +msgid "Delete category disclaimer" +msgstr "I hereby acknowledge that all category data will be deleted" + +msgid "Edit categories head" +msgstr "Edit categories" + +msgid "Edit categories subhead" +msgstr "Edit categories" + +msgid "Category position label" +msgstr "Position" + +msgid "Category name label" +msgstr "Name" diff --git a/app/lang/English/admin/censoring.mo b/app/lang/English/admin/censoring.mo new file mode 100644 index 0000000000000000000000000000000000000000..2f0e456c224163bf2c73bf679de354e34c738d35 GIT binary patch literal 1551 zcmZvcOHUL*5XVQw2kRR(8sninm;iAGF&@bB2#8=v05`gV9(!kMciYT#Z@POx?tBFK z2p;?n>dCVQ?|SnC7;nad|DKs;S+$eqN7qzWRo7#`jg1@xSQoKxVZXt?j(zSJ{$O>% zbD#vzgFE0Qa38z^9)M%uJMc329=rg4uD*W-y}cixzc+fk)Vm4#`**=>;9|usumRl^ zJO%lO6G0H+{0TgR^Uskoj^AL2bL}K-fHUAI$lz5_g9Pq_H^8@`_xBO>@qPil-uH^X zK)5N^*@_-;8z7V-KmJ`%EBu@W{qiyT{M4|0e17>nA-v(W6g#OErJ}`Yu#_aUt4%^u zwe{d+^H!Hd5-hW_+Hj>)UMXc#btsWmv{LS?c@e9>C54@pL^?8@=^duN?Ty?z=sPxL z1Q}Z^Ivi~3;%pHTrP8|KDfdzla|Yci>TMsfND>5w;H2T$1%<41@wYVZCBhxmZKSyo zX}GFQX6vMS#nH~+pQZBO`Ef|h0_K~>q2#Myf$pI$c|W~Igw;iEw)P+tyZK> zXQ8&Swy`qsKONnxEo)>>!RlTQP948?Q^=B3vlMrQvFzrbH&?@%fu8r?W)rTcSSKh| zon~6n9R^ZIDQYjm$E?_tF*Y<(>u5Tfi5}ofc?_TF+{C zb;gs>%+rK2;o>fN$u7zQU3f^fVlSD9sBGA(sYGfuiFO+`rQEVn0(}?JChrzUIG1Tk zN;_)75W3q(Zn%R+^o=TAcW{kj6ahK+jW5(*^}uRcV6=%>S{4Su;Z?D)jGng0f^>3+ zqr-6<9\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Must enter word message" +msgstr "You must enter a word to censor." + +msgid "Word updated redirect" +msgstr "Censor word updated." + +msgid "Word added redirect" +msgstr "Censor word added." + +msgid "Word removed redirect" +msgstr "Censor word removed." + +msgid "Censoring head" +msgstr "Censoring" + +msgid "Add word subhead" +msgstr "Add word" + +msgid "Add word info" +msgstr "Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case insensitive." + +msgid "Censoring enabled" +msgstr "Censoring is enabled in %s." + +msgid "Censoring disabled" +msgstr "Censoring is disabled in %s." + +msgid "Censored word label" +msgstr "Censored word" + +msgid "Replacement label" +msgstr "Replacement word(s)" + +msgid "Action label" +msgstr "Action" + +msgid "Edit remove subhead" +msgstr "Edit or remove words" + +msgid "No words in list" +msgstr "No censor words in list." diff --git a/app/lang/English/admin/common.mo b/app/lang/English/admin/common.mo new file mode 100644 index 0000000000000000000000000000000000000000..80370172ebed1c83e490488693dfcd113d29b4e3 GIT binary patch literal 1802 zcmchW&5ImG7>6sm(PZLBOk&h%v|?OPp=Yy_$TGW|nBDA##o1)s4>6wXovxj<&U6h` zJxg-%KM?dH9z4Z^Cs91)mWv>Q2QMBBUIalgq>sCw(| z?+%Q;YiP%j$B>h|jG2JVI~Ztt?lk5uxEIpReumxf5Ujx?a14%**3ZJdtWQDNof&;! z9Iao3ceB3&<>ytn555NX!!EoJz6o`Nx8MWtZKyccpzJ?{^8YcE{dM>t{0!a$Z$kP1 z0ZQ*@D7#;w{QM53_a~J9eQZkaD3rgapzKdTRLt{`ZW;_Na&!ht{~eU{{XHoC_ZgIz zYf$dyH-4~fc1yo_P2yc~q5;9;mZO(^@9 zAl+PI80Hm9uM2hG51{;i0_o;DgY0fV`S~15?@Oq>d;{s`CkFZZ1nnfQ5y=cyRyOFlvFiS<|u9)RCFG^RWMceJ1+n&$ZU^1f@!(X%VVszD)r4Y@45^>l~rrF8!Nx9Fu=!( z>-jCA??V~QYRW=`ZC_4{4!2r$Vao*@%e2g6nYW`^?`K@vtP|6Af* z3~@r*O}Kh5Hf+J!S;pDtrgaUbvriZH*sPs=X1dl2{&m+blcg+q86OzMrM(>w*nytKTq9e=WZqBigKKzO~{Cur%eloS0fuQsj3knVDJeQhzB+SXI_O&5}d zqU|$^pkb#r^78gU8rBuHSCaFtsNS|=Ti#J0cCtQIKgpMBnXLLjXuJ6;M#EM?%>Ph^ zz3r0xr!rjA-02{(GqDW5 Z=$sypGZUk!O>9-sb(I+Z!+&4Oe*v%hjEDdL literal 0 HcmV?d00001 diff --git a/app/lang/English/admin/common.po b/app/lang/English/admin/common.po new file mode 100644 index 00000000..7fd3c5b6 --- /dev/null +++ b/app/lang/English/admin/common.po @@ -0,0 +1,117 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Admin menu" +msgstr "Admin menu" + +msgid "Plugins menu" +msgstr "Plugins menu" + +msgid "Moderator menu" +msgstr "Moderator menu" + +msgid "Index" +msgstr "Index" + +msgid "Categories" +msgstr "Categories" + +msgid "Forums" +msgstr "Forums" + +msgid "Users" +msgstr "Users" + +msgid "User groups" +msgstr "User groups" + +msgid "Options" +msgstr "Options" + +msgid "Permissions" +msgstr "Permissions" + +msgid "Parser" +msgstr "Parser" + +msgid "Censoring" +msgstr "Censoring" + +msgid "Bans" +msgstr "Bans" + +msgid "Prune" +msgstr "Prune" + +msgid "Maintenance" +msgstr "Maintenance" + +msgid "Reports" +msgstr "Reports" + +msgid "Server statistics" +msgstr "Server statistics" + +msgid "Admin" +msgstr "Admin" + +msgid "Go back" +msgstr "Go back" + +msgid "Delete" +msgstr "Delete" + +msgid "Update" +msgstr "Update" + +msgid "Add" +msgstr "Add" + +msgid "Edit" +msgstr "Edit" + +msgid "Remove" +msgstr "Remove" + +msgid "Yes" +msgstr "Yes" + +msgid "No" +msgstr "No" + +msgid "Save changes" +msgstr "Save changes" + +msgid "Save" +msgstr "Save" + +msgid "here" +msgstr "here" + +msgid "Action" +msgstr "Action" + +msgid "None" +msgstr "None" + +msgid "Maintenance mode" +msgstr "maintenance mode" + +msgid "No plugin message" +msgstr "There is no plugin called %s in the plugin directory." + +msgid "Plugin failed message" +msgstr "Loading of the plugin - %s - failed." diff --git a/app/lang/English/admin/forums.mo b/app/lang/English/admin/forums.mo new file mode 100644 index 0000000000000000000000000000000000000000..03ddd80dc6c4a33dfe423faa626b936b95d41701 GIT binary patch literal 3548 zcmbVOO>A5>5H`>s8h%?SP@u&rlqMzbl~f?LNz;<1ZHStrQL<^_=-ubtea-t>Y`-MS zt%w7MN*n-j;J^VD2^Ar6p}m2`u^?3(Iq-8p2o(t=Bo18Q8{2Pplkg*9#rdAc52 z9`QH>d;n|V*Q>xCSYHC(0elyDKky2WO`T}ql))#>!?;RlNy$mG2Yd|`8!>@k?65pRdvVYqa$G00u_kI>g=T8E+1J46V ze+;|}_%e|AUi15Jd-?~!t)O28(tSS#lKksHI{z(j4nF@CNczWbcX$SP1nWiMPT=c6 z{ISdUM|>Xv$#2(y6TmNlj{&!1a}qcVBzxOHh-R1k`VC+o*6#!1QuZNRSc8o_6 zuji^rS?7y4rHIxnlUC0%5mlM631MU-S8cv-sf(&TK9OhjSfxCYi8RuQTt|zudd}9- z{^9tFP#K$05=wa{S9r;G(n(L^Y>AzUVgq$X#EI@OSfah3Gr_Jc`)Rr~7f~c5u4EJ| zSu@NLoy~tk)-@HkOq^%_){fnIz6~RrCU3>Hk}{8+bE-Vc zypIX)gY@gH-1&K{lbaj?uZtovY#~>;aG8z^MfC#3vqCDkHbNP;n2Bm4=?sGIZ?$Nn zLteB7Yc`h@N+bb-nd%Xqwd_)l9UA5Cb8H~v{bPK1aI|ku<)kB+ih^@eQOHL4X=G?q zsuL&r=FV0Eo3Nki-)4=>6fltHE4f>I+_&B0b8;%t=HnnG!5#uh85gTq}u z(q5M;IF;4%D9#!q{BSik9YaRA%=%skCS@j-vvDp*Yz!X`4~NfS$1Q_}yihec;dG2} zr=(jqdcGF$YHNnWQ)N!IDJ(0^xYp$Dyx=RbZkB-(_QBgE47)ODx0AhPE$S4dk@aQ8 z$ulu5QykyVzRAJsxC~ee|IJJkF-l7BUS-`ngTnssyui zhv7SRetdp*YId@p+tLII7hc>-oFt_Zflnlz(R?7TbCI~Ks@)9~FD`Zn-YOLvA>5%nd zO=KLIWkc#r(=Azx>v(*<6%AXKC5r1vI3y`AG)hi`N}mq-RNV?|ie;JYH#`-QB;Qcp zW)0L11gX?pr2Dly*Q;O%Ipm|Nr9}Np@)Zt4DW<+q@T$-#$0*^j*C0MrXZb#8AE)Pq zvSyQ9bCIlwHmWI%;q`*z)l-^97I9&dsGwq4OA54+kW)c))w?U*=9#-Nud6&=V@$8i z(m7q1SQV*IORj%}yn=h|?N-XYJvPBfvbI#sSMhjYEJ}YAYbtmVM~0CDte5GsFBMYz z@?2YT&T&GkxlmEB(2$=-#LDjI@>mbSc?lluzt{qoQ-vV)p-WDueB*Up7U9>&KXfyO zPT_h<>N}e7)f!4\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Forum added redirect" +msgstr "Forum added." + +msgid "Unable to add forum" +msgstr "Unable to add forum" + +msgid "Forum deleted redirect" +msgstr "Forum deleted." + +msgid "Forums updated redirect" +msgstr "Forums updated." + +msgid "Forum updated redirect" +msgstr "Forum updated." + +msgid "Perms reverted redirect" +msgstr "Permissions reverted to defaults." + +msgid "Must enter name message" +msgstr "You must enter a forum name." + +msgid "Must be integer message" +msgstr "Position must be a positive integer value." + +msgid "Must be valid category" +msgstr "You must enter a valid category" + +msgid "New forum" +msgstr "New forum" + +msgid "Add forum head" +msgstr "Add forum" + +msgid "Create new subhead" +msgstr "Create a new forum" + +msgid "Add forum label" +msgstr "Add forum to category" + +msgid "Add forum help" +msgstr "Select the category to which you wish to add a new forum." + +msgid "Add forum" +msgstr "Add forum" + +msgid "No categories exist" +msgstr "No categories exist" + +msgid "Manage forums head" +msgstr "Manage forums" + +msgid "Category subhead" +msgstr "Category:" + +msgid "Forum label" +msgstr "Forum" + +msgid "Edit link" +msgstr "Edit" + +msgid "Delete link" +msgstr "Delete" + +msgid "Position label" +msgstr "Position" + +msgid "Update positions" +msgstr "Update positions" + +msgid "Confirm delete head" +msgstr "Confirm delete forum" + +msgid "Confirm delete subhead" +msgstr "Important! Read before deleting" + +msgid "Confirm delete info" +msgstr "Are you sure that you want to delete the forum %s?" + +msgid "Confirm delete warn" +msgstr "WARNING! Deleting a forum will delete all posts (if any) in that forum!" + +msgid "Edit forum head" +msgstr "Edit forum" + +msgid "Edit details subhead" +msgstr "Edit forum details" + +msgid "Forum name label" +msgstr "Forum name" + +msgid "Forum description label" +msgstr "Description (HTML)" + +msgid "Category label" +msgstr "Category" + +msgid "Sort by label" +msgstr "Sort topics by" + +msgid "Last post" +msgstr "Last post" + +msgid "Topic start" +msgstr "Topic start" + +msgid "Subject" +msgstr "Subject" + +msgid "Redirect label" +msgstr "Redirect URL" + +msgid "Redirect help" +msgstr "Only available in empty forums" + +msgid "Group permissions subhead" +msgstr "Edit group permissions for this forum" + +msgid "Group permissions info" +msgstr "In this form, you can set the forum specific permissions for the different user groups. If you haven't made any changes to this forum's group permissions, what you see below is the default based on settings in %s. Administrators always have full permissions and are thus excluded. Permission settings that differ from the default permissions for the user group are marked red. The \"Read forum\" permission checkbox will be disabled if the group in question lacks the \"Read board\" permission. For redirect forums, only the \"Read forum\" permission is editable." + +msgid "Read forum label" +msgstr "Read forum" + +msgid "Post replies label" +msgstr "Post replies" + +msgid "Post topics label" +msgstr "Post topics" + +msgid "Revert to default" +msgstr "Revert to default" diff --git a/app/lang/English/admin/groups.mo b/app/lang/English/admin/groups.mo new file mode 100644 index 0000000000000000000000000000000000000000..c76b6c961767db43e55cbf7a7f06130c998d6971 GIT binary patch literal 8477 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 XD2L1RND5MdlC4I+`(=_0NZ|hgb0FhW literal 0 HcmV?d00001 diff --git a/app/lang/English/admin/groups.po b/app/lang/English/admin/groups.po new file mode 100644 index 00000000..cb17a229 --- /dev/null +++ b/app/lang/English/admin/groups.po @@ -0,0 +1,261 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Must enter title message" +msgstr "You must enter a group title." + +msgid "Title already exists message" +msgstr "There is already a group with the title %s." + +msgid "Default group redirect" +msgstr "Default group set." + +msgid "Cannot remove default message" +msgstr "The default group cannot be removed. In order to delete this group, you must first setup a different group as the default." + +msgid "Group removed redirect" +msgstr "Group removed." + +msgid "Group added redirect" +msgstr "Group added." + +msgid "Group edited redirect" +msgstr "Group edited." + +msgid "Add groups head" +msgstr "Add/setup groups" + +msgid "Add group subhead" +msgstr "Add new group" + +msgid "New group label" +msgstr "Base new group on" + +msgid "New group help" +msgstr "Select a user group from which the new group will inherit its permission settings. The next page will let you fine-tune its settings." + +msgid "Default group subhead" +msgstr "Set default group" + +msgid "Default group label" +msgstr "Default group" + +msgid "Default group help" +msgstr "This is the default user group, e.g. the group users are placed in when they register. For security reasons, users can't be placed in either the moderator or administrator user groups by default." + +msgid "Existing groups head" +msgstr "Existing groups" + +msgid "Edit groups subhead" +msgstr "Edit/delete groups" + +msgid "Edit groups info" +msgstr "The pre-defined groups Guests, Administrators, Moderators and Members cannot be removed. However, they can be edited. Please note that in some groups, some options are unavailable (e.g. the edit posts permission for guests). Administrators always have full permissions." + +msgid "Edit link" +msgstr "Edit" + +msgid "Delete link" +msgstr "Delete" + +msgid "Group delete head" +msgstr "Group delete" + +msgid "Confirm delete subhead" +msgstr "Confirm delete group" + +msgid "Confirm delete info" +msgstr "Are you sure that you want to delete the group %s?" + +msgid "Confirm delete warn" +msgstr "WARNING! After you deleted a group you cannot restore it." + +msgid "Delete group head" +msgstr "Delete group" + +msgid "Move users subhead" +msgstr "Move users currently in group" + +msgid "Move users info" +msgstr "The group %s currently has %s members. Please select a group to which these members will be assigned upon deletion." + +msgid "Move users label" +msgstr "Move users to" + +msgid "Delete group" +msgstr "Delete group" + +msgid "Group settings head" +msgstr "Group settings" + +msgid "Group settings subhead" +msgstr "Setup group options and permissions" + +msgid "Group settings info" +msgstr "Below options and permissions are the default permissions for the user group. These options apply if no forum specific permissions are in effect." + +msgid "Group title label" +msgstr "Group title" + +msgid "User title label" +msgstr "User title" + +msgid "User title help" +msgstr "The rank users in this group have attained. Leave blank to use default title (\"%s\")." + +msgid "Promote users label" +msgstr "Promote users" + +msgid "Promote users help" +msgstr "You can promote users to a new group automatically if they reach a certain number of posts. Select \"%s\" to disable. For security reasons, you are not allowed to select an administrator group here. Also note that group changes for users affected by this setting will take effect immediately. Note that the amount of posts you enter is the total amount of posts of a user, not the amount of posts made as a member of this group." + +msgid "Disable promotion" +msgstr "Disable promoting" + +msgid "Mod privileges label" +msgstr "Allow users moderator privileges" + +msgid "Mod privileges help" +msgstr "In order for a user in this group to have moderator abilities, he/she must be assigned to moderate one or more forums. This is done via the user administration page of the user's profile." + +msgid "Edit profile label" +msgstr "Allow moderators to edit user profiles" + +msgid "Edit profile help" +msgstr "If moderator privileges are enabled, allow users in this group to edit user profiles." + +msgid "Rename users label" +msgstr "Allow moderators to rename users" + +msgid "Rename users help" +msgstr "If moderator privileges are enabled, allow users in this group to rename users." + +msgid "Change passwords label" +msgstr "Allow moderators to change passwords" + +msgid "Change passwords help" +msgstr "If moderator privileges are enabled, allow users in this group to change user passwords." + +msgid "Mod promote users label" +msgstr "Allow moderators to promote users" + +msgid "Mod promote users help" +msgstr "If moderator privileges are enabled, allow users in this group to promote users." + +msgid "Ban users label" +msgstr "Allow moderators to ban users" + +msgid "Ban users help" +msgstr "If moderator privileges are enabled, allow users in this group to ban users." + +msgid "Read board label" +msgstr "Read board" + +msgid "Read board help" +msgstr "Allow users in this group to view the board. This setting applies to every aspect of the board and can therefore not be overridden by forum specific settings. If this is set to \"No\", users in this group will only be able to login/logout and register." + +msgid "View user info label" +msgstr "View user information" + +msgid "View user info help" +msgstr "Allow users to view the user list and user profiles." + +msgid "Post replies label" +msgstr "Post replies" + +msgid "Post replies help" +msgstr "Allow users in this group to post replies in topics." + +msgid "Post topics label" +msgstr "Post topics" + +msgid "Post topics help" +msgstr "Allow users in this group to post new topics." + +msgid "Edit posts label" +msgstr "Edit posts" + +msgid "Edit posts help" +msgstr "Allow users in this group to edit their own posts." + +msgid "Delete posts label" +msgstr "Delete posts" + +msgid "Delete posts help" +msgstr "Allow users in this group to delete their own posts." + +msgid "Delete topics label" +msgstr "Delete topics" + +msgid "Delete topics help" +msgstr "Allow users in this group to delete their own topics (including any replies)." + +msgid "Post links label" +msgstr "Post links" + +msgid "Post links help" +msgstr "Allow users in this group to include links in their posts. This setting also applies to signatures and the website field in users' profiles." + +msgid "Set own title label" +msgstr "Set own user title" + +msgid "Set own title help" +msgstr "Allow users in this group to set their own user title." + +msgid "User search label" +msgstr "Use search" + +msgid "User search help" +msgstr "Allow users in this group to use the search feature." + +msgid "User list search label" +msgstr "Search user list" + +msgid "User list search help" +msgstr "Allow users in this group to freetext search for users in the user list." + +msgid "Send e-mails label" +msgstr "Send e-mails" + +msgid "Send e-mails help" +msgstr "Allow users in this group to send e-mails to other users." + +msgid "Post flood label" +msgstr "Post flood interval" + +msgid "Post flood help" +msgstr "Number of seconds that users in this group have to wait between posts. Set to 0 to disable." + +msgid "Search flood label" +msgstr "Search flood interval" + +msgid "Search flood help" +msgstr "Number of seconds that users in this group have to wait between searches. Set to 0 to disable." + +msgid "E-mail flood label" +msgstr "Email flood interval" + +msgid "E-mail flood help" +msgstr "Number of seconds that users in this group have to wait between emails. Set to 0 to disable." + +msgid "Report flood label" +msgstr "Report flood interval" + +msgid "Report flood help" +msgstr "Number of seconds that users in this group have to wait between reports. Set to 0 to disable." + +msgid "Moderator info" +msgstr "Please note that in order for a user in this group to have moderator abilities, he/she must be assigned to moderate one or more forums. This is done via the user administration page of the user's profile." diff --git a/app/lang/English/admin/index.html b/app/lang/English/admin/index.html new file mode 100644 index 00000000..89337b2f --- /dev/null +++ b/app/lang/English/admin/index.html @@ -0,0 +1 @@ +.. diff --git a/app/lang/English/admin/index.mo b/app/lang/English/admin/index.mo new file mode 100644 index 0000000000000000000000000000000000000000..4a7addb19d2ddd3d3b13821c293300399d51aedd GIT binary patch literal 4052 zcmaKuO^h5z6~`;V5LiND5<&=pP=*BWCg~op?KsP93|`NAiKTdVvb#10Az3xuH8YKS zs+y|m9j_6HBSMHnByLe8K8`>nF2IQoi4%eY2mu0xOC&%D2`NH|1Bm~ts_vcf+O($o zS6x-}>V4I#e(ixHUt_pdaK8`tAMavp3w-%ac;Nco5ylq4--B-lUk4ur{{eFF-ZwM$ zPA~x<06!MF4c>=$2|frq@DcD!Ag%L_*#9H&U3mXB_#W^tAj!MyEsVVzd=PvXd=fkg zo(D;f9q?`7HIU>N;N9To!S{n-1m6L^0+QTsgO7nf14+*7Ag%LHkk+~9p0LhiAjv%g z(*MszZh~arr$N$RgY>_zfHeP`k>82@e&kOge;)ap$UjB?HS!IR^!g77mDqi64R$^R zk{^$OWakO+UT_^G{a*x0j|?O~-2_R$m%u(^`6_rn-YJMA_b5p5dl;nkPJtw69mG_2 zCGuM27$o~X3!VZ$2YwKI6{NWR3MBb|21&1fffS!3c#yoKAjy9Or1?*Q2r)Yc;>R}d zSOvF1O1ZCsSHYJ+^8eq!=fHo1C%`jUgzO!G=we?0N&c53Uj|9v?}Bh8`vFLDehgCl ze+eew-$9b|C__ajK(10M&; z&%Xt!|1}Ul_68nLfp^1MSem8aL*Od71-=MU{Jsvp7yKcJ@Od8sUI%pf9H;l@T1JEH zB_Ggr1~=JBKBhR+MS1ff+~kj^aX*gx817pyiZ5MH;Kug${(TlC|Ipqge~?Y&hvs@F zHfV30jO|5`d_?ggACW)E=F_-4xXDhsk^oOL0?P(?xm0 zag(2JchP=lYXe<7K9(Y9Yo#>KHf<-360X>jy#IWk_e3_9d~vPcTf)3Mj`6Zk*I92Y zv+I1Q4X>+_5xHdR!ij;flILh}qo?+kE?eB3nN^B`EZMp&rIWl+)`_y@!=l8LxxTa- zS9~ZikjIg{neK;-%nKtk$1bS7!e}*-$^{j+b`JN6EIZt}Cygz%ni~k}ZAjt9(wslf z;~X!U9qx|PwW%ju*c>#x~`&T}JG|VlgNspGa%P zNU}}sc-zYmuR;wq&kIYl@^;#GtyG~#SjkE2T6v9>9cf?*FSW>nDYG3xyV!$(IA~U6 zFp{?bKDJjf+O^)&>c3>5|VXHun}X=yJ##j-;bZ@)2&$xKh9wHYj_b z3HyXBGd+=fxow?nTc_IA>9+Mu+d9*>o^4wzZR;a#%jpn5b~Pv-5H$XjR5{k zT;-v8c2V(TXZiBd>O$Y>&tQur7xUyw$n`F7b9kY@wVU(|G9Ak$*u}ET(U)w?y@Iwy z)AfR|F4;9gS>%>BnDl~BqZ+xH>`F12k;tF(Tj1OAHCcFC;7IpH5>r|yE)GCrf7%Sb`%ex!N%E3HZeJD+GL1j8ens@oipm41sT`twa z)#T$+g$Q(cU!y!YzMQV4r!f*AS8zLQazL-dqFbte_u(yq%Kl?N3Cbv_imr}+Tqk{x^Fk^aHi)Y&UoZ|N5k^c_y&E^i=r*hthp(9TYAIpDU)MCLMso zT4iJjM@XrnEiN4_(-v9`yKw=J`{I-`T2&Y*9}Dko7M)c*Wznm=hJ;1C#I?eKDp{_Q-Lvu*Xp{06X9E7wL&oN zP>#3ENGPN=-0tK^n?hQS+@#NfdV;_0NEh14w8$mbD4h`Jr&LB_BTI#>O_Bb}8C`Ou z>!h$$bZq#vfQ!QPQH|5AQRHGDY1E!hUSXP;vh#>Oxs^mpWnsxwn;dVXNL~3cJ~Fzl z8YT2Zd!16&M*yKBwqd3HQqRK@>@IqPBj{v&9Aq~_B9z5w>|B+HESNvSd^x*`B~u)-oyzFEhEg5Wc$0UiKcNWv!>==U zxcNUyd|Nd~Uyy!T`7apwDxUFBD}F6\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "fopen disabled message" +msgstr "Unable to check for upgrade since 'allow_url_fopen' is disabled on this system." + +msgid "Upgrade check failed message" +msgstr "Check for upgrade failed for unknown reasons." + +msgid "Running latest version message" +msgstr "You are running the latest version of FeatherBB." + +msgid "New version available message" +msgstr "A new version of FeatherBB has been released. You can download the latest version at %s." + +msgid "Deleted install.php redirect" +msgstr "The file was successfully removed." + +msgid "Delete install.php failed" +msgstr "Could not remove install.php. Please do so by hand." + +msgid "Not available" +msgstr "Not available" + +msgid "Forum admin head" +msgstr "Forum administration" + +msgid "NA" +msgstr "N/A" + +msgid "Welcome to admin" +msgstr "Welcome to the FeatherBB administration control panel. From here you can control vital aspects of the board. Depending on whether you are an administrator or a moderator you can:" + +msgid "Welcome 1" +msgstr "Organize categories and forums." + +msgid "Welcome 2" +msgstr "Set forum-wide options and preferences." + +msgid "Welcome 3" +msgstr "Control permissions for users and guests." + +msgid "Welcome 4" +msgstr "View IP statistics for users." + +msgid "Welcome 5" +msgstr "Ban users." + +msgid "Welcome 6" +msgstr "Censor words." + +msgid "Welcome 7" +msgstr "Set up user groups and promotions." + +msgid "Welcome 8" +msgstr "Prune old posts." + +msgid "Welcome 9" +msgstr "Handle post reports." + +msgid "Alerts head" +msgstr "Alerts" + +msgid "Install file exists" +msgstr "The install folder still exists, but should be removed. %s." + +msgid "Delete install file" +msgstr "Delete it" + +msgid "About head" +msgstr "About FeatherBB" + +msgid "FeatherBB version label" +msgstr "FeatherBB version" + +msgid "Check for upgrade" +msgstr "Check for upgrade" + +msgid "FeatherBB version data" +msgstr "v%s - %s" + +msgid "Server statistics label" +msgstr "Server statistics" + +msgid "View server statistics" +msgstr "View server statistics" + +msgid "Support label" +msgstr "Support" + +msgid "Forum label" +msgstr "Forum" + +msgid "IRC label" +msgstr "IRC channel" + +msgid "PHPinfo disabled message" +msgstr "The PHP function phpinfo() has been disabled on this server." + +msgid "Server statistics head" +msgstr "Server statistics" + +msgid "Server load label" +msgstr "Server load" + +msgid "Server load data" +msgstr "%s - %s user(s) online" + +msgid "Environment label" +msgstr "Environment" + +msgid "Environment data OS" +msgstr "Operating system: %s" + +msgid "Show info" +msgstr "Show info" + +msgid "Environment data version" +msgstr "PHP: %s - %s" + +msgid "Environment data acc" +msgstr "Accelerator: %s" + +msgid "Turck MMCache" +msgstr "Turck MMCache" + +msgid "Turck MMCache link" +msgstr "turck-mmcache.sourceforge.net/" + +msgid "ionCube PHP Accelerator" +msgstr "ionCube PHP Accelerator" + +msgid "ionCube PHP Accelerator link" +msgstr "www.php-accelerator.co.uk/" + +msgid "Alternative PHP Cache (APC)" +msgstr "Alternative PHP Cache (APC)" + +msgid "Alternative PHP Cache (APC) link" +msgstr "www.php.net/apc/" + +msgid "Zend Optimizer" +msgstr "Zend Optimizer" + +msgid "Zend Optimizer link" +msgstr "www.zend.com/products/guard/zend-optimizer/" + +msgid "eAccelerator" +msgstr "eAccelerator" + +msgid "eAccelerator link" +msgstr "www.eaccelerator.net/" + +msgid "XCache" +msgstr "XCache" + +msgid "XCache link" +msgstr "xcache.lighttpd.net/" + +msgid "Database label" +msgstr "Database" + +msgid "Database data rows" +msgstr "Rows: %s" + +msgid "Database data size" +msgstr "Size: %s" diff --git a/app/lang/English/admin/maintenance.mo b/app/lang/English/admin/maintenance.mo new file mode 100644 index 0000000000000000000000000000000000000000..d31d3736a25e05750fa3194d34023a5c9a20a5ee GIT binary patch literal 4083 zcmbuCOKc=Z8OIw~Aecu;cs~NQBO>n#Pw$$|!SX&}V|ydR?#A+ZH*lk-yJoscKStfv zo(w01h=i0&E+FMd4hST~E#kt7oRK(iiUdN*1;L2}Qleb=eO1*n<4J;q7^(g5s;>Ip z-@nR#ee~SVB7Os&FY|1@FN!XK*WS+`es6*s;9CLDeISY+W&AMs8E_EBJD}|U4)}2} z13v+tf}aGR2Oj}{4t^2*RhWMj6ghte9|QjZej0q}oS%Oz;1%#;<_`mY4-~mMDE9p@ z;Pas9c@Y#lUk1gVSHRDLuZHn!;rrh~(f@Y9M?M%upJTiU%KmSHp8}7;BVscKMc?l} z)z( z(Z_gjG5QjZ$dlTUx{#VtJn|DeNK15{2RB^2favo)U*QqEq;4folEYB4ym_D83xB@Q zzkr0%#UZ*`6lz>IUD-x^MV>sXGSir7udc>tmxRYv92xL%uTyHRFzx;8u0O%?6y zd8^82+A<_Q)B3y$j6zPEk;>lBNVc~XcV%v_)J zri59EP`WTCI%?_!O?fp@Q#3J_2#%Y&46>HvAjVBNgZ)|;ZU5R@GBRJ?7-m+t_Nh2F zqb|qaq%Nn0u^8nf_0uk_(V5Y^EKqCG#1Eg4RbevQ8r>wB{}|n~y0N{_-rloQ!Qi56 zbTPbDH)Xr4s;L{c*S~R9`Pb_gDs}$4+P-*ogE;|R~YdS6S z>RV&4Vl;~DW^!ZW&f%SdrT*>s@&=tjks)aI!5p4YLf zyps3m-kXh4^SUFKyx2@zH=60n(hQ-eHGLmCgC?QgSy!pYTa`-tx_V`Bfyb}97_arZ zRCgOabMyG_;oYasD=FB%01#rN0@<4xNW?Uyt_WH&kA2H8tmtV%OS9xQKV34$sV+Jb zM<(8;B$Yk^u2pOfc}!H@Q8Zm6ud*VfvbX*n z@#y2@Yj*wUP}f@9)Yat14OpH7o1^8u62C2(={jO2oIe8i!?rNV(1sA`r&Te@ghdp&q~W?`6AHwYWYPB@+>E9%=Sbq zsg)kpjSux&5pKZ%&(id?yfxCj5|n~-vX2b=9r+#ZyUy^W>3lof|N6E#F*tj)AMOv7 z7)HnFt! z7x=(-CFSiBq}8OZsVK2Qc$ogJE7jHvlX^UcUw4NWSEZbhej*JgCn?3m?pAJzy@jGu zThS-y%2;=W4Mz&?C7$pP2s=6HaxRZt#gVa=<5=All9B8?`V)$gW4z}\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Maintenance head" +msgstr "Forum maintenance" + +msgid "Rebuild index subhead" +msgstr "Rebuild search index" + +msgid "Rebuild index info" +msgstr "If you've added, edited or removed posts manually in the database or if you're having problems searching, you should rebuild the search index. For best performance, you should put the forum in %s during rebuilding. Rebuilding the search index can take a long time and will increase server load during the rebuild process!" + +msgid "Posts per cycle label" +msgstr "Posts per cycle" + +msgid "Posts per cycle help" +msgstr "The number of posts to process per pageview. E.g. if you were to enter 300, three hundred posts would be processed and then the page would refresh. This is to prevent the script from timing out during the rebuild process." + +msgid "Starting post label" +msgstr "Starting post ID" + +msgid "Starting post help" +msgstr "The post ID to start rebuilding at. The default value is the first available ID in the database. Normally you wouldn't want to change this." + +msgid "Empty index label" +msgstr "Empty index" + +msgid "Empty index help" +msgstr "Select this if you want the search index to be emptied before rebuilding (see below)." + +msgid "Rebuild completed info" +msgstr "Once the process has completed, you will be redirected back to this page. It is highly recommended that you have JavaScript enabled in your browser during rebuilding (for automatic redirect when a cycle has completed). If you are forced to abort the rebuild process, make a note of the last processed post ID and enter that ID+1 in \"Starting post ID\" when/if you want to continue (\"Empty index\" must not be selected)." + +msgid "Rebuild index" +msgstr "Rebuild index" + +msgid "Rebuilding search index" +msgstr "Rebuilding search index" + +msgid "Rebuilding index info" +msgstr "Rebuilding index. This might be a good time to put on some coffee :-)" + +msgid "Processing post" +msgstr "Processing post %s …" + +msgid "Click here" +msgstr "Click here" + +msgid "Javascript redirect failed" +msgstr "JavaScript redirect unsuccessful. %s to continue …" + +msgid "Posts must be integer message" +msgstr "Posts per cycle must be a positive integer value." + +msgid "Days must be integer message" +msgstr "Days to prune must be a positive integer value." + +msgid "No old topics message" +msgstr "There are no topics that are %s days old. Please decrease the value of \"Days old\" and try again." + +msgid "Posts pruned redirect" +msgstr "Posts pruned." + +msgid "Prune head" +msgstr "Prune" + +msgid "Prune subhead" +msgstr "Prune old posts" + +msgid "Days old label" +msgstr "Days old" + +msgid "Days old help" +msgstr "The number of days \"old\" a topic must be to be pruned. E.g. if you were to enter 30, every topic that didn't contain a post dated less than 30 days old would be deleted." + +msgid "Prune sticky label" +msgstr "Prune sticky topics" + +msgid "Prune sticky help" +msgstr "When enabled, sticky topics will also be pruned." + +msgid "Prune from label" +msgstr "Prune from forum" + +msgid "All forums" +msgstr "All forums" + +msgid "Prune from help" +msgstr "The forum from which you want to prune posts." + +msgid "Prune info" +msgstr "Use this feature with caution. Pruned posts can never be recovered. For best performance, you should put the forum in %s during pruning." + +msgid "Confirm prune subhead" +msgstr "Confirm prune posts" + +msgid "Confirm prune info" +msgstr "Are you sure that you want to prune all topics older than %s days from %s (%s topics)." + +msgid "Confirm prune warn" +msgstr "WARNING! Pruning posts deletes them permanently." diff --git a/app/lang/English/admin/options.mo b/app/lang/English/admin/options.mo new file mode 100644 index 0000000000000000000000000000000000000000..e650f058e17e820620ef23ad31d363620b23f641 GIT binary patch literal 18847 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 RkHK1LAzR7B9c9ro`F~JqR&M|R literal 0 HcmV?d00001 diff --git a/app/lang/English/admin/options.po b/app/lang/English/admin/options.po new file mode 100644 index 00000000..9df9a3d3 --- /dev/null +++ b/app/lang/English/admin/options.po @@ -0,0 +1,603 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Bad HTTP Referer message" +msgstr "Bad HTTP_REFERER. If you have moved these forums from one location to another or switched domains, you need to update the Base URL manually in the database (look for o_base_url in the config table) and then clear the cache by deleting all .php files in the /cache directory." + +msgid "Must enter title message" +msgstr "You must enter a board title." + +msgid "Invalid e-mail message" +msgstr "The admin email address you entered is invalid." + +msgid "Invalid webmaster e-mail message" +msgstr "The webmaster email address you entered is invalid." + +msgid "SMTP passwords did not match" +msgstr "You need to enter the SMTP password twice exactly the same to change it." + +msgid "Enter announcement here" +msgstr "Enter your announcement here." + +msgid "Enter rules here" +msgstr "Enter your rules here." + +msgid "Default maintenance message" +msgstr "The forums are temporarily down for maintenance. Please try again in a few minutes." + +msgid "Timeout error message" +msgstr "The value of \"Timeout online\" must be smaller than the value of \"Timeout visit\"." + +msgid "Options updated redirect" +msgstr "Options updated." + +msgid "Options head" +msgstr "Options" + +msgid "Essentials subhead" +msgstr "Essentials" + +msgid "Board title label" +msgstr "Board title" + +msgid "Board title help" +msgstr "The title of this bulletin board (shown at the top of every page). This field may not contain HTML." + +msgid "Board desc label" +msgstr "Board description" + +msgid "Board desc help" +msgstr "A short description of this bulletin board (shown at the top of every page). This field may contain HTML." + +msgid "Base URL label" +msgstr "Base URL" + +msgid "Base URL help" +msgstr "The complete URL of the board without trailing slash (i.e. http://www.mydomain.com/forums). This must be correct in order for all admin and moderator features to work. If you get \"Bad referer\" errors, it's probably incorrect." + +msgid "Base URL problem" +msgstr "Your installation does not support automatic conversion of internationalized domain names. As your base URL contains special characters, you must use an online converter in order to avoid \"Bad referer\" errors." + +msgid "Timezone label" +msgstr "Default time zone" + +msgid "Timezone help" +msgstr "The default time zone for guests and users attempting to register for the board." + +msgid "DST label" +msgstr "Adjust for DST" + +msgid "DST help" +msgstr "Check if daylight savings is in effect (advances times by 1 hour)." + +msgid "Language label" +msgstr "Default language" + +msgid "Language help" +msgstr "The default language for guests and users who haven't changed from the default in their profile. If you remove a language pack, this must be updated." + +msgid "Default style label" +msgstr "Default style" + +msgid "Default style help" +msgstr "The default style for guests and users who haven't changed from the default in their profile." + +msgid "UTC-12:00" +msgstr "(UTC-12:00) International Date Line West" + +msgid "UTC-11:00" +msgstr "(UTC-11:00) Niue, Samoa" + +msgid "UTC-10:00" +msgstr "(UTC-10:00) Hawaii-Aleutian, Cook Island" + +msgid "UTC-09:30" +msgstr "(UTC-09:30) Marquesas Islands" + +msgid "UTC-09:00" +msgstr "(UTC-09:00) Alaska, Gambier Island" + +msgid "UTC-08:30" +msgstr "(UTC-08:30) Pitcairn Islands" + +msgid "UTC-08:00" +msgstr "(UTC-08:00) Pacific" + +msgid "UTC-07:00" +msgstr "(UTC-07:00) Mountain" + +msgid "UTC-06:00" +msgstr "(UTC-06:00) Central" + +msgid "UTC-05:00" +msgstr "(UTC-05:00) Eastern" + +msgid "UTC-04:00" +msgstr "(UTC-04:00) Atlantic" + +msgid "UTC-03:30" +msgstr "(UTC-03:30) Newfoundland" + +msgid "UTC-03:00" +msgstr "(UTC-03:00) Amazon, Central Greenland" + +msgid "UTC-02:00" +msgstr "(UTC-02:00) Mid-Atlantic" + +msgid "UTC-01:00" +msgstr "(UTC-01:00) Azores, Cape Verde, Eastern Greenland" + +msgid "UTC" +msgstr "(UTC) Western European, Greenwich" + +msgid "UTC+01:00" +msgstr "(UTC+01:00) Central European, West African" + +msgid "UTC+02:00" +msgstr "(UTC+02:00) Eastern European, Central African" + +msgid "UTC+03:00" +msgstr "(UTC+03:00) Eastern African" + +msgid "UTC+03:30" +msgstr "(UTC+03:30) Iran" + +msgid "UTC+04:00" +msgstr "(UTC+04:00) Moscow, Gulf, Samara" + +msgid "UTC+04:30" +msgstr "(UTC+04:30) Afghanistan" + +msgid "UTC+05:00" +msgstr "(UTC+05:00) Pakistan" + +msgid "UTC+05:30" +msgstr "(UTC+05:30) India, Sri Lanka" + +msgid "UTC+05:45" +msgstr "(UTC+05:45) Nepal" + +msgid "UTC+06:00" +msgstr "(UTC+06:00) Bangladesh, Bhutan, Yekaterinburg" + +msgid "UTC+06:30" +msgstr "(UTC+06:30) Cocos Islands, Myanmar" + +msgid "UTC+07:00" +msgstr "(UTC+07:00) Indochina, Novosibirsk" + +msgid "UTC+08:00" +msgstr "(UTC+08:00) Greater China, Australian Western, Krasnoyarsk" + +msgid "UTC+08:45" +msgstr "(UTC+08:45) Southeastern Western Australia" + +msgid "UTC+09:00" +msgstr "(UTC+09:00) Japan, Korea, Chita, Irkutsk" + +msgid "UTC+09:30" +msgstr "(UTC+09:30) Australian Central" + +msgid "UTC+10:00" +msgstr "(UTC+10:00) Australian Eastern" + +msgid "UTC+10:30" +msgstr "(UTC+10:30) Lord Howe" + +msgid "UTC+11:00" +msgstr "(UTC+11:00) Solomon Island, Vladivostok" + +msgid "UTC+11:30" +msgstr "(UTC+11:30) Norfolk Island" + +msgid "UTC+12:00" +msgstr "(UTC+12:00) New Zealand, Fiji, Magadan" + +msgid "UTC+12:45" +msgstr "(UTC+12:45) Chatham Islands" + +msgid "UTC+13:00" +msgstr "(UTC+13:00) Tonga, Phoenix Islands, Kamchatka" + +msgid "UTC+14:00" +msgstr "(UTC+14:00) Line Islands" + +msgid "Timeouts subhead" +msgstr "Time and timeouts" + +msgid "Time format label" +msgstr "Time format" + +msgid "PHP manual" +msgstr "PHP manual" + +msgid "Time format help" +msgstr "[Current format: %s]. See %s for formatting options." + +msgid "Date format label" +msgstr "Date format" + +msgid "Date format help" +msgstr "[Current format: %s]. See %s for formatting options." + +msgid "Visit timeout label" +msgstr "Visit timeout" + +msgid "Visit timeout help" +msgstr "Number of seconds a user must be idle before his/hers last visit data is updated (primarily affects new message indicators)." + +msgid "Online timeout label" +msgstr "Online timeout" + +msgid "Online timeout help" +msgstr "Number of seconds a user must be idle before being removed from the online users list." + +msgid "Redirect time label" +msgstr "Redirect time" + +msgid "Redirect time help" +msgstr "Number of seconds to wait when redirecting. If set to 0, no redirect page will be displayed (not recommended)." + +msgid "Display subhead" +msgstr "Display" + +msgid "Version number label" +msgstr "Version number" + +msgid "Version number help" +msgstr "Show FluxBB version number in footer." + +msgid "Info in posts label" +msgstr "User info in posts" + +msgid "Info in posts help" +msgstr "Show information about the poster under the username in topic view. The information affected is location, register date, post count and the contact links (email and URL)." + +msgid "Post count label" +msgstr "User post count" + +msgid "Post count help" +msgstr "Show the number of posts a user has made (affects topic view, profile and user list)." + +msgid "Smilies label" +msgstr "Smilies in posts" + +msgid "Smilies help" +msgstr "Convert smilies to small graphic icons." + +msgid "Smilies sigs label" +msgstr "Smilies in signatures" + +msgid "Smilies sigs help" +msgstr "Convert smilies to small graphic icons in user signatures." + +msgid "Clickable links label" +msgstr "Make clickable links" + +msgid "Clickable links help" +msgstr "When enabled, FluxBB will automatically detect any URLs in posts and make them clickable hyperlinks." + +msgid "Topic review label" +msgstr "Topic review" + +msgid "Topic review help" +msgstr "Maximum number of posts to display when posting (newest first). Set to 0 to disable." + +msgid "Topics per page label" +msgstr "Topics per page" + +msgid "Topics per page help" +msgstr "The default number of topics to display per page in a forum. Users can personalize this setting." + +msgid "Posts per page label" +msgstr "Posts per page" + +msgid "Posts per page help" +msgstr "The default number of posts to display per page in a topic. Users can personalize this setting." + +msgid "Indent label" +msgstr "Indent size" + +msgid "Indent help" +msgstr "If set to 8, a regular tab will be used when displaying text within the [code][/code] tag. Otherwise this many spaces will be used to indent the text." + +msgid "Quote depth label" +msgstr "Maximum [quote] depth" + +msgid "Quote depth help" +msgstr "The maximum times a [quote] tag can go inside other [quote] tags, any tags deeper than this will be discarded." + +msgid "Features subhead" +msgstr "Features" + +msgid "Quick post label" +msgstr "Quick reply" + +msgid "Quick post help" +msgstr "When enabled, FluxBB will add a quick reply form at the bottom of topics. This way users can post directly from the topic view." + +msgid "Users online label" +msgstr "Users online" + +msgid "Users online help" +msgstr "Display info on the index page about guests and registered users currently browsing the board." + +msgid "Censor words label" +msgstr "Censor words" + +msgid "Censor words help" +msgstr "Enable this to censor specific words in the board. See %s for more info." + +msgid "Signatures label" +msgstr "Signatures" + +msgid "Signatures help" +msgstr "Allow users to attach a signature to their posts." + +msgid "User has posted label" +msgstr "User has posted earlier" + +msgid "User has posted help" +msgstr "This feature displays a dot in front of topics in viewforum.php in case the currently logged in user has posted in that topic earlier. Disable if you are experiencing high server load." + +msgid "Topic views label" +msgstr "Topic views" + +msgid "Topic views help" +msgstr "Keep track of the number of views a topic has. Disable if you are experiencing high server load in a busy forum." + +msgid "Quick jump label" +msgstr "Quick jump" + +msgid "Quick jump help" +msgstr "Enable the quick jump (jump to forum) drop list." + +msgid "GZip label" +msgstr "GZip output" + +msgid "GZip help" +msgstr "If enabled, FluxBB will gzip the output sent to browsers. This will reduce bandwidth usage, but use a little more CPU. This feature requires that PHP is configured with zlib (--with-zlib). Note: If you already have one of the Apache modules mod_gzip or mod_deflate set up to compress PHP scripts, you should disable this feature." + +msgid "Search all label" +msgstr "Search all forums" + +msgid "Search all help" +msgstr "When disabled, searches will only be allowed in one forum at a time. Disable if server load is high due to excessive searching." + +msgid "Menu items label" +msgstr "Additional menu items" + +msgid "Menu items help" +msgstr "By entering HTML hyperlinks into this textbox, any number of items can be added to the navigation menu at the top of all pages. The format for adding new links is X = <a href=\"URL\">LINK</a> where X is the position at which the link should be inserted (e.g. 0 to insert at the beginning and 2 to insert after \"User list\"). Separate entries with a linebreak." + +msgid "Feed subhead" +msgstr "Syndication" + +msgid "Default feed label" +msgstr "Default feed type" + +msgid "Default feed help" +msgstr "Select the type of syndication feed to display. Note: Choosing none will not disable feeds, only hide them by default." + +msgid "None" +msgstr "None" + +msgid "RSS" +msgstr "RSS" + +msgid "Atom" +msgstr "Atom" + +msgid "Feed TTL label" +msgstr "Duration to cache feeds" + +msgid "Feed TTL help" +msgstr "Feeds can be cached to lower the resource usage of feeds." + +msgid "No cache" +msgstr "Don't cache" + +msgid "Minutes" +msgstr "%d minutes" + +msgid "Reports subhead" +msgstr "Reports" + +msgid "Reporting method label" +msgstr "Reporting method" + +msgid "Internal" +msgstr "Internal" + +msgid "By e-mail" +msgstr "Email" + +msgid "Both" +msgstr "Both" + +msgid "Reporting method help" +msgstr "Select the method for handling topic/post reports. You can choose whether topic/post reports should be handled by the internal report system, emailed to the addresses on the mailing list (see below) or both." + +msgid "Mailing list label" +msgstr "Mailing list" + +msgid "Mailing list help" +msgstr "A comma separated list of subscribers. The people on this list are the recipients of reports." + +msgid "Avatars subhead" +msgstr "Avatars" + +msgid "Use avatars label" +msgstr "Use avatars" + +msgid "Use avatars help" +msgstr "When enabled, users will be able to upload an avatar which will be displayed under their title." + +msgid "Upload directory label" +msgstr "Upload directory" + +msgid "Upload directory help" +msgstr "The upload directory for avatars (relative to the FluxBB root directory). PHP must have write permissions to this directory." + +msgid "Max width label" +msgstr "Max width" + +msgid "Max width help" +msgstr "The maximum allowed width of avatars in pixels (60 is recommended)." + +msgid "Max height label" +msgstr "Max height" + +msgid "Max height help" +msgstr "The maximum allowed height of avatars in pixels (60 is recommended)." + +msgid "Max size label" +msgstr "Max size" + +msgid "Max size help" +msgstr "The maximum allowed size of avatars in bytes (10240 is recommended)." + +msgid "E-mail subhead" +msgstr "Email" + +msgid "Admin e-mail label" +msgstr "Admin email" + +msgid "Admin e-mail help" +msgstr "The email address of the board administrator." + +msgid "Webmaster e-mail label" +msgstr "Webmaster email" + +msgid "Webmaster e-mail help" +msgstr "This is the address that all emails sent by the board will be addressed from." + +msgid "Forum subscriptions label" +msgstr "Forum subscriptions" + +msgid "Forum subscriptions help" +msgstr "Enable users to subscribe to forums (receive email when someone creates a new topic)." + +msgid "Topic subscriptions label" +msgstr "Topic subscriptions" + +msgid "Topic subscriptions help" +msgstr "Enable users to subscribe to topics (receive email when someone replies)." + +msgid "SMTP address label" +msgstr "SMTP server address" + +msgid "SMTP address help" +msgstr "The address of an external SMTP server to send emails with. You can specify a custom port number if the SMTP server doesn't run on the default port 25 (example: mail.myhost.com:3580). Leave blank to use the local mail program." + +msgid "SMTP username label" +msgstr "SMTP username" + +msgid "SMTP username help" +msgstr "Username for SMTP server. Only enter a username if it is required by the SMTP server (most servers do not require authentication)." + +msgid "SMTP password label" +msgstr "SMTP password" + +msgid "SMTP change password help" +msgstr "Check this if you want to change or delete the currently stored password." + +msgid "SMTP password help" +msgstr "Password for SMTP server. Only enter a password if it is required by the SMTP server (most servers do not require authentication). Please enter your password twice to confirm." + +msgid "SMTP SSL label" +msgstr "Encrypt SMTP using SSL" + +msgid "SMTP SSL help" +msgstr "Encrypts the connection to the SMTP server using SSL. Should only be used if your SMTP server requires it and your version of PHP supports SSL." + +msgid "Registration subhead" +msgstr "Registration" + +msgid "Allow new label" +msgstr "Allow new registrations" + +msgid "Allow new help" +msgstr "Controls whether this board accepts new registrations. Disable only under special circumstances." + +msgid "Verify label" +msgstr "Verify registrations" + +msgid "Verify help" +msgstr "When enabled, users are emailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new email addresses if they choose to change from the one they registered with. This is an effective way of avoiding registration abuse and making sure that all users have \"correct\" email addresses in their profiles." + +msgid "Report new label" +msgstr "Report new registrations" + +msgid "Report new help" +msgstr "If enabled, FluxBB will notify users on the mailing list (see above) when a new user registers in the forums." + +msgid "Use rules label" +msgstr "User forum rules" + +msgid "Use rules help" +msgstr "When enabled, users must agree to a set of rules when registering (enter text below). The rules will always be available through a link in the navigation table at the top of every page." + +msgid "Rules label" +msgstr "Enter your rules here" + +msgid "Rules help" +msgstr "Here you can enter any rules or other information that the user must review and accept when registering. If you enabled rules above you have to enter something here, otherwise it will be disabled. This text will not be parsed like regular posts and thus may contain HTML." + +msgid "E-mail default label" +msgstr "Default email setting" + +msgid "E-mail default help" +msgstr "Choose the default privacy setting for new user registrations." + +msgid "Display e-mail label" +msgstr "Display email address to other users." + +msgid "Hide allow form label" +msgstr "Hide email address but allow form e-mail." + +msgid "Hide both label" +msgstr "Hide email address and disallow form email." + +msgid "Announcement subhead" +msgstr "Announcements" + +msgid "Display announcement label" +msgstr "Display announcement" + +msgid "Display announcement help" +msgstr "Enable this to display the below message in the board." + +msgid "Announcement message label" +msgstr "Announcement message" + +msgid "Announcement message help" +msgstr "This text will not be parsed like regular posts and thus may contain HTML." + +msgid "Maintenance subhead" +msgstr "Maintenance" + +msgid "Maintenance mode label" +msgstr "Maintenance mode" + +msgid "Maintenance mode help" +msgstr "When enabled, the board will only be available to administrators. This should be used if the board needs to be taken down temporarily for maintenance. WARNING! Do not log out when the board is in maintenance mode. You will not be able to login again." + +msgid "Maintenance message label" +msgstr "Maintenance message" + +msgid "Maintenance message help" +msgstr "The message that will be displayed to users when the board is in maintenance mode. If left blank, a default message will be used. This text will not be parsed like regular posts and thus may contain HTML." diff --git a/app/lang/English/admin/parser.mo b/app/lang/English/admin/parser.mo new file mode 100644 index 0000000000000000000000000000000000000000..b18ade305d28766faae4f1f67744c3d60cc02cf4 GIT binary patch literal 5557 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 literal 0 HcmV?d00001 diff --git a/app/lang/English/admin/parser.php b/app/lang/English/admin/parser.php new file mode 100644 index 00000000..e15237e9 --- /dev/null +++ b/app/lang/English/admin/parser.php @@ -0,0 +1,93 @@ + 'Parser Options, BBCodes and Smilies', + 'reset_success' => 'Parser Options, BBCodes and Smilies successfully reset to FluxBB default settings.', + 'save_success' => 'Parser changes successfully saved.', + 'upload success' => 'Smiley file upload successful.', + 'upload_button' => 'Upload Smiley Image', + 'reset defaults' => 'Restore default settings', + +/* *********************************************************************** */ + 'Remotes subhead' => 'Remote image validation', + 'unavailable' => 'This function is unavailable.', + +/* *********************************************************************** */ + 'Config subhead' => 'Parser options', + + 'syntax style' => 'CODE syntax style', + 'syntax style help' => 'Select a style sheet file from this list of currently installed SyntaxHighlighter files.', + + 'textile' => 'Enable Textile shortcuts', + 'textile help' => 'Enable some textile tag keystroke shortcuts: _emphasized_, *strong*, @inline code@, super^script^, sub~script~, -deleted- and +inserted+ text. Textile shortcuts for bulleted (*) and numbered (#) lists are also supported. When posting a new message, (or editing an existing one), during the pre-parsing phase, the textile shortcut delimiters are converted to their equivalent BBCode tags before being stored in the database.', + + 'quote_imgs' => 'Display IMG in QUOTE ', + 'quote_imgs help' => 'Display images contained within QUOTE tags. If this option is set to "No" (the default setting), then images within a quote are not displayed graphically but are instead displayed as a simple text hyperlink to the image (with the link text set to: "{IMG}"). If this option is set to "Yes", then images within quotes are displayed normally (as a graphic object).', + + 'quote_links' => 'Linkify QUOTE citation', + 'quote_links help' => 'Make the "Poster wrote:" citation text a link back to the original post for quotes having original post number metadata included in the tag attribute (the post number, preceded by a: \'#\', is specified at the end of the attribute like so: "[quote=Admin #101]...[/quote]").', + + 'click_imgs' => 'Make IMG clickable', + 'click_imgs help' => 'Display images and also make each image a clickable link to the full sized original.', + + 'max_xy' => 'Maximum media XY', + 'max_xy help' => 'Maximum pixel width and height allowable for new visual media objects (images, videos etc).', + + 'smiley_size' => 'Smiley display size', + 'smiley_size help' => 'Percent size adjustment for smiley box dimensions (default 160% == 24x24 pixels).', + +/* *********************************************************************** */ + 'valid_imgs' => 'Validate remote IMG', + 'valid_imgs help' => 'When posting a message having IMG tags, validate the existence of the remote image files by requesting their file header information. Check each remote image filesize and do NOT display if too big (to save the forum viewer\'s bandwidth). If any image has a dimension greater than "Max width" or "Max height", then limit the displayed image to fit. (Note that this option is disabled if the PHP variable "allow_url_fopen" is FALSE.)', + + 'max_size' => 'Maximum IMG filesize', + 'max_size help' => 'Maximum remote image filesize to be allowed on forum pages. When creating a new post, the remote image file size is checked against this value and reported as an error if it is too big and image validation is on.', + + 'def_xy' => 'Default media XY', + 'def_xy help' => 'Default pixel width and height for new visual media objects (images, videos etc). When a post has an IMG tag and the "Validate remote IMG" option is turned on, then the remote file information is scaled to fit within these dimensions and retain the original aspect ratio.', + +/* *********************************************************************** */ + 'Smilies subhead' => 'Smilies', + 'smiley_text_label' => 'Smiley text', + 'smiley_file_label' => 'Smiley image file', + 'smiley_upload' => 'Upload new smiley image', + 'New smiley image' => 'New smiley image', + 'upload_err_1' => 'Smiley upload failed. Unable to move to smiley folder.', + 'upload_err_2' => 'Smiley upload failed. File is too big.', + 'upload_err_3' => 'Smiley upload failed. File type is not an image.', + 'upload_err_4' => 'Smiley upload failed. Bad filename.', + 'upload_err_5' => 'Smiley upload failed. File only partially uploaded.', + 'upload_err_6' => 'Smiley upload failed. No filename.', + 'upload_err_7' => 'Smiley upload failed. No temporary folder.', + 'upload_err_8' => 'Smiley upload failed. Cannot write file to disk.', + 'upload_err_9' => 'Smiley upload failed. Unknown error!', + 'upload_off' => 'Uploading files is currently disabled.', + 'upload_button' => 'Upload File', + +/* *********************************************************************** */ + 'BBCodes subhead' => 'BBCodes', + 'tagname_label' => 'BBCode Tag Name', + 'tagtype_label' => 'Tag type', + 'in_post_label' => 'Allow in posts?', + 'in_sig_label' => 'Allow in signatures?', + 'depth_max' => 'Max tag nesting depth.', + 'tag_summary' => array( + 'unknown' => 'Unrecognized tag - (need to update language file).', + 'code' => 'Computer Code. [attrib=language].', + 'quote' => 'Block Quotation. [attrib == citation].', + 'list' => 'Ordered or Unordered list. (*=bulleted | a=alpha | 1=numeric).', + '*' => 'List Item.', + 'h' => 'Header 5. [attrib=TITLE].', + 'img' => 'Inline Image. [attrib=ALT=TITLE].', + 'url' => 'Hypertext Link. [attrib=URL].', + 'b' => 'Strong Emphasis. (Bold).', + 'i' => 'Emphasis. (Italic).', + 's' => 'Strike-through Text.', + 'u' => 'Underlined Text.', + 'color' => 'Color. attrib=[#FFF | #FFFFFF | red].', + 'tt' => 'Teletype Text.', + 'center' => 'Centered Block.', + 'err' => 'Error codes generated by parser for invalid BBCode. [attrib=TITLE].', + 'dbug' => 'Debug messages generated by parser. [attrib=TITLE].', + ), +); diff --git a/app/lang/English/admin/parser.po b/app/lang/English/admin/parser.po new file mode 100644 index 00000000..b21ec9f5 --- /dev/null +++ b/app/lang/English/admin/parser.po @@ -0,0 +1,168 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Parser head" +msgstr "Parser Options, BBCodes and Smilies" + +msgid "reset_success" +msgstr "Parser Options, BBCodes and Smilies successfully reset to FluxBB default settings." + +msgid "save_success" +msgstr "Parser changes successfully saved." + +msgid "upload success" +msgstr "Smiley file upload successful." + +msgid "upload_button" +msgstr "Upload File" + +msgid "reset defaults" +msgstr "Restore default settings" + +msgid "Remotes subhead" +msgstr "Remote image validation" + +msgid "unavailable" +msgstr "This function is unavailable." + +msgid "Config subhead" +msgstr "Parser options" + +msgid "syntax style" +msgstr "CODE syntax style" + +msgid "syntax style help" +msgstr "Select a style sheet file from this list of currently installed SyntaxHighlighter files." + +msgid "textile" +msgstr "Enable Textile shortcuts" + +msgid "textile help" +msgstr "Enable some textile tag keystroke shortcuts: _emphasized_, *strong*, @inline code@, super^script^, sub~script~, -deleted- and +inserted+ text. Textile shortcuts for bulleted (*) and numbered (#) lists are also supported. When posting a new message, (or editing an existing one), during the pre-parsing phase, the textile shortcut delimiters are converted to their equivalent BBCode tags before being stored in the database." + +msgid "quote_imgs" +msgstr "Display IMG in QUOTE " + +msgid "quote_imgs help" +msgstr "Display images contained within QUOTE tags. If this option is set to \"No\" (the default setting), then images within a quote are not displayed graphically but are instead displayed as a simple text hyperlink to the image (with the link text set to: \"{IMG}\"). If this option is set to \"Yes\", then images within quotes are displayed normally (as a graphic object)." + +msgid "quote_links" +msgstr "Linkify QUOTE citation" + +msgid "quote_links help" +msgstr "Make the \"Poster wrote:\" citation text a link back to the original post for quotes having original post number metadata included in the tag attribute (the post number, preceded by a: '#', is specified at the end of the attribute like so: \"[quote=Admin #101]...[/quote]\")." + +msgid "click_imgs" +msgstr "Make IMG clickable" + +msgid "click_imgs help" +msgstr "Display images and also make each image a clickable link to the full sized original." + +msgid "max_xy" +msgstr "Maximum media XY" + +msgid "max_xy help" +msgstr "Maximum pixel width and height allowable for new visual media objects (images, videos etc)." + +msgid "smiley_size" +msgstr "Smiley display size" + +msgid "smiley_size help" +msgstr "Percent size adjustment for smiley box dimensions (default 160% == 24x24 pixels)." + +msgid "valid_imgs" +msgstr "Validate remote IMG" + +msgid "valid_imgs help" +msgstr "When posting a message having IMG tags, validate the existence of the remote image files by requesting their file header information. Check each remote image filesize and do NOT display if too big (to save the forum viewer's bandwidth). If any image has a dimension greater than \"Max width\" or \"Max height\", then limit the displayed image to fit. (Note that this option is disabled if the PHP variable \"allow_url_fopen\" is FALSE.)" + +msgid "max_size" +msgstr "Maximum IMG filesize" + +msgid "max_size help" +msgstr "Maximum remote image filesize to be allowed on forum pages. When creating a new post, the remote image file size is checked against this value and reported as an error if it is too big and image validation is on." + +msgid "def_xy" +msgstr "Default media XY" + +msgid "def_xy help" +msgstr "Default pixel width and height for new visual media objects (images, videos etc). When a post has an IMG tag and the \"Validate remote IMG\" option is turned on, then the remote file information is scaled to fit within these dimensions and retain the original aspect ratio." + +msgid "Smilies subhead" +msgstr "Smilies" + +msgid "smiley_text_label" +msgstr "Smiley text" + +msgid "smiley_file_label" +msgstr "Smiley image file" + +msgid "smiley_upload" +msgstr "Upload new smiley image" + +msgid "New smiley image" +msgstr "New smiley image" + +msgid "upload_err_1" +msgstr "Smiley upload failed. Unable to move to smiley folder." + +msgid "upload_err_2" +msgstr "Smiley upload failed. File is too big." + +msgid "upload_err_3" +msgstr "Smiley upload failed. File type is not an image." + +msgid "upload_err_4" +msgstr "Smiley upload failed. Bad filename." + +msgid "upload_err_5" +msgstr "Smiley upload failed. File only partially uploaded." + +msgid "upload_err_6" +msgstr "Smiley upload failed. No filename." + +msgid "upload_err_7" +msgstr "Smiley upload failed. No temporary folder." + +msgid "upload_err_8" +msgstr "Smiley upload failed. Cannot write file to disk." + +msgid "upload_err_9" +msgstr "Smiley upload failed. Unknown error!" + +msgid "upload_off" +msgstr "Uploading files is currently disabled." + +msgid "BBCodes subhead" +msgstr "BBCodes" + +msgid "tagname_label" +msgstr "BBCode Tag Name" + +msgid "tagtype_label" +msgstr "Tag type" + +msgid "in_post_label" +msgstr "Allow in posts?" + +msgid "in_sig_label" +msgstr "Allow in signatures?" + +msgid "depth_max" +msgstr "Max tag nesting depth." + +msgid "tag_summary" +msgstr "" diff --git a/app/lang/English/admin/permissions.mo b/app/lang/English/admin/permissions.mo new file mode 100644 index 0000000000000000000000000000000000000000..b90e01493cdced77a818ba14c09c24312dcc9be4 GIT binary patch literal 2836 zcmb7_&u<(x6vqveAKjJ$Ek8>E7kWrgXVO&s2%DyYqzy`yh*gpzqzEMMj(65*#-5Hn zO>^OZg!lsxLWm38kl=v0a6*CuS0u!_NF2CwtB?=}zHjWE{gED;(M~?`^Yin2&+mEu zIDY6;hUZzlr|=%Vi?LboKaid;?`G^V@GJ0f@CWcX_$zn<{4>no3iC(qVeAOx&x1$7 z7F#K@UJlbH;j)R^7dW;N$(Yq z_PYX-y&aJ3lpwAD5G1|N!uT7I{P_v&Am-n}a~Pkw&)c~Qp2xTklHTVa&3_x_Z-Qqq z{u{)Pow%Q|)8I*v;<^C-18#zp-zyIwCNKq`17{C2_9D0j;>R5Rtb!kaPk_IG7r~q0 zli;ZqW3PcPgEVhI%J;`0#rFw_t=QKf<^MbIRq#iU;=Tpq#|~o=9WmT!9y%X-$WMxe zo_p~=gO_qi=Ryzd^B~@*@RBWxlj?`;laFw<_6?|WhNEg8@(rcJp2m9;FP#5*e2 zoiX1w#0`!i&!kS>z#E&Ad5euuX&I6_De`I^S?0=GWi%;?gpt7Vsz?x6!b_Q`61ip_ zW1Z3|w^g@R+mxxYt`rU{$As4^s88f$Q%=bIu3IYA!c`?a8yf6nRVlJ))nNNJ*F`pCh-uGK{yRj+Li>-~djmx9` z=i_s&6{DThu)0@ZQzvh@xgrxvFY?|%lvcW>tJ|y5!bp#H@5?f}ta~OwcH4ZRt6bwq zn@in#CwfzAiA0l+9fR|5d_G=?U&4$ZMq8#Tdve9^(dK>=>MFC#Mbm-K@E#n5KiueS zkJ?i?k)e{DLl)yv8-|{3ETG=}Y4JO^(X1I+3H^Bh8-7Kw5c(AE7pO(cXHb_W&!tXe zG8;2LJ)vtklq)Ms>X=Y(L&bV-Bo6CH*;15cUEWx^tI%bpq!ZNCzy=xZhWnwu9z>F$ zjO|=vFw`+$>m#Fm$A#kxUM8|Hs?2eme%(Jad(zIHtmuH=FaOeSY} zx59Fbu`C^z^)5pli~1rbQ0tr~s3kKrBA>wm+3%w*)OE>s#U3|(Z0<+^og6->B9kF7 z-?tWN^Hp-Yh@@py(51;N-yKNmt~!}$*@3CDWX$FL86$7T(*uW*5TQ+D2H~MelRZ8V zw$54;{y{@meVj?sT*gSOk6R|g@J5ppP9Z`cK4mkM*N)25cX#IKZ+%-2%PnTjb$myQ zrpk`bAao>uykZ-JRHkF4xLu#^4V70p*Hzv{-f@<6g`i-lKE+f~qY}{0zPDqBTfSb} zSPb6^c6+-hA>6_THc6}MZ$CUdc?!81{?ocVBo(9X(g$TQO&k03fxHhiUwup SyB#GQPp\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Perms updated redirect" +msgstr "Permissions updated." + +msgid "Permissions head" +msgstr "Permissions" + +msgid "Posting subhead" +msgstr "Posting" + +msgid "BBCode label" +msgstr "BBCode" + +msgid "BBCode help" +msgstr "Allow BBCode in posts (recommended)." + +msgid "Image tag label" +msgstr "Image tag" + +msgid "Image tag help" +msgstr "Allow the BBCode [img][/img] tag in posts." + +msgid "All caps message label" +msgstr "All caps message" + +msgid "All caps message help" +msgstr "Allow a message to contain only capital letters." + +msgid "All caps subject label" +msgstr "All caps subject" + +msgid "All caps subject help" +msgstr "Allow a subject to contain only capital letters." + +msgid "Require e-mail label" +msgstr "Require guest email" + +msgid "Require e-mail help" +msgstr "Require guests to supply an email address when posting." + +msgid "Signatures subhead" +msgstr "Signatures" + +msgid "BBCode sigs label" +msgstr "BBCodes in signatures" + +msgid "BBCode sigs help" +msgstr "Allow BBCodes in user signatures." + +msgid "Image tag sigs label" +msgstr "Image tag in signatures" + +msgid "Image tag sigs help" +msgstr "Allow the BBCode [img][/img] tag in user signatures (not recommended)." + +msgid "All caps sigs label" +msgstr "All caps signature" + +msgid "All caps sigs help" +msgstr "Allow a signature to contain only capital letters." + +msgid "Max sig length label" +msgstr "Maximum signature length" + +msgid "Max sig length help" +msgstr "The maximum number of characters a user signature may contain." + +msgid "Max sig lines label" +msgstr "Maximum signature lines" + +msgid "Max sig lines help" +msgstr "The maximum number of lines a user signature may contain." + +msgid "Registration subhead" +msgstr "Registration" + +msgid "Banned e-mail label" +msgstr "Allow banned email addresses" + +msgid "Banned e-mail help" +msgstr "Allow users to register with or change to a banned email address/domain. If left at its default setting (yes), this action will be allowed, but an alert email will be sent to the mailing list (an effective way of detecting multiple registrations)." + +msgid "Duplicate e-mail label" +msgstr "Allow duplicate email addresses" + +msgid "Duplicate e-mail help" +msgstr "Controls whether users should be allowed to register with an email address that another user already has. If allowed, an alert email will be sent to the mailing list if a duplicate is detected." diff --git a/app/lang/English/admin/plugin_example.mo b/app/lang/English/admin/plugin_example.mo new file mode 100644 index 0000000000000000000000000000000000000000..e0a606bdc922c117379a06cbd1f0c098bc8199bb GIT binary patch literal 1137 zcmZva%We}f6ow6yTY%D5thh+00mMbjKq?j`B^AA-rBVwKO%W`enKOxDVn?>8Y2E-H zpj)1ZCt$%Vuw@6oGwDSLOGlqCXMFxS{(sI*9SV#qh}#H{m_>X?gfVkQh&gZ;yaC<= zuYoTn+?;R^40j~pMbLmV;1IkDegQ9mhhPiw4RIaoUuT7w2LFI7;Pg2mzJe|A4)_Cn z4E_dhf_JBcxC}0X;ojHaEpQLSm7;@Xlq+KAGNL2E|=a| zByCIGEo7IYHp~908|kG?`%1sc$`YMUY;1SAva_|*JgHxcpHGi#$oEmoefd@(Ik?%nY6^^qakLfk*gbBSR zE&EK>i9@P!dBe~Yc}g87NnK-7asxAdTrcy_*vplNtw?qZTrz^rNy(Vj*(Fxt!(mT) z!cPSeD4$aB3)Zm5nPN3m$a zn-*FIit#5VD^tgnP^Nn9&+7cxjj2jQFJR~J)ubKs;yCU9{-x@DSB+^i7>}GUvMd&V E0VRz$fB*mh literal 0 HcmV?d00001 diff --git a/app/lang/English/admin/plugin_example.po b/app/lang/English/admin/plugin_example.po new file mode 100644 index 00000000..491eca80 --- /dev/null +++ b/app/lang/English/admin/plugin_example.po @@ -0,0 +1,45 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "No text" +msgstr "You didn't enter anything!" + +msgid "Example plugin title" +msgstr "Example plugin" + +msgid "You said" +msgstr "You said \"%s\". Great stuff." + +msgid "Explanation 1" +msgstr "This plugin doesn't do anything useful. Hence the name \"Example\"." + +msgid "Explanation 2" +msgstr "This would be a good spot to talk a little about your plugin. Describe what it does and how it should be used. Be brief, but informative." + +msgid "Example form title" +msgstr "An example form" + +msgid "Legend text" +msgstr "Enter a piece of text and hit \"Show text\"!" + +msgid "Text to show" +msgstr "Text to show" + +msgid "Show text button" +msgstr "Show text" + +msgid "Input content" +msgstr "The text you want to display." diff --git a/app/lang/English/admin/reports.mo b/app/lang/English/admin/reports.mo new file mode 100644 index 0000000000000000000000000000000000000000..3fcf39da696a0648275f2b7020ce364a802430ef GIT binary patch literal 1083 zcmY+CJ8u&~5XUc&5IDk9Q4ok?QG^7=U1CIGoiT#gF|rgJD;N~ft$h>w;Jkb6oq?p_ z3m`!O)cFSVbd+>7w4~w#(9rXrd-$=^+|Tn~@67S##V;1l1;};CXUG-E$^t$(LvR@k zz!mUS&UfGm=-UImZ9Yv4EVH24eTzP~|^`vY>{zaaNnUd-yQf&72hL9|U{ zmq0!UO%KQOu_1gHu6qW;_v3ftcR+f2&gEqAJtn74AtmHnImI|8W9`T|5v5HrBjjvpB6CwUaA z^bV}&GGgJHMOG&q8yPwcZAP&tRFtZ5^-e`(KdZNtxKS0Q+ZDTG^b1sUn!fXlOdM$C zi3Z7JNM>ux?mX@~H3JoPr!Eun1Z>VOy$(3EF!3umT_aT-%0wFk?MO8k%K??V45zDO5d(&@`d9$wm~)KvhJ4C{0XB^=Y@^ zl&5jreV>f8t@_#z)W8$vUXV;K;t5jrp7V$lne2`oO@4skxn=h*Jele|(PPu6TGqo8 zS(9Ss1+&>>>>-aI?=u}|dt+`1tS%msgoLQMO>pNuvo+joC)RJq^GksNr>1m4M$){5 ZLB?r&cXlH\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Report zapped redirect" +msgstr "Report marked as read." + +msgid "New reports head" +msgstr "New reports" + +msgid "Deleted user" +msgstr "Deleted user" + +msgid "Deleted" +msgstr "Deleted" + +msgid "Post ID" +msgstr "Post #%s" + +msgid "Report subhead" +msgstr "Reported %s" + +msgid "Reported by" +msgstr "Reported by %s" + +msgid "Reason" +msgstr "Reason" + +msgid "Zap" +msgstr "Mark as read" + +msgid "No new reports" +msgstr "There are no new reports." + +msgid "Last 10 head" +msgstr "10 last read reports" + +msgid "NA" +msgstr "N/A" + +msgid "Zapped subhead" +msgstr "Marked as read %s by %s" + +msgid "No zapped reports" +msgstr "There are no read reports." diff --git a/app/lang/English/admin/users.mo b/app/lang/English/admin/users.mo new file mode 100644 index 0000000000000000000000000000000000000000..4ca0d53146c0d6a3443f8069beba1e47755dceed GIT binary patch literal 7114 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 literal 0 HcmV?d00001 diff --git a/app/lang/English/admin/users.po b/app/lang/English/admin/users.po new file mode 100644 index 00000000..41af5899 --- /dev/null +++ b/app/lang/English/admin/users.po @@ -0,0 +1,312 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Non numeric message" +msgstr "You entered a non-numeric value into a numeric only column." + +msgid "Invalid date time message" +msgstr "You entered an invalid date/time." + +msgid "Not verified" +msgstr "Not verified" + +msgid "No users selected" +msgstr "No users selected." + +msgid "No move admins message" +msgstr "For security reasons, you are not allowed to move multiple administrators to another group. If you want to move these administrators, you can do so on their respective user profiles." + +msgid "No delete admins message" +msgstr "Administrators cannot be deleted. In order to delete administrators, you must first move them to a different user group." + +msgid "No ban admins message" +msgstr "Administrators cannot be banned. In order to ban administrators, you must first move them to a different user group." + +msgid "No ban mods message" +msgstr "Moderators cannot be banned. In order to ban moderators, you must first move them to a different user group." + +msgid "Move users" +msgstr "Change user group" + +msgid "Move users subhead" +msgstr "Select new user group" + +msgid "New group label" +msgstr "New group" + +msgid "New group help" +msgstr "Select the group to which the selected users will be moved. For security reasons, it is not possible to move multiple users to the administrator group." + +msgid "Invalid group message" +msgstr "Invalid group ID." + +msgid "Users move redirect" +msgstr "User group changed." + +msgid "Delete users" +msgstr "Delete users" + +msgid "Confirm delete legend" +msgstr "Important: read before deleting users" + +msgid "Confirm delete info" +msgstr "Please confirm that you want to delete these users." + +msgid "Delete posts" +msgstr "Delete any posts and topics these users have made." + +msgid "Delete warning" +msgstr "Warning! Deleted users and/or posts cannot be restored. If you choose not to delete the posts made by these users, the posts can only be deleted manually at a later time." + +msgid "Users delete redirect" +msgstr "Users deleted." + +msgid "Ban users" +msgstr "Ban users" + +msgid "Message expiry subhead" +msgstr "Ban message and expiry" + +msgid "Ban message label" +msgstr "Ban message" + +msgid "Ban message help" +msgstr "A message that will be displayed to the banned users when they visit the board." + +msgid "Expire date label" +msgstr "Expire date" + +msgid "Expire date help" +msgstr "The date when these bans should be automatically removed (format: yyyy-mm-dd). Leave blank to remove manually." + +msgid "Ban IP label" +msgstr "Ban IP addresses" + +msgid "Ban IP help" +msgstr "Also ban the IP addresses of the banned users to make registering a new account more difficult for them." + +msgid "Invalid date message" +msgstr "You entered an invalid expire date." + +msgid "Invalid date reasons" +msgstr "The format should be YYYY-MM-DD and the date must be at least one day in the future." + +msgid "Users banned redirect" +msgstr "Users banned." + +msgid "User search head" +msgstr "User search" + +msgid "User search subhead" +msgstr "Enter search criteria" + +msgid "User search info" +msgstr "Search for users in the database. You can enter one or more terms to search for. Wildcards in the form of asterisks (*) are accepted." + +msgid "Username label" +msgstr "Username" + +msgid "E-mail address label" +msgstr "Email address" + +msgid "Title label" +msgstr "Title" + +msgid "Real name label" +msgstr "Real name" + +msgid "Website label" +msgstr "Website" + +msgid "Jabber label" +msgstr "Jabber" + +msgid "ICQ label" +msgstr "ICQ" + +msgid "MSN label" +msgstr "Microsoft Account" + +msgid "AOL label" +msgstr "AOL IM" + +msgid "Yahoo label" +msgstr "Yahoo Messenger" + +msgid "Location label" +msgstr "Location" + +msgid "Signature label" +msgstr "Signature" + +msgid "Admin note label" +msgstr "Admin note" + +msgid "Posts more than label" +msgstr "Number of posts greater than" + +msgid "Posts less than label" +msgstr "Number of posts less than" + +msgid "Last post after label" +msgstr "Last post is after" + +msgid "Date help" +msgstr "(yyyy-mm-dd hh:mm:ss)" + +msgid "Last post before label" +msgstr "Last post is before" + +msgid "Last visit after label" +msgstr "Last visit is after" + +msgid "Last visit before label" +msgstr "Last visit is before" + +msgid "Registered after label" +msgstr "Registered after" + +msgid "Registered before label" +msgstr "Registered before" + +msgid "Order by label" +msgstr "Order by" + +msgid "Order by username" +msgstr "Username" + +msgid "Order by e-mail" +msgstr "Email" + +msgid "Order by posts" +msgstr "Number of posts" + +msgid "Order by last post" +msgstr "Last post" + +msgid "Order by last visit" +msgstr "Last visit" + +msgid "Order by registered" +msgstr "Registered" + +msgid "Ascending" +msgstr "Ascending" + +msgid "Descending" +msgstr "Descending" + +msgid "User group label" +msgstr "User group" + +msgid "All groups" +msgstr "All groups" + +msgid "Unverified users" +msgstr "Unverified users" + +msgid "Submit search" +msgstr "Submit search" + +msgid "IP search head" +msgstr "IP search" + +msgid "IP search subhead" +msgstr "Enter IP to search for" + +msgid "IP address label" +msgstr "IP address" + +msgid "IP address help" +msgstr "The IP address to search for in the post database." + +msgid "Find IP address" +msgstr "Find IP address" + +msgid "Results head" +msgstr "Search Results" + +msgid "Results username head" +msgstr "Username" + +msgid "Results e-mail head" +msgstr "Email" + +msgid "Results title head" +msgstr "Title/Status" + +msgid "Results posts head" +msgstr "Posts" + +msgid "Results admin note head" +msgstr "Admin note" + +msgid "Results actions head" +msgstr "Actions" + +msgid "Results IP address head" +msgstr "IP address" + +msgid "Results last used head" +msgstr "Last used" + +msgid "Results times found head" +msgstr "Times found" + +msgid "Results action head" +msgstr "Action" + +msgid "Results find more link" +msgstr "Find more users for this ip" + +msgid "Results no posts found" +msgstr "There are currently no posts by that user in the forum." + +msgid "Select" +msgstr "Select" + +msgid "Select all" +msgstr "Select all" + +msgid "Unselect all" +msgstr "Unselect all" + +msgid "Ban" +msgstr "Ban" + +msgid "Delete" +msgstr "Delete" + +msgid "Change group" +msgstr "Change group" + +msgid "Bad IP message" +msgstr "The supplied IP address is not correctly formatted." + +msgid "Results view IP link" +msgstr "View IP stats" + +msgid "Results show posts link" +msgstr "Show posts" + +msgid "Results guest" +msgstr "Guest" + +msgid "Results no IP found" +msgstr "The supplied IP address could not be found in the database." + +msgid "No match" +msgstr "No match" diff --git a/app/lang/English/antispam.mo b/app/lang/English/antispam.mo new file mode 100644 index 0000000000000000000000000000000000000000..2d884422712f3935e89b7acbab004e1cdb67f9c4 GIT binary patch literal 751 zcmYk4!EVz)5QYsDAsGn}7cLxzN=R^6mmm(2n*?auK&4bfB_KF(SjUrO!QM5qYf9b# z?r`JABk%w`1~;CC-*MBj^5@yvotfX>*}pfpzDF3B!ELY)u7CnG;|qwvS8xq{1J}V% za25OllM7Mw8+HtCT#TXt>^s;L_6O`O*gvoci!K37*LpDPvDLhfUFHHAJ9nqkk2U*X zoIP~|Jeq4$YuO&IP6=!3m_L~&bh9+pKB%c^>kA#6AZV=ZqSgymQ`Y5w z6{)B5(%2{SRwBz1CyPORba-@duHQ)>#6xETTU1?D5Dok}>{Nv|c9&*LEuKUF)pVq~ z=W&htoJAejnahn`q}0t!IQx*4*v4`8&Gi2VcK*%ZMN_FW-EH@Y83V-EGTO5w<2g@vD)NpKd(y& aJE8UE**+_hL{Eijh4kenLYnLKIQj?9tlQE6 literal 0 HcmV?d00001 diff --git a/app/lang/English/antispam.php b/app/lang/English/antispam.php new file mode 100644 index 00000000..67a827fb --- /dev/null +++ b/app/lang/English/antispam.php @@ -0,0 +1,23 @@ + 'Are you human or robot?', + 'Robot question' => 'Please respond with a number to the question: %s', + 'Robot info' => 'Checking if this is requested by a real person and not an automated program.', + 'Robot test fail' => 'You answered incorrectly to the "Human or Robot" question.', +); + +$lang_antispam_questions = array( + 'What is two plus two?' => '4', + 'What is four minus one?' => '3', + 'What is three plus two?' => '5', + 'What is two times four?' => '8', + 'What is five minus two?' => '3', + 'What is six plus three?' => '9', + 'What is seven minus one?' => '6', + 'What is eight times two?' => '16', + 'What is six times two?' => '12', + 'What is nine minus seven?' => '2' +); diff --git a/app/lang/English/antispam.po b/app/lang/English/antispam.po new file mode 100644 index 00000000..75fa1d31 --- /dev/null +++ b/app/lang/English/antispam.po @@ -0,0 +1,27 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Robot title" +msgstr "Are you human or robot?" + +msgid "Robot question" +msgstr "Please respond with a number to the question: %s" + +msgid "Robot info" +msgstr "Checking if this is requested by a real person and not an automated program." + +msgid "Robot test fail" +msgstr "You answered incorrectly to the \"Human or Robot\" question." diff --git a/app/lang/English/antispam_questions.mo b/app/lang/English/antispam_questions.mo new file mode 100644 index 0000000000000000000000000000000000000000..f3ff0a71bb65c8f0a8a5a078d57338b2408dd0e7 GIT binary patch literal 765 zcmZ{f&uUXa6vn5u{=06h;6LbM*1|+@ZOUy#3bsWGEd~iH?#ARKnUc(enUh!_!et+! zZ{Z`jbnU88C?X<-BHj4i^rR_L=iV>B`+alf%*ppVb9)Nw7PJ5{G!K1+%5{52sR!UZ zcprQud;va$e=qwi`DgGR@_q4Nz`O9@#2PYxQ_*3{x_#4Elj>Vq{ z{|HZo*HANAH{_%IZ&#rVx-QvG@QQqwn1j$lskdFr+9ge{(`C)BPf7E~uzJ4Hb|cb# z=ZF91VHhP3o~HHQ`AL1E5&7xP*j{!dxm`Wzl^1j)U1(M2mrOLSk^>hf#n}Hz&ziI` z@v5rFutQBYn=SK(VsgRPbXI@WFl&)4!uk7J((=*qOqj|V;L{4?F`+L(x+yA(`OR98$sEiUh9 zQ#2dC8CuSFYP$H~`24z>CZD}CFUeCpo1`A7vjCVAg%v6tE*Nfb#{uVEr)OVgrZv^JvZmFIttWR*WFwQU5)L`8Q zJ31wsDNWJHn&HSbhH@}ohuy*7v02p03M;dC#n@q<2tD#P_~Wb6Q6k`r*JxAm*0HN8a~HR*)OjYI zvDnmqKX*DVnTrM;i;}D1`}` z%WzOH=oTcN=)25+lYj!k@8VPmBqf;>E-{W3D5K?A91QZZ|+z@AMK-Aw9@Gf6bb H<1_pPbWa9S literal 0 HcmV?d00001 diff --git a/app/lang/English/bbeditor.po b/app/lang/English/bbeditor.po new file mode 100644 index 00000000..3deedec3 --- /dev/null +++ b/app/lang/English/bbeditor.po @@ -0,0 +1,63 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "btnBold" +msgstr "Bold" + +msgid "btnItalic" +msgstr "Italic" + +msgid "btnUnderline" +msgstr "Underline" + +msgid "btnColor" +msgstr "Color" + +msgid "btnLeft" +msgstr "Left" + +msgid "btnRight" +msgstr "Right" + +msgid "btnJustify" +msgstr "Justify" + +msgid "btnCenter" +msgstr "Center" + +msgid "btnLink" +msgstr "Insert URL Link" + +msgid "btnPicture" +msgstr "Insert Image" + +msgid "btnList" +msgstr "Unordered List" + +msgid "btnQuote" +msgstr "Quote" + +msgid "btnCode" +msgstr "Code" + +msgid "promptImage" +msgstr "Enter the Image URL:" + +msgid "promptUrl" +msgstr "Enter the URL:" + +msgid "promptQuote" +msgstr "Please enter the username quoted (or leave blank):" diff --git a/app/lang/English/common.mo b/app/lang/English/common.mo new file mode 100644 index 0000000000000000000000000000000000000000..fc08237e6da5b22b1f2d17b687732e820380b425 GIT binary patch literal 9404 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 literal 0 HcmV?d00001 diff --git a/app/lang/English/common.po b/app/lang/English/common.po new file mode 100644 index 00000000..8d5a40cd --- /dev/null +++ b/app/lang/English/common.po @@ -0,0 +1,473 @@ +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "lang_direction" +msgstr "ltr" + +msgid "lang_identifier" +msgstr "en" + +msgid "lang_decimal_point" +msgstr "." + +msgid "lang_thousands_sep" +msgstr "," + +msgid "Bad request" +msgstr "Bad request. The link you followed is incorrect or outdated." + +msgid "No view" +msgstr "You do not have permission to view these forums." + +msgid "No permission" +msgstr "You do not have permission to access this page." + +msgid "Bad referrer" +msgstr "Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that 'Base URL' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the FluxBB documentation." + +msgid "No cookie" +msgstr "You appear to have logged in successfully, however a cookie has not been set. Please check your settings and if applicable, enable cookies for this website." + +msgid "Pun include extension" +msgstr "Unable to process user include %s from template %s. \"%s\" files are not allowed" + +msgid "Pun include directory" +msgstr "Unable to process user include %s from template %s. Directory traversal is not allowed" + +msgid "Pun include error" +msgstr "Unable to process user include %s from template %s. There is no such file in neither the template directory nor in the user include directory" + +msgid "Announcement" +msgstr "Announcement" + +msgid "Options" +msgstr "Options" + +msgid "Submit" +msgstr "Submit" + +msgid "Ban message" +msgstr "You are banned from this forum." + +msgid "Ban message 2" +msgstr "The ban expires at the end of" + +msgid "Ban message 3" +msgstr "The administrator or moderator that banned you left the following message:" + +msgid "Ban message 4" +msgstr "Please direct any inquiries to the forum administrator at" + +msgid "Never" +msgstr "Never" + +msgid "Today" +msgstr "Today" + +msgid "Yesterday" +msgstr "Yesterday" + +msgid "Info" +msgstr "Info" + +msgid "Go back" +msgstr "Go back" + +msgid "Maintenance" +msgstr "Maintenance" + +msgid "Redirecting" +msgstr "Redirecting" + +msgid "Click redirect" +msgstr "Click here if you do not want to wait any longer (or if your browser does not automatically forward you)" + +msgid "on" +msgstr "on" + +msgid "off" +msgstr "off" + +msgid "Invalid email" +msgstr "The email address you entered is invalid." + +msgid "Required" +msgstr "(Required)" + +msgid "required field" +msgstr "is a required field in this form." + +msgid "Last post" +msgstr "Last post" + +msgid "by" +msgstr "by" + +msgid "New posts" +msgstr "New posts" + +msgid "New posts info" +msgstr "Go to the first new post in this topic." + +msgid "Username" +msgstr "Username" + +msgid "Password" +msgstr "Password" + +msgid "Email" +msgstr "Email" + +msgid "Send email" +msgstr "Send email" + +msgid "Moderated by" +msgstr "Moderated by" + +msgid "Registered" +msgstr "Registered" + +msgid "Subject" +msgstr "Subject" + +msgid "Message" +msgstr "Message" + +msgid "Topic" +msgstr "Topic" + +msgid "Forum" +msgstr "Forum" + +msgid "Posts" +msgstr "Posts" + +msgid "Replies" +msgstr "Replies" + +msgid "Pages" +msgstr "Pages:" + +msgid "Page" +msgstr "Page %s" + +msgid "BBCode" +msgstr "BBCode:" + +msgid "url tag" +msgstr "[url] tag:" + +msgid "img tag" +msgstr "[img] tag:" + +msgid "Smilies" +msgstr "Smilies:" + +msgid "and" +msgstr "and" + +msgid "Image link" +msgstr "image" + +msgid "wrote" +msgstr "wrote:" + +msgid "Mailer" +msgstr "%s Mailer" + +msgid "Important information" +msgstr "Important information" + +msgid "Write message legend" +msgstr "Write your message and submit" + +msgid "Previous" +msgstr "Previous" + +msgid "Next" +msgstr "Next" + +msgid "Spacer" +msgstr "…" + +msgid "Title" +msgstr "Title" + +msgid "Member" +msgstr "Member" + +msgid "Moderator" +msgstr "Moderator" + +msgid "Administrator" +msgstr "Administrator" + +msgid "Banned" +msgstr "Banned" + +msgid "Guest" +msgstr "Guest" + +msgid "BBerr pcre" +msgstr "(%s) Message is too long or too complex. Please shorten." + +msgid "BBerr unexpected attribute" +msgstr "Unexpected attribute: \"%1$s\". (No attribute allowed for (%2$s)." + +msgid "BBerr unrecognized attribute" +msgstr "Unrecognized attribute: \"%1$s\", is not valid for (%2$s)." + +msgid "BBerr bbcode attribute" +msgstr "Attribute may NOT contain open or close bbcode tags" + +msgid "BBerr missing attribute" +msgstr "(%1$s) is missing a required attribute." + +msgid "BBerr nesting overflow" +msgstr "(%1$s) tag nesting depth: %2$d exceeds allowable limit: %3$d." + +msgid "BBerr self-nesting" +msgstr "(%s) was opened within itself, this is not allowed." + +msgid "BBerr invalid nesting" +msgstr "(%1$s) was opened within (%2$s), this is not allowed." + +msgid "BBerr invalid parent" +msgstr "(%1$s) cannot be within: (%2$s). Allowable parent tags: %3$s." + +msgid "BBerr Invalid URL name" +msgstr "Invalid URL name: %s" + +msgid "BBerr cannot post URLs" +msgstr "You are not allowed to post links" + +msgid "BBerr Invalid email address" +msgstr "Invalid email address: %s" + +msgid "BBerr Invalid color" +msgstr "Invalid color attribute: %s" + +msgid "BBerr invalid content" +msgstr "Invalid content, (%s) requires specific content." + +msgid "BBerr bad meta data" +msgstr "Unable to retrieve image data from remote url: %s" + +msgid "BBerr no file size" +msgstr "Unable to determine remote file size." + +msgid "BBerr non image" +msgstr "Remote url does not have Content-Type: \"image\"." + +msgid "BBerr bad http response" +msgstr "Bad HTTP response header: \"%s\"" + +msgid "BBerr bad headers" +msgstr "Unable to read remote image http headers." + +msgid "BBerr orphan close" +msgstr "Orphan close tag: (/%s) is missing its open tag." + +msgid "BBerr orphan open" +msgstr "Orphan open tag: (%s) is missing its close tag." + +msgid "BBmsg big image" +msgstr "Big image" + +msgid "BBmsg images disabled" +msgstr "Image display not currently enabled in this context" + +msgid "Index" +msgstr "Index" + +msgid "User list" +msgstr "User list" + +msgid "Rules" +msgstr "Rules" + +msgid "Search" +msgstr "Search" + +msgid "Register" +msgstr "Register" + +msgid "Login" +msgstr "Login" + +msgid "Not logged in" +msgstr "You are not logged in." + +msgid "Profile" +msgstr "Profile" + +msgid "Logout" +msgstr "Logout" + +msgid "Logged in as" +msgstr "Logged in as" + +msgid "Admin" +msgstr "Administration" + +msgid "Last visit" +msgstr "Last visit: %s" + +msgid "Topic searches" +msgstr "Topics:" + +msgid "New posts header" +msgstr "New" + +msgid "Active topics" +msgstr "Active" + +msgid "Unanswered topics" +msgstr "Unanswered" + +msgid "Posted topics" +msgstr "Posted" + +msgid "Show new posts" +msgstr "Find topics with new posts since your last visit." + +msgid "Show active topics" +msgstr "Find topics with recent posts." + +msgid "Show unanswered topics" +msgstr "Find topics with no replies." + +msgid "Show posted topics" +msgstr "Find topics you have posted to." + +msgid "Mark all as read" +msgstr "Mark all topics as read" + +msgid "Mark forum read" +msgstr "Mark this forum as read" + +msgid "Title separator" +msgstr " / " + +msgid "Board footer" +msgstr "Board footer" + +msgid "Jump to" +msgstr "Jump to" + +msgid "Go" +msgstr " Go " + +msgid "Moderate topic" +msgstr "Moderate topic" + +msgid "All" +msgstr "All" + +msgid "Move topic" +msgstr "Move topic" + +msgid "Open topic" +msgstr "Open topic" + +msgid "Close topic" +msgstr "Close topic" + +msgid "Unstick topic" +msgstr "Unstick topic" + +msgid "Stick topic" +msgstr "Stick topic" + +msgid "Moderate forum" +msgstr "Moderate forum" + +msgid "Powered by" +msgstr "Powered by %s" + +msgid "Debug table" +msgstr "Debug information" + +msgid "Querytime" +msgstr "Generated in %1$s seconds, %2$s queries executed" + +msgid "Memory usage" +msgstr "Memory usage: %1$s" + +msgid "Peak usage" +msgstr "(Peak: %1$s)" + +msgid "Query times" +msgstr "Time (s)" + +msgid "Query" +msgstr "Query" + +msgid "Total query time" +msgstr "Total query time: %s" + +msgid "RSS description" +msgstr "The most recent topics at %s." + +msgid "RSS description topic" +msgstr "The most recent posts in %s." + +msgid "RSS reply" +msgstr "Re: " + +msgid "RSS active topics feed" +msgstr "RSS active topics feed" + +msgid "Atom active topics feed" +msgstr "Atom active topics feed" + +msgid "RSS forum feed" +msgstr "RSS forum feed" + +msgid "Atom forum feed" +msgstr "Atom forum feed" + +msgid "RSS topic feed" +msgstr "RSS topic feed" + +msgid "Atom topic feed" +msgstr "Atom topic feed" + +msgid "New reports" +msgstr "There are new reports" + +msgid "Maintenance mode enabled" +msgstr "Maintenance mode is enabled!" + +msgid "Size unit B" +msgstr "%s B" + +msgid "Size unit KiB" +msgstr "%s KiB" + +msgid "Size unit MiB" +msgstr "%s MiB" + +msgid "Size unit GiB" +msgstr "%s GiB" + +msgid "Size unit TiB" +msgstr "%s TiB" + +msgid "Size unit PiB" +msgstr "%s PiB" + +msgid "Size unit EiB" +msgstr "%s EiB" diff --git a/app/lang/English/delete.mo b/app/lang/English/delete.mo new file mode 100644 index 0000000000000000000000000000000000000000..6597bd8e9691f8fca8dfc14430312b9b6eff0bb9 GIT binary patch literal 1003 zcmZuv&2AGh5H=A0f~ZPQ2yvJqAr*laf_exEL8xg{Rcb|4wos5bIGaggw6RxSry&o* zYjES%XW<#(#*xq2O~Rj*Z@-!GWPUvJZKLv8;8cOTKnmOh&Vg{g16P0_zzyJM$(0L2 z+=9Fgz6QQm@fF)Q{{{{L-DrcZaQ%)l^yHGd4o(gSM%1>CKY09%g|K6e#CBPr`mlL%eI3GyWCZt8w8s?<})2!7p6m%dl@@r z@>F^2;B=_WaH57RV^-teBGPl!A8Ye+P^9SfBI|}Psz(P$d#n7l=t;G0jc0?XvkXZ+ zfAWvBRB6+sWTafqzI76JWPRlqvJcqFJ(Jiz9-~3^p7zT^8pNi0D)-s2D{AaoytJoU zRFAfCQ>gN_ow$VCMUDm)NfyJ4M@(T_G_w;LsWV0~HfKZLhS_1hq;o=XWG9|_oZ2Z3 zted;T#o^g_3Oj5FGAIox9_{<O9oe)r&{U@>3Z;zQSQ!igtGEpP4&5tspn9QAH1@9- K0wQHd6p3HzG7?h& literal 0 HcmV?d00001 diff --git a/app/lang/English/delete.po b/app/lang/English/delete.po new file mode 100644 index 00000000..208f9bdc --- /dev/null +++ b/app/lang/English/delete.po @@ -0,0 +1,42 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Delete post" +msgstr "Delete post" + +msgid "Warning" +msgstr "You are about to permanently delete this post." + +msgid "Topic warning" +msgstr "Warning! This is the first post in the topic, the whole topic will be permanently deleted." + +msgid "Delete info" +msgstr "The post you have chosen to delete is set out below for you to review before proceeding." + +msgid "Reply by" +msgstr "Reply by %s - %s" + +msgid "Topic by" +msgstr "Topic started by %s - %s" + +msgid "Delete" +msgstr "Delete" + +msgid "Post del redirect" +msgstr "Post deleted." + +msgid "Topic del redirect" +msgstr "Topic deleted." diff --git a/app/lang/English/forum.mo b/app/lang/English/forum.mo new file mode 100644 index 0000000000000000000000000000000000000000..b0b3a1649e976c79f203ea4e3c0c3d235a87f124 GIT binary patch literal 866 zcmZXR&u$Yj5XKD@3d`U20zw>Ii31=xG!=(vLjW}-C{iO>>=w8IhMFhfeegMW z58MH7g73iy?0}&@0q=lc!SGIkp{@YKorA9<{&k(Phu|6b3j7Ujg6lV`K2O01h_}E{ zzYRVH8(`?0fT8aph?WdkSeU)GJcqq*FV6uOv9QoDSa=_H4*gg=H;yvaDQ14o$HtZg z>pAYqkxQ)_;ihjgo*M0~$sK|dq!Qyi_hzP2Ht;Gvp0mMuJ=@n8Z`pyOQ^%6Lv@#c6 zV+$8^JzIpXwbSI)vGqdptroApY(|MSN0fTe%fta$r;Ltym!zMP-QA6n&qL9+2$2^b zrKgx9C%({$3Z>_%J?Xp{TB%(wy|F0TlX_Ch35g-e;!;QcR%V6LAI8;)(WqwZnXSr0m$*cFXcU6?*5D>^zgnbMP(H%7`| zEE03l(KqplG}&s$#89R@uh$y2H@K-nF)*b~sa?&8c{OAySv8#1OTbd_~&0(pJ;yKl;Wifv+_BU+%xIH`nR_ literal 0 HcmV?d00001 diff --git a/app/lang/English/forum.po b/app/lang/English/forum.po new file mode 100644 index 00000000..4a2b8880 --- /dev/null +++ b/app/lang/English/forum.po @@ -0,0 +1,45 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Post topic" +msgstr "Post new topic" + +msgid "Views" +msgstr "Views" + +msgid "Moved" +msgstr "Moved:" + +msgid "Sticky" +msgstr "Sticky:" + +msgid "Closed" +msgstr "Closed:" + +msgid "Empty forum" +msgstr "Forum is empty." + +msgid "Mod controls" +msgstr "Moderator controls" + +msgid "Is subscribed" +msgstr "You are currently subscribed to this forum" + +msgid "Unsubscribe" +msgstr "Unsubscribe" + +msgid "Subscribe" +msgstr "Subscribe to this forum" diff --git a/app/lang/English/help.mo b/app/lang/English/help.mo new file mode 100644 index 0000000000000000000000000000000000000000..0cc4462a25c7bd1f4e0b9612a952aefa7842a618 GIT binary patch literal 4261 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 Jj@u=n{|{6llYIaH literal 0 HcmV?d00001 diff --git a/app/lang/English/help.po b/app/lang/English/help.po new file mode 100644 index 00000000..2d7c7c52 --- /dev/null +++ b/app/lang/English/help.po @@ -0,0 +1,165 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Help" +msgstr "Help" + +msgid "produces" +msgstr "produces" + +msgid "BBCode" +msgstr "BBCode" + +msgid "BBCode info 1" +msgstr "BBCode is a collection of formatting tags that are used to change the look of text in this forum. BBCode is based on the same principal as, and is very similar to, HTML. Below is a list of all the available BBCodes and instructions on how to use them." + +msgid "BBCode info 2" +msgstr "Administrators have the ability to enable or disable BBCode. You can tell if BBCode is enabled or disabled out in the left margin whenever you post a message or edit your signature." + +msgid "Text style" +msgstr "Text style" + +msgid "Text style info" +msgstr "The following tags change the appearance of text:" + +msgid "Bold text" +msgstr "Bold text" + +msgid "Underlined text" +msgstr "Underlined text" + +msgid "Italic text" +msgstr "Italic text" + +msgid "Strike-through text" +msgstr "Strike-through text" + +msgid "Red text" +msgstr "Red text" + +msgid "Blue text" +msgstr "Blue text" + +msgid "Heading text" +msgstr "Heading text" + +msgid "Deleted text" +msgstr "Deleted text" + +msgid "Inserted text" +msgstr "Inserted text" + +msgid "Emphasised text" +msgstr "Emphasised text" + +msgid "Links and images" +msgstr "Links and images" + +msgid "Links info" +msgstr "You can create links to other documents or to email addresses using the following tags:" + +msgid "This help page" +msgstr "This help page" + +msgid "My email address" +msgstr "My email address" + +msgid "Images info" +msgstr "If you want to display an image you can use the img tag. The text appearing after the \"=\" sign in the opening tag is used for the alt attribute and should be included whenever possible." + +msgid "FeatherBB bbcode test" +msgstr "FeatherBB bbcode test" + +msgid "Test topic" +msgstr "Test topic" + +msgid "Test post" +msgstr "Test post" + +msgid "Test forum" +msgstr "Test forum" + +msgid "Test user" +msgstr "Test user" + +msgid "Quotes" +msgstr "Quotes" + +msgid "Quotes info" +msgstr "If you want to quote someone, you should use the quote tag." + +msgid "Quotes info 2" +msgstr "If you don't want to quote anyone in particular, you can use the quote tag without specifying a name." + +msgid "Quote text" +msgstr "This is the text I want to quote." + +msgid "produces quote box" +msgstr "produces a quote box like this:" + +msgid "quote note" +msgstr "Note: If a username contains the characters [ or ] you can enclose it in quote marks." + +msgid "Code" +msgstr "Code" + +msgid "Code info" +msgstr "When displaying source code you should make sure that you use the code tag. Text displayed with the code tag will use a monospaced font and will not be affected by other tags." + +msgid "Code text" +msgstr "This is some code." + +msgid "produces code box" +msgstr "produces a code box like this:" + +msgid "Nested tags" +msgstr "Nested tags" + +msgid "Nested tags info" +msgstr "BBCode can be nested to create more advanced formatting. For example:" + +msgid "Bold, underlined text" +msgstr "Bold, underlined text" + +msgid "Lists" +msgstr "Lists" + +msgid "List info" +msgstr "To create a list you can use the list tag. You can create 3 types of lists using the list tag." + +msgid "List text 1" +msgstr "Example list item 1." + +msgid "List text 2" +msgstr "Example list item 2." + +msgid "List text 3" +msgstr "Example list item 3." + +msgid "produces list" +msgstr "produces a bulleted list." + +msgid "produces decimal list" +msgstr "produces a numbered list." + +msgid "produces alpha list" +msgstr "produces an alphabetically labelled list." + +msgid "Smilies" +msgstr "Smilies" + +msgid "Smilies info" +msgstr "If you like (and if it is enabled), the forum can convert a series of smilies to images representations of that smiley. This forum recognizes the following smilies and replaces them with images:" diff --git a/app/lang/English/index.mo b/app/lang/English/index.mo new file mode 100644 index 0000000000000000000000000000000000000000..c8ab6fe21fdf82315b9166c34d7355ba818d7dc1 GIT binary patch literal 1064 zcmZvaJC74F5XTK1ujP1GJPIR$#1#$%QA8VpP(pG<%H2iB9-_DcC+p-EcJ0XaavUW! zqCleI3((Nf(NR(G1*rH0lyp$=_j>nUI!mLUXFQ%6d*;`Lxeo;E4CE^0E#xBPAH=Ok zhX@J4K6na@NUMwO{>9Z^thVAhriq*=;I+m1d=bInuM zQ#vytm9s)MtvgNXx2>C!UTe|%LNgd@^<0cC>&NT~A|y(Nv?sXT5W3wChAR>4XsEEW zhun&g!p2s`%fz`>rU5sWMVd>Ka;r3)23$^aJ{2qyJlhqK-s5qW$OjXjVl=8LJ-r_+ z^_RLk`RldYK}Sg|B%*H3kkpD-_SP)riEPsG2G>T|)>_nKjU7LieIhjL%CU+QISpxJ zl-TV;LMmkNlr0J=w6AffM4VV!uQh6SapG0>Smk;wIzC58eUh@NuD?1fK4Vv#6JuSI z$`LSBxTe?k_B*6EOx5$SYPuFv+!b2HMgI$*NLijznP($3wwi_mPyB2gc(gAtMgZCU T;DluV\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Topics" +msgstr "Topics" + +msgid "Link to" +msgstr "Link to:" + +msgid "Empty board" +msgstr "Board is empty." + +msgid "Newest user" +msgstr "Newest registered user: %s" + +msgid "Users online" +msgstr "Registered users online: %s" + +msgid "Guests online" +msgstr "Guests online: %s" + +msgid "No of users" +msgstr "Total number of registered users: %s" + +msgid "No of topics" +msgstr "Total number of topics: %s" + +msgid "No of posts" +msgstr "Total number of posts: %s" + +msgid "Online" +msgstr "Online:" + +msgid "Board info" +msgstr "Board information" + +msgid "Board stats" +msgstr "Board statistics" + +msgid "User info" +msgstr "User information" diff --git a/app/lang/English/install.mo b/app/lang/English/install.mo new file mode 100644 index 0000000000000000000000000000000000000000..1052a5282505b5b50a975dbac3799dc91ed6dd13 GIT binary patch literal 9441 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 R2&?E@J;D%*kPb2YzX2gx-ueIl literal 0 HcmV?d00001 diff --git a/app/lang/English/install.po b/app/lang/English/install.po new file mode 100644 index 00000000..03f10123 --- /dev/null +++ b/app/lang/English/install.po @@ -0,0 +1,291 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Choose install language" +msgstr "Choose the install script language" + +msgid "Choose install language info" +msgstr "The language used for this install script. The default language used for the board itself can be set below." + +msgid "Install language" +msgstr "Install language" + +msgid "Change language" +msgstr "Change language" + +msgid "Already installed" +msgstr "It seems like FeatherBB is already installed. You should go here instead." + +msgid "You are running error" +msgstr "You are running %1$s version %2$s. FeatherBB %3$s requires at least %1$s %4$s to run properly. You must upgrade your %1$s installation before you can continue." + +msgid "My FeatherBB Forum" +msgstr "My FeatherBB Forum" + +msgid "Description" +msgstr "Lighter than a feather." + +msgid "Username 1" +msgstr "Usernames must be at least 2 characters long." + +msgid "Username 2" +msgstr "Usernames must not be more than 25 characters long." + +msgid "Username 3" +msgstr "The username guest is reserved." + +msgid "Username 4" +msgstr "Usernames may not be in the form of an IP address." + +msgid "Username 5" +msgstr "Usernames may not contain all the characters ', \" and [ or ] at once." + +msgid "Username 6" +msgstr "Usernames may not contain any of the text formatting tags (BBCode) that the forum uses." + +msgid "Short password" +msgstr "Passwords must be at least 6 characters long." + +msgid "Passwords not match" +msgstr "Passwords do not match." + +msgid "Wrong email" +msgstr "The administrator email address you entered is invalid." + +msgid "No board title" +msgstr "You must enter a board title." + +msgid "Error default language" +msgstr "The default language chosen doesn't seem to exist." + +msgid "Error default style" +msgstr "The default style chosen doesn't seem to exist." + +msgid "No DB extensions" +msgstr "This PHP environment does not have support for any of the databases that FeatherBB supports. PHP needs to have support for either MySQL, PostgreSQL or SQLite in order for FeatherBB to be installed." + +msgid "Administrator username" +msgstr "Administrator's username" + +msgid "Administrator email" +msgstr "Administrator's email" + +msgid "Board title" +msgstr "Board title" + +msgid "Base URL" +msgstr "The URL (without trailing slash) of your FeatherBB forum. This must be correct." + +msgid "Required field" +msgstr "is a required field in this form." + +msgid "FeatherBB Installation" +msgstr "FeatherBB Installation" + +msgid "Welcome" +msgstr "You are about to install FeatherBB. In order to install FeatherBB, you must complete the form set out below. If you encounter any difficulties with the installation, please refer to the documentation." + +msgid "Install" +msgstr "Install FeatherBB %s" + +msgid "Errors" +msgstr "The following errors need to be corrected:" + +msgid "Database setup" +msgstr "Database setup" + +msgid "Info 1" +msgstr "All information we need to create a connection with your database." + +msgid "Select database" +msgstr "Select your database type" + +msgid "Info 2" +msgstr "Select a database. We support SQLite, MySQL and PostgreSQL." + +msgid "Database type" +msgstr "Database type" + +msgid "Required" +msgstr "(Required)" + +msgid "Database hostname" +msgstr "Enter your database server hostname" + +msgid "Info 3" +msgstr "You should be able to get this info from your web host, if localhost does not work." + +msgid "Database server hostname" +msgstr "Database server hostname" + +msgid "Database enter name" +msgstr "Enter the name of your database" + +msgid "Info 4" +msgstr "The name of the database you want to install FeatherBB on." + +msgid "Database name" +msgstr "Database name" + +msgid "Database enter informations" +msgstr "Enter your database username and password" + +msgid "Database username" +msgstr "Database username" + +msgid "Info 5" +msgstr "Your MySQL username and password (ignore of SQLite)." + +msgid "Database password" +msgstr "Database password" + +msgid "Database enter prefix" +msgstr "Enter database table prefix" + +msgid "Info 6" +msgstr "If you want to run multiple FeatherBB installations in a single database, change this." + +msgid "Table prefix" +msgstr "Table prefix" + +msgid "Administration setup" +msgstr "Administration setup" + +msgid "Info 7" +msgstr "Create the very first account on your board." + +msgid "Info 8" +msgstr "Your username should be between 2 and 25 characters long. Your password must be at least 6 characters long. Remember that passwords are case-sensitive." + +msgid "Password" +msgstr "Password" + +msgid "Confirm password" +msgstr "Confirm password" + +msgid "Board setup" +msgstr "Board setup" + +msgid "Info 11" +msgstr "Settings for your board. You can change this later." + +msgid "General information" +msgstr "Enter your board's title and description." + +msgid "Board description" +msgstr "Board description (supports HTML)" + +msgid "Appearance" +msgstr "Appearance" + +msgid "Info 15" +msgstr "Make your forum yours. Choose a language and a style for your board." + +msgid "Default language" +msgstr "Default language" + +msgid "Default style" +msgstr "Default style" + +msgid "Start install" +msgstr "Start install" + +msgid "DB type not valid" +msgstr "'%s' is not a valid database type" + +msgid "Table prefix error" +msgstr "The table prefix '%s' contains illegal characters or is too long. The prefix may contain the letters a to z, any numbers and the underscore character. They must however not start with a number. The maximum length is 40 characters. Please choose a different prefix" + +msgid "Prefix reserved" +msgstr "The table prefix 'sqlite_' is reserved for use by the SQLite engine. Please choose a different prefix" + +msgid "Existing table error" +msgstr "A table called '%susers' is already present in the database '%s'. This could mean that FeatherBB is already installed or that another piece of software is installed and is occupying one or more of the table names FeatherBB requires. If you want to install multiple copies of FeatherBB in the same database, you must choose a different table prefix" + +msgid "InnoDB off" +msgstr "InnoDB does not seem to be enabled. Please choose a database layer that does not have InnoDB support, or enable InnoDB on your MySQL server" + +msgid "Administrators" +msgstr "Administrators" + +msgid "Administrator" +msgstr "Administrator" + +msgid "Moderators" +msgstr "Moderators" + +msgid "Moderator" +msgstr "Moderator" + +msgid "Guests" +msgstr "Guests" + +msgid "Guest" +msgstr "Guest" + +msgid "Members" +msgstr "Members" + +msgid "Announcement" +msgstr "Enter your announcement here." + +msgid "Rules" +msgstr "Enter your rules here" + +msgid "Maintenance message" +msgstr "The forums are temporarily down for maintenance. Please try again in a few minutes." + +msgid "Test post" +msgstr "Test topic" + +msgid "Message" +msgstr "You have successfully installed FeatherBB, congratulations! Now log in and head over to the administration control panel to configure your forum." + +msgid "Test category" +msgstr "Test category" + +msgid "Test forum" +msgstr "Test forum" + +msgid "This is just a test forum" +msgstr "This is just a test forum" + +msgid "Alert cache" +msgstr "The cache directory is currently not writable! In order for FeatherBB to function properly, the directory %s must be writable by PHP. Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777." + +msgid "Alert avatar" +msgstr "The avatar directory is currently not writable! If you want users to be able to upload their own avatar images you must see to it that the directory %s is writable by PHP. You can later choose to save avatar images in a different directory (see Admin/Options). Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777." + +msgid "Alert upload" +msgstr "File uploads appear to be disallowed on this server! If you want users to be able to upload their own avatar images you must enable the file_uploads configuration setting in PHP. Once file uploads have been enabled, avatar uploads can be enabled in Administration/Options/Features." + +msgid "FeatherBB has been installed" +msgstr "FeatherBB has been installed. To finalize the installation please follow the instructions below." + +msgid "Final instructions" +msgstr "Final instructions" + +msgid "Info 17" +msgstr "To finalize the installation, you need to click on the button below to download a file called config.php. You then need to upload this file to the root directory of your FeatherBB installation." + +msgid "Info 18" +msgstr "Once you have uploaded config.php, FeatherBB will be fully installed! At that point, you may go to the forum index." + +msgid "Download config.php file" +msgstr "Download config.php file" + +msgid "FeatherBB fully installed" +msgstr "FeatherBB has been fully installed! You may now go to the forum index." diff --git a/app/lang/English/login.mo b/app/lang/English/login.mo new file mode 100644 index 0000000000000000000000000000000000000000..cef79b30ccc81bc7fe3d011101c52b6cfabb7959 GIT binary patch literal 1877 zcmZWp%Z?m16g4Egns*`r3nXrkK!B(kIs$3bLlcr=1`V1FtMQ%l!-`RUP}5eeSsr`>zYr3+ZAYO@I9Za>UX|$g~GaZ6Dc9pSY z?AR@aHCJrQ#l&-IJQq=>u8FjopYXihKX<+)_TKrRHf_n2cuyR0D`u)=F;OQ@cq$Vj zgHGMxDNjf2Y04OX(Qt@K+2$k>ZCMsNKl092)CBfBZ9Idz@w(0s@ig?v&f00{U*4lM z?7w8`QlGjn?{x;=eU8|&qcXe6J{V_vbjUhR*k8NW8N5Ht_C2PsXYc69J%TN}!KX%+ zE=|We#BAub4YiKWW6`m;Rii7;hODO>jP#~1r^dcLPA*2H994O%bN%T0!P;u>Mg7=e;9wjGgI5B~AQMkrNnrMt`WTiYq4clUINqXH1 zo}mxbB4kml*aFs^1~u!zG}mzZLLlU!i5zIeW9NBE1?k|jo2{iQ1fHv_cF{s2V8m$N zfDBP|t)DRC!iT0+3Y0__aEPd&xS7HeVn7eK86_Pz&eaz46$NHkkUH=Q^}6@T`D6xVmCoeW zUMgx++!E>HSI=hN&AdS?Qf=%ljTVroYj~3iwMQFO;xb4&M~v)vxg@~8sOMcplni2- zl&mLYs5pAcy7t&^=A$i}#G3AlMK$lbG3bor6_Je_L&DKbbhueep%D+UE+!NWejSmV zR7ACTZAf(L>UNJshszPFQrGB|TttR~n^VcQDB9}ExvA@AM5zfiS|;`0vLOEpBhk+% Z1_Gra)_tJXm)Np;J7^8L&qQyo{sSF\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Wrong user/pass" +msgstr "Wrong username and/or password." + +msgid "Forgotten pass" +msgstr "Forgotten your password?" + +msgid "Login redirect" +msgstr "Logged in successfully." + +msgid "Logout redirect" +msgstr "Logged out." + +msgid "No email match" +msgstr "There is no user registered with the email address" + +msgid "Request pass" +msgstr "Request password" + +msgid "Request pass legend" +msgstr "Enter the email address with which you registered" + +msgid "Request pass info" +msgstr "A new password together with a link to activate the new password will be sent to that address." + +msgid "Not registered" +msgstr "Not registered yet?" + +msgid "Login legend" +msgstr "Enter your username and password below" + +msgid "Remember me" +msgstr "Log me in automatically each time I visit." + +msgid "Login info" +msgstr "If you have not registered or have forgotten your password click on the appropriate link below." + +msgid "New password errors" +msgstr "Password request error" + +msgid "New passworderrors info" +msgstr "The following error needs to be corrected before a new password can be sent:" + +msgid "Forget mail" +msgstr "An email has been sent to the specified address with instructions on how to change your password. If it does not arrive you can contact the forum administrator at" + +msgid "Email flood" +msgstr "This account has already requested a password reset in the past hour. Please wait %s minutes before requesting a new password again." diff --git a/app/lang/English/mail_templates/activate_email.tpl b/app/lang/English/mail_templates/activate_email.tpl new file mode 100644 index 00000000..49095c01 --- /dev/null +++ b/app/lang/English/mail_templates/activate_email.tpl @@ -0,0 +1,12 @@ +Subject: Change email address requested + +Hello , + +You have requested to have a new email address assigned to your account in the discussion forum at . If you didn't request this or if you don't want to change your email address you should just ignore this message. Only if you visit the activation page below will your email address be changed. In order for the activation page to work, you must be logged in to the forum. + +To change your email address, please visit the following page: + + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/activate_password.tpl b/app/lang/English/mail_templates/activate_password.tpl new file mode 100644 index 00000000..b408927b --- /dev/null +++ b/app/lang/English/mail_templates/activate_password.tpl @@ -0,0 +1,14 @@ +Subject: New password requested + +Hello , + +You have requested to have a new password assigned to your account in the discussion forum at . If you didn't request this or if you don't want to change your password you should just ignore this message. Only if you visit the activation page below will your password be changed. + +Your new password is: + +To change your password, please visit the following page: + + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/banned_email_change.tpl b/app/lang/English/mail_templates/banned_email_change.tpl new file mode 100644 index 00000000..276662f3 --- /dev/null +++ b/app/lang/English/mail_templates/banned_email_change.tpl @@ -0,0 +1,9 @@ +Subject: Alert - Banned email detected + +User '' changed to banned email address: + +User profile: + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/banned_email_post.tpl b/app/lang/English/mail_templates/banned_email_post.tpl new file mode 100644 index 00000000..f7e02433 --- /dev/null +++ b/app/lang/English/mail_templates/banned_email_post.tpl @@ -0,0 +1,9 @@ +Subject: Alert - Banned email detected + +User '' posted with banned email address: + +Post URL: + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/banned_email_register.tpl b/app/lang/English/mail_templates/banned_email_register.tpl new file mode 100644 index 00000000..f0085ec4 --- /dev/null +++ b/app/lang/English/mail_templates/banned_email_register.tpl @@ -0,0 +1,9 @@ +Subject: Alert - Banned email detected + +User '' registered with banned email address: + +User profile: + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/dupe_email_change.tpl b/app/lang/English/mail_templates/dupe_email_change.tpl new file mode 100644 index 00000000..583fb246 --- /dev/null +++ b/app/lang/English/mail_templates/dupe_email_change.tpl @@ -0,0 +1,9 @@ +Subject: Alert - Duplicate email detected + +User '' changed to an email address that also belongs to: + +User profile: + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/dupe_email_register.tpl b/app/lang/English/mail_templates/dupe_email_register.tpl new file mode 100644 index 00000000..b1cb3636 --- /dev/null +++ b/app/lang/English/mail_templates/dupe_email_register.tpl @@ -0,0 +1,9 @@ +Subject: Alert - Duplicate email detected + +User '' registered with an email address that also belongs to: + +User profile: + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/form_email.tpl b/app/lang/English/mail_templates/form_email.tpl new file mode 100644 index 00000000..e3e0d5f7 --- /dev/null +++ b/app/lang/English/mail_templates/form_email.tpl @@ -0,0 +1,13 @@ +Subject: + + from has sent you a message. You can reply to by replying to this email. + +The message reads as follows: +----------------------------------------------------------------------- + + + +----------------------------------------------------------------------- + +-- + Mailer diff --git a/app/lang/English/mail_templates/new_reply.tpl b/app/lang/English/mail_templates/new_reply.tpl new file mode 100644 index 00000000..286914ec --- /dev/null +++ b/app/lang/English/mail_templates/new_reply.tpl @@ -0,0 +1,11 @@ +Subject: Reply to topic: '' + + has replied to the topic '' to which you are subscribed. There may be more new replies, but this is the only notification you will receive until you visit the board again. + +The post is located at + +You can unsubscribe by going to + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/new_reply_full.tpl b/app/lang/English/mail_templates/new_reply_full.tpl new file mode 100644 index 00000000..4fbc777e --- /dev/null +++ b/app/lang/English/mail_templates/new_reply_full.tpl @@ -0,0 +1,18 @@ +Subject: Reply to topic: '' + + has replied to the topic '' to which you are subscribed. There may be more new replies, but this is the only notification you will receive until you visit the board again. + +The post is located at + +The message reads as follows: +----------------------------------------------------------------------- + + + +----------------------------------------------------------------------- + +You can unsubscribe by going to + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/new_report.tpl b/app/lang/English/mail_templates/new_report.tpl new file mode 100644 index 00000000..dedb113b --- /dev/null +++ b/app/lang/English/mail_templates/new_report.tpl @@ -0,0 +1,9 @@ +Subject: Report() - '' + +User '' has reported the following message: + +Reason: + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/new_topic.tpl b/app/lang/English/mail_templates/new_topic.tpl new file mode 100644 index 00000000..2bc048b1 --- /dev/null +++ b/app/lang/English/mail_templates/new_topic.tpl @@ -0,0 +1,11 @@ +Subject: New topic in forum: '' + + has posted a new topic '' in the forum '', to which you are subscribed. + +The topic is located at + +You can unsubscribe by going to + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/new_topic_full.tpl b/app/lang/English/mail_templates/new_topic_full.tpl new file mode 100644 index 00000000..f70c7262 --- /dev/null +++ b/app/lang/English/mail_templates/new_topic_full.tpl @@ -0,0 +1,18 @@ +Subject: New topic in forum: '' + + has posted a new topic '' in the forum '', to which you are subscribed. + +The topic is located at + +The message reads as follows: +----------------------------------------------------------------------- + + + +----------------------------------------------------------------------- + +You can unsubscribe by going to + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/new_user.tpl b/app/lang/English/mail_templates/new_user.tpl new file mode 100644 index 00000000..30164e87 --- /dev/null +++ b/app/lang/English/mail_templates/new_user.tpl @@ -0,0 +1,12 @@ +Subject: Alert - New registration + +User '' registered in the forums at + +User profile: + +To administer this account, please visit the following page: + + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/rename.tpl b/app/lang/English/mail_templates/rename.tpl new file mode 100644 index 00000000..3cba50dd --- /dev/null +++ b/app/lang/English/mail_templates/rename.tpl @@ -0,0 +1,12 @@ +Subject: User account renamed + +During an upgrade to the forums at it was determined your username is too similar to an existing user. Your username has been changed accordingly. + +Old username: +New username: + +We apologise for any inconvenience caused. + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/mail_templates/welcome.tpl b/app/lang/English/mail_templates/welcome.tpl new file mode 100644 index 00000000..779a5745 --- /dev/null +++ b/app/lang/English/mail_templates/welcome.tpl @@ -0,0 +1,12 @@ +Subject: Welcome to ! + +Thank you for registering in the forums at . Your account details are: + +Username: +Password: + +Login at to activate the account. + +-- + Mailer +(Do not reply to this message) diff --git a/app/lang/English/misc.mo b/app/lang/English/misc.mo new file mode 100644 index 0000000000000000000000000000000000000000..9a3f7859ab142662a032fa3356390c5918b31c2d GIT binary patch literal 5068 zcmb7`O^h5z701gE3|Rt+O(5aB65`;EGqYZQ#q8Sg$J!e#y!I-)i9rFOo|)R+#xvbR zcaJxVkU3xhhbRI>;1VIYAS8r@l0!}*7myGVAcRm3AS8qY95_Hu1cBi9ud1Gz-L*;F zn(E(Fb$z^g@6~(thuyb4V|X5+ypOW{24fQV)GfSt?$~L}-Eddr1MnTx=ir;*C3q+N z6nrNvBEJ&bza9BJo)i+sCj-5HSX{5ZE)wC!+dwbcTt~&`hF6=6+RBtuLU)} zAM4j*{p(Quz8Co%d^`0YL+#@ia5wxjl>Dzk$@5>Rb#8l$G5pNEyrhDCQ1k7FbTP-^ z1Uv(^{>Avc4W)-X)~~@ksDCx`yKoov=isgICs1EX9f^ZX7YZg0kzgQ0u$^QHgm8YTVDE&!?gG z^$eVXzlNWNJ20~3N}&4pp!$CvYMw8`_rkA1>EVY^{hx;i;7d^c@e0)VTXEWZ;N9>j zoPmgHO86moE%N&ixA9}u?*WP)#iSDy*`|KHJ*e!Z5U#vmN+)a~^nUuaNdgEJJ=U_L_8BfWF{%rVLwWrp$~Wk02Ua1--EihOJ9Gfl%o zTN-5x`Q^P7*-btrf72tonp54vC7lgh4q9cqNL#LBSMp-eyWWQ?@271umt(cVLE6#g0MXFf*_uAVk&bzR4Nl>OK=TgmP8*#86Oyi2aQ z(L@VLaXDCvwxqM=!VCyS0rp|A-@t{wa(Rmb^V86<*~ox6Zmep zN;&p@%=Q=Dy4=n0{z4x2UMpM;;Br1>oUj+rp4)Doty1sj z1&7CbOsr^^^@rhHOa7FZB~C|F6b4vY%hwSM0SBckO0%Ss5#I4A_?Ga$cIfe@(ezc? zzPxo)OSL*i`&^EKZ!y+mS$Vw)Xx=`>r6T2^dq+2m-9eFb8*=?}#%6tAEsr0Vwc+pa zy_vn|xSgJyomeb#IZESPr|~#@P4jHV&by?-KBrGlEM8o0%;5|b?Ts^d?Tn?Z@u<6! zs%zbJJ}Illa*vW1PUn+sb-)2_EW4yPHlsb3bb4uaawRO$YBlp>_2G$ya|>rj z>rXfLPY|jqPIY5>qtBw1d$OA9cat=mwe7W}C|z~@vE}*3(NRCGzT%3;*{q#+(rk6c z9&M%7P>>nCcH-lWM_i`UCm9!WLTF{Dn@5|6_!6p(rF>Ad-CS5>#)d`AC-Q+!@P}l3 zG{=XlwX_UzqWOAy`ZLfp^NQ@=hip59{FWOYLQQ9VM4k#Eycu)AvT}q~bab7j@wIYT zUF>o+93D9q{4o>$u&LdL|E-OFF`KW9LI#8Io#%sYcR>gYCO2H2Dc%qdj0 zfy#UY*Pr!-0F9=?UQpQBPW>_`%%XBk?7+@8r;wYP(CfE6Q7b2`$&^tG$|y*XRJOIj z0moH_2JAg3v5R;LlTN1~&Diy{+qKvxW+gJXx49BUJME`g znKDGUz2zjgnr^6+w8boN=vHfkzQ#=8X^q#85=7NAlaZ7wRqkBKEG~G zx$!)B2WQ5GO}RG2dL@jlUR>wVn!1LCgC-yM6OD3iy+-&lo@^B*dIL0tOJIt`#-tmf z!lo|-aM^9_OFUz^WpJcCb0Iivj|AJ+L4Ty{*O<&73m;dssTfwKax(0c4=4X;c(p#f z2uK>Q-q2mH=5MQYLW+lDdqBKFFE5pMJ%v|4TW$F?u8h zNxK+}hjlev3+jVkTcupn-5}_U`8S4Vrtr6hVL~Q0_ z?PHxkrM_p(Ox9mtB%4=bytVXooA6P{4\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Mark read redirect" +msgstr "All topics and forums have been marked as read." + +msgid "Mark forum read redirect" +msgstr "All topics in the specified forum have been marked as read." + +msgid "Form email disabled" +msgstr "The user you are trying to send an email to has disabled form email." + +msgid "No email subject" +msgstr "You must enter a subject." + +msgid "No email message" +msgstr "You must enter a message." + +msgid "Too long email message" +msgstr "Messages cannot be longer than 65535 characters (64 KB)." + +msgid "Email flood" +msgstr "At least %s seconds have to pass between sent emails. Please wait %s seconds and try sending again." + +msgid "Email sent redirect" +msgstr "Email sent." + +msgid "Send email to" +msgstr "Send email to" + +msgid "Email subject" +msgstr "Subject" + +msgid "Email message" +msgstr "Message" + +msgid "Email disclosure note" +msgstr "Please note that by using this form, your email address will be disclosed to the recipient." + +msgid "Write email" +msgstr "Write and submit your email message" + +msgid "No reason" +msgstr "You must enter a reason." + +msgid "Reason too long" +msgstr "Your message must be under 65535 bytes (~64kb)." + +msgid "Report flood" +msgstr "At least %s seconds have to pass between reports. Please wait %s seconds and try sending again." + +msgid "Report redirect" +msgstr "Post reported." + +msgid "Report post" +msgstr "Report post" + +msgid "Reason" +msgstr "Reason" + +msgid "Reason desc" +msgstr "Please enter a short reason why you are reporting this post" + +msgid "Already subscribed topic" +msgstr "You are already subscribed to this topic." + +msgid "Already subscribed forum" +msgstr "You are already subscribed to this forum." + +msgid "Subscribe redirect" +msgstr "Your subscription has been added." + +msgid "Not subscribed topic" +msgstr "You are not subscribed to this topic." + +msgid "Not subscribed forum" +msgstr "You are not subscribed to this forum." + +msgid "Unsubscribe redirect" +msgstr "Your subscription has been removed." + +msgid "Moderate" +msgstr "Moderate" + +msgid "Select" +msgstr "Select" + +msgid "Move" +msgstr "Move" + +msgid "Split" +msgstr "Split" + +msgid "Delete" +msgstr "Delete" + +msgid "Merge" +msgstr "Merge" + +msgid "Open" +msgstr "Open" + +msgid "Close" +msgstr "Close" + +msgid "Move topic" +msgstr "Move topic" + +msgid "Move topics" +msgstr "Move topics" + +msgid "Move legend" +msgstr "Select destination of move" + +msgid "Move to" +msgstr "Move to" + +msgid "Nowhere to move" +msgstr "There are no forums into which you can move topics." + +msgid "Leave redirect" +msgstr "Leave redirect topic(s)" + +msgid "Move topic redirect" +msgstr "Topic moved." + +msgid "Move topics redirect" +msgstr "Topics moved." + +msgid "Confirm delete legend" +msgstr "Please confirm deletion" + +msgid "Delete topics" +msgstr "Delete topics" + +msgid "Delete topics comply" +msgstr "Are you sure you want to delete the selected topics?" + +msgid "Delete topics redirect" +msgstr "Topics deleted." + +msgid "Open topic redirect" +msgstr "Topic opened." + +msgid "Open topics redirect" +msgstr "Topics opened." + +msgid "Close topic redirect" +msgstr "Topic closed." + +msgid "Close topics redirect" +msgstr "Topics closed." + +msgid "No topics selected" +msgstr "You must select at least one topic for move/delete/open/close." + +msgid "Not enough topics selected" +msgstr "You must select at least two topics for merge." + +msgid "Stick topic redirect" +msgstr "Topic sticked." + +msgid "Unstick topic redirect" +msgstr "Topic unsticked." + +msgid "Merge topics" +msgstr "Merge topics" + +msgid "Merge topics redirect" +msgstr "Topics merged." + +msgid "Confirm merge legend" +msgstr "Please confirm merge" + +msgid "New subject" +msgstr "New subject" + +msgid "Confirm split legend" +msgstr "Please confirm split of selected posts and select destination of move." + +msgid "Split posts" +msgstr "Split posts" + +msgid "Split posts comply" +msgstr "Are you sure you want to split the selected posts?" + +msgid "Split posts redirect" +msgstr "Posts have been split." + +msgid "Delete posts" +msgstr "Delete posts" + +msgid "Cannot select first" +msgstr "First post cannot be selected for split/delete." + +msgid "Delete posts comply" +msgstr "Are you sure you want to delete the selected posts?" + +msgid "Delete posts redirect" +msgstr "Posts deleted." + +msgid "No posts selected" +msgstr "You must select at least one post for split/delete." + +msgid "Host info 1" +msgstr "The IP address is: %s" + +msgid "Host info 2" +msgstr "The host name is: %s" + +msgid "Show more users" +msgstr "Show more users for this IP" diff --git a/app/lang/English/post.mo b/app/lang/English/post.mo new file mode 100644 index 0000000000000000000000000000000000000000..58fde8300077007e4b07e61d358b4877b2e39f52 GIT binary patch literal 2395 zcma)-O=u)V6vta#bsax<*N^p+=fYwlcAJP`oESBUNeu4B!Hg0S!J6qeGbPo`beS-f9gh95kyTpmR?foe<#UIY1!vHT8rJ>(C-6W~YSwczJq1N;iS4*X#( z{|w#%`M0rr{EAvW1&Uq*%Kl|g>~4WKfP3ThJ}CAAcs2MsDEe=KH-hhj;@^j$?EhrU zFF^VJw_por`w6@s^1_u-6oW5;vhPihz;{8h^C|c-_$Bx$SfwzI*foH*A zLGk+poR-`@0gh7^orXMlWRJu}Vu2$^x8S`QFWjyCLK>=b1696+_;mG68H>-7FL~tL zl4J2t&Ww;$X8xsd6l~%+DLVv!upvJW!z_z z)=Q34?JC8*2qRLxz>a)yx`;M2Yg3Gs3(;1|K9Es4M^EdN$>%!L?4un!HGMD~f2GUD zTc=H5v?l%>4F93kf|sPoagmLpN?_-#^Rr{prf2I3!$S(T(A`=r9Peu$*245ut?}%x z&e#OPVMDYV)JXjCU8g&oM!ShOO(!Pqx5Xe_tW9O5Q(3%eUGAG?ic0h= z4=qzYT$wX;?+Pu>FE?7wN;=~0G=71d*VZ&?lT{e7TU%?io^8kL4kG5`r&Qo3VJ?0S zW<+%|bx!#Zx1BORQ^7hYol~Y?BJXjVRX+1YdQ7FcHc$3y6P-?CUH|dM`R(%?2lf|} zg~qxy0fC9zqXI?)UkncxnbKyNx&!4rhn45soAJ_to>=d(i#JTyrpRrRmO4629cdDq z#$LR|hF$Gr%SzB`Fv4Og94W5uS*+`092bH08 z0}9k9k~9hEC2AkK1qgd}CrB9-c-hI}AkJ(0sOYNj$|6M;(j?jrZf>rTcL1}fkOQv+2L2uw;H?yAx=anet)#Heb-E0_Ae zP};yWRGw1pyUL|A>aZuuxw@$HG9Rm^T!aDQvd>u(tpLfm)mS~GP1Yl;1geAC9rG*@m>LU?Jv?JGl2bRzw26i}U0t9EZM1^|R)hET_ zL-e98DKFs+3JhD+2|3RFxkrw)20>muh$124?M6^>S3#Y9m!Wn`L$=C#hQ*8Ad*lj1I#|CylqtF9Iipg51`9 zT<(DANE|tB)BQRFJYKoMtCl56iG+%8>y_$DDV-t_K@Nu3su`uh>G0t*=9>~IKKP` K^|bS0KKdIOKcS%j literal 0 HcmV?d00001 diff --git a/app/lang/English/post.po b/app/lang/English/post.po new file mode 100644 index 00000000..5472cbc5 --- /dev/null +++ b/app/lang/English/post.po @@ -0,0 +1,93 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "No subject" +msgstr "Topics must contain a subject." + +msgid "No subject after censoring" +msgstr "Topics must contain a subject. After applying censoring filters, your subject was empty." + +msgid "Too long subject" +msgstr "Subjects cannot be longer than 70 characters." + +msgid "No message" +msgstr "You must enter a message." + +msgid "No message after censoring" +msgstr "You must enter a message. After applying censoring filters, your message was empty." + +msgid "Too long message" +msgstr "Posts cannot be longer than %s bytes." + +msgid "All caps subject" +msgstr "Subjects cannot contain only capital letters." + +msgid "All caps message" +msgstr "Posts cannot contain only capital letters." + +msgid "Empty after strip" +msgstr "It seems your post consisted of empty BBCodes only. It is possible that this happened because e.g. the innermost quote was discarded because of the maximum quote depth level." + +msgid "Post errors" +msgstr "Post errors" + +msgid "Post errors info" +msgstr "The following errors need to be corrected before the message can be posted:" + +msgid "Post preview" +msgstr "Post preview" + +msgid "Guest name" +msgstr "Name" + +msgid "Post redirect" +msgstr "Post entered." + +msgid "Post a reply" +msgstr "Post a reply" + +msgid "Post new topic" +msgstr "Post new topic" + +msgid "Hide smilies" +msgstr "Never show smilies as icons for this post" + +msgid "Subscribe" +msgstr "Subscribe to this topic" + +msgid "Stay subscribed" +msgstr "Stay subscribed to this topic" + +msgid "Topic review" +msgstr "Topic review (newest first)" + +msgid "Flood start" +msgstr "At least %s seconds have to pass between posts. Please wait %s seconds and try posting again." + +msgid "Preview" +msgstr "Preview" + +msgid "Edit post legend" +msgstr "Edit the post and submit changes" + +msgid "Silent edit" +msgstr "Silent edit (don't display \"Edited by ...\" in topic view)" + +msgid "Edit post" +msgstr "Edit post" + +msgid "Edit redirect" +msgstr "Post updated." diff --git a/app/lang/English/prof_reg.mo b/app/lang/English/prof_reg.mo new file mode 100644 index 0000000000000000000000000000000000000000..c20bbbd19e3f9ba8d8b6e49836bffc40de556cb9 GIT binary patch literal 5891 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 L%k^o>NbG+B>1OB{ literal 0 HcmV?d00001 diff --git a/app/lang/English/prof_reg.po b/app/lang/English/prof_reg.po new file mode 100644 index 00000000..9409aa33 --- /dev/null +++ b/app/lang/English/prof_reg.po @@ -0,0 +1,225 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Email legend" +msgstr "Enter a valid email address" + +msgid "Email legend 2" +msgstr "Enter and confirm a valid email address" + +msgid "Localisation legend" +msgstr "Set your localisation options" + +msgid "Time zone" +msgstr "Time zone" + +msgid "Time zone info" +msgstr "For the forum to display times correctly you must select your local time zone. If Daylight Savings Time is in effect you should also check the option provided which will advance times by 1 hour." + +msgid "DST" +msgstr "Daylight Savings Time is in effect (advance time by 1 hour)." + +msgid "Time format" +msgstr "Time format" + +msgid "Date format" +msgstr "Date format" + +msgid "Default" +msgstr "Default" + +msgid "Language" +msgstr "Language" + +msgid "Email setting info" +msgstr "Select whether you want your email address to be viewable to other users or not and if you want other users to be able to send you email via the forum (form email) or not." + +msgid "Email setting 1" +msgstr "Display your email address to other users." + +msgid "Email setting 2" +msgstr "Hide your email address but allow form email." + +msgid "Email setting 3" +msgstr "Hide your email address and disallow form email." + +msgid "Privacy options legend" +msgstr "Set your privacy options" + +msgid "Confirm pass" +msgstr "Confirm password" + +msgid "Username too short" +msgstr "Usernames must be at least 2 characters long. Please choose another (longer) username." + +msgid "Username too long" +msgstr "Usernames must not be more than 25 characters long. Please choose another (shorter) username." + +msgid "Username guest" +msgstr "The username guest is reserved. Please choose another username." + +msgid "Username IP" +msgstr "Usernames may not be in the form of an IP address. Please choose another username." + +msgid "Username reserved chars" +msgstr "Usernames may not contain all the characters ', \" and [ or ] at once. Please choose another username." + +msgid "Username BBCode" +msgstr "Usernames may not contain any of the text formatting tags (BBCode) that the forum uses. Please choose another username." + +msgid "Banned username" +msgstr "The username you entered is banned in this forum. Please choose another username." + +msgid "Pass too short" +msgstr "Passwords must be at least 6 characters long. Please choose another (longer) password." + +msgid "Pass not match" +msgstr "Passwords do not match." + +msgid "Banned email" +msgstr "The email address you entered is banned in this forum. Please choose another email address." + +msgid "Dupe email" +msgstr "Someone else is already registered with that email address. Please choose another email address." + +msgid "Sig too long" +msgstr "Signatures cannot be longer than %1$s characters. Please reduce your signature by %2$s characters." + +msgid "Sig too many lines" +msgstr "Signatures cannot have more than %s lines." + +msgid "Bad ICQ" +msgstr "You entered an invalid ICQ UIN. Please go back and correct." + +msgid "UTC-12:00" +msgstr "(UTC-12:00) International Date Line West" + +msgid "UTC-11:00" +msgstr "(UTC-11:00) Niue, Samoa" + +msgid "UTC-10:00" +msgstr "(UTC-10:00) Hawaii-Aleutian, Cook Island" + +msgid "UTC-09:30" +msgstr "(UTC-09:30) Marquesas Islands" + +msgid "UTC-09:00" +msgstr "(UTC-09:00) Alaska, Gambier Island" + +msgid "UTC-08:30" +msgstr "(UTC-08:30) Pitcairn Islands" + +msgid "UTC-08:00" +msgstr "(UTC-08:00) Pacific" + +msgid "UTC-07:00" +msgstr "(UTC-07:00) Mountain" + +msgid "UTC-06:00" +msgstr "(UTC-06:00) Central" + +msgid "UTC-05:00" +msgstr "(UTC-05:00) Eastern" + +msgid "UTC-04:00" +msgstr "(UTC-04:00) Atlantic" + +msgid "UTC-03:30" +msgstr "(UTC-03:30) Newfoundland" + +msgid "UTC-03:00" +msgstr "(UTC-03:00) Amazon, Central Greenland" + +msgid "UTC-02:00" +msgstr "(UTC-02:00) Mid-Atlantic" + +msgid "UTC-01:00" +msgstr "(UTC-01:00) Azores, Cape Verde, Eastern Greenland" + +msgid "UTC" +msgstr "(UTC) Western European, Greenwich" + +msgid "UTC+01:00" +msgstr "(UTC+01:00) Central European, West African" + +msgid "UTC+02:00" +msgstr "(UTC+02:00) Eastern European, Central African" + +msgid "UTC+03:00" +msgstr "(UTC+03:00) Eastern African" + +msgid "UTC+03:30" +msgstr "(UTC+03:30) Iran" + +msgid "UTC+04:00" +msgstr "(UTC+04:00) Moscow, Gulf, Samara" + +msgid "UTC+04:30" +msgstr "(UTC+04:30) Afghanistan" + +msgid "UTC+05:00" +msgstr "(UTC+05:00) Pakistan" + +msgid "UTC+05:30" +msgstr "(UTC+05:30) India, Sri Lanka" + +msgid "UTC+05:45" +msgstr "(UTC+05:45) Nepal" + +msgid "UTC+06:00" +msgstr "(UTC+06:00) Bangladesh, Bhutan, Yekaterinburg" + +msgid "UTC+06:30" +msgstr "(UTC+06:30) Cocos Islands, Myanmar" + +msgid "UTC+07:00" +msgstr "(UTC+07:00) Indochina, Novosibirsk" + +msgid "UTC+08:00" +msgstr "(UTC+08:00) Greater China, Australian Western, Krasnoyarsk" + +msgid "UTC+08:45" +msgstr "(UTC+08:45) Southeastern Western Australia" + +msgid "UTC+09:00" +msgstr "(UTC+09:00) Japan, Korea, Chita, Irkutsk" + +msgid "UTC+09:30" +msgstr "(UTC+09:30) Australian Central" + +msgid "UTC+10:00" +msgstr "(UTC+10:00) Australian Eastern" + +msgid "UTC+10:30" +msgstr "(UTC+10:30) Lord Howe" + +msgid "UTC+11:00" +msgstr "(UTC+11:00) Solomon Island, Vladivostok" + +msgid "UTC+11:30" +msgstr "(UTC+11:30) Norfolk Island" + +msgid "UTC+12:00" +msgstr "(UTC+12:00) New Zealand, Fiji, Magadan" + +msgid "UTC+12:45" +msgstr "(UTC+12:45) Chatham Islands" + +msgid "UTC+13:00" +msgstr "(UTC+13:00) Tonga, Phoenix Islands, Kamchatka" + +msgid "UTC+14:00" +msgstr "(UTC+14:00) Line Islands" diff --git a/app/lang/English/profile.mo b/app/lang/English/profile.mo new file mode 100644 index 0000000000000000000000000000000000000000..59c8f7e636ece29c768e9fb9322345b6a5d0afad GIT binary patch literal 9585 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 Wx5GrZMcnV?pYc-s!(#42@&5r|czkyN literal 0 HcmV?d00001 diff --git a/app/lang/English/profile.po b/app/lang/English/profile.po new file mode 100644 index 00000000..bbd7f00b --- /dev/null +++ b/app/lang/English/profile.po @@ -0,0 +1,378 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Profile menu" +msgstr "Profile menu" + +msgid "Section essentials" +msgstr "Essentials" + +msgid "Section personal" +msgstr "Personal" + +msgid "Section messaging" +msgstr "Messaging" + +msgid "Section personality" +msgstr "Personality" + +msgid "Section display" +msgstr "Display" + +msgid "Section privacy" +msgstr "Privacy" + +msgid "Section admin" +msgstr "Administration" + +msgid "Username and pass legend" +msgstr "Enter your username and password" + +msgid "Personal details legend" +msgstr "Enter your personal details" + +msgid "Contact details legend" +msgstr "Enter your messaging details" + +msgid "User activity" +msgstr "User activity" + +msgid "Paginate info" +msgstr "Enter the number of topics and posts you wish to view on each page." + +msgid "Pass key bad" +msgstr "The specified password activation key was incorrect or has expired. Please re-request a new password. If that fails, contact the forum administrator at" + +msgid "Pass updated" +msgstr "Your password has been updated. You can now login with your new password." + +msgid "Pass updated redirect" +msgstr "Password updated." + +msgid "Wrong pass" +msgstr "Wrong old password." + +msgid "Change pass" +msgstr "Change password" + +msgid "Change pass legend" +msgstr "Enter and confirm your new password" + +msgid "Old pass" +msgstr "Old password" + +msgid "New pass" +msgstr "New password" + +msgid "Confirm new pass" +msgstr "Confirm new password" + +msgid "Pass info" +msgstr "Passwords must be at least 6 characters long. Passwords are case sensitive." + +msgid "Email key bad" +msgstr "The specified email activation key was incorrect or has expired. Please re-request change of email address. If that fails, contact the forum administrator at" + +msgid "Email updated" +msgstr "Your email address has been updated." + +msgid "Activate email sent" +msgstr "An email has been sent to the specified address with instructions on how to activate the new email address. If it doesn't arrive you can contact the forum administrator at" + +msgid "Email legend" +msgstr "Enter your new email address" + +msgid "Email instructions" +msgstr "An email will be sent to your new address with an activation link. You must click the link in the email you receive to activate the new address." + +msgid "Change email" +msgstr "Change email address" + +msgid "New email" +msgstr "New email" + +msgid "Avatars disabled" +msgstr "The administrator has disabled avatar support." + +msgid "Too large ini" +msgstr "The selected file was too large to upload. The server didn't allow the upload." + +msgid "Partial upload" +msgstr "The selected file was only partially uploaded. Please try again." + +msgid "No tmp directory" +msgstr "PHP was unable to save the uploaded file to a temporary location." + +msgid "No file" +msgstr "You did not select a file for upload." + +msgid "Bad type" +msgstr "The file you tried to upload is not of an allowed type. Allowed types are gif, jpeg and png." + +msgid "Too wide or high" +msgstr "The file you tried to upload is wider and/or higher than the maximum allowed" + +msgid "Too large" +msgstr "The file you tried to upload is larger than the maximum allowed" + +msgid "pixels" +msgstr "pixels" + +msgid "bytes" +msgstr "bytes" + +msgid "Move failed" +msgstr "The server was unable to save the uploaded file. Please contact the forum administrator at" + +msgid "Unknown failure" +msgstr "An unknown error occurred. Please try again." + +msgid "Avatar upload redirect" +msgstr "Avatar uploaded." + +msgid "Avatar deleted redirect" +msgstr "Avatar deleted." + +msgid "Avatar desc" +msgstr "An avatar is a small image that will be displayed under your username in your posts. It must not be any bigger than" + +msgid "Upload avatar" +msgstr "Upload avatar" + +msgid "Upload avatar legend" +msgstr "Enter an avatar file to upload" + +msgid "Delete avatar" +msgstr "Delete avatar" + +msgid "File" +msgstr "File" + +msgid "Upload" +msgstr "Upload" + +msgid "Forbidden title" +msgstr "The title you entered contains a forbidden word. You must choose a different title." + +msgid "Profile redirect" +msgstr "Profile updated." + +msgid "Users profile" +msgstr "%s's profile" + +msgid "Username info" +msgstr "Username: %s" + +msgid "Email info" +msgstr "Email: %s" + +msgid "Posts info" +msgstr "Posts: %s" + +msgid "Registered info" +msgstr "Registered: %s" + +msgid "Last post info" +msgstr "Last post: %s" + +msgid "Last visit info" +msgstr "Last visit: %s" + +msgid "Show posts" +msgstr "Show all posts" + +msgid "Show topics" +msgstr "Show all topics" + +msgid "Show subscriptions" +msgstr "Show all subscriptions" + +msgid "Realname" +msgstr "Real name" + +msgid "Location" +msgstr "Location" + +msgid "Website" +msgstr "Website" + +msgid "Invalid website URL" +msgstr "The website URL you entered is invalid." + +msgid "Website not allowed" +msgstr "You are not allowed to add a website to your profile yet." + +msgid "Jabber" +msgstr "Jabber" + +msgid "ICQ" +msgstr "ICQ" + +msgid "MSN" +msgstr "Microsoft Account" + +msgid "AOL IM" +msgstr "AOL IM" + +msgid "Yahoo" +msgstr "Yahoo! Messenger" + +msgid "Avatar" +msgstr "Avatar" + +msgid "Signature" +msgstr "Signature" + +msgid "Sig max size" +msgstr "Max length: %s characters / Max lines: %s" + +msgid "Avatar legend" +msgstr "Set your avatar display options" + +msgid "Avatar info" +msgstr "An avatar is a small image that will be displayed with all your posts. You can upload an avatar by clicking the link below." + +msgid "Change avatar" +msgstr "Change avatar" + +msgid "Signature legend" +msgstr "Compose your signature" + +msgid "Signature info" +msgstr "A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature." + +msgid "Sig preview" +msgstr "Current signature preview:" + +msgid "No sig" +msgstr "No signature currently stored in profile." + +msgid "Signature quote/code/list/h" +msgstr "The quote, code, list, and heading BBCodes are not allowed in signatures." + +msgid "Topics per page" +msgstr "Topics" + +msgid "Posts per page" +msgstr "Posts" + +msgid "Leave blank" +msgstr "Leave blank to use forum default." + +msgid "Subscription legend" +msgstr "Set your subscription options" + +msgid "Notify full" +msgstr "Include a plain text version of new posts in subscription notification emails." + +msgid "Auto notify full" +msgstr "Automatically subscribe to every topic you post in." + +msgid "Show smilies" +msgstr "Show smilies as graphic icons." + +msgid "Show images" +msgstr "Show images in posts." + +msgid "Show images sigs" +msgstr "Show images in user signatures." + +msgid "Show avatars" +msgstr "Show user avatars in posts." + +msgid "Show sigs" +msgstr "Show user signatures." + +msgid "Style legend" +msgstr "Select your preferred style" + +msgid "Styles" +msgstr "Styles" + +msgid "Admin note" +msgstr "Admin note" + +msgid "Pagination legend" +msgstr "Enter your pagination options" + +msgid "Post display legend" +msgstr "Set your options for viewing posts" + +msgid "Post display info" +msgstr "If you are on a slow connection, disabling these options, particularly showing images in posts and signatures, will make pages load faster." + +msgid "Instructions" +msgstr "When you update your profile, you will be redirected back to this page." + +msgid "Group membership legend" +msgstr "Choose user group" + +msgid "Save" +msgstr "Save" + +msgid "Set mods legend" +msgstr "Set moderator access" + +msgid "Moderator in info" +msgstr "Choose which forums this user should be allowed to moderate. Note: This only applies to moderators. Administrators always have full permissions in all forums." + +msgid "Update forums" +msgstr "Update forums" + +msgid "Delete ban legend" +msgstr "Delete (administrators only) or ban user" + +msgid "Delete user" +msgstr "Delete user" + +msgid "Ban user" +msgstr "Ban user" + +msgid "Confirm delete legend" +msgstr "Important: read before deleting user" + +msgid "Confirm delete user" +msgstr "Confirm delete user" + +msgid "Confirmation info" +msgstr "Please confirm that you want to delete the user" + +msgid "Delete warning" +msgstr "Warning! Deleted users and/or posts cannot be restored. If you choose not to delete the posts made by this user, the posts can only be deleted manually at a later time." + +msgid "Delete posts" +msgstr "Delete any posts and topics this user has made." + +msgid "Delete" +msgstr "Delete" + +msgid "User delete redirect" +msgstr "User deleted." + +msgid "User promote redirect" +msgstr "User promoted." + +msgid "Group membership redirect" +msgstr "Group membership saved." + +msgid "Update forums redirect" +msgstr "Forum moderator rights updated." + +msgid "Ban redirect" +msgstr "Redirecting …" + +msgid "No delete admin message" +msgstr "Administrators cannot be deleted. In order to delete this user, you must first move him/her to a different user group." diff --git a/app/lang/English/register.mo b/app/lang/English/register.mo new file mode 100644 index 0000000000000000000000000000000000000000..f076b7ec197bfa69d341ed5f2390572d16f257ad GIT binary patch literal 3064 zcma)8O>Z1U5FH?VnGhg+BnKiD5+8|_nZ#BCW`iSQCq@d7^T*)> zpCx#X;(Z+N?|7fW`^9begXi?^NpdG}5qKByIpF=k^WFGzhg-k}%)beI0LZ}mfNh5# z0Pn^4<8J&p@L`O<0v-f@+kO8Lcn`)uci(>n3b((2hk*y~i0h94#md5r089_#?T1Yrz&E#7OueOgj÷`DxJcd}lEEz=P)iQ&`X+gioJ!mu!z=zK z7fQ#RtSOVTPS&g$R<0(lRi%@Q>~mU-u#{YqIjYRic0Y}6s8&rrO4hAwYjUk-pS)tp z@Pr(fKG{^>#~tC9=8{d3T;r1RU=OQ`%5mPrIa`l4Hyj3$0hU(2VJB1g;Z##uL+qS& ze!sbBY|rAMwiY&p8+8P(dv-?EOgS5GU9vMS+A+i7z2l|%xZA&}Tc>miuWR2UGY&() zvUHB(&z0kbo>-y96XzB-oqZerr5i>18aog6Jz8hgjM%NNE^J=yr)v&F%%>Ms!#%=W zdX2X$Svs4#tbCL9oibjl#yTvztW4RelG8q`de@2cf-36Dyf};|27}DH^8CV;jVqVt z_7}6$3rKXs2B%KPFxv3D&8e|gl{rWGNIB2V%Ju$wx;$Se)`#rUOD4BPWy&5c52|K| zNRQYoyq>;Bnl0B)krV^AI zn%b6Bo?{6$mK2$`9stKyya@5o2oD znq2ZB!p(JCFkv;t%~P=v+>$d37PZpY`o^Ec$XBHiKCnJ9B%?q8`&A z1#WelkEpf|6gGyzp^@5#Ni(H)TK18Q<5D>ZJdUe84MW9=^L}JoU6ArOumj;j`eUV7 zmnEyL?S!yi$&NZ4UbnuXp+wNO4V)zF3PcQ^!A7XIjIN>^gvHA7&NLTcsxv4O4dHh* zb{6Le;{uDfE0n*)tf+=i3{*zYQv>S3b18ihnJHt)L4|eUX%MJdqo-&pH;|e!Nc&oW z=UBN$GAh62;C~&bG5C^o~MOw-Onky`O^9*9=99#?M2Th@+As|5^u{`z^17g?F=l!n} zls}3@qhKT*@s2@OU>_Mr>~rhns=|1{IDc+xCw8Y4!nICRH;OGX| z40^C(G@j7*x@%aXBw~k>qgEkGs1jv6ZzQubvt-NGEN4h>)3`#5>AvBfZMZcf9MD*c zc3tBhkeKhL9=b;~KZ_ema4?<6T{tK`hSJ-bU6m_6uS`0w()Yy6)9Ldk{-0ZW%XA*Y RSt^%8lU+JHHxkP~`3D%zqaXkP literal 0 HcmV?d00001 diff --git a/app/lang/English/register.po b/app/lang/English/register.po new file mode 100644 index 00000000..7cde2e42 --- /dev/null +++ b/app/lang/English/register.po @@ -0,0 +1,84 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "No new regs" +msgstr "This forum is not accepting new registrations." + +msgid "Reg cancel redirect" +msgstr "Registration cancelled." + +msgid "Forum rules" +msgstr "Forum rules" + +msgid "Rules legend" +msgstr "You must agree to the following in order to register" + +msgid "Registration flood" +msgstr "A new user was registered with the same IP address as you within the last hour. To prevent registration flooding, at least an hour has to pass between registrations from the same IP. Sorry for the inconvenience." + +msgid "Agree" +msgstr "Agree" + +msgid "Cancel" +msgstr "Cancel" + +msgid "Register" +msgstr "Register" + +msgid "Registration errors" +msgstr "Registration errors" + +msgid "Registration errors info" +msgstr "The following errors need to be corrected before you can register:" + +msgid "Username censor" +msgstr "The username you entered contains one or more censored words. Please choose a different username." + +msgid "Username dupe 1" +msgstr "Someone is already registered with the username" + +msgid "Username dupe 2" +msgstr "The username you entered is too similar. The username must differ from that by at least one alphanumerical character (a-z or 0-9). Please choose a different username." + +msgid "Email not match" +msgstr "Email addresses do not match." + +msgid "Reg email" +msgstr "Thank you for registering. Your password has been sent to the specified address. If it doesn't arrive you can contact the forum administrator at" + +msgid "Reg complete" +msgstr "Registration complete. You are now logged in." + +msgid "Desc 1" +msgstr "Registration will grant you access to a number of features and capabilities otherwise unavailable. These functions include the ability to edit and delete posts, design your own signature that accompanies your posts and much more. If you have any questions regarding this forum you should ask an administrator." + +msgid "Desc 2" +msgstr "Below is a form you must fill out in order to register. Once you are registered you should visit your profile and review the different settings you can change. The fields below only make up a small part of all the settings you can alter in your profile." + +msgid "Username legend" +msgstr "Please enter a username between 2 and 25 characters long" + +msgid "Pass legend" +msgstr "Please enter and confirm your chosen password" + +msgid "Pass info" +msgstr "Passwords must be at least 6 characters long. Passwords are case sensitive." + +msgid "Email info" +msgstr "You must enter a valid email address as your randomly generated password will be sent to that address." + +msgid "Confirm email" +msgstr "Confirm email address" diff --git a/app/lang/English/search.mo b/app/lang/English/search.mo new file mode 100644 index 0000000000000000000000000000000000000000..1f68f853019433a51326c94ee5a3f1f980c6b99e GIT binary patch literal 4068 zcma);Pi$009LGlmh2r0eB7!ie|v-AHqzxn-s zGuQf8yvC4*kvAe=y@9a_@Z3%KAicYSvDM&v;BDY1;631%;Jx5?;Ck>^@P3f3bnP2J zY99joz+>R8;IuD42d+VR4!j*~f_H=GLF)G=cnkQEFMkH!f%0W=EqE2Y6Z{2S1^xk& ze1ChczS+&Y4kUTEg7<+3K$3R`+zh55?fYfVPr(OJz5?RMuH!@d_zfhvRzfJ!M?Xk% zZv;t>T_Ek}0Js4>=G#M%_N76R<3$iZ_BK8w?}s4G^SQ78+Lyoe?LUEcq5V2Y`~M3h zeXho)iEBYxcQZJJv)cudeCP0?`Oky2zgNNS;6;$+_!-;+{tnXkeoVFw+yv6R!}vgz zY}A*Jg4FL6Nb)`lZUSo{$#(%Hy}biI4qgTy1^@KSVenp*%iuWpI+z2mfdz04lsgC( zK{CCwAn8BxY=ETab0DThVu8=6z!`IN-l!yLDEkN#E;G6L;5%m(mEGF90hyDm*4X3?}N17$G-g%Nb-IK z_JiMmB=?UXmbZ1JcS@wMJ;rB_Fzo*5^Um6WIaj=0Rlg zEjriT$a!S)J+hA+GNoM()+P`-x)My-ribV|ssovXQ8LR$8>X5nuBA{xl^tsFa%!qv zSJNgJn%7fpbWg2G>rr5<=VYsys!;b1=xON;YG{cC7q8G&>pLHoZ8^tN)u?4+9!PnoZ?Lw4f z)ltHuq>?Tub`M+FSZl;4s>hO7$Ov@TKqWO=bvBPLF4d(im$N)J-DQDUDcf4A3@^9X zv?CYRP1;2(NV`P3;wGxec1>n(b~qeFDpn$=;nwbEtOGdZO~nl*;ylc|ri(nO+oB%X zv!A=aBij?cWrPpy*xxs$QnKOvM3{eCDzd{OAD6;Zr8;z|Z|YY7y@7uw`Y3Kkj*lPYvNE|S>>{3KtJqPAd0en5n^C^=YhOO(rnRLwrocVgni zk%m=hP9L<{%VxP7AEl#zC! z6$~0m!2siyoyEt#GB$+?MAGuRa7$UaP>=q&g@i#=pe>|{@Fdc4H1hvJJZ5xn~wOTlx4bm?f+Z0C!kSfT6VVl_Krm0}OpZ#WC;Y&6r<04{q8H^QZ#>9Q`g##x&t9k&}Ob%9TjYH{=e zuDf6qUB^bXd`I#`F$=F%qh5R->TmbV&xsn`t8sc^u8bEZV0+Ge#BH zE^u*oTIeur-1Pxj=XlM(3YLN55uEduh0og_Vn=q3^|eAfh3 zNX#ZG6b`ISYa1N2RhSHOT*PtKfcat=LS_SD`%JT2`ZSI(fMW&jfawPAl8\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "User search" +msgstr "User search" + +msgid "No search permission" +msgstr "You do not have permission to use the search feature." + +msgid "Search flood" +msgstr "At least %s seconds have to pass between searches. Please wait %s seconds and try searching again." + +msgid "Search" +msgstr "Search" + +msgid "Search criteria legend" +msgstr "Enter your search criteria" + +msgid "Search info" +msgstr "To search by keyword, enter a term or terms to search for. Separate terms with spaces. Use AND, OR and NOT to refine your search. To search by author enter the username of the author whose posts you wish to search for. Use wildcard character * for partial matches." + +msgid "Keyword search" +msgstr "Keyword search" + +msgid "Author search" +msgstr "Author search" + +msgid "Search in legend" +msgstr "Select where to search" + +msgid "Search in info" +msgstr "Choose in which forum you would like to search and if you want to search in topic subjects, message text or both." + +msgid "Search multiple forums info" +msgstr "If no forums are selected, all forums will be searched." + +msgid "Forum search" +msgstr "Forum" + +msgid "Search in" +msgstr "Search in" + +msgid "Message and subject" +msgstr "Message text and topic subject" + +msgid "Message only" +msgstr "Message text only" + +msgid "Topic only" +msgstr "Topic subject only" + +msgid "Sort by" +msgstr "Sort by" + +msgid "Sort order" +msgstr "Sort order" + +msgid "Search results legend" +msgstr "Select how to view search results" + +msgid "Search results info" +msgstr "You can choose how you wish to sort and show your results." + +msgid "Sort by post time" +msgstr "Post time" + +msgid "Sort by author" +msgstr "Author" + +msgid "Sort by subject" +msgstr "Subject" + +msgid "Sort by forum" +msgstr "Forum" + +msgid "Ascending" +msgstr "Ascending" + +msgid "Descending" +msgstr "Descending" + +msgid "Show as" +msgstr "Show results as" + +msgid "Show as topics" +msgstr "Topics" + +msgid "Show as posts" +msgstr "Posts" + +msgid "Search results" +msgstr "Search results" + +msgid "Quick search show_new" +msgstr "New" + +msgid "Quick search show_recent" +msgstr "Active" + +msgid "Quick search show_unanswered" +msgstr "Unanswered" + +msgid "Quick search show_replies" +msgstr "Posted" + +msgid "Quick search show_user_topics" +msgstr "Topics by %s" + +msgid "Quick search show_user_posts" +msgstr "Posts by %s" + +msgid "Quick search show_subscriptions" +msgstr "Subscribed by %s" + +msgid "By keywords show as topics" +msgstr "Topics with posts containing '%s'" + +msgid "By keywords show as posts" +msgstr "Posts containing '%s'" + +msgid "By user show as topics" +msgstr "Topics with posts by %s" + +msgid "By user show as posts" +msgstr "Posts by %s" + +msgid "By both show as topics" +msgstr "Topics with posts containing '%s', by %s" + +msgid "By both show as posts" +msgstr "Posts containing '%s', by %s" + +msgid "No terms" +msgstr "You have to enter at least one keyword and/or an author to search for." + +msgid "No hits" +msgstr "Your search returned no hits." + +msgid "No user posts" +msgstr "There are no posts by this user in this forum." + +msgid "No user topics" +msgstr "There are no topics by this user in this forum." + +msgid "No subscriptions" +msgstr "This user is currently not subscribed to any topics." + +msgid "No new posts" +msgstr "There are no topics with new posts since your last visit." + +msgid "No recent posts" +msgstr "No new posts have been made within the last 24 hours." + +msgid "No unanswered" +msgstr "There are no unanswered posts in this forum." + +msgid "Go to post" +msgstr "Go to post" + +msgid "Go to topic" +msgstr "Go to topic" diff --git a/app/lang/English/stopwords.txt b/app/lang/English/stopwords.txt new file mode 100644 index 00000000..907a2600 --- /dev/null +++ b/app/lang/English/stopwords.txt @@ -0,0 +1,175 @@ +about +after +ago +all +almost +along +also +any +anybody +anywhere +are +arent +aren't +around +ask +been +before +being +between +but +came +can +cant +can't +come +could +couldnt +couldn't +did +didnt +didn't +does +doesnt +doesn't +dont +don't +each +either +else +even +every +everybody +everyone +find +for +from +get +going +gone +got +had +has +have +havent +haven't +having +her +here +hers +him +his +how +ill +i'll +i'm +into +isnt +isn't +itll +it'll +its +it's +ive +i've +just +know +less +like +make +many +may +more +most +much +must +near +never +none +nothing +now +off +often +once +one +only +other +our +ours +our's +out +over +please +rather +really +said +see +she +should +small +some +something +sometime +somewhere +take +than +thank +thanks +that +thats +that's +the +their +theirs +them +then +there +these +they +thing +think +this +those +though +through +thus +too +true +two +under +until +upon +use +very +want +was +way +well +were +what +when +where +which +who +whom +whose +why +will +with +within +without +would +yes +yet +you +your +youre +you're +yours +http +https +ftp +www +com +net +org diff --git a/app/lang/English/topic.mo b/app/lang/English/topic.mo new file mode 100644 index 0000000000000000000000000000000000000000..b5dbc93c8358f0e216f8001e84e2d1a83cfc13cb GIT binary patch literal 1487 zcmaiyyKfUg5XKi09x>q+-Y>BfkpkijK`4qY7@;_Eu$06maR_vr@7DIg`PSOqOJe>2 z3K}X9H5CArvn_(O z|20IBu2uXf{@axAK|0qb@DlhHJOKUy2f%)8rgNPK$!`chik}53?g&Wd%BADm>3Rty zU5g;;@<4p7g&!obrF8x=Nb#S56z>^$0(=3I{~M6}KY*0?3rJ5!IZwil!KjgDEXA=7 zf^=u}PTh^}i{78&(%DYKI_*f>p}Xib%6l9}x=z99JxCkr!1cuEI10vXLIlDHHtG3> z6_jkUsYqzUie>J2o)TK~K-TNRV@1t%RMoEXs~Al?+HgTmGt%R(42_b3X0u|M`xvoV ziJ+xgE$~Ayj8T^GQKA*J8Fe)`vgNz1ti+NpmO`vsnk9Z5)(4|;&^woWB zgc4rrIfq!j&{$|mW!QX29;;Ab?gmmr>O#1#n=Oi}_7SZdM9K-Qf>cdy^RN{Ub?(|2 zPrA9GkYC90;frG#$a*MTV--E?u29;Sq0I}zF%6-{$1~+p#mXxTF>g&cM%Wy4)*OyR zTRT&9T~_em{^9J^ zOdfYGLPTx1kkp73bEOqHemKV6hNHAFxrIu>8r|4O*=s^slc6g;Kdjq)wCbC6AvPCb z=AJbrLZK3kWl0arhqI&E>sU#K*1U|AEAmMWn+NMfNq;0OZxJanp?ClE9{$H&nh1n@KyQ|u$9~WBO*;Hv;1aDh+ Fe*tICQ3C(~ literal 0 HcmV?d00001 diff --git a/app/lang/English/topic.po b/app/lang/English/topic.po new file mode 100644 index 00000000..bca23a6f --- /dev/null +++ b/app/lang/English/topic.po @@ -0,0 +1,93 @@ +# +msgid "" +msgstr "" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Project-Id-Version: FeatherBB\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: FeatherBB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Post reply" +msgstr "Post reply" + +msgid "Topic closed" +msgstr "Topic closed" + +msgid "From" +msgstr "From:" + +msgid "Promote user" +msgstr "Promote user" + +msgid "IP address logged" +msgstr "IP address logged" + +msgid "Note" +msgstr "Note:" + +msgid "Posts topic" +msgstr "Posts:" + +msgid "Registered topic" +msgstr "Registered:" + +msgid "Replies" +msgstr "Replies:" + +msgid "Website" +msgstr "Website" + +msgid "Guest" +msgstr "Guest" + +msgid "Online" +msgstr "Online" + +msgid "Offline" +msgstr "Offline" + +msgid "Last edit" +msgstr "Last edited by" + +msgid "Report" +msgstr "Report" + +msgid "Delete" +msgstr "Delete" + +msgid "Edit" +msgstr "Edit" + +msgid "Quote" +msgstr "Quote" + +msgid "Is subscribed" +msgstr "You are currently subscribed to this topic" + +msgid "Unsubscribe" +msgstr "Unsubscribe" + +msgid "Subscribe" +msgstr "Subscribe to this topic" + +msgid "Quick post" +msgstr "Quick reply" + +msgid "Mod controls" +msgstr "Moderator controls" + +msgid "New icon" +msgstr "New post" + +msgid "Re" +msgstr "Re:" + +msgid "Preview" +msgstr "Preview" diff --git a/app/lang/English/update.mo b/app/lang/English/update.mo new file mode 100644 index 0000000000000000000000000000000000000000..18d61df2ff3d7f864483f458fe703aa3bbddb701 GIT binary patch literal 7678 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 u=vY&HP\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "Update" +msgstr "Update FluxBB" + +msgid "Update message" +msgstr "Your FluxBB database is out-of-date and must be upgraded in order to continue. If you are the board administrator, please follow the instructions below to complete the upgrade." + +msgid "Note" +msgstr "Note:" + +msgid "Members message" +msgstr "This process is for board administrators only. If you are a member there is nothing to worry about - the forums will be back shortly!" + +msgid "Administrator only" +msgstr "This step is for the board administrator only!" + +msgid "Database password info" +msgstr "To perform the database update please enter the database password with which FluxBB was installed. If you cannot remember, this is stored in your 'config.php' file." + +msgid "Database password note" +msgstr "If you are running SQLite (and hence have no database password) please use the database file name instead. This must exactly match the database file name given in your configuration file." + +msgid "Database password" +msgstr "Database password" + +msgid "Maintenance" +msgstr "Maintenance" + +msgid "Maintenance message info" +msgstr "The message that will be displayed to users during the updating process. This text will not be parsed like regular posts and thus may contain HTML." + +msgid "Maintenance message" +msgstr "Maintenance message" + +msgid "You are running error" +msgstr "You are running %1$s version %2$s. FluxBB %3$s requires at least %1$s %4$s to run properly. You must upgrade your %1$s installation before you can continue." + +msgid "Version mismatch error" +msgstr "Version mismatch. The database '%s' doesn't seem to be running a FluxBB database schema supported by this update script." + +msgid "Invalid file error" +msgstr "Invalid database file name. When using SQLite the database file name must be entered exactly as it appears in your '%s'" + +msgid "Invalid password error" +msgstr "Invalid database password. To upgrade FluxBB you must enter your database password exactly as it appears in your '%s'" + +msgid "No password error" +msgstr "No database password provided" + +msgid "Script runs error" +msgstr "It appears the update script is already being ran by someone else. If this is not the case, please manually delete the file '%s' and try again" + +msgid "No update error" +msgstr "Your forum is already as up-to-date as this script can make it" + +msgid "Intro 1" +msgstr "This script will update your forum database. The update procedure might take anything from a second to hours depending on the speed of the server and the size of the forum database. Don't forget to make a backup of the database before continuing." + +msgid "Intro 2" +msgstr "Did you read the update instructions in the documentation? If not, start there." + +msgid "No charset conversion" +msgstr "IMPORTANT! FluxBB has detected that this PHP environment does not have support for the encoding mechanisms required to do UTF-8 conversion from character sets other than ISO-8859-1. What this means is that if the current character set is not ISO-8859-1, FluxBB won't be able to convert your forum database to UTF-8 and you will have to do it manually. Instructions for doing manual charset conversion can be found in the update instructions." + +msgid "Enable conversion" +msgstr "Enable conversion: When enabled this update script will, after it has made the required structural changes to the database, convert all text in the database from the current character set to UTF-8. This conversion is required if you're upgrading from version 1.2." + +msgid "Current character set" +msgstr "Current character set: If the primary language in your forum is English, you can leave this at the default value. However, if your forum is non-English, you should enter the character set of the primary language pack used in the forum. Getting this wrong can corrupt your database so don't just guess! Note: This is required even if the old database is UTF-8." + +msgid "Charset conversion" +msgstr "Charset conversion" + +msgid "Enable conversion label" +msgstr "Enable conversion (perform database charset conversion)." + +msgid "Current character set label" +msgstr "Current character set" + +msgid "Current character set info" +msgstr "Accept default for English forums otherwise the character set of the primary language pack." + +msgid "Start update" +msgstr "Start update" + +msgid "Error converting users" +msgstr "Error converting users" + +msgid "Error info 1" +msgstr "There was an error converting some users. This can occur when converting from FluxBB v1.2 if multiple users have registered with very similar usernames, for example \"bob\" and \"böb\"." + +msgid "Error info 2" +msgstr "Below is a list of users who failed to convert. Please choose a new username for each user. Users who are renamed will automatically be sent an email alerting them of the change." + +msgid "New username" +msgstr "New username" + +msgid "Required" +msgstr "(Required)" + +msgid "Correct errors" +msgstr "The following errors need to be corrected:" + +msgid "Rename users" +msgstr "Rename users" + +msgid "Successfully updated" +msgstr "Your forum database was successfully updated. You may now %s." + +msgid "go to index" +msgstr "go to the forum index" + +msgid "Unable to lock error" +msgstr "Unable to write update lock. Please make sure PHP has write access to the directory '%s' and no-one else is currently running the update script." + +msgid "Converting" +msgstr "Converting %s …" + +msgid "Converting item" +msgstr "Converting %1$s %2$s …" + +msgid "Preparsing item" +msgstr "Preparsing %1$s %2$s …" + +msgid "Rebuilding index item" +msgstr "Rebuilding index for %1$s %2$s" + +msgid "ban" +msgstr "ban" + +msgid "categories" +msgstr "categories" + +msgid "censor words" +msgstr "censor words" + +msgid "configuration" +msgstr "configuration" + +msgid "forums" +msgstr "forums" + +msgid "groups" +msgstr "groups" + +msgid "post" +msgstr "post" + +msgid "report" +msgstr "report" + +msgid "topic" +msgstr "topic" + +msgid "user" +msgstr "user" + +msgid "signature" +msgstr "signature" + +msgid "Username too short error" +msgstr "Usernames must be at least 2 characters long. Please choose another (longer) username." + +msgid "Username too long error" +msgstr "Usernames must not be more than 25 characters long. Please choose another (shorter) username." + +msgid "Username Guest reserved error" +msgstr "The username guest is reserved. Please choose another username." + +msgid "Username IP format error" +msgstr "Usernames may not be in the form of an IP address. Please choose another username." + +msgid "Username bad characters error" +msgstr "Usernames may not contain all the characters ', \" and [ or ] at once. Please choose another username." + +msgid "Username BBCode error" +msgstr "Usernames may not contain any of the text formatting tags (BBCode) that the forum uses. Please choose another username." + +msgid "Username duplicate error" +msgstr "Someone is already registered with the username %s. The username you entered is too similar. The username must differ from that by at least one alphanumerical character (a-z or 0-9). Please choose a different username." diff --git a/app/lang/English/userlist.mo b/app/lang/English/userlist.mo new file mode 100644 index 0000000000000000000000000000000000000000..74d6b6eaf7013ca1abd4270b4dcbf6b1c58fd784 GIT binary patch literal 898 zcmY+C!H&}~5QYORAc6!4t{jHjf=EgchbpBAwzO!a-KAo?2qX?T@gy~*c4WK2-Z>(1 zLgG>2%meTSh&!*qf#1z;yIA@(p7D%llHb3sZhVQb&V%b<3NC_AAgpiT0{9L>{0F!K zeu5bM2EqRWE`h&batgWN4EC>1N6}^2*Ra=M8`x0y5%w$WXV{mpn@C1UbQXlQ0m4k@ zf^%YpJ5drvkLsEhj;)LK44IM|TzgCIG;?d(5@EVSS0NTT`fe#$&|(X#Eo=c$hp!F%eFvH?^P`eVUdH;MG-E!MWIn6tXHC@x$wn|T^jAL#zh+nqunM6 kX~}Y>912+y>h%AgyZln6Nw@-!5&yR%`FM+T$u^Dt0lG5+eE\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "User find legend" +msgstr "Find and sort users" + +msgid "User search info" +msgstr "Enter a username to search for and/or a user group to filter by. The username field can be left blank. Use the wildcard character * for partial matches." + +msgid "User sort info" +msgstr "Sort users by name, date registered or number of posts and in ascending/descending order." + +msgid "User group" +msgstr "User group" + +msgid "No of posts" +msgstr "Number of posts" + +msgid "All users" +msgstr "All" diff --git a/controller/admin/bans.php b/controller/admin/bans.php index 66fc80c5..6423631f 100644 --- a/controller/admin/bans.php +++ b/controller/admin/bans.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\bans(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/bans.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/bans.mo'); if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { throw new \FeatherBB\Error(__('No permission'), '403'); diff --git a/controller/admin/categories.php b/controller/admin/categories.php index a14c6467..affa990b 100644 --- a/controller/admin/categories.php +++ b/controller/admin/categories.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\categories(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/categories.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/categories.mo'); } public function __autoload($class_name) diff --git a/controller/admin/censoring.php b/controller/admin/censoring.php index 634e2401..396c4089 100644 --- a/controller/admin/censoring.php +++ b/controller/admin/censoring.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\censoring(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/censoring.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/censoring.mo'); } public function __autoload($class_name) diff --git a/controller/admin/forums.php b/controller/admin/forums.php index a23f3fad..425a857f 100644 --- a/controller/admin/forums.php +++ b/controller/admin/forums.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\forums(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/forums.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/forums.mo'); } public function __autoload($class_name) diff --git a/controller/admin/groups.php b/controller/admin/groups.php index f02b6be7..bd5e75f8 100644 --- a/controller/admin/groups.php +++ b/controller/admin/groups.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\groups(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/groups.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/groups.mo'); } public function __autoload($class_name) diff --git a/controller/admin/index.php b/controller/admin/index.php index ce49946f..74dbfa95 100644 --- a/controller/admin/index.php +++ b/controller/admin/index.php @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/index.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/index.mo'); } public function __autoload($class_name) diff --git a/controller/admin/maintenance.php b/controller/admin/maintenance.php index 6b6fbe1a..21762614 100644 --- a/controller/admin/maintenance.php +++ b/controller/admin/maintenance.php @@ -15,7 +15,7 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\admin\maintenance(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/admin/maintenance.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/admin/maintenance.mo'); } public function display() diff --git a/controller/admin/options.php b/controller/admin/options.php index ae47aec5..bc9091dd 100644 --- a/controller/admin/options.php +++ b/controller/admin/options.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\options(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/options.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/options.mo'); } public function __autoload($class_name) diff --git a/controller/admin/parser.php b/controller/admin/parser.php index 6ea82ff2..c086b3e7 100644 --- a/controller/admin/parser.php +++ b/controller/admin/parser.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\parser(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/parser.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/parser.mo'); } public function __autoload($class_name) diff --git a/controller/admin/permissions.php b/controller/admin/permissions.php index a728b9cd..e54c86ab 100644 --- a/controller/admin/permissions.php +++ b/controller/admin/permissions.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\permissions(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/permissions.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/permissions.mo'); } public function __autoload($class_name) diff --git a/controller/admin/reports.php b/controller/admin/reports.php index 4aba65e8..d1d95586 100644 --- a/controller/admin/reports.php +++ b/controller/admin/reports.php @@ -21,7 +21,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\reports(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/reports.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/reports.mo'); } public function __autoload($class_name) diff --git a/controller/admin/statistics.php b/controller/admin/statistics.php index e8349a0d..382ec3cc 100644 --- a/controller/admin/statistics.php +++ b/controller/admin/statistics.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\statistics(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/index.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/index.mo'); } public function display() diff --git a/controller/admin/users.php b/controller/admin/users.php index b0130364..ce6be2ec 100644 --- a/controller/admin/users.php +++ b/controller/admin/users.php @@ -19,7 +19,7 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\admin\users(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->user->language.'/admin/users.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/users.mo'); } public function __autoload($class_name) diff --git a/controller/auth.php b/controller/auth.php index e7c16cb5..cde81fbc 100644 --- a/controller/auth.php +++ b/controller/auth.php @@ -14,7 +14,7 @@ class auth public function __construct() { $this->feather = \Slim\Slim::getInstance(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->feather->user->language.'/login.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/login.mo'); } public function login() @@ -101,7 +101,7 @@ public function forget() if ($user) { // Load the "activate password" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->feather->user->language.'/mail_templates/activate_password.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/mail_templates/activate_password.tpl')); $mail_tpl = $this->feather->hooks->fire('mail_tpl_password_forgotten', $mail_tpl); // The first row contains the subject diff --git a/controller/delete.php b/controller/delete.php index f939068d..c7b5b111 100644 --- a/controller/delete.php +++ b/controller/delete.php @@ -15,8 +15,8 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\delete(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/delete.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/post.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/delete.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); } public function deletepost($id) diff --git a/controller/edit.php b/controller/edit.php index e1a0e504..71d671e9 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -19,10 +19,10 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\edit(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/bbeditor.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/post.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/bbeditor.mo'); } public function __autoload($class_name) diff --git a/controller/help.php b/controller/help.php index e96f2c33..ade00b45 100644 --- a/controller/help.php +++ b/controller/help.php @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/help.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/help.mo'); } public function __autoload($class_name) diff --git a/controller/index.php b/controller/index.php index 862c0d16..4bf1b867 100644 --- a/controller/index.php +++ b/controller/index.php @@ -15,7 +15,7 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\index(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->feather->user->language.'/index.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/index.mo'); } public function display() diff --git a/controller/install.php b/controller/install.php index c9a6bd32..0df7f051 100644 --- a/controller/install.php +++ b/controller/install.php @@ -38,7 +38,7 @@ public function run() $this->install_lang = $this->feather->request->post('install_lang'); } } - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->install_lang.'/install.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->install_lang.'/install.mo'); if ($this->feather->request->isPost() && empty($this->feather->request->post('choose_lang'))) { $missing_fields = array(); @@ -164,7 +164,7 @@ public function create_db(array $data) \FeatherBB\Core::init_db($data); // Load appropriate language - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$data['default_lang'].'/install.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$data['default_lang'].'/install.mo'); // Handle db prefix $data['db_prefix'] = (!empty($data['db_prefix'])) ? $data['db_prefix'] : ''; diff --git a/controller/login.php b/controller/login.php index bd41c6a1..0c101c1d 100644 --- a/controller/login.php +++ b/controller/login.php @@ -21,7 +21,7 @@ public function __construct() $this->model = new \model\login(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/login.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/login.mo'); } public function __autoload($class_name) diff --git a/controller/misc.php b/controller/misc.php index 0a6440d2..eb598ba1 100644 --- a/controller/misc.php +++ b/controller/misc.php @@ -15,8 +15,8 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\misc(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/register.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/misc.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/register.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/misc.mo'); } public function rules() diff --git a/controller/moderate.php b/controller/moderate.php index e2614b7d..a090451d 100644 --- a/controller/moderate.php +++ b/controller/moderate.php @@ -19,10 +19,10 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\moderate(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/topic.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/misc.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/post.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/topic.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/forum.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/misc.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/post.mo'); } public function __autoload($class_name) diff --git a/controller/post.php b/controller/post.php index 9ab0b212..99ec3dae 100644 --- a/controller/post.php +++ b/controller/post.php @@ -15,11 +15,11 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\post(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/prof_reg.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/post.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/register.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/antispam.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/bbeditor.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/register.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/antispam.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/bbeditor.mo'); } public function newreply($fid = null, $tid = null, $qid = null) @@ -30,7 +30,7 @@ public function newreply($fid = null, $tid = null, $qid = null) public function newpost($fid = null, $tid = null, $qid = null) { // Antispam feature - require $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/antispam.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); // If $_POST['username'] is filled, we are facing a bot diff --git a/controller/profile.php b/controller/profile.php index 8664f4bd..8cd36d60 100644 --- a/controller/profile.php +++ b/controller/profile.php @@ -19,9 +19,9 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\profile(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/profile.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/profile.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); } public function __autoload($class_name) diff --git a/controller/register.php b/controller/register.php index cb1a8541..f6bf8415 100644 --- a/controller/register.php +++ b/controller/register.php @@ -19,9 +19,9 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\register(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/prof_reg.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/antispam.mo'); } public function __autoload($class_name) @@ -37,7 +37,7 @@ public function display() } // Antispam feature - require FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.php'; + require FEATHER_ROOT.'app/lang/'.$this->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); // Display an error message if new registrations are disabled diff --git a/controller/search.php b/controller/search.php index afa8d659..42c6cec6 100644 --- a/controller/search.php +++ b/controller/search.php @@ -19,9 +19,9 @@ public function __construct() $this->user = $this->feather->user; $this->request = $this->feather->request; $this->model = new \model\search(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/userlist.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/search.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->user->language.'/forum.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/userlist.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/search.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/forum.mo'); } public function __autoload($class_name) diff --git a/controller/userlist.php b/controller/userlist.php index 27008155..63869bba 100644 --- a/controller/userlist.php +++ b/controller/userlist.php @@ -15,8 +15,8 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\userlist(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/userlist.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/search.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/userlist.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/search.mo'); } public function display() diff --git a/controller/viewforum.php b/controller/viewforum.php index f4820c65..4be4857f 100644 --- a/controller/viewforum.php +++ b/controller/viewforum.php @@ -15,7 +15,7 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\viewforum(); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$this->feather->user->language.'/forum.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/forum.mo'); } public function __autoload($class_name) diff --git a/controller/viewtopic.php b/controller/viewtopic.php index d3afe74c..2725e422 100644 --- a/controller/viewtopic.php +++ b/controller/viewtopic.php @@ -15,9 +15,9 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->model = new \model\viewtopic(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/topic.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/post.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/bbeditor.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/topic.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/bbeditor.mo'); } public function display($id = null, $name = null, $page = null, $pid = null) @@ -29,7 +29,7 @@ public function display($id = null, $name = null, $page = null, $pid = null) } // Antispam feature - require $this->feather->forum_env['FEATHER_ROOT'].'lang/'.$this->feather->user->language.'/antispam.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); // Fetch some informations about the topic diff --git a/extern.php b/extern.php index 1f85454a..e35e5335 100644 --- a/extern.php +++ b/extern.php @@ -75,8 +75,8 @@ $feather->add(new \FeatherBB\Auth()); $feather->add(new \FeatherBB\Core($feather_settings)); -load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/common.mo'); -load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/index.mo'); +load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/common.mo'); +load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/index.mo'); // The length at which topic subjects will be truncated (for HTML output) if (!defined('FORUM_EXTERN_MAX_SUBJECT_LENGTH')) { diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index 608e0c36..207d826a 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -220,7 +220,7 @@ public function call() if (!$this->app->user->disp_posts) { $this->app->user->disp_posts = $this->app->forum_settings['o_disp_posts_default']; } - if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language)) { + if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'app/lang/'.$this->app->user->language)) { $this->app->user->language = $this->app->forum_settings['o_default_lang']; } if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'style/themes/'.$this->app->user->style.'/style.css')) { @@ -267,7 +267,7 @@ public function call() $this->model->feather_setcookie(1, \FeatherBB\Utils::feather_hash(uniqid(rand(), true)), $this->app->now + 31536000); } - load_textdomain('featherbb', $this->app->forum_env['FEATHER_ROOT'].'lang/'.$this->app->user->language.'/common.mo'); + load_textdomain('featherbb', $this->app->forum_env['FEATHER_ROOT'].'app/lang/'.$this->app->user->language.'/common.mo'); // Load bans from cache if (!$this->app->cache->isCached('bans')) { diff --git a/include/functions.php b/include/functions.php index 11f0609f..11c02b28 100644 --- a/include/functions.php +++ b/include/functions.php @@ -33,8 +33,8 @@ function check_username($username, $errors, $exclude_id = null) // Include UTF-8 function require_once FEATHER_ROOT.'include/utf8/strcasecmp.php'; - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'lang/'.$feather->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/prof_reg.mo'); // Convert multiple whitespace characters into one (to prevent people from registering with indistinguishable usernames) $username = preg_replace('%\s+%s', ' ', $username); @@ -518,7 +518,7 @@ function file_size($size) // function generate_stopwords_cache_id() { - $files = glob(FEATHER_ROOT.'lang/*/stopwords.txt'); + $files = glob(FEATHER_ROOT.'app/lang/*/stopwords.txt'); if ($files === false) { return 'cache_id_error'; } diff --git a/model/login.php b/model/login.php index ff28e584..a7ae06ec 100644 --- a/model/login.php +++ b/model/login.php @@ -147,7 +147,7 @@ public function password_forgotten() if ($result) { // Load the "activate password" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/activate_password.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/activate_password.tpl')); $mail_tpl = $this->hook->fire('mail_tpl_password_forgotten', $mail_tpl); // The first row contains the subject diff --git a/model/misc.php b/model/misc.php index 2a89e805..f3f4f716 100644 --- a/model/misc.php +++ b/model/misc.php @@ -82,7 +82,7 @@ public function send_email($mail) } // Load the "form email" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/form_email.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/form_email.tpl')); $mail_tpl = $this->hook->fire('send_email_mail_tpl', $mail_tpl); // The first row contains the subject @@ -194,7 +194,7 @@ public function insert_report($post_id) // We send it to the complete mailing-list in one swoop if ($this->config['o_mailing_list'] != '') { // Load the "new report" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/new_report.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/new_report.tpl')); $mail_tpl = $this->hook->fire('insert_report_mail_tpl', $mail_tpl); // The first row contains the subject diff --git a/model/post.php b/model/post.php index 7f7f6530..b7d3e9ff 100644 --- a/model/post.php +++ b/model/post.php @@ -386,13 +386,13 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) foreach($result as $cur_subscriber) { // Is the subscription email for $cur_subscriber['language'] cached or not? if (!isset($notification_emails[$cur_subscriber['language']])) { - if (file_exists(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')) { + if (file_exists(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')) { // Load the "new reply" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')); $mail_tpl = $this->hook->fire('send_notifications_reply_mail_tpl', $mail_tpl); // Load the "new reply full" template (with post included) - $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply_full.tpl')); + $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_reply_full.tpl')); $mail_tpl_full = $this->hook->fire('send_notifications_reply_mail_tpl_full', $mail_tpl_full); // The first row contains the subject (it also starts with "Subject:") @@ -595,13 +595,13 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) foreach($result as $cur_subscriber) { // Is the subscription email for $cur_subscriber['language'] cached or not? if (!isset($notification_emails[$cur_subscriber['language']])) { - if (file_exists(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')) { + if (file_exists(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')) { // Load the "new topic" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')); $mail_tpl = $this->hook->fire('send_notifications_new_topic_mail_tpl', $mail_tpl); // Load the "new topic full" template (with post included) - $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_topic_full.tpl')); + $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_topic_full.tpl')); // The first row contains the subject (it also starts with "Subject:") $first_crlf = strpos($mail_tpl, "\n"); @@ -660,7 +660,7 @@ public function warn_banned_user($post, $new_pid) $this->hook->fire('warn_banned_user_start', $post, $new_pid); // Load the "banned email post" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/banned_email_post.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/banned_email_post.tpl')); $mail_tpl = $this->hook->fire('warn_banned_user_mail_tpl', $mail_tpl); // The first row contains the subject diff --git a/model/profile.php b/model/profile.php index c5daeeb2..754ecc72 100644 --- a/model/profile.php +++ b/model/profile.php @@ -215,7 +215,7 @@ public function change_email($id) throw new \FeatherBB\Error(__('Banned email'), 403); } elseif ($this->config['o_mailing_list'] != '') { // Load the "banned email change" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/banned_email_change.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/banned_email_change.tpl')); $mail_tpl = $this->hook->fire('change_email_mail_tpl', $mail_tpl); // The first row contains the subject @@ -252,7 +252,7 @@ public function change_email($id) } // Load the "dupe email change" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/dupe_email_change.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/dupe_email_change.tpl')); $mail_tpl = $this->hook->fire('change_email_mail_dupe_tpl', $mail_tpl); // The first row contains the subject @@ -289,7 +289,7 @@ public function change_email($id) $user = $user->save(); // Load the "activate email" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/activate_email.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/activate_email.tpl')); $mail_tpl = $this->hook->fire('change_email_mail_activate_tpl', $mail_tpl); // The first row contains the subject diff --git a/model/register.php b/model/register.php index 9a609e96..e2fdef8d 100644 --- a/model/register.php +++ b/model/register.php @@ -69,7 +69,7 @@ public function check_for_errors() } // Antispam feature - require FEATHER_ROOT.'lang/'.$this->user->language.'/antispam.php'; + require FEATHER_ROOT.'app/lang/'.$this->user->language.'/antispam.php'; $question = $this->request->post('captcha_q') ? trim($this->request->post('captcha_q')) : ''; $answer = $this->request->post('captcha') ? strtoupper(trim($this->request->post('captcha'))) : ''; $lang_antispam_questions_array = array(); @@ -118,7 +118,7 @@ public function check_for_errors() // Make sure we got a valid language string if ($this->request->post('language')) { $user['language'] = preg_replace('%[\.\\\/]%', '', $this->request->post('language')); - if (!file_exists(FEATHER_ROOT.'lang/'.$user['language'].'/common.po')) { + if (!file_exists(FEATHER_ROOT.'app/lang/'.$user['language'].'/common.po')) { throw new \FeatherBB\Error(__('Bad request'), 500); } } else { @@ -179,7 +179,7 @@ public function insert_user($user) // If we previously found out that the email was banned if (isset($user['banned_email'])) { // Load the "banned email register" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/banned_email_register.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/banned_email_register.tpl')); $mail_tpl = $this->hook->fire('insert_user_banned_mail_tpl', $mail_tpl); // The first row contains the subject @@ -200,7 +200,7 @@ public function insert_user($user) // If we previously found out that the email was a dupe if (!empty($dupe_list)) { // Load the "dupe email register" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/dupe_email_register.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/dupe_email_register.tpl')); $mail_tpl = $this->hook->fire('insert_user_dupe_mail_tpl', $mail_tpl); // The first row contains the subject @@ -221,7 +221,7 @@ public function insert_user($user) // Should we alert people on the admin mailing list that a new user has registered? if ($this->config['o_regs_report'] == '1') { // Load the "new user" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/new_user.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/new_user.tpl')); $mail_tpl = $this->hook->fire('insert_user_new_mail_tpl', $mail_tpl); // The first row contains the subject @@ -244,7 +244,7 @@ public function insert_user($user) // Must the user verify the registration or do we log him/her in right now? if ($this->config['o_regs_verify'] == '1') { // Load the "welcome" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'lang/'.$this->user->language.'/mail_templates/welcome.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/welcome.tpl')); $mail_tpl = $this->hook->fire('insert_user_welcome_mail_tpl', $mail_tpl); // The first row contains the subject From afcfb4aacbf6c45f9ae9df6e4431743aaa345274 Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 00:38:48 +0200 Subject: [PATCH 280/353] PSR-0 loader and require slim via Composer --- composer.json | 8 +- include/classes/auth.class.php | 1 + include/classes/view.class.php | 1 - index.php | 9 +- lang/English/admin/bans.mo | Bin 4861 -> 0 bytes lang/English/admin/bans.po | 183 -- lang/English/admin/categories.mo | Bin 2167 -> 0 bytes lang/English/admin/categories.po | 84 - lang/English/admin/censoring.mo | Bin 1551 -> 0 bytes lang/English/admin/censoring.po | 57 - lang/English/admin/common.mo | Bin 1802 -> 0 bytes lang/English/admin/common.po | 117 -- lang/English/admin/forums.mo | Bin 3548 -> 0 bytes lang/English/admin/forums.po | 147 -- lang/English/admin/groups.mo | Bin 8477 -> 0 bytes lang/English/admin/groups.po | 261 --- lang/English/admin/index.html | 1 - lang/English/admin/index.mo | Bin 4052 -> 0 bytes lang/English/admin/index.po | 180 -- lang/English/admin/maintenance.mo | Bin 4083 -> 0 bytes lang/English/admin/maintenance.po | 114 -- lang/English/admin/options.mo | Bin 18847 -> 0 bytes lang/English/admin/options.po | 603 ------ lang/English/admin/parser.mo | Bin 5557 -> 0 bytes lang/English/admin/parser.php | 93 - lang/English/admin/parser.po | 168 -- lang/English/admin/permissions.mo | Bin 2836 -> 0 bytes lang/English/admin/permissions.po | 102 - lang/English/admin/plugin_example.mo | Bin 1137 -> 0 bytes lang/English/admin/plugin_example.po | 45 - lang/English/admin/reports.mo | Bin 1083 -> 0 bytes lang/English/admin/reports.po | 57 - lang/English/admin/users.mo | Bin 7114 -> 0 bytes lang/English/admin/users.po | 312 ---- lang/English/antispam.mo | Bin 751 -> 0 bytes lang/English/antispam.php | 23 - lang/English/antispam.po | 27 - lang/English/antispam_questions.mo | Bin 765 -> 0 bytes lang/English/antispam_questions.po | 43 - lang/English/bbeditor.mo | Bin 1082 -> 0 bytes lang/English/bbeditor.po | 63 - lang/English/common.mo | Bin 9404 -> 0 bytes lang/English/common.po | 473 ----- lang/English/delete.mo | Bin 1003 -> 0 bytes lang/English/delete.po | 42 - lang/English/forum.mo | Bin 866 -> 0 bytes lang/English/forum.po | 45 - lang/English/help.mo | Bin 4261 -> 0 bytes lang/English/help.po | 165 -- lang/English/index.mo | Bin 1064 -> 0 bytes lang/English/index.po | 54 - lang/English/install.mo | Bin 9441 -> 0 bytes lang/English/install.po | 291 --- lang/English/login.mo | Bin 1877 -> 0 bytes lang/English/login.po | 63 - .../English/mail_templates/activate_email.tpl | 12 - .../mail_templates/activate_password.tpl | 14 - .../mail_templates/banned_email_change.tpl | 9 - .../mail_templates/banned_email_post.tpl | 9 - .../mail_templates/banned_email_register.tpl | 9 - .../mail_templates/dupe_email_change.tpl | 9 - .../mail_templates/dupe_email_register.tpl | 9 - lang/English/mail_templates/form_email.tpl | 13 - lang/English/mail_templates/new_reply.tpl | 11 - .../English/mail_templates/new_reply_full.tpl | 18 - lang/English/mail_templates/new_report.tpl | 9 - lang/English/mail_templates/new_topic.tpl | 11 - .../English/mail_templates/new_topic_full.tpl | 18 - lang/English/mail_templates/new_user.tpl | 12 - lang/English/mail_templates/rename.tpl | 12 - lang/English/mail_templates/welcome.tpl | 12 - lang/English/misc.mo | Bin 5068 -> 0 bytes lang/English/misc.po | 225 --- lang/English/post.mo | Bin 2395 -> 0 bytes lang/English/post.po | 93 - lang/English/prof_reg.mo | Bin 5891 -> 0 bytes lang/English/prof_reg.po | 225 --- lang/English/profile.mo | Bin 9585 -> 0 bytes lang/English/profile.po | 378 ---- lang/English/register.mo | Bin 3064 -> 0 bytes lang/English/register.po | 84 - lang/English/search.mo | Bin 4068 -> 0 bytes lang/English/search.po | 174 -- lang/English/stopwords.txt | 175 -- lang/English/topic.mo | Bin 1487 -> 0 bytes lang/English/topic.po | 93 - lang/English/update.mo | Bin 7678 -> 0 bytes lang/English/update.po | 195 -- lang/English/userlist.mo | Bin 898 -> 0 bytes lang/English/userlist.po | 33 - vendor/akrabat/rka-slim-controller/LICENSE | 26 + vendor/akrabat/rka-slim-controller/README.md | 96 + .../akrabat/rka-slim-controller/RKA/Slim.php | 84 + .../akrabat/rka-slim-controller/composer.json | 26 + vendor/composer/autoload_classmap.php | 1 + vendor/composer/autoload_namespaces.php | 2 + vendor/composer/autoload_psr4.php | 1 + vendor/composer/installed.json | 96 +- vendor/slim/slim/.gitignore | 1 + vendor/slim/slim/.travis.yml | 11 + vendor/slim/slim/CONTRIBUTING.md | 20 + vendor/slim/slim/LICENSE | 19 + vendor/slim/slim/README.markdown | 208 +++ .../slim/slim/Slim}/Environment.php | 0 .../slim/slim/Slim}/Exception/Pass.php | 0 .../slim/slim/Slim}/Exception/Stop.php | 0 .../slim/slim/Slim}/Helper/Set.php | 0 .../slim/slim/Slim}/Http/Cookies.php | 0 .../slim/slim/Slim}/Http/Headers.php | 2 +- .../slim/slim/Slim}/Http/Request.php | 0 .../slim/slim/Slim}/Http/Response.php | 2 +- {Slim => vendor/slim/slim/Slim}/Http/Util.php | 0 {Slim => vendor/slim/slim/Slim}/Log.php | 2 +- {Slim => vendor/slim/slim/Slim}/LogWriter.php | 0 .../slim/slim/Slim}/Middleware.php | 0 .../slim/Slim}/Middleware/ContentTypes.php | 6 +- .../slim/slim/Slim}/Middleware/Flash.php | 5 +- .../slim/Slim}/Middleware/MethodOverride.php | 2 +- .../Slim}/Middleware/PrettyExceptions.php | 6 +- .../slim/Slim}/Middleware/SessionCookie.php | 0 {Slim => vendor/slim/slim/Slim}/Route.php | 6 +- {Slim => vendor/slim/slim/Slim}/Router.php | 0 {Slim => vendor/slim/slim/Slim}/Slim.php | 69 +- {Slim => vendor/slim/slim/Slim}/View.php | 0 vendor/slim/slim/composer.json | 24 + vendor/slim/slim/index.php | 169 ++ vendor/slim/slim/phpunit.xml.dist | 25 + vendor/slim/slim/tests/EnvironmentTest.php | 376 ++++ vendor/slim/slim/tests/Foo.php | 7 + vendor/slim/slim/tests/Helper/SetTest.php | 241 +++ vendor/slim/slim/tests/Http/CookiesTest.php | 92 + vendor/slim/slim/tests/Http/HeadersTest.php | 59 + vendor/slim/slim/tests/Http/RequestTest.php | 949 ++++++++++ vendor/slim/slim/tests/Http/ResponseTest.php | 271 +++ vendor/slim/slim/tests/Http/UtilTest.php | 445 +++++ vendor/slim/slim/tests/LogTest.php | 208 +++ vendor/slim/slim/tests/LogWriterTest.php | 48 + .../tests/Middleware/ContentTypesTest.php | 162 ++ .../slim/slim/tests/Middleware/FlashTest.php | 141 ++ .../tests/Middleware/MethodOverrideTest.php | 149 ++ .../tests/Middleware/PrettyExceptionsTest.php | 153 ++ .../tests/Middleware/SessionCookieTest.php | 463 +++++ vendor/slim/slim/tests/MiddlewareTest.php | 79 + vendor/slim/slim/tests/README | 18 + vendor/slim/slim/tests/RouteTest.php | 617 ++++++ vendor/slim/slim/tests/RouterTest.php | 250 +++ vendor/slim/slim/tests/SlimTest.php | 1657 +++++++++++++++++ vendor/slim/slim/tests/ViewTest.php | 199 ++ vendor/slim/slim/tests/bootstrap.php | 22 + vendor/slim/slim/tests/templates/test.php | 1 + 150 files changed, 7475 insertions(+), 5735 deletions(-) delete mode 100644 lang/English/admin/bans.mo delete mode 100644 lang/English/admin/bans.po delete mode 100644 lang/English/admin/categories.mo delete mode 100644 lang/English/admin/categories.po delete mode 100644 lang/English/admin/censoring.mo delete mode 100644 lang/English/admin/censoring.po delete mode 100644 lang/English/admin/common.mo delete mode 100644 lang/English/admin/common.po delete mode 100644 lang/English/admin/forums.mo delete mode 100644 lang/English/admin/forums.po delete mode 100644 lang/English/admin/groups.mo delete mode 100644 lang/English/admin/groups.po delete mode 100644 lang/English/admin/index.html delete mode 100644 lang/English/admin/index.mo delete mode 100644 lang/English/admin/index.po delete mode 100644 lang/English/admin/maintenance.mo delete mode 100644 lang/English/admin/maintenance.po delete mode 100644 lang/English/admin/options.mo delete mode 100644 lang/English/admin/options.po delete mode 100644 lang/English/admin/parser.mo delete mode 100644 lang/English/admin/parser.php delete mode 100644 lang/English/admin/parser.po delete mode 100644 lang/English/admin/permissions.mo delete mode 100644 lang/English/admin/permissions.po delete mode 100644 lang/English/admin/plugin_example.mo delete mode 100644 lang/English/admin/plugin_example.po delete mode 100644 lang/English/admin/reports.mo delete mode 100644 lang/English/admin/reports.po delete mode 100644 lang/English/admin/users.mo delete mode 100644 lang/English/admin/users.po delete mode 100644 lang/English/antispam.mo delete mode 100644 lang/English/antispam.php delete mode 100644 lang/English/antispam.po delete mode 100644 lang/English/antispam_questions.mo delete mode 100644 lang/English/antispam_questions.po delete mode 100644 lang/English/bbeditor.mo delete mode 100644 lang/English/bbeditor.po delete mode 100644 lang/English/common.mo delete mode 100644 lang/English/common.po delete mode 100644 lang/English/delete.mo delete mode 100644 lang/English/delete.po delete mode 100644 lang/English/forum.mo delete mode 100644 lang/English/forum.po delete mode 100644 lang/English/help.mo delete mode 100644 lang/English/help.po delete mode 100644 lang/English/index.mo delete mode 100644 lang/English/index.po delete mode 100644 lang/English/install.mo delete mode 100644 lang/English/install.po delete mode 100644 lang/English/login.mo delete mode 100644 lang/English/login.po delete mode 100644 lang/English/mail_templates/activate_email.tpl delete mode 100644 lang/English/mail_templates/activate_password.tpl delete mode 100644 lang/English/mail_templates/banned_email_change.tpl delete mode 100644 lang/English/mail_templates/banned_email_post.tpl delete mode 100644 lang/English/mail_templates/banned_email_register.tpl delete mode 100644 lang/English/mail_templates/dupe_email_change.tpl delete mode 100644 lang/English/mail_templates/dupe_email_register.tpl delete mode 100644 lang/English/mail_templates/form_email.tpl delete mode 100644 lang/English/mail_templates/new_reply.tpl delete mode 100644 lang/English/mail_templates/new_reply_full.tpl delete mode 100644 lang/English/mail_templates/new_report.tpl delete mode 100644 lang/English/mail_templates/new_topic.tpl delete mode 100644 lang/English/mail_templates/new_topic_full.tpl delete mode 100644 lang/English/mail_templates/new_user.tpl delete mode 100644 lang/English/mail_templates/rename.tpl delete mode 100644 lang/English/mail_templates/welcome.tpl delete mode 100644 lang/English/misc.mo delete mode 100644 lang/English/misc.po delete mode 100644 lang/English/post.mo delete mode 100644 lang/English/post.po delete mode 100644 lang/English/prof_reg.mo delete mode 100644 lang/English/prof_reg.po delete mode 100644 lang/English/profile.mo delete mode 100644 lang/English/profile.po delete mode 100644 lang/English/register.mo delete mode 100644 lang/English/register.po delete mode 100644 lang/English/search.mo delete mode 100644 lang/English/search.po delete mode 100644 lang/English/stopwords.txt delete mode 100644 lang/English/topic.mo delete mode 100644 lang/English/topic.po delete mode 100644 lang/English/update.mo delete mode 100644 lang/English/update.po delete mode 100644 lang/English/userlist.mo delete mode 100644 lang/English/userlist.po create mode 100644 vendor/akrabat/rka-slim-controller/LICENSE create mode 100644 vendor/akrabat/rka-slim-controller/README.md create mode 100644 vendor/akrabat/rka-slim-controller/RKA/Slim.php create mode 100644 vendor/akrabat/rka-slim-controller/composer.json create mode 100644 vendor/slim/slim/.gitignore create mode 100644 vendor/slim/slim/.travis.yml create mode 100644 vendor/slim/slim/CONTRIBUTING.md create mode 100644 vendor/slim/slim/LICENSE create mode 100644 vendor/slim/slim/README.markdown rename {Slim => vendor/slim/slim/Slim}/Environment.php (100%) rename {Slim => vendor/slim/slim/Slim}/Exception/Pass.php (100%) rename {Slim => vendor/slim/slim/Slim}/Exception/Stop.php (100%) rename {Slim => vendor/slim/slim/Slim}/Helper/Set.php (100%) rename {Slim => vendor/slim/slim/Slim}/Http/Cookies.php (100%) rename {Slim => vendor/slim/slim/Slim}/Http/Headers.php (99%) rename {Slim => vendor/slim/slim/Slim}/Http/Request.php (100%) rename {Slim => vendor/slim/slim/Slim}/Http/Response.php (99%) rename {Slim => vendor/slim/slim/Slim}/Http/Util.php (100%) rename {Slim => vendor/slim/slim/Slim}/Log.php (99%) rename {Slim => vendor/slim/slim/Slim}/LogWriter.php (100%) rename {Slim => vendor/slim/slim/Slim}/Middleware.php (100%) rename {Slim => vendor/slim/slim/Slim}/Middleware/ContentTypes.php (97%) rename {Slim => vendor/slim/slim/Slim}/Middleware/Flash.php (99%) rename {Slim => vendor/slim/slim/Slim}/Middleware/MethodOverride.php (99%) rename {Slim => vendor/slim/slim/Slim}/Middleware/PrettyExceptions.php (96%) rename {Slim => vendor/slim/slim/Slim}/Middleware/SessionCookie.php (100%) rename {Slim => vendor/slim/slim/Slim}/Route.php (98%) rename {Slim => vendor/slim/slim/Slim}/Router.php (100%) rename {Slim => vendor/slim/slim/Slim}/Slim.php (96%) rename {Slim => vendor/slim/slim/Slim}/View.php (100%) create mode 100644 vendor/slim/slim/composer.json create mode 100644 vendor/slim/slim/index.php create mode 100644 vendor/slim/slim/phpunit.xml.dist create mode 100644 vendor/slim/slim/tests/EnvironmentTest.php create mode 100644 vendor/slim/slim/tests/Foo.php create mode 100644 vendor/slim/slim/tests/Helper/SetTest.php create mode 100644 vendor/slim/slim/tests/Http/CookiesTest.php create mode 100644 vendor/slim/slim/tests/Http/HeadersTest.php create mode 100644 vendor/slim/slim/tests/Http/RequestTest.php create mode 100644 vendor/slim/slim/tests/Http/ResponseTest.php create mode 100644 vendor/slim/slim/tests/Http/UtilTest.php create mode 100644 vendor/slim/slim/tests/LogTest.php create mode 100644 vendor/slim/slim/tests/LogWriterTest.php create mode 100644 vendor/slim/slim/tests/Middleware/ContentTypesTest.php create mode 100644 vendor/slim/slim/tests/Middleware/FlashTest.php create mode 100644 vendor/slim/slim/tests/Middleware/MethodOverrideTest.php create mode 100644 vendor/slim/slim/tests/Middleware/PrettyExceptionsTest.php create mode 100644 vendor/slim/slim/tests/Middleware/SessionCookieTest.php create mode 100644 vendor/slim/slim/tests/MiddlewareTest.php create mode 100644 vendor/slim/slim/tests/README create mode 100644 vendor/slim/slim/tests/RouteTest.php create mode 100644 vendor/slim/slim/tests/RouterTest.php create mode 100644 vendor/slim/slim/tests/SlimTest.php create mode 100644 vendor/slim/slim/tests/ViewTest.php create mode 100644 vendor/slim/slim/tests/bootstrap.php create mode 100644 vendor/slim/slim/tests/templates/test.php diff --git a/composer.json b/composer.json index 938feef8..3bf3df86 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,12 @@ "classmap": ["include/classes/"], "psr-4" : { "Plugins\\" : "/plugins" - } + }, + "psr-0": { "": "" } + }, + "require": { + "php": ">=5.3", + "slim/slim": "^2.6", + "akrabat/rka-slim-controller": "^2.0" } } diff --git a/include/classes/auth.class.php b/include/classes/auth.class.php index 207d826a..a35309f1 100644 --- a/include/classes/auth.class.php +++ b/include/classes/auth.class.php @@ -13,6 +13,7 @@ namespace FeatherBB; use DB; +// use model\auth; class Auth extends \Slim\Middleware { diff --git a/include/classes/view.class.php b/include/classes/view.class.php index 3605046c..6cc73e71 100644 --- a/include/classes/view.class.php +++ b/include/classes/view.class.php @@ -254,7 +254,6 @@ public function setStyle($style) } $this->data->set('style', (string) $style); $this->setTemplatesDirectory($this->app->forum_env['FEATHER_ROOT'].'style/themes/'.$style.'/view'); - // $this->addAsset('css', 'style/themes/'.$style.'/style.css'); return $this; } diff --git a/index.php b/index.php index 15b38fb4..29a82294 100644 --- a/index.php +++ b/index.php @@ -14,15 +14,8 @@ ini_set('display_errors', 1); // Load Slim Framework -require 'Slim/Slim.php'; -\Slim\Slim::registerAutoloader(); - -// Load dependencies require 'vendor/autoload.php'; - -// Load FeatherBB -require 'include/classes/autoload.class.php'; -\FeatherBB\Loader::registerAutoloader(); +// \Slim\Slim::registerAutoloader(); // Instantiate Slim and add CSRF $feather = new \Slim\Slim(); diff --git a/lang/English/admin/bans.mo b/lang/English/admin/bans.mo deleted file mode 100644 index 3077c64b555429af441b4f7867c6d8ac40e68fea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4861 zcma)0bc}tQ9(iRIYcypfNv@&zDYz71>XcAki<7p)DR#1ovP}-_YMiBnY#b3 z)Ae!A|9n)3556^42MbQVr*TFl$H^7tNt+z+fUEtlI z^yk43gUjHDz-{nOFbUu5@ckR0toNgUKLur-Ux4?5zXxTXSHU^(@8EmE|AOxWPrN(q z3(7w8pzQM)D0*yx?*X3zW&A#P0<1yV=NVA+{7%5^L8AHQ;qn^zDKl01Hs`dItOm_-#=3e;$;5e+h~me+>94DEqw$%D5A3 zdN+6rK8V;WmJ8$Jz6EXgCWdYX10?Nc#wn&2-_nZ&-DEQg%j+@$t)N{E;$#K5;So_7l2#@kC zd2l>^CcJ+fJV%q5oEOr2t!DYY$%k&OMv&{S$(^J!gYxkBJZp57 z^d}pJeye5ZH`}l2q9|);=l;mpT7_+*bzO(e*G+5qMrWY2-0KwHy*e8=hghw2uQrvM z5p_+k| zXvS^@rj6JzZr$C8{l;4(xG{y8*UWpu968>cZ=WdDK-Wn>;$>tRwYfeS7(~s)?J8wJ zcdWc3(WLKKob$4wXF$JuuOAV@G*yg%JXYIdbYJulrIbq86keCS0tii4s&Dxw=gQ)W?nkQFUijdW0^GcqxD zl07a&WT+F*_B>NN`KZ!)=W1CE?6N9`u4^x!zoh)@<@rLLzO0rOF3s&!<%OU0SLb%N_d08YkkHtXtXNjaI@ir%CPN$1HErw89wou%x-KgQU86jV zNa4<&(SxZK)nm@$D?PtOw;Pw${^#emHn%n=`!B`k=GIE$tzgyhkWFiIvtAtLIx8-z zq^~P$>dQCwu68a?#>wtIQ*}0qq?AIntS)x5x>aPE0G|75=L@DVmDh2nl+vS?;*0Sk zeDU4RZaJzFv*!0$R(_MF98Q(NC(Dtt{c@BONk$zSk|)uX>5X!A)Hj7BM}Zc~Rm+aA zmR*x*fyQ3j%4WQ8F=}}hqU78fBGE&Ff3cmKn(Ml6-Y^G~CS~aU5+pCBg}kR2*7WrlUPf_GgD91#R7l0uQdr z#L@hir!yFI(sUu3I!$DvbA;IBU(yoC6l#psN15%5d90%5O}rl~TMi5iToEL|DibFq z##Qb^D_Drtt}*J&N}gkr*CDJP3Z$`TgycV6CP>VvxA7{>H zci^}{ultlS(Q}dwdQ@Xdoh7h1Zd|YC#T~j{R#S|`>YAgwo9p604EAwC@E0SQj5fXm z%YJU-sZx*Hn>#+W?Ax%mbm3gQw8S4EWKH^xDKbh<hMZ@ucj@I%lIZzLT$Tc#-)(~ak%KO2wDU;)9 zV(DUQW+W-m>Qdmz=1S0xiQjIFJK{-dERG$O-XBwbdy=QKwbfZ)$8eG!>ztnla{f~f zC=Fx>?~;nCh6SIoy-__PAl;%ql$+Do$FA6O#YeY9?SgosDQ2_dLkjq5(=#L~8oQx4 z*gaEcoX*b3akS;HHI53Wy_>5H?xl2T=N>sd&jt@S`l6WB8_9qsD%5;q_Cg$mYmZ!X z2<53854Q)=p_IYqLezW~Cfun#HAv#j<-Dd=lLF|1hLTZIO6ts)Urkt= zBIx+wEi%cb8mEkelgiDw;g&cVH` zf{c{^3gqgZ4Hj{?BbB2bWPZ3;+NC diff --git a/lang/English/admin/bans.po b/lang/English/admin/bans.po deleted file mode 100644 index 4a126619..00000000 --- a/lang/English/admin/bans.po +++ /dev/null @@ -1,183 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "No user message" -msgstr "No user by that username registered. If you want to add a ban not tied to a specific username just leave the username blank." - -msgid "No user ID message" -msgstr "No user by that ID registered." - -msgid "User is admin message" -msgstr "The user %s is an administrator and can't be banned. If you want to ban an administrator, you must first demote him/her." - -msgid "User is mod message" -msgstr "The user %s is a moderator and can't be banned. If you want to ban a moderator, you must first demote him/her." - -msgid "Must enter message" -msgstr "You must enter either a username, an IP address or an email address (at least)." - -msgid "Cannot ban guest message" -msgstr "The guest user cannot be banned." - -msgid "Invalid IP message" -msgstr "You entered an invalid IP/IP-range." - -msgid "Invalid e-mail message" -msgstr "The email address (e.g. user@domain.com) or partial email address domain (e.g. domain.com) you entered is invalid." - -msgid "Invalid date message" -msgstr "You entered an invalid expire date." - -msgid "Invalid date reasons" -msgstr "The format should be YYYY-MM-DD and the date must be at least one day in the future." - -msgid "Ban added redirect" -msgstr "Ban added." - -msgid "Ban edited redirect" -msgstr "Ban edited." - -msgid "Ban removed redirect" -msgstr "Ban removed." - -msgid "New ban head" -msgstr "New ban" - -msgid "Add ban subhead" -msgstr "Add ban" - -msgid "Username label" -msgstr "Username" - -msgid "Username help" -msgstr "The username to ban (case-insensitive)." - -msgid "Username advanced help" -msgstr "The username to ban (case-insensitive). The next page will let you enter a custom IP and email. If you just want to ban a specific IP/IP-range or email just leave it blank." - -msgid "Ban search head" -msgstr "Ban search" - -msgid "Ban search subhead" -msgstr "Enter search criteria" - -msgid "Ban search info" -msgstr "Search for bans in the database. You can enter one or more terms to search for. Wildcards in the form of asterisks (*) are accepted. To show all bans leave all fields empty." - -msgid "Date help" -msgstr "(yyyy-mm-dd)" - -msgid "Message label" -msgstr "Message" - -msgid "Expire after label" -msgstr "Expire after" - -msgid "Expire before label" -msgstr "Expire before" - -msgid "Order by label" -msgstr "Order by" - -msgid "Order by username" -msgstr "Username" - -msgid "Order by ip" -msgstr "IP" - -msgid "Order by e-mail" -msgstr "Email" - -msgid "Order by expire" -msgstr "Expire date" - -msgid "Ascending" -msgstr "Ascending" - -msgid "Descending" -msgstr "Descending" - -msgid "Submit search" -msgstr "Submit search" - -msgid "E-mail label" -msgstr "Email" - -msgid "E-mail help" -msgstr "The email or email domain you wish to ban (e.g. someone@somewhere.com or somewhere.com). See \"Allow banned email addresses\" in Permissions for more info." - -msgid "IP label" -msgstr "IP address/IP-ranges" - -msgid "IP help" -msgstr "The IP address or IP-ranges you wish to ban (e.g. 150.11.110.1 or 150.11.110). Separate addresses with spaces. If an IP is entered already it is the last known IP of this user in the database." - -msgid "IP help link" -msgstr "Click %s to see IP statistics for this user." - -msgid "Ban advanced head" -msgstr "Ban advanced settings" - -msgid "Ban advanced subhead" -msgstr "Supplement ban with IP and email" - -msgid "Ban message label" -msgstr "Ban message" - -msgid "Ban message help" -msgstr "A message that will be displayed to the banned user when he/she visits the board." - -msgid "Message expiry subhead" -msgstr "Ban message and expiry" - -msgid "Ban IP range info" -msgstr "You should be very careful when banning an IP-range because of the possibility of multiple users matching the same partial IP." - -msgid "Expire date label" -msgstr "Expire date" - -msgid "Expire date help" -msgstr "The date when this ban should be automatically removed (format: yyyy-mm-dd). Leave blank to remove manually." - -msgid "Results head" -msgstr "Search Results" - -msgid "Results username head" -msgstr "Username" - -msgid "Results e-mail head" -msgstr "Email" - -msgid "Results IP address head" -msgstr "IP/IP-ranges" - -msgid "Results expire head" -msgstr "Expires" - -msgid "Results message head" -msgstr "Message" - -msgid "Results banned by head" -msgstr "Banned by" - -msgid "Results actions head" -msgstr "Actions" - -msgid "No match" -msgstr "No match" - -msgid "Unknown" -msgstr "Unknown" diff --git a/lang/English/admin/categories.mo b/lang/English/admin/categories.mo deleted file mode 100644 index 73ca42af061e53155923b6c77b56d277bd521e43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2167 zcmZ{kNsrt_6vqolSekuU!mi>lXeN@KG$PWdXC@?>O(V@f3pxl;E@ivA+r+MFRh6gH z$6Pogp&$-$LpkNfg%7}q&w#=mi3=AbPW+!;?#10$a{u~0SG~1fJzP6?kKuU@?^}3( z$GeXAhez;(=klYBy#%(wSHT1DMer851}gA5@Gkf!_zidgd;q=<{tD9mhhG1;ms^ij z_TKTl0@C^u@C~pJz6{<4Uje@Z-v%Fe{cj-o`2(c&|9E-rTxI7X*hLQeAjNm@e8r!@ zZz2B-Qv64cGxh}dB}j2b;Pc=aNO^t@!UX#sd=mT-JOuB9_)}4nD;stOU+yt+I z((CVoZOFfXWdBdkf5D58TQL3}cmj zx>T!LuT?)aIj@ZHRP{C6Th!Hw?U#O*%CM|nyk9c(Fk#)S zFd_>MwaIOVt5GT1-S@Y7^>=qe@ppH5dvm+hHTo;GGB{3x&!n-aeup1Q;fB)OxY6o< z+za*$MCgNkG{3{43qFx&DJ`v4C&Id*XN0nuaN1zeiBN+A!3RAl@;QrqMM4!6P&@TC%iPjz8pxmWq<@XE>jm|(`5 zVs9vU*%{sEC>*Ehse8dEy5M7>9Q6rf67nygh=t;%_i{Ong5NsbhC<>9Y*;BdhEk6= zLw=;m#=7;Ecwd_$FD3Xe3tq!AM6sZ&2Ybathqca6@|>Jh6CARS5GCvS31!!fEHkqO z{(haX=H?u zX^63?ytb&dWg+NBLzwYU#\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Must enter name message" -msgstr "You must enter a name for the category" - -msgid "Category added redirect" -msgstr "Category added." - -msgid "Category deleted redirect" -msgstr "Category deleted." - -msgid "Unable to delete category" -msgstr "Unable to delete category." - -msgid "Delete category head" -msgstr "Delete category (together with all forums and posts it contains)" - -msgid "Confirm delete subhead" -msgstr "Confirm delete category" - -msgid "Confirm delete info" -msgstr "Are you sure that you want to delete the category %s?" - -msgid "Delete category not validated" -msgstr "You must confirm the deletion by checking the box" - -msgid "Must enter integer message" -msgstr "Position must be a positive integer value." - -msgid "Categories updated redirect" -msgstr "Categories updated." - -msgid "Add categories head" -msgstr "Add categories" - -msgid "Add categories subhead" -msgstr "Add categories" - -msgid "Add category label" -msgstr "Add a new category" - -msgid "Add new submit" -msgstr "Add new" - -msgid "Add category help" -msgstr "The name of the new category you want to add. You can edit the name of the category later (see below). Go to %s to add forums to your new category." - -msgid "Delete categories head" -msgstr "Delete categories" - -msgid "Delete categories subhead" -msgstr "Delete categories" - -msgid "Delete category label" -msgstr "Delete a category" - -msgid "Delete category disclaimer" -msgstr "I hereby acknowledge that all category data will be deleted" - -msgid "Edit categories head" -msgstr "Edit categories" - -msgid "Edit categories subhead" -msgstr "Edit categories" - -msgid "Category position label" -msgstr "Position" - -msgid "Category name label" -msgstr "Name" diff --git a/lang/English/admin/censoring.mo b/lang/English/admin/censoring.mo deleted file mode 100644 index 2f0e456c224163bf2c73bf679de354e34c738d35..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1551 zcmZvcOHUL*5XVQw2kRR(8sninm;iAGF&@bB2#8=v05`gV9(!kMciYT#Z@POx?tBFK z2p;?n>dCVQ?|SnC7;nad|DKs;S+$eqN7qzWRo7#`jg1@xSQoKxVZXt?j(zSJ{$O>% zbD#vzgFE0Qa38z^9)M%uJMc329=rg4uD*W-y}cixzc+fk)Vm4#`**=>;9|usumRl^ zJO%lO6G0H+{0TgR^Uskoj^AL2bL}K-fHUAI$lz5_g9Pq_H^8@`_xBO>@qPil-uH^X zK)5N^*@_-;8z7V-KmJ`%EBu@W{qiyT{M4|0e17>nA-v(W6g#OErJ}`Yu#_aUt4%^u zwe{d+^H!Hd5-hW_+Hj>)UMXc#btsWmv{LS?c@e9>C54@pL^?8@=^duN?Ty?z=sPxL z1Q}Z^Ivi~3;%pHTrP8|KDfdzla|Yci>TMsfND>5w;H2T$1%<41@wYVZCBhxmZKSyo zX}GFQX6vMS#nH~+pQZBO`Ef|h0_K~>q2#Myf$pI$c|W~Igw;iEw)P+tyZK> zXQ8&Swy`qsKONnxEo)>>!RlTQP948?Q^=B3vlMrQvFzrbH&?@%fu8r?W)rTcSSKh| zon~6n9R^ZIDQYjm$E?_tF*Y<(>u5Tfi5}ofc?_TF+{C zb;gs>%+rK2;o>fN$u7zQU3f^fVlSD9sBGA(sYGfuiFO+`rQEVn0(}?JChrzUIG1Tk zN;_)75W3q(Zn%R+^o=TAcW{kj6ahK+jW5(*^}uRcV6=%>S{4Su;Z?D)jGng0f^>3+ zqr-6<9\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Must enter word message" -msgstr "You must enter a word to censor." - -msgid "Word updated redirect" -msgstr "Censor word updated." - -msgid "Word added redirect" -msgstr "Censor word added." - -msgid "Word removed redirect" -msgstr "Censor word removed." - -msgid "Censoring head" -msgstr "Censoring" - -msgid "Add word subhead" -msgstr "Add word" - -msgid "Add word info" -msgstr "Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case insensitive." - -msgid "Censoring enabled" -msgstr "Censoring is enabled in %s." - -msgid "Censoring disabled" -msgstr "Censoring is disabled in %s." - -msgid "Censored word label" -msgstr "Censored word" - -msgid "Replacement label" -msgstr "Replacement word(s)" - -msgid "Action label" -msgstr "Action" - -msgid "Edit remove subhead" -msgstr "Edit or remove words" - -msgid "No words in list" -msgstr "No censor words in list." diff --git a/lang/English/admin/common.mo b/lang/English/admin/common.mo deleted file mode 100644 index 80370172ebed1c83e490488693dfcd113d29b4e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1802 zcmchW&5ImG7>6sm(PZLBOk&h%v|?OPp=Yy_$TGW|nBDA##o1)s4>6wXovxj<&U6h` zJxg-%KM?dH9z4Z^Cs91)mWv>Q2QMBBUIalgq>sCw(| z?+%Q;YiP%j$B>h|jG2JVI~Ztt?lk5uxEIpReumxf5Ujx?a14%**3ZJdtWQDNof&;! z9Iao3ceB3&<>ytn555NX!!EoJz6o`Nx8MWtZKyccpzJ?{^8YcE{dM>t{0!a$Z$kP1 z0ZQ*@D7#;w{QM53_a~J9eQZkaD3rgapzKdTRLt{`ZW;_Na&!ht{~eU{{XHoC_ZgIz zYf$dyH-4~fc1yo_P2yc~q5;9;mZO(^@9 zAl+PI80Hm9uM2hG51{;i0_o;DgY0fV`S~15?@Oq>d;{s`CkFZZ1nnfQ5y=cyRyOFlvFiS<|u9)RCFG^RWMceJ1+n&$ZU^1f@!(X%VVszD)r4Y@45^>l~rrF8!Nx9Fu=!( z>-jCA??V~QYRW=`ZC_4{4!2r$Vao*@%e2g6nYW`^?`K@vtP|6Af* z3~@r*O}Kh5Hf+J!S;pDtrgaUbvriZH*sPs=X1dl2{&m+blcg+q86OzMrM(>w*nytKTq9e=WZqBigKKzO~{Cur%eloS0fuQsj3knVDJeQhzB+SXI_O&5}d zqU|$^pkb#r^78gU8rBuHSCaFtsNS|=Ti#J0cCtQIKgpMBnXLLjXuJ6;M#EM?%>Ph^ zz3r0xr!rjA-02{(GqDW5 Z=$sypGZUk!O>9-sb(I+Z!+&4Oe*v%hjEDdL diff --git a/lang/English/admin/common.po b/lang/English/admin/common.po deleted file mode 100644 index 7fd3c5b6..00000000 --- a/lang/English/admin/common.po +++ /dev/null @@ -1,117 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Admin menu" -msgstr "Admin menu" - -msgid "Plugins menu" -msgstr "Plugins menu" - -msgid "Moderator menu" -msgstr "Moderator menu" - -msgid "Index" -msgstr "Index" - -msgid "Categories" -msgstr "Categories" - -msgid "Forums" -msgstr "Forums" - -msgid "Users" -msgstr "Users" - -msgid "User groups" -msgstr "User groups" - -msgid "Options" -msgstr "Options" - -msgid "Permissions" -msgstr "Permissions" - -msgid "Parser" -msgstr "Parser" - -msgid "Censoring" -msgstr "Censoring" - -msgid "Bans" -msgstr "Bans" - -msgid "Prune" -msgstr "Prune" - -msgid "Maintenance" -msgstr "Maintenance" - -msgid "Reports" -msgstr "Reports" - -msgid "Server statistics" -msgstr "Server statistics" - -msgid "Admin" -msgstr "Admin" - -msgid "Go back" -msgstr "Go back" - -msgid "Delete" -msgstr "Delete" - -msgid "Update" -msgstr "Update" - -msgid "Add" -msgstr "Add" - -msgid "Edit" -msgstr "Edit" - -msgid "Remove" -msgstr "Remove" - -msgid "Yes" -msgstr "Yes" - -msgid "No" -msgstr "No" - -msgid "Save changes" -msgstr "Save changes" - -msgid "Save" -msgstr "Save" - -msgid "here" -msgstr "here" - -msgid "Action" -msgstr "Action" - -msgid "None" -msgstr "None" - -msgid "Maintenance mode" -msgstr "maintenance mode" - -msgid "No plugin message" -msgstr "There is no plugin called %s in the plugin directory." - -msgid "Plugin failed message" -msgstr "Loading of the plugin - %s - failed." diff --git a/lang/English/admin/forums.mo b/lang/English/admin/forums.mo deleted file mode 100644 index 03ddd80dc6c4a33dfe423faa626b936b95d41701..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3548 zcmbVOO>A5>5H`>s8h%?SP@u&rlqMzbl~f?LNz;<1ZHStrQL<^_=-ubtea-t>Y`-MS zt%w7MN*n-j;J^VD2^Ar6p}m2`u^?3(Iq-8p2o(t=Bo18Q8{2Pplkg*9#rdAc52 z9`QH>d;n|V*Q>xCSYHC(0elyDKky2WO`T}ql))#>!?;RlNy$mG2Yd|`8!>@k?65pRdvVYqa$G00u_kI>g=T8E+1J46V ze+;|}_%e|AUi15Jd-?~!t)O28(tSS#lKksHI{z(j4nF@CNczWbcX$SP1nWiMPT=c6 z{ISdUM|>Xv$#2(y6TmNlj{&!1a}qcVBzxOHh-R1k`VC+o*6#!1QuZNRSc8o_6 zuji^rS?7y4rHIxnlUC0%5mlM631MU-S8cv-sf(&TK9OhjSfxCYi8RuQTt|zudd}9- z{^9tFP#K$05=wa{S9r;G(n(L^Y>AzUVgq$X#EI@OSfah3Gr_Jc`)Rr~7f~c5u4EJ| zSu@NLoy~tk)-@HkOq^%_){fnIz6~RrCU3>Hk}{8+bE-Vc zypIX)gY@gH-1&K{lbaj?uZtovY#~>;aG8z^MfC#3vqCDkHbNP;n2Bm4=?sGIZ?$Nn zLteB7Yc`h@N+bb-nd%Xqwd_)l9UA5Cb8H~v{bPK1aI|ku<)kB+ih^@eQOHL4X=G?q zsuL&r=FV0Eo3Nki-)4=>6fltHE4f>I+_&B0b8;%t=HnnG!5#uh85gTq}u z(q5M;IF;4%D9#!q{BSik9YaRA%=%skCS@j-vvDp*Yz!X`4~NfS$1Q_}yihec;dG2} zr=(jqdcGF$YHNnWQ)N!IDJ(0^xYp$Dyx=RbZkB-(_QBgE47)ODx0AhPE$S4dk@aQ8 z$ulu5QykyVzRAJsxC~ee|IJJkF-l7BUS-`ngTnssyui zhv7SRetdp*YId@p+tLII7hc>-oFt_Zflnlz(R?7TbCI~Ks@)9~FD`Zn-YOLvA>5%nd zO=KLIWkc#r(=Azx>v(*<6%AXKC5r1vI3y`AG)hi`N}mq-RNV?|ie;JYH#`-QB;Qcp zW)0L11gX?pr2Dly*Q;O%Ipm|Nr9}Np@)Zt4DW<+q@T$-#$0*^j*C0MrXZb#8AE)Pq zvSyQ9bCIlwHmWI%;q`*z)l-^97I9&dsGwq4OA54+kW)c))w?U*=9#-Nud6&=V@$8i z(m7q1SQV*IORj%}yn=h|?N-XYJvPBfvbI#sSMhjYEJ}YAYbtmVM~0CDte5GsFBMYz z@?2YT&T&GkxlmEB(2$=-#LDjI@>mbSc?lluzt{qoQ-vV)p-WDueB*Up7U9>&KXfyO zPT_h<>N}e7)f!4\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Forum added redirect" -msgstr "Forum added." - -msgid "Unable to add forum" -msgstr "Unable to add forum" - -msgid "Forum deleted redirect" -msgstr "Forum deleted." - -msgid "Forums updated redirect" -msgstr "Forums updated." - -msgid "Forum updated redirect" -msgstr "Forum updated." - -msgid "Perms reverted redirect" -msgstr "Permissions reverted to defaults." - -msgid "Must enter name message" -msgstr "You must enter a forum name." - -msgid "Must be integer message" -msgstr "Position must be a positive integer value." - -msgid "Must be valid category" -msgstr "You must enter a valid category" - -msgid "New forum" -msgstr "New forum" - -msgid "Add forum head" -msgstr "Add forum" - -msgid "Create new subhead" -msgstr "Create a new forum" - -msgid "Add forum label" -msgstr "Add forum to category" - -msgid "Add forum help" -msgstr "Select the category to which you wish to add a new forum." - -msgid "Add forum" -msgstr "Add forum" - -msgid "No categories exist" -msgstr "No categories exist" - -msgid "Manage forums head" -msgstr "Manage forums" - -msgid "Category subhead" -msgstr "Category:" - -msgid "Forum label" -msgstr "Forum" - -msgid "Edit link" -msgstr "Edit" - -msgid "Delete link" -msgstr "Delete" - -msgid "Position label" -msgstr "Position" - -msgid "Update positions" -msgstr "Update positions" - -msgid "Confirm delete head" -msgstr "Confirm delete forum" - -msgid "Confirm delete subhead" -msgstr "Important! Read before deleting" - -msgid "Confirm delete info" -msgstr "Are you sure that you want to delete the forum %s?" - -msgid "Confirm delete warn" -msgstr "WARNING! Deleting a forum will delete all posts (if any) in that forum!" - -msgid "Edit forum head" -msgstr "Edit forum" - -msgid "Edit details subhead" -msgstr "Edit forum details" - -msgid "Forum name label" -msgstr "Forum name" - -msgid "Forum description label" -msgstr "Description (HTML)" - -msgid "Category label" -msgstr "Category" - -msgid "Sort by label" -msgstr "Sort topics by" - -msgid "Last post" -msgstr "Last post" - -msgid "Topic start" -msgstr "Topic start" - -msgid "Subject" -msgstr "Subject" - -msgid "Redirect label" -msgstr "Redirect URL" - -msgid "Redirect help" -msgstr "Only available in empty forums" - -msgid "Group permissions subhead" -msgstr "Edit group permissions for this forum" - -msgid "Group permissions info" -msgstr "In this form, you can set the forum specific permissions for the different user groups. If you haven't made any changes to this forum's group permissions, what you see below is the default based on settings in %s. Administrators always have full permissions and are thus excluded. Permission settings that differ from the default permissions for the user group are marked red. The \"Read forum\" permission checkbox will be disabled if the group in question lacks the \"Read board\" permission. For redirect forums, only the \"Read forum\" permission is editable." - -msgid "Read forum label" -msgstr "Read forum" - -msgid "Post replies label" -msgstr "Post replies" - -msgid "Post topics label" -msgstr "Post topics" - -msgid "Revert to default" -msgstr "Revert to default" diff --git a/lang/English/admin/groups.mo b/lang/English/admin/groups.mo deleted file mode 100644 index c76b6c961767db43e55cbf7a7f06130c998d6971..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8477 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 XD2L1RND5MdlC4I+`(=_0NZ|hgb0FhW diff --git a/lang/English/admin/groups.po b/lang/English/admin/groups.po deleted file mode 100644 index cb17a229..00000000 --- a/lang/English/admin/groups.po +++ /dev/null @@ -1,261 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Must enter title message" -msgstr "You must enter a group title." - -msgid "Title already exists message" -msgstr "There is already a group with the title %s." - -msgid "Default group redirect" -msgstr "Default group set." - -msgid "Cannot remove default message" -msgstr "The default group cannot be removed. In order to delete this group, you must first setup a different group as the default." - -msgid "Group removed redirect" -msgstr "Group removed." - -msgid "Group added redirect" -msgstr "Group added." - -msgid "Group edited redirect" -msgstr "Group edited." - -msgid "Add groups head" -msgstr "Add/setup groups" - -msgid "Add group subhead" -msgstr "Add new group" - -msgid "New group label" -msgstr "Base new group on" - -msgid "New group help" -msgstr "Select a user group from which the new group will inherit its permission settings. The next page will let you fine-tune its settings." - -msgid "Default group subhead" -msgstr "Set default group" - -msgid "Default group label" -msgstr "Default group" - -msgid "Default group help" -msgstr "This is the default user group, e.g. the group users are placed in when they register. For security reasons, users can't be placed in either the moderator or administrator user groups by default." - -msgid "Existing groups head" -msgstr "Existing groups" - -msgid "Edit groups subhead" -msgstr "Edit/delete groups" - -msgid "Edit groups info" -msgstr "The pre-defined groups Guests, Administrators, Moderators and Members cannot be removed. However, they can be edited. Please note that in some groups, some options are unavailable (e.g. the edit posts permission for guests). Administrators always have full permissions." - -msgid "Edit link" -msgstr "Edit" - -msgid "Delete link" -msgstr "Delete" - -msgid "Group delete head" -msgstr "Group delete" - -msgid "Confirm delete subhead" -msgstr "Confirm delete group" - -msgid "Confirm delete info" -msgstr "Are you sure that you want to delete the group %s?" - -msgid "Confirm delete warn" -msgstr "WARNING! After you deleted a group you cannot restore it." - -msgid "Delete group head" -msgstr "Delete group" - -msgid "Move users subhead" -msgstr "Move users currently in group" - -msgid "Move users info" -msgstr "The group %s currently has %s members. Please select a group to which these members will be assigned upon deletion." - -msgid "Move users label" -msgstr "Move users to" - -msgid "Delete group" -msgstr "Delete group" - -msgid "Group settings head" -msgstr "Group settings" - -msgid "Group settings subhead" -msgstr "Setup group options and permissions" - -msgid "Group settings info" -msgstr "Below options and permissions are the default permissions for the user group. These options apply if no forum specific permissions are in effect." - -msgid "Group title label" -msgstr "Group title" - -msgid "User title label" -msgstr "User title" - -msgid "User title help" -msgstr "The rank users in this group have attained. Leave blank to use default title (\"%s\")." - -msgid "Promote users label" -msgstr "Promote users" - -msgid "Promote users help" -msgstr "You can promote users to a new group automatically if they reach a certain number of posts. Select \"%s\" to disable. For security reasons, you are not allowed to select an administrator group here. Also note that group changes for users affected by this setting will take effect immediately. Note that the amount of posts you enter is the total amount of posts of a user, not the amount of posts made as a member of this group." - -msgid "Disable promotion" -msgstr "Disable promoting" - -msgid "Mod privileges label" -msgstr "Allow users moderator privileges" - -msgid "Mod privileges help" -msgstr "In order for a user in this group to have moderator abilities, he/she must be assigned to moderate one or more forums. This is done via the user administration page of the user's profile." - -msgid "Edit profile label" -msgstr "Allow moderators to edit user profiles" - -msgid "Edit profile help" -msgstr "If moderator privileges are enabled, allow users in this group to edit user profiles." - -msgid "Rename users label" -msgstr "Allow moderators to rename users" - -msgid "Rename users help" -msgstr "If moderator privileges are enabled, allow users in this group to rename users." - -msgid "Change passwords label" -msgstr "Allow moderators to change passwords" - -msgid "Change passwords help" -msgstr "If moderator privileges are enabled, allow users in this group to change user passwords." - -msgid "Mod promote users label" -msgstr "Allow moderators to promote users" - -msgid "Mod promote users help" -msgstr "If moderator privileges are enabled, allow users in this group to promote users." - -msgid "Ban users label" -msgstr "Allow moderators to ban users" - -msgid "Ban users help" -msgstr "If moderator privileges are enabled, allow users in this group to ban users." - -msgid "Read board label" -msgstr "Read board" - -msgid "Read board help" -msgstr "Allow users in this group to view the board. This setting applies to every aspect of the board and can therefore not be overridden by forum specific settings. If this is set to \"No\", users in this group will only be able to login/logout and register." - -msgid "View user info label" -msgstr "View user information" - -msgid "View user info help" -msgstr "Allow users to view the user list and user profiles." - -msgid "Post replies label" -msgstr "Post replies" - -msgid "Post replies help" -msgstr "Allow users in this group to post replies in topics." - -msgid "Post topics label" -msgstr "Post topics" - -msgid "Post topics help" -msgstr "Allow users in this group to post new topics." - -msgid "Edit posts label" -msgstr "Edit posts" - -msgid "Edit posts help" -msgstr "Allow users in this group to edit their own posts." - -msgid "Delete posts label" -msgstr "Delete posts" - -msgid "Delete posts help" -msgstr "Allow users in this group to delete their own posts." - -msgid "Delete topics label" -msgstr "Delete topics" - -msgid "Delete topics help" -msgstr "Allow users in this group to delete their own topics (including any replies)." - -msgid "Post links label" -msgstr "Post links" - -msgid "Post links help" -msgstr "Allow users in this group to include links in their posts. This setting also applies to signatures and the website field in users' profiles." - -msgid "Set own title label" -msgstr "Set own user title" - -msgid "Set own title help" -msgstr "Allow users in this group to set their own user title." - -msgid "User search label" -msgstr "Use search" - -msgid "User search help" -msgstr "Allow users in this group to use the search feature." - -msgid "User list search label" -msgstr "Search user list" - -msgid "User list search help" -msgstr "Allow users in this group to freetext search for users in the user list." - -msgid "Send e-mails label" -msgstr "Send e-mails" - -msgid "Send e-mails help" -msgstr "Allow users in this group to send e-mails to other users." - -msgid "Post flood label" -msgstr "Post flood interval" - -msgid "Post flood help" -msgstr "Number of seconds that users in this group have to wait between posts. Set to 0 to disable." - -msgid "Search flood label" -msgstr "Search flood interval" - -msgid "Search flood help" -msgstr "Number of seconds that users in this group have to wait between searches. Set to 0 to disable." - -msgid "E-mail flood label" -msgstr "Email flood interval" - -msgid "E-mail flood help" -msgstr "Number of seconds that users in this group have to wait between emails. Set to 0 to disable." - -msgid "Report flood label" -msgstr "Report flood interval" - -msgid "Report flood help" -msgstr "Number of seconds that users in this group have to wait between reports. Set to 0 to disable." - -msgid "Moderator info" -msgstr "Please note that in order for a user in this group to have moderator abilities, he/she must be assigned to moderate one or more forums. This is done via the user administration page of the user's profile." diff --git a/lang/English/admin/index.html b/lang/English/admin/index.html deleted file mode 100644 index 89337b2f..00000000 --- a/lang/English/admin/index.html +++ /dev/null @@ -1 +0,0 @@ -.. diff --git a/lang/English/admin/index.mo b/lang/English/admin/index.mo deleted file mode 100644 index 4a7addb19d2ddd3d3b13821c293300399d51aedd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4052 zcmaKuO^h5z6~`;V5LiND5<&=pP=*BWCg~op?KsP93|`NAiKTdVvb#10Az3xuH8YKS zs+y|m9j_6HBSMHnByLe8K8`>nF2IQoi4%eY2mu0xOC&%D2`NH|1Bm~ts_vcf+O($o zS6x-}>V4I#e(ixHUt_pdaK8`tAMavp3w-%ac;Nco5ylq4--B-lUk4ur{{eFF-ZwM$ zPA~x<06!MF4c>=$2|frq@DcD!Ag%L_*#9H&U3mXB_#W^tAj!MyEsVVzd=PvXd=fkg zo(D;f9q?`7HIU>N;N9To!S{n-1m6L^0+QTsgO7nf14+*7Ag%LHkk+~9p0LhiAjv%g z(*MszZh~arr$N$RgY>_zfHeP`k>82@e&kOge;)ap$UjB?HS!IR^!g77mDqi64R$^R zk{^$OWakO+UT_^G{a*x0j|?O~-2_R$m%u(^`6_rn-YJMA_b5p5dl;nkPJtw69mG_2 zCGuM27$o~X3!VZ$2YwKI6{NWR3MBb|21&1fffS!3c#yoKAjy9Or1?*Q2r)Yc;>R}d zSOvF1O1ZCsSHYJ+^8eq!=fHo1C%`jUgzO!G=we?0N&c53Uj|9v?}Bh8`vFLDehgCl ze+eew-$9b|C__ajK(10M&; z&%Xt!|1}Ul_68nLfp^1MSem8aL*Od71-=MU{Jsvp7yKcJ@Od8sUI%pf9H;l@T1JEH zB_Ggr1~=JBKBhR+MS1ff+~kj^aX*gx817pyiZ5MH;Kug${(TlC|Ipqge~?Y&hvs@F zHfV30jO|5`d_?ggACW)E=F_-4xXDhsk^oOL0?P(?xm0 zag(2JchP=lYXe<7K9(Y9Yo#>KHf<-360X>jy#IWk_e3_9d~vPcTf)3Mj`6Zk*I92Y zv+I1Q4X>+_5xHdR!ij;flILh}qo?+kE?eB3nN^B`EZMp&rIWl+)`_y@!=l8LxxTa- zS9~ZikjIg{neK;-%nKtk$1bS7!e}*-$^{j+b`JN6EIZt}Cygz%ni~k}ZAjt9(wslf z;~X!U9qx|PwW%ju*c>#x~`&T}JG|VlgNspGa%P zNU}}sc-zYmuR;wq&kIYl@^;#GtyG~#SjkE2T6v9>9cf?*FSW>nDYG3xyV!$(IA~U6 zFp{?bKDJjf+O^)&>c3>5|VXHun}X=yJ##j-;bZ@)2&$xKh9wHYj_b z3HyXBGd+=fxow?nTc_IA>9+Mu+d9*>o^4wzZR;a#%jpn5b~Pv-5H$XjR5{k zT;-v8c2V(TXZiBd>O$Y>&tQur7xUyw$n`F7b9kY@wVU(|G9Ak$*u}ET(U)w?y@Iwy z)AfR|F4;9gS>%>BnDl~BqZ+xH>`F12k;tF(Tj1OAHCcFC;7IpH5>r|yE)GCrf7%Sb`%ex!N%E3HZeJD+GL1j8ens@oipm41sT`twa z)#T$+g$Q(cU!y!YzMQV4r!f*AS8zLQazL-dqFbte_u(yq%Kl?N3Cbv_imr}+Tqk{x^Fk^aHi)Y&UoZ|N5k^c_y&E^i=r*hthp(9TYAIpDU)MCLMso zT4iJjM@XrnEiN4_(-v9`yKw=J`{I-`T2&Y*9}Dko7M)c*Wznm=hJ;1C#I?eKDp{_Q-Lvu*Xp{06X9E7wL&oN zP>#3ENGPN=-0tK^n?hQS+@#NfdV;_0NEh14w8$mbD4h`Jr&LB_BTI#>O_Bb}8C`Ou z>!h$$bZq#vfQ!QPQH|5AQRHGDY1E!hUSXP;vh#>Oxs^mpWnsxwn;dVXNL~3cJ~Fzl z8YT2Zd!16&M*yKBwqd3HQqRK@>@IqPBj{v&9Aq~_B9z5w>|B+HESNvSd^x*`B~u)-oyzFEhEg5Wc$0UiKcNWv!>==U zxcNUyd|Nd~Uyy!T`7apwDxUFBD}F6\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "fopen disabled message" -msgstr "Unable to check for upgrade since 'allow_url_fopen' is disabled on this system." - -msgid "Upgrade check failed message" -msgstr "Check for upgrade failed for unknown reasons." - -msgid "Running latest version message" -msgstr "You are running the latest version of FeatherBB." - -msgid "New version available message" -msgstr "A new version of FeatherBB has been released. You can download the latest version at %s." - -msgid "Deleted install.php redirect" -msgstr "The file was successfully removed." - -msgid "Delete install.php failed" -msgstr "Could not remove install.php. Please do so by hand." - -msgid "Not available" -msgstr "Not available" - -msgid "Forum admin head" -msgstr "Forum administration" - -msgid "NA" -msgstr "N/A" - -msgid "Welcome to admin" -msgstr "Welcome to the FeatherBB administration control panel. From here you can control vital aspects of the board. Depending on whether you are an administrator or a moderator you can:" - -msgid "Welcome 1" -msgstr "Organize categories and forums." - -msgid "Welcome 2" -msgstr "Set forum-wide options and preferences." - -msgid "Welcome 3" -msgstr "Control permissions for users and guests." - -msgid "Welcome 4" -msgstr "View IP statistics for users." - -msgid "Welcome 5" -msgstr "Ban users." - -msgid "Welcome 6" -msgstr "Censor words." - -msgid "Welcome 7" -msgstr "Set up user groups and promotions." - -msgid "Welcome 8" -msgstr "Prune old posts." - -msgid "Welcome 9" -msgstr "Handle post reports." - -msgid "Alerts head" -msgstr "Alerts" - -msgid "Install file exists" -msgstr "The install folder still exists, but should be removed. %s." - -msgid "Delete install file" -msgstr "Delete it" - -msgid "About head" -msgstr "About FeatherBB" - -msgid "FeatherBB version label" -msgstr "FeatherBB version" - -msgid "Check for upgrade" -msgstr "Check for upgrade" - -msgid "FeatherBB version data" -msgstr "v%s - %s" - -msgid "Server statistics label" -msgstr "Server statistics" - -msgid "View server statistics" -msgstr "View server statistics" - -msgid "Support label" -msgstr "Support" - -msgid "Forum label" -msgstr "Forum" - -msgid "IRC label" -msgstr "IRC channel" - -msgid "PHPinfo disabled message" -msgstr "The PHP function phpinfo() has been disabled on this server." - -msgid "Server statistics head" -msgstr "Server statistics" - -msgid "Server load label" -msgstr "Server load" - -msgid "Server load data" -msgstr "%s - %s user(s) online" - -msgid "Environment label" -msgstr "Environment" - -msgid "Environment data OS" -msgstr "Operating system: %s" - -msgid "Show info" -msgstr "Show info" - -msgid "Environment data version" -msgstr "PHP: %s - %s" - -msgid "Environment data acc" -msgstr "Accelerator: %s" - -msgid "Turck MMCache" -msgstr "Turck MMCache" - -msgid "Turck MMCache link" -msgstr "turck-mmcache.sourceforge.net/" - -msgid "ionCube PHP Accelerator" -msgstr "ionCube PHP Accelerator" - -msgid "ionCube PHP Accelerator link" -msgstr "www.php-accelerator.co.uk/" - -msgid "Alternative PHP Cache (APC)" -msgstr "Alternative PHP Cache (APC)" - -msgid "Alternative PHP Cache (APC) link" -msgstr "www.php.net/apc/" - -msgid "Zend Optimizer" -msgstr "Zend Optimizer" - -msgid "Zend Optimizer link" -msgstr "www.zend.com/products/guard/zend-optimizer/" - -msgid "eAccelerator" -msgstr "eAccelerator" - -msgid "eAccelerator link" -msgstr "www.eaccelerator.net/" - -msgid "XCache" -msgstr "XCache" - -msgid "XCache link" -msgstr "xcache.lighttpd.net/" - -msgid "Database label" -msgstr "Database" - -msgid "Database data rows" -msgstr "Rows: %s" - -msgid "Database data size" -msgstr "Size: %s" diff --git a/lang/English/admin/maintenance.mo b/lang/English/admin/maintenance.mo deleted file mode 100644 index d31d3736a25e05750fa3194d34023a5c9a20a5ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4083 zcmbuCOKc=Z8OIw~Aecu;cs~NQBO>n#Pw$$|!SX&}V|ydR?#A+ZH*lk-yJoscKStfv zo(w01h=i0&E+FMd4hST~E#kt7oRK(iiUdN*1;L2}Qleb=eO1*n<4J;q7^(g5s;>Ip z-@nR#ee~SVB7Os&FY|1@FN!XK*WS+`es6*s;9CLDeISY+W&AMs8E_EBJD}|U4)}2} z13v+tf}aGR2Oj}{4t^2*RhWMj6ghte9|QjZej0q}oS%Oz;1%#;<_`mY4-~mMDE9p@ z;Pas9c@Y#lUk1gVSHRDLuZHn!;rrh~(f@Y9M?M%upJTiU%KmSHp8}7;BVscKMc?l} z)z( z(Z_gjG5QjZ$dlTUx{#VtJn|DeNK15{2RB^2favo)U*QqEq;4folEYB4ym_D83xB@Q zzkr0%#UZ*`6lz>IUD-x^MV>sXGSir7udc>tmxRYv92xL%uTyHRFzx;8u0O%?6y zd8^82+A<_Q)B3y$j6zPEk;>lBNVc~XcV%v_)J zri59EP`WTCI%?_!O?fp@Q#3J_2#%Y&46>HvAjVBNgZ)|;ZU5R@GBRJ?7-m+t_Nh2F zqb|qaq%Nn0u^8nf_0uk_(V5Y^EKqCG#1Eg4RbevQ8r>wB{}|n~y0N{_-rloQ!Qi56 zbTPbDH)Xr4s;L{c*S~R9`Pb_gDs}$4+P-*ogE;|R~YdS6S z>RV&4Vl;~DW^!ZW&f%SdrT*>s@&=tjks)aI!5p4YLf zyps3m-kXh4^SUFKyx2@zH=60n(hQ-eHGLmCgC?QgSy!pYTa`-tx_V`Bfyb}97_arZ zRCgOabMyG_;oYasD=FB%01#rN0@<4xNW?Uyt_WH&kA2H8tmtV%OS9xQKV34$sV+Jb zM<(8;B$Yk^u2pOfc}!H@Q8Zm6ud*VfvbX*n z@#y2@Yj*wUP}f@9)Yat14OpH7o1^8u62C2(={jO2oIe8i!?rNV(1sA`r&Te@ghdp&q~W?`6AHwYWYPB@+>E9%=Sbq zsg)kpjSux&5pKZ%&(id?yfxCj5|n~-vX2b=9r+#ZyUy^W>3lof|N6E#F*tj)AMOv7 z7)HnFt! z7x=(-CFSiBq}8OZsVK2Qc$ogJE7jHvlX^UcUw4NWSEZbhej*JgCn?3m?pAJzy@jGu zThS-y%2;=W4Mz&?C7$pP2s=6HaxRZt#gVa=<5=All9B8?`V)$gW4z}\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Maintenance head" -msgstr "Forum maintenance" - -msgid "Rebuild index subhead" -msgstr "Rebuild search index" - -msgid "Rebuild index info" -msgstr "If you've added, edited or removed posts manually in the database or if you're having problems searching, you should rebuild the search index. For best performance, you should put the forum in %s during rebuilding. Rebuilding the search index can take a long time and will increase server load during the rebuild process!" - -msgid "Posts per cycle label" -msgstr "Posts per cycle" - -msgid "Posts per cycle help" -msgstr "The number of posts to process per pageview. E.g. if you were to enter 300, three hundred posts would be processed and then the page would refresh. This is to prevent the script from timing out during the rebuild process." - -msgid "Starting post label" -msgstr "Starting post ID" - -msgid "Starting post help" -msgstr "The post ID to start rebuilding at. The default value is the first available ID in the database. Normally you wouldn't want to change this." - -msgid "Empty index label" -msgstr "Empty index" - -msgid "Empty index help" -msgstr "Select this if you want the search index to be emptied before rebuilding (see below)." - -msgid "Rebuild completed info" -msgstr "Once the process has completed, you will be redirected back to this page. It is highly recommended that you have JavaScript enabled in your browser during rebuilding (for automatic redirect when a cycle has completed). If you are forced to abort the rebuild process, make a note of the last processed post ID and enter that ID+1 in \"Starting post ID\" when/if you want to continue (\"Empty index\" must not be selected)." - -msgid "Rebuild index" -msgstr "Rebuild index" - -msgid "Rebuilding search index" -msgstr "Rebuilding search index" - -msgid "Rebuilding index info" -msgstr "Rebuilding index. This might be a good time to put on some coffee :-)" - -msgid "Processing post" -msgstr "Processing post %s …" - -msgid "Click here" -msgstr "Click here" - -msgid "Javascript redirect failed" -msgstr "JavaScript redirect unsuccessful. %s to continue …" - -msgid "Posts must be integer message" -msgstr "Posts per cycle must be a positive integer value." - -msgid "Days must be integer message" -msgstr "Days to prune must be a positive integer value." - -msgid "No old topics message" -msgstr "There are no topics that are %s days old. Please decrease the value of \"Days old\" and try again." - -msgid "Posts pruned redirect" -msgstr "Posts pruned." - -msgid "Prune head" -msgstr "Prune" - -msgid "Prune subhead" -msgstr "Prune old posts" - -msgid "Days old label" -msgstr "Days old" - -msgid "Days old help" -msgstr "The number of days \"old\" a topic must be to be pruned. E.g. if you were to enter 30, every topic that didn't contain a post dated less than 30 days old would be deleted." - -msgid "Prune sticky label" -msgstr "Prune sticky topics" - -msgid "Prune sticky help" -msgstr "When enabled, sticky topics will also be pruned." - -msgid "Prune from label" -msgstr "Prune from forum" - -msgid "All forums" -msgstr "All forums" - -msgid "Prune from help" -msgstr "The forum from which you want to prune posts." - -msgid "Prune info" -msgstr "Use this feature with caution. Pruned posts can never be recovered. For best performance, you should put the forum in %s during pruning." - -msgid "Confirm prune subhead" -msgstr "Confirm prune posts" - -msgid "Confirm prune info" -msgstr "Are you sure that you want to prune all topics older than %s days from %s (%s topics)." - -msgid "Confirm prune warn" -msgstr "WARNING! Pruning posts deletes them permanently." diff --git a/lang/English/admin/options.mo b/lang/English/admin/options.mo deleted file mode 100644 index e650f058e17e820620ef23ad31d363620b23f641..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18847 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 RkHK1LAzR7B9c9ro`F~JqR&M|R diff --git a/lang/English/admin/options.po b/lang/English/admin/options.po deleted file mode 100644 index 9df9a3d3..00000000 --- a/lang/English/admin/options.po +++ /dev/null @@ -1,603 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Bad HTTP Referer message" -msgstr "Bad HTTP_REFERER. If you have moved these forums from one location to another or switched domains, you need to update the Base URL manually in the database (look for o_base_url in the config table) and then clear the cache by deleting all .php files in the /cache directory." - -msgid "Must enter title message" -msgstr "You must enter a board title." - -msgid "Invalid e-mail message" -msgstr "The admin email address you entered is invalid." - -msgid "Invalid webmaster e-mail message" -msgstr "The webmaster email address you entered is invalid." - -msgid "SMTP passwords did not match" -msgstr "You need to enter the SMTP password twice exactly the same to change it." - -msgid "Enter announcement here" -msgstr "Enter your announcement here." - -msgid "Enter rules here" -msgstr "Enter your rules here." - -msgid "Default maintenance message" -msgstr "The forums are temporarily down for maintenance. Please try again in a few minutes." - -msgid "Timeout error message" -msgstr "The value of \"Timeout online\" must be smaller than the value of \"Timeout visit\"." - -msgid "Options updated redirect" -msgstr "Options updated." - -msgid "Options head" -msgstr "Options" - -msgid "Essentials subhead" -msgstr "Essentials" - -msgid "Board title label" -msgstr "Board title" - -msgid "Board title help" -msgstr "The title of this bulletin board (shown at the top of every page). This field may not contain HTML." - -msgid "Board desc label" -msgstr "Board description" - -msgid "Board desc help" -msgstr "A short description of this bulletin board (shown at the top of every page). This field may contain HTML." - -msgid "Base URL label" -msgstr "Base URL" - -msgid "Base URL help" -msgstr "The complete URL of the board without trailing slash (i.e. http://www.mydomain.com/forums). This must be correct in order for all admin and moderator features to work. If you get \"Bad referer\" errors, it's probably incorrect." - -msgid "Base URL problem" -msgstr "Your installation does not support automatic conversion of internationalized domain names. As your base URL contains special characters, you must use an online converter in order to avoid \"Bad referer\" errors." - -msgid "Timezone label" -msgstr "Default time zone" - -msgid "Timezone help" -msgstr "The default time zone for guests and users attempting to register for the board." - -msgid "DST label" -msgstr "Adjust for DST" - -msgid "DST help" -msgstr "Check if daylight savings is in effect (advances times by 1 hour)." - -msgid "Language label" -msgstr "Default language" - -msgid "Language help" -msgstr "The default language for guests and users who haven't changed from the default in their profile. If you remove a language pack, this must be updated." - -msgid "Default style label" -msgstr "Default style" - -msgid "Default style help" -msgstr "The default style for guests and users who haven't changed from the default in their profile." - -msgid "UTC-12:00" -msgstr "(UTC-12:00) International Date Line West" - -msgid "UTC-11:00" -msgstr "(UTC-11:00) Niue, Samoa" - -msgid "UTC-10:00" -msgstr "(UTC-10:00) Hawaii-Aleutian, Cook Island" - -msgid "UTC-09:30" -msgstr "(UTC-09:30) Marquesas Islands" - -msgid "UTC-09:00" -msgstr "(UTC-09:00) Alaska, Gambier Island" - -msgid "UTC-08:30" -msgstr "(UTC-08:30) Pitcairn Islands" - -msgid "UTC-08:00" -msgstr "(UTC-08:00) Pacific" - -msgid "UTC-07:00" -msgstr "(UTC-07:00) Mountain" - -msgid "UTC-06:00" -msgstr "(UTC-06:00) Central" - -msgid "UTC-05:00" -msgstr "(UTC-05:00) Eastern" - -msgid "UTC-04:00" -msgstr "(UTC-04:00) Atlantic" - -msgid "UTC-03:30" -msgstr "(UTC-03:30) Newfoundland" - -msgid "UTC-03:00" -msgstr "(UTC-03:00) Amazon, Central Greenland" - -msgid "UTC-02:00" -msgstr "(UTC-02:00) Mid-Atlantic" - -msgid "UTC-01:00" -msgstr "(UTC-01:00) Azores, Cape Verde, Eastern Greenland" - -msgid "UTC" -msgstr "(UTC) Western European, Greenwich" - -msgid "UTC+01:00" -msgstr "(UTC+01:00) Central European, West African" - -msgid "UTC+02:00" -msgstr "(UTC+02:00) Eastern European, Central African" - -msgid "UTC+03:00" -msgstr "(UTC+03:00) Eastern African" - -msgid "UTC+03:30" -msgstr "(UTC+03:30) Iran" - -msgid "UTC+04:00" -msgstr "(UTC+04:00) Moscow, Gulf, Samara" - -msgid "UTC+04:30" -msgstr "(UTC+04:30) Afghanistan" - -msgid "UTC+05:00" -msgstr "(UTC+05:00) Pakistan" - -msgid "UTC+05:30" -msgstr "(UTC+05:30) India, Sri Lanka" - -msgid "UTC+05:45" -msgstr "(UTC+05:45) Nepal" - -msgid "UTC+06:00" -msgstr "(UTC+06:00) Bangladesh, Bhutan, Yekaterinburg" - -msgid "UTC+06:30" -msgstr "(UTC+06:30) Cocos Islands, Myanmar" - -msgid "UTC+07:00" -msgstr "(UTC+07:00) Indochina, Novosibirsk" - -msgid "UTC+08:00" -msgstr "(UTC+08:00) Greater China, Australian Western, Krasnoyarsk" - -msgid "UTC+08:45" -msgstr "(UTC+08:45) Southeastern Western Australia" - -msgid "UTC+09:00" -msgstr "(UTC+09:00) Japan, Korea, Chita, Irkutsk" - -msgid "UTC+09:30" -msgstr "(UTC+09:30) Australian Central" - -msgid "UTC+10:00" -msgstr "(UTC+10:00) Australian Eastern" - -msgid "UTC+10:30" -msgstr "(UTC+10:30) Lord Howe" - -msgid "UTC+11:00" -msgstr "(UTC+11:00) Solomon Island, Vladivostok" - -msgid "UTC+11:30" -msgstr "(UTC+11:30) Norfolk Island" - -msgid "UTC+12:00" -msgstr "(UTC+12:00) New Zealand, Fiji, Magadan" - -msgid "UTC+12:45" -msgstr "(UTC+12:45) Chatham Islands" - -msgid "UTC+13:00" -msgstr "(UTC+13:00) Tonga, Phoenix Islands, Kamchatka" - -msgid "UTC+14:00" -msgstr "(UTC+14:00) Line Islands" - -msgid "Timeouts subhead" -msgstr "Time and timeouts" - -msgid "Time format label" -msgstr "Time format" - -msgid "PHP manual" -msgstr "PHP manual" - -msgid "Time format help" -msgstr "[Current format: %s]. See %s for formatting options." - -msgid "Date format label" -msgstr "Date format" - -msgid "Date format help" -msgstr "[Current format: %s]. See %s for formatting options." - -msgid "Visit timeout label" -msgstr "Visit timeout" - -msgid "Visit timeout help" -msgstr "Number of seconds a user must be idle before his/hers last visit data is updated (primarily affects new message indicators)." - -msgid "Online timeout label" -msgstr "Online timeout" - -msgid "Online timeout help" -msgstr "Number of seconds a user must be idle before being removed from the online users list." - -msgid "Redirect time label" -msgstr "Redirect time" - -msgid "Redirect time help" -msgstr "Number of seconds to wait when redirecting. If set to 0, no redirect page will be displayed (not recommended)." - -msgid "Display subhead" -msgstr "Display" - -msgid "Version number label" -msgstr "Version number" - -msgid "Version number help" -msgstr "Show FluxBB version number in footer." - -msgid "Info in posts label" -msgstr "User info in posts" - -msgid "Info in posts help" -msgstr "Show information about the poster under the username in topic view. The information affected is location, register date, post count and the contact links (email and URL)." - -msgid "Post count label" -msgstr "User post count" - -msgid "Post count help" -msgstr "Show the number of posts a user has made (affects topic view, profile and user list)." - -msgid "Smilies label" -msgstr "Smilies in posts" - -msgid "Smilies help" -msgstr "Convert smilies to small graphic icons." - -msgid "Smilies sigs label" -msgstr "Smilies in signatures" - -msgid "Smilies sigs help" -msgstr "Convert smilies to small graphic icons in user signatures." - -msgid "Clickable links label" -msgstr "Make clickable links" - -msgid "Clickable links help" -msgstr "When enabled, FluxBB will automatically detect any URLs in posts and make them clickable hyperlinks." - -msgid "Topic review label" -msgstr "Topic review" - -msgid "Topic review help" -msgstr "Maximum number of posts to display when posting (newest first). Set to 0 to disable." - -msgid "Topics per page label" -msgstr "Topics per page" - -msgid "Topics per page help" -msgstr "The default number of topics to display per page in a forum. Users can personalize this setting." - -msgid "Posts per page label" -msgstr "Posts per page" - -msgid "Posts per page help" -msgstr "The default number of posts to display per page in a topic. Users can personalize this setting." - -msgid "Indent label" -msgstr "Indent size" - -msgid "Indent help" -msgstr "If set to 8, a regular tab will be used when displaying text within the [code][/code] tag. Otherwise this many spaces will be used to indent the text." - -msgid "Quote depth label" -msgstr "Maximum [quote] depth" - -msgid "Quote depth help" -msgstr "The maximum times a [quote] tag can go inside other [quote] tags, any tags deeper than this will be discarded." - -msgid "Features subhead" -msgstr "Features" - -msgid "Quick post label" -msgstr "Quick reply" - -msgid "Quick post help" -msgstr "When enabled, FluxBB will add a quick reply form at the bottom of topics. This way users can post directly from the topic view." - -msgid "Users online label" -msgstr "Users online" - -msgid "Users online help" -msgstr "Display info on the index page about guests and registered users currently browsing the board." - -msgid "Censor words label" -msgstr "Censor words" - -msgid "Censor words help" -msgstr "Enable this to censor specific words in the board. See %s for more info." - -msgid "Signatures label" -msgstr "Signatures" - -msgid "Signatures help" -msgstr "Allow users to attach a signature to their posts." - -msgid "User has posted label" -msgstr "User has posted earlier" - -msgid "User has posted help" -msgstr "This feature displays a dot in front of topics in viewforum.php in case the currently logged in user has posted in that topic earlier. Disable if you are experiencing high server load." - -msgid "Topic views label" -msgstr "Topic views" - -msgid "Topic views help" -msgstr "Keep track of the number of views a topic has. Disable if you are experiencing high server load in a busy forum." - -msgid "Quick jump label" -msgstr "Quick jump" - -msgid "Quick jump help" -msgstr "Enable the quick jump (jump to forum) drop list." - -msgid "GZip label" -msgstr "GZip output" - -msgid "GZip help" -msgstr "If enabled, FluxBB will gzip the output sent to browsers. This will reduce bandwidth usage, but use a little more CPU. This feature requires that PHP is configured with zlib (--with-zlib). Note: If you already have one of the Apache modules mod_gzip or mod_deflate set up to compress PHP scripts, you should disable this feature." - -msgid "Search all label" -msgstr "Search all forums" - -msgid "Search all help" -msgstr "When disabled, searches will only be allowed in one forum at a time. Disable if server load is high due to excessive searching." - -msgid "Menu items label" -msgstr "Additional menu items" - -msgid "Menu items help" -msgstr "By entering HTML hyperlinks into this textbox, any number of items can be added to the navigation menu at the top of all pages. The format for adding new links is X = <a href=\"URL\">LINK</a> where X is the position at which the link should be inserted (e.g. 0 to insert at the beginning and 2 to insert after \"User list\"). Separate entries with a linebreak." - -msgid "Feed subhead" -msgstr "Syndication" - -msgid "Default feed label" -msgstr "Default feed type" - -msgid "Default feed help" -msgstr "Select the type of syndication feed to display. Note: Choosing none will not disable feeds, only hide them by default." - -msgid "None" -msgstr "None" - -msgid "RSS" -msgstr "RSS" - -msgid "Atom" -msgstr "Atom" - -msgid "Feed TTL label" -msgstr "Duration to cache feeds" - -msgid "Feed TTL help" -msgstr "Feeds can be cached to lower the resource usage of feeds." - -msgid "No cache" -msgstr "Don't cache" - -msgid "Minutes" -msgstr "%d minutes" - -msgid "Reports subhead" -msgstr "Reports" - -msgid "Reporting method label" -msgstr "Reporting method" - -msgid "Internal" -msgstr "Internal" - -msgid "By e-mail" -msgstr "Email" - -msgid "Both" -msgstr "Both" - -msgid "Reporting method help" -msgstr "Select the method for handling topic/post reports. You can choose whether topic/post reports should be handled by the internal report system, emailed to the addresses on the mailing list (see below) or both." - -msgid "Mailing list label" -msgstr "Mailing list" - -msgid "Mailing list help" -msgstr "A comma separated list of subscribers. The people on this list are the recipients of reports." - -msgid "Avatars subhead" -msgstr "Avatars" - -msgid "Use avatars label" -msgstr "Use avatars" - -msgid "Use avatars help" -msgstr "When enabled, users will be able to upload an avatar which will be displayed under their title." - -msgid "Upload directory label" -msgstr "Upload directory" - -msgid "Upload directory help" -msgstr "The upload directory for avatars (relative to the FluxBB root directory). PHP must have write permissions to this directory." - -msgid "Max width label" -msgstr "Max width" - -msgid "Max width help" -msgstr "The maximum allowed width of avatars in pixels (60 is recommended)." - -msgid "Max height label" -msgstr "Max height" - -msgid "Max height help" -msgstr "The maximum allowed height of avatars in pixels (60 is recommended)." - -msgid "Max size label" -msgstr "Max size" - -msgid "Max size help" -msgstr "The maximum allowed size of avatars in bytes (10240 is recommended)." - -msgid "E-mail subhead" -msgstr "Email" - -msgid "Admin e-mail label" -msgstr "Admin email" - -msgid "Admin e-mail help" -msgstr "The email address of the board administrator." - -msgid "Webmaster e-mail label" -msgstr "Webmaster email" - -msgid "Webmaster e-mail help" -msgstr "This is the address that all emails sent by the board will be addressed from." - -msgid "Forum subscriptions label" -msgstr "Forum subscriptions" - -msgid "Forum subscriptions help" -msgstr "Enable users to subscribe to forums (receive email when someone creates a new topic)." - -msgid "Topic subscriptions label" -msgstr "Topic subscriptions" - -msgid "Topic subscriptions help" -msgstr "Enable users to subscribe to topics (receive email when someone replies)." - -msgid "SMTP address label" -msgstr "SMTP server address" - -msgid "SMTP address help" -msgstr "The address of an external SMTP server to send emails with. You can specify a custom port number if the SMTP server doesn't run on the default port 25 (example: mail.myhost.com:3580). Leave blank to use the local mail program." - -msgid "SMTP username label" -msgstr "SMTP username" - -msgid "SMTP username help" -msgstr "Username for SMTP server. Only enter a username if it is required by the SMTP server (most servers do not require authentication)." - -msgid "SMTP password label" -msgstr "SMTP password" - -msgid "SMTP change password help" -msgstr "Check this if you want to change or delete the currently stored password." - -msgid "SMTP password help" -msgstr "Password for SMTP server. Only enter a password if it is required by the SMTP server (most servers do not require authentication). Please enter your password twice to confirm." - -msgid "SMTP SSL label" -msgstr "Encrypt SMTP using SSL" - -msgid "SMTP SSL help" -msgstr "Encrypts the connection to the SMTP server using SSL. Should only be used if your SMTP server requires it and your version of PHP supports SSL." - -msgid "Registration subhead" -msgstr "Registration" - -msgid "Allow new label" -msgstr "Allow new registrations" - -msgid "Allow new help" -msgstr "Controls whether this board accepts new registrations. Disable only under special circumstances." - -msgid "Verify label" -msgstr "Verify registrations" - -msgid "Verify help" -msgstr "When enabled, users are emailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new email addresses if they choose to change from the one they registered with. This is an effective way of avoiding registration abuse and making sure that all users have \"correct\" email addresses in their profiles." - -msgid "Report new label" -msgstr "Report new registrations" - -msgid "Report new help" -msgstr "If enabled, FluxBB will notify users on the mailing list (see above) when a new user registers in the forums." - -msgid "Use rules label" -msgstr "User forum rules" - -msgid "Use rules help" -msgstr "When enabled, users must agree to a set of rules when registering (enter text below). The rules will always be available through a link in the navigation table at the top of every page." - -msgid "Rules label" -msgstr "Enter your rules here" - -msgid "Rules help" -msgstr "Here you can enter any rules or other information that the user must review and accept when registering. If you enabled rules above you have to enter something here, otherwise it will be disabled. This text will not be parsed like regular posts and thus may contain HTML." - -msgid "E-mail default label" -msgstr "Default email setting" - -msgid "E-mail default help" -msgstr "Choose the default privacy setting for new user registrations." - -msgid "Display e-mail label" -msgstr "Display email address to other users." - -msgid "Hide allow form label" -msgstr "Hide email address but allow form e-mail." - -msgid "Hide both label" -msgstr "Hide email address and disallow form email." - -msgid "Announcement subhead" -msgstr "Announcements" - -msgid "Display announcement label" -msgstr "Display announcement" - -msgid "Display announcement help" -msgstr "Enable this to display the below message in the board." - -msgid "Announcement message label" -msgstr "Announcement message" - -msgid "Announcement message help" -msgstr "This text will not be parsed like regular posts and thus may contain HTML." - -msgid "Maintenance subhead" -msgstr "Maintenance" - -msgid "Maintenance mode label" -msgstr "Maintenance mode" - -msgid "Maintenance mode help" -msgstr "When enabled, the board will only be available to administrators. This should be used if the board needs to be taken down temporarily for maintenance. WARNING! Do not log out when the board is in maintenance mode. You will not be able to login again." - -msgid "Maintenance message label" -msgstr "Maintenance message" - -msgid "Maintenance message help" -msgstr "The message that will be displayed to users when the board is in maintenance mode. If left blank, a default message will be used. This text will not be parsed like regular posts and thus may contain HTML." diff --git a/lang/English/admin/parser.mo b/lang/English/admin/parser.mo deleted file mode 100644 index b18ade305d28766faae4f1f67744c3d60cc02cf4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5557 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 diff --git a/lang/English/admin/parser.php b/lang/English/admin/parser.php deleted file mode 100644 index e15237e9..00000000 --- a/lang/English/admin/parser.php +++ /dev/null @@ -1,93 +0,0 @@ - 'Parser Options, BBCodes and Smilies', - 'reset_success' => 'Parser Options, BBCodes and Smilies successfully reset to FluxBB default settings.', - 'save_success' => 'Parser changes successfully saved.', - 'upload success' => 'Smiley file upload successful.', - 'upload_button' => 'Upload Smiley Image', - 'reset defaults' => 'Restore default settings', - -/* *********************************************************************** */ - 'Remotes subhead' => 'Remote image validation', - 'unavailable' => 'This function is unavailable.', - -/* *********************************************************************** */ - 'Config subhead' => 'Parser options', - - 'syntax style' => 'CODE syntax style', - 'syntax style help' => 'Select a style sheet file from this list of currently installed SyntaxHighlighter files.', - - 'textile' => 'Enable Textile shortcuts', - 'textile help' => 'Enable some textile tag keystroke shortcuts: _emphasized_, *strong*, @inline code@, super^script^, sub~script~, -deleted- and +inserted+ text. Textile shortcuts for bulleted (*) and numbered (#) lists are also supported. When posting a new message, (or editing an existing one), during the pre-parsing phase, the textile shortcut delimiters are converted to their equivalent BBCode tags before being stored in the database.', - - 'quote_imgs' => 'Display IMG in QUOTE ', - 'quote_imgs help' => 'Display images contained within QUOTE tags. If this option is set to "No" (the default setting), then images within a quote are not displayed graphically but are instead displayed as a simple text hyperlink to the image (with the link text set to: "{IMG}"). If this option is set to "Yes", then images within quotes are displayed normally (as a graphic object).', - - 'quote_links' => 'Linkify QUOTE citation', - 'quote_links help' => 'Make the "Poster wrote:" citation text a link back to the original post for quotes having original post number metadata included in the tag attribute (the post number, preceded by a: \'#\', is specified at the end of the attribute like so: "[quote=Admin #101]...[/quote]").', - - 'click_imgs' => 'Make IMG clickable', - 'click_imgs help' => 'Display images and also make each image a clickable link to the full sized original.', - - 'max_xy' => 'Maximum media XY', - 'max_xy help' => 'Maximum pixel width and height allowable for new visual media objects (images, videos etc).', - - 'smiley_size' => 'Smiley display size', - 'smiley_size help' => 'Percent size adjustment for smiley box dimensions (default 160% == 24x24 pixels).', - -/* *********************************************************************** */ - 'valid_imgs' => 'Validate remote IMG', - 'valid_imgs help' => 'When posting a message having IMG tags, validate the existence of the remote image files by requesting their file header information. Check each remote image filesize and do NOT display if too big (to save the forum viewer\'s bandwidth). If any image has a dimension greater than "Max width" or "Max height", then limit the displayed image to fit. (Note that this option is disabled if the PHP variable "allow_url_fopen" is FALSE.)', - - 'max_size' => 'Maximum IMG filesize', - 'max_size help' => 'Maximum remote image filesize to be allowed on forum pages. When creating a new post, the remote image file size is checked against this value and reported as an error if it is too big and image validation is on.', - - 'def_xy' => 'Default media XY', - 'def_xy help' => 'Default pixel width and height for new visual media objects (images, videos etc). When a post has an IMG tag and the "Validate remote IMG" option is turned on, then the remote file information is scaled to fit within these dimensions and retain the original aspect ratio.', - -/* *********************************************************************** */ - 'Smilies subhead' => 'Smilies', - 'smiley_text_label' => 'Smiley text', - 'smiley_file_label' => 'Smiley image file', - 'smiley_upload' => 'Upload new smiley image', - 'New smiley image' => 'New smiley image', - 'upload_err_1' => 'Smiley upload failed. Unable to move to smiley folder.', - 'upload_err_2' => 'Smiley upload failed. File is too big.', - 'upload_err_3' => 'Smiley upload failed. File type is not an image.', - 'upload_err_4' => 'Smiley upload failed. Bad filename.', - 'upload_err_5' => 'Smiley upload failed. File only partially uploaded.', - 'upload_err_6' => 'Smiley upload failed. No filename.', - 'upload_err_7' => 'Smiley upload failed. No temporary folder.', - 'upload_err_8' => 'Smiley upload failed. Cannot write file to disk.', - 'upload_err_9' => 'Smiley upload failed. Unknown error!', - 'upload_off' => 'Uploading files is currently disabled.', - 'upload_button' => 'Upload File', - -/* *********************************************************************** */ - 'BBCodes subhead' => 'BBCodes', - 'tagname_label' => 'BBCode Tag Name', - 'tagtype_label' => 'Tag type', - 'in_post_label' => 'Allow in posts?', - 'in_sig_label' => 'Allow in signatures?', - 'depth_max' => 'Max tag nesting depth.', - 'tag_summary' => array( - 'unknown' => 'Unrecognized tag - (need to update language file).', - 'code' => 'Computer Code. [attrib=language].', - 'quote' => 'Block Quotation. [attrib == citation].', - 'list' => 'Ordered or Unordered list. (*=bulleted | a=alpha | 1=numeric).', - '*' => 'List Item.', - 'h' => 'Header 5. [attrib=TITLE].', - 'img' => 'Inline Image. [attrib=ALT=TITLE].', - 'url' => 'Hypertext Link. [attrib=URL].', - 'b' => 'Strong Emphasis. (Bold).', - 'i' => 'Emphasis. (Italic).', - 's' => 'Strike-through Text.', - 'u' => 'Underlined Text.', - 'color' => 'Color. attrib=[#FFF | #FFFFFF | red].', - 'tt' => 'Teletype Text.', - 'center' => 'Centered Block.', - 'err' => 'Error codes generated by parser for invalid BBCode. [attrib=TITLE].', - 'dbug' => 'Debug messages generated by parser. [attrib=TITLE].', - ), -); diff --git a/lang/English/admin/parser.po b/lang/English/admin/parser.po deleted file mode 100644 index b21ec9f5..00000000 --- a/lang/English/admin/parser.po +++ /dev/null @@ -1,168 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Parser head" -msgstr "Parser Options, BBCodes and Smilies" - -msgid "reset_success" -msgstr "Parser Options, BBCodes and Smilies successfully reset to FluxBB default settings." - -msgid "save_success" -msgstr "Parser changes successfully saved." - -msgid "upload success" -msgstr "Smiley file upload successful." - -msgid "upload_button" -msgstr "Upload File" - -msgid "reset defaults" -msgstr "Restore default settings" - -msgid "Remotes subhead" -msgstr "Remote image validation" - -msgid "unavailable" -msgstr "This function is unavailable." - -msgid "Config subhead" -msgstr "Parser options" - -msgid "syntax style" -msgstr "CODE syntax style" - -msgid "syntax style help" -msgstr "Select a style sheet file from this list of currently installed SyntaxHighlighter files." - -msgid "textile" -msgstr "Enable Textile shortcuts" - -msgid "textile help" -msgstr "Enable some textile tag keystroke shortcuts: _emphasized_, *strong*, @inline code@, super^script^, sub~script~, -deleted- and +inserted+ text. Textile shortcuts for bulleted (*) and numbered (#) lists are also supported. When posting a new message, (or editing an existing one), during the pre-parsing phase, the textile shortcut delimiters are converted to their equivalent BBCode tags before being stored in the database." - -msgid "quote_imgs" -msgstr "Display IMG in QUOTE " - -msgid "quote_imgs help" -msgstr "Display images contained within QUOTE tags. If this option is set to \"No\" (the default setting), then images within a quote are not displayed graphically but are instead displayed as a simple text hyperlink to the image (with the link text set to: \"{IMG}\"). If this option is set to \"Yes\", then images within quotes are displayed normally (as a graphic object)." - -msgid "quote_links" -msgstr "Linkify QUOTE citation" - -msgid "quote_links help" -msgstr "Make the \"Poster wrote:\" citation text a link back to the original post for quotes having original post number metadata included in the tag attribute (the post number, preceded by a: '#', is specified at the end of the attribute like so: \"[quote=Admin #101]...[/quote]\")." - -msgid "click_imgs" -msgstr "Make IMG clickable" - -msgid "click_imgs help" -msgstr "Display images and also make each image a clickable link to the full sized original." - -msgid "max_xy" -msgstr "Maximum media XY" - -msgid "max_xy help" -msgstr "Maximum pixel width and height allowable for new visual media objects (images, videos etc)." - -msgid "smiley_size" -msgstr "Smiley display size" - -msgid "smiley_size help" -msgstr "Percent size adjustment for smiley box dimensions (default 160% == 24x24 pixels)." - -msgid "valid_imgs" -msgstr "Validate remote IMG" - -msgid "valid_imgs help" -msgstr "When posting a message having IMG tags, validate the existence of the remote image files by requesting their file header information. Check each remote image filesize and do NOT display if too big (to save the forum viewer's bandwidth). If any image has a dimension greater than \"Max width\" or \"Max height\", then limit the displayed image to fit. (Note that this option is disabled if the PHP variable \"allow_url_fopen\" is FALSE.)" - -msgid "max_size" -msgstr "Maximum IMG filesize" - -msgid "max_size help" -msgstr "Maximum remote image filesize to be allowed on forum pages. When creating a new post, the remote image file size is checked against this value and reported as an error if it is too big and image validation is on." - -msgid "def_xy" -msgstr "Default media XY" - -msgid "def_xy help" -msgstr "Default pixel width and height for new visual media objects (images, videos etc). When a post has an IMG tag and the \"Validate remote IMG\" option is turned on, then the remote file information is scaled to fit within these dimensions and retain the original aspect ratio." - -msgid "Smilies subhead" -msgstr "Smilies" - -msgid "smiley_text_label" -msgstr "Smiley text" - -msgid "smiley_file_label" -msgstr "Smiley image file" - -msgid "smiley_upload" -msgstr "Upload new smiley image" - -msgid "New smiley image" -msgstr "New smiley image" - -msgid "upload_err_1" -msgstr "Smiley upload failed. Unable to move to smiley folder." - -msgid "upload_err_2" -msgstr "Smiley upload failed. File is too big." - -msgid "upload_err_3" -msgstr "Smiley upload failed. File type is not an image." - -msgid "upload_err_4" -msgstr "Smiley upload failed. Bad filename." - -msgid "upload_err_5" -msgstr "Smiley upload failed. File only partially uploaded." - -msgid "upload_err_6" -msgstr "Smiley upload failed. No filename." - -msgid "upload_err_7" -msgstr "Smiley upload failed. No temporary folder." - -msgid "upload_err_8" -msgstr "Smiley upload failed. Cannot write file to disk." - -msgid "upload_err_9" -msgstr "Smiley upload failed. Unknown error!" - -msgid "upload_off" -msgstr "Uploading files is currently disabled." - -msgid "BBCodes subhead" -msgstr "BBCodes" - -msgid "tagname_label" -msgstr "BBCode Tag Name" - -msgid "tagtype_label" -msgstr "Tag type" - -msgid "in_post_label" -msgstr "Allow in posts?" - -msgid "in_sig_label" -msgstr "Allow in signatures?" - -msgid "depth_max" -msgstr "Max tag nesting depth." - -msgid "tag_summary" -msgstr "" diff --git a/lang/English/admin/permissions.mo b/lang/English/admin/permissions.mo deleted file mode 100644 index b90e01493cdced77a818ba14c09c24312dcc9be4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2836 zcmb7_&u<(x6vqveAKjJ$Ek8>E7kWrgXVO&s2%DyYqzy`yh*gpzqzEMMj(65*#-5Hn zO>^OZg!lsxLWm38kl=v0a6*CuS0u!_NF2CwtB?=}zHjWE{gED;(M~?`^Yin2&+mEu zIDY6;hUZzlr|=%Vi?LboKaid;?`G^V@GJ0f@CWcX_$zn<{4>no3iC(qVeAOx&x1$7 z7F#K@UJlbH;j)R^7dW;N$(Yq z_PYX-y&aJ3lpwAD5G1|N!uT7I{P_v&Am-n}a~Pkw&)c~Qp2xTklHTVa&3_x_Z-Qqq z{u{)Pow%Q|)8I*v;<^C-18#zp-zyIwCNKq`17{C2_9D0j;>R5Rtb!kaPk_IG7r~q0 zli;ZqW3PcPgEVhI%J;`0#rFw_t=QKf<^MbIRq#iU;=Tpq#|~o=9WmT!9y%X-$WMxe zo_p~=gO_qi=Ryzd^B~@*@RBWxlj?`;laFw<_6?|WhNEg8@(rcJp2m9;FP#5*e2 zoiX1w#0`!i&!kS>z#E&Ad5euuX&I6_De`I^S?0=GWi%;?gpt7Vsz?x6!b_Q`61ip_ zW1Z3|w^g@R+mxxYt`rU{$As4^s88f$Q%=bIu3IYA!c`?a8yf6nRVlJ))nNNJ*F`pCh-uGK{yRj+Li>-~djmx9` z=i_s&6{DThu)0@ZQzvh@xgrxvFY?|%lvcW>tJ|y5!bp#H@5?f}ta~OwcH4ZRt6bwq zn@in#CwfzAiA0l+9fR|5d_G=?U&4$ZMq8#Tdve9^(dK>=>MFC#Mbm-K@E#n5KiueS zkJ?i?k)e{DLl)yv8-|{3ETG=}Y4JO^(X1I+3H^Bh8-7Kw5c(AE7pO(cXHb_W&!tXe zG8;2LJ)vtklq)Ms>X=Y(L&bV-Bo6CH*;15cUEWx^tI%bpq!ZNCzy=xZhWnwu9z>F$ zjO|=vFw`+$>m#Fm$A#kxUM8|Hs?2eme%(Jad(zIHtmuH=FaOeSY} zx59Fbu`C^z^)5pli~1rbQ0tr~s3kKrBA>wm+3%w*)OE>s#U3|(Z0<+^og6->B9kF7 z-?tWN^Hp-Yh@@py(51;N-yKNmt~!}$*@3CDWX$FL86$7T(*uW*5TQ+D2H~MelRZ8V zw$54;{y{@meVj?sT*gSOk6R|g@J5ppP9Z`cK4mkM*N)25cX#IKZ+%-2%PnTjb$myQ zrpk`bAao>uykZ-JRHkF4xLu#^4V70p*Hzv{-f@<6g`i-lKE+f~qY}{0zPDqBTfSb} zSPb6^c6+-hA>6_THc6}MZ$CUdc?!81{?ocVBo(9X(g$TQO&k03fxHhiUwup SyB#GQPp\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Perms updated redirect" -msgstr "Permissions updated." - -msgid "Permissions head" -msgstr "Permissions" - -msgid "Posting subhead" -msgstr "Posting" - -msgid "BBCode label" -msgstr "BBCode" - -msgid "BBCode help" -msgstr "Allow BBCode in posts (recommended)." - -msgid "Image tag label" -msgstr "Image tag" - -msgid "Image tag help" -msgstr "Allow the BBCode [img][/img] tag in posts." - -msgid "All caps message label" -msgstr "All caps message" - -msgid "All caps message help" -msgstr "Allow a message to contain only capital letters." - -msgid "All caps subject label" -msgstr "All caps subject" - -msgid "All caps subject help" -msgstr "Allow a subject to contain only capital letters." - -msgid "Require e-mail label" -msgstr "Require guest email" - -msgid "Require e-mail help" -msgstr "Require guests to supply an email address when posting." - -msgid "Signatures subhead" -msgstr "Signatures" - -msgid "BBCode sigs label" -msgstr "BBCodes in signatures" - -msgid "BBCode sigs help" -msgstr "Allow BBCodes in user signatures." - -msgid "Image tag sigs label" -msgstr "Image tag in signatures" - -msgid "Image tag sigs help" -msgstr "Allow the BBCode [img][/img] tag in user signatures (not recommended)." - -msgid "All caps sigs label" -msgstr "All caps signature" - -msgid "All caps sigs help" -msgstr "Allow a signature to contain only capital letters." - -msgid "Max sig length label" -msgstr "Maximum signature length" - -msgid "Max sig length help" -msgstr "The maximum number of characters a user signature may contain." - -msgid "Max sig lines label" -msgstr "Maximum signature lines" - -msgid "Max sig lines help" -msgstr "The maximum number of lines a user signature may contain." - -msgid "Registration subhead" -msgstr "Registration" - -msgid "Banned e-mail label" -msgstr "Allow banned email addresses" - -msgid "Banned e-mail help" -msgstr "Allow users to register with or change to a banned email address/domain. If left at its default setting (yes), this action will be allowed, but an alert email will be sent to the mailing list (an effective way of detecting multiple registrations)." - -msgid "Duplicate e-mail label" -msgstr "Allow duplicate email addresses" - -msgid "Duplicate e-mail help" -msgstr "Controls whether users should be allowed to register with an email address that another user already has. If allowed, an alert email will be sent to the mailing list if a duplicate is detected." diff --git a/lang/English/admin/plugin_example.mo b/lang/English/admin/plugin_example.mo deleted file mode 100644 index e0a606bdc922c117379a06cbd1f0c098bc8199bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1137 zcmZva%We}f6ow6yTY%D5thh+00mMbjKq?j`B^AA-rBVwKO%W`enKOxDVn?>8Y2E-H zpj)1ZCt$%Vuw@6oGwDSLOGlqCXMFxS{(sI*9SV#qh}#H{m_>X?gfVkQh&gZ;yaC<= zuYoTn+?;R^40j~pMbLmV;1IkDegQ9mhhPiw4RIaoUuT7w2LFI7;Pg2mzJe|A4)_Cn z4E_dhf_JBcxC}0X;ojHaEpQLSm7;@Xlq+KAGNL2E|=a| zByCIGEo7IYHp~908|kG?`%1sc$`YMUY;1SAva_|*JgHxcpHGi#$oEmoefd@(Ik?%nY6^^qakLfk*gbBSR zE&EK>i9@P!dBe~Yc}g87NnK-7asxAdTrcy_*vplNtw?qZTrz^rNy(Vj*(Fxt!(mT) z!cPSeD4$aB3)Zm5nPN3m$a zn-*FIit#5VD^tgnP^Nn9&+7cxjj2jQFJR~J)ubKs;yCU9{-x@DSB+^i7>}GUvMd&V E0VRz$fB*mh diff --git a/lang/English/admin/plugin_example.po b/lang/English/admin/plugin_example.po deleted file mode 100644 index 491eca80..00000000 --- a/lang/English/admin/plugin_example.po +++ /dev/null @@ -1,45 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "No text" -msgstr "You didn't enter anything!" - -msgid "Example plugin title" -msgstr "Example plugin" - -msgid "You said" -msgstr "You said \"%s\". Great stuff." - -msgid "Explanation 1" -msgstr "This plugin doesn't do anything useful. Hence the name \"Example\"." - -msgid "Explanation 2" -msgstr "This would be a good spot to talk a little about your plugin. Describe what it does and how it should be used. Be brief, but informative." - -msgid "Example form title" -msgstr "An example form" - -msgid "Legend text" -msgstr "Enter a piece of text and hit \"Show text\"!" - -msgid "Text to show" -msgstr "Text to show" - -msgid "Show text button" -msgstr "Show text" - -msgid "Input content" -msgstr "The text you want to display." diff --git a/lang/English/admin/reports.mo b/lang/English/admin/reports.mo deleted file mode 100644 index 3fcf39da696a0648275f2b7020ce364a802430ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1083 zcmY+CJ8u&~5XUc&5IDk9Q4ok?QG^7=U1CIGoiT#gF|rgJD;N~ft$h>w;Jkb6oq?p_ z3m`!O)cFSVbd+>7w4~w#(9rXrd-$=^+|Tn~@67S##V;1l1;};CXUG-E$^t$(LvR@k zz!mUS&UfGm=-UImZ9Yv4EVH24eTzP~|^`vY>{zaaNnUd-yQf&72hL9|U{ zmq0!UO%KQOu_1gHu6qW;_v3ftcR+f2&gEqAJtn74AtmHnImI|8W9`T|5v5HrBjjvpB6CwUaA z^bV}&GGgJHMOG&q8yPwcZAP&tRFtZ5^-e`(KdZNtxKS0Q+ZDTG^b1sUn!fXlOdM$C zi3Z7JNM>ux?mX@~H3JoPr!Eun1Z>VOy$(3EF!3umT_aT-%0wFk?MO8k%K??V45zDO5d(&@`d9$wm~)KvhJ4C{0XB^=Y@^ zl&5jreV>f8t@_#z)W8$vUXV;K;t5jrp7V$lne2`oO@4skxn=h*Jele|(PPu6TGqo8 zS(9Ss1+&>>>>-aI?=u}|dt+`1tS%msgoLQMO>pNuvo+joC)RJq^GksNr>1m4M$){5 ZLB?r&cXlH\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Report zapped redirect" -msgstr "Report marked as read." - -msgid "New reports head" -msgstr "New reports" - -msgid "Deleted user" -msgstr "Deleted user" - -msgid "Deleted" -msgstr "Deleted" - -msgid "Post ID" -msgstr "Post #%s" - -msgid "Report subhead" -msgstr "Reported %s" - -msgid "Reported by" -msgstr "Reported by %s" - -msgid "Reason" -msgstr "Reason" - -msgid "Zap" -msgstr "Mark as read" - -msgid "No new reports" -msgstr "There are no new reports." - -msgid "Last 10 head" -msgstr "10 last read reports" - -msgid "NA" -msgstr "N/A" - -msgid "Zapped subhead" -msgstr "Marked as read %s by %s" - -msgid "No zapped reports" -msgstr "There are no read reports." diff --git a/lang/English/admin/users.mo b/lang/English/admin/users.mo deleted file mode 100644 index 4ca0d53146c0d6a3443f8069beba1e47755dceed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7114 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 diff --git a/lang/English/admin/users.po b/lang/English/admin/users.po deleted file mode 100644 index 41af5899..00000000 --- a/lang/English/admin/users.po +++ /dev/null @@ -1,312 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Non numeric message" -msgstr "You entered a non-numeric value into a numeric only column." - -msgid "Invalid date time message" -msgstr "You entered an invalid date/time." - -msgid "Not verified" -msgstr "Not verified" - -msgid "No users selected" -msgstr "No users selected." - -msgid "No move admins message" -msgstr "For security reasons, you are not allowed to move multiple administrators to another group. If you want to move these administrators, you can do so on their respective user profiles." - -msgid "No delete admins message" -msgstr "Administrators cannot be deleted. In order to delete administrators, you must first move them to a different user group." - -msgid "No ban admins message" -msgstr "Administrators cannot be banned. In order to ban administrators, you must first move them to a different user group." - -msgid "No ban mods message" -msgstr "Moderators cannot be banned. In order to ban moderators, you must first move them to a different user group." - -msgid "Move users" -msgstr "Change user group" - -msgid "Move users subhead" -msgstr "Select new user group" - -msgid "New group label" -msgstr "New group" - -msgid "New group help" -msgstr "Select the group to which the selected users will be moved. For security reasons, it is not possible to move multiple users to the administrator group." - -msgid "Invalid group message" -msgstr "Invalid group ID." - -msgid "Users move redirect" -msgstr "User group changed." - -msgid "Delete users" -msgstr "Delete users" - -msgid "Confirm delete legend" -msgstr "Important: read before deleting users" - -msgid "Confirm delete info" -msgstr "Please confirm that you want to delete these users." - -msgid "Delete posts" -msgstr "Delete any posts and topics these users have made." - -msgid "Delete warning" -msgstr "Warning! Deleted users and/or posts cannot be restored. If you choose not to delete the posts made by these users, the posts can only be deleted manually at a later time." - -msgid "Users delete redirect" -msgstr "Users deleted." - -msgid "Ban users" -msgstr "Ban users" - -msgid "Message expiry subhead" -msgstr "Ban message and expiry" - -msgid "Ban message label" -msgstr "Ban message" - -msgid "Ban message help" -msgstr "A message that will be displayed to the banned users when they visit the board." - -msgid "Expire date label" -msgstr "Expire date" - -msgid "Expire date help" -msgstr "The date when these bans should be automatically removed (format: yyyy-mm-dd). Leave blank to remove manually." - -msgid "Ban IP label" -msgstr "Ban IP addresses" - -msgid "Ban IP help" -msgstr "Also ban the IP addresses of the banned users to make registering a new account more difficult for them." - -msgid "Invalid date message" -msgstr "You entered an invalid expire date." - -msgid "Invalid date reasons" -msgstr "The format should be YYYY-MM-DD and the date must be at least one day in the future." - -msgid "Users banned redirect" -msgstr "Users banned." - -msgid "User search head" -msgstr "User search" - -msgid "User search subhead" -msgstr "Enter search criteria" - -msgid "User search info" -msgstr "Search for users in the database. You can enter one or more terms to search for. Wildcards in the form of asterisks (*) are accepted." - -msgid "Username label" -msgstr "Username" - -msgid "E-mail address label" -msgstr "Email address" - -msgid "Title label" -msgstr "Title" - -msgid "Real name label" -msgstr "Real name" - -msgid "Website label" -msgstr "Website" - -msgid "Jabber label" -msgstr "Jabber" - -msgid "ICQ label" -msgstr "ICQ" - -msgid "MSN label" -msgstr "Microsoft Account" - -msgid "AOL label" -msgstr "AOL IM" - -msgid "Yahoo label" -msgstr "Yahoo Messenger" - -msgid "Location label" -msgstr "Location" - -msgid "Signature label" -msgstr "Signature" - -msgid "Admin note label" -msgstr "Admin note" - -msgid "Posts more than label" -msgstr "Number of posts greater than" - -msgid "Posts less than label" -msgstr "Number of posts less than" - -msgid "Last post after label" -msgstr "Last post is after" - -msgid "Date help" -msgstr "(yyyy-mm-dd hh:mm:ss)" - -msgid "Last post before label" -msgstr "Last post is before" - -msgid "Last visit after label" -msgstr "Last visit is after" - -msgid "Last visit before label" -msgstr "Last visit is before" - -msgid "Registered after label" -msgstr "Registered after" - -msgid "Registered before label" -msgstr "Registered before" - -msgid "Order by label" -msgstr "Order by" - -msgid "Order by username" -msgstr "Username" - -msgid "Order by e-mail" -msgstr "Email" - -msgid "Order by posts" -msgstr "Number of posts" - -msgid "Order by last post" -msgstr "Last post" - -msgid "Order by last visit" -msgstr "Last visit" - -msgid "Order by registered" -msgstr "Registered" - -msgid "Ascending" -msgstr "Ascending" - -msgid "Descending" -msgstr "Descending" - -msgid "User group label" -msgstr "User group" - -msgid "All groups" -msgstr "All groups" - -msgid "Unverified users" -msgstr "Unverified users" - -msgid "Submit search" -msgstr "Submit search" - -msgid "IP search head" -msgstr "IP search" - -msgid "IP search subhead" -msgstr "Enter IP to search for" - -msgid "IP address label" -msgstr "IP address" - -msgid "IP address help" -msgstr "The IP address to search for in the post database." - -msgid "Find IP address" -msgstr "Find IP address" - -msgid "Results head" -msgstr "Search Results" - -msgid "Results username head" -msgstr "Username" - -msgid "Results e-mail head" -msgstr "Email" - -msgid "Results title head" -msgstr "Title/Status" - -msgid "Results posts head" -msgstr "Posts" - -msgid "Results admin note head" -msgstr "Admin note" - -msgid "Results actions head" -msgstr "Actions" - -msgid "Results IP address head" -msgstr "IP address" - -msgid "Results last used head" -msgstr "Last used" - -msgid "Results times found head" -msgstr "Times found" - -msgid "Results action head" -msgstr "Action" - -msgid "Results find more link" -msgstr "Find more users for this ip" - -msgid "Results no posts found" -msgstr "There are currently no posts by that user in the forum." - -msgid "Select" -msgstr "Select" - -msgid "Select all" -msgstr "Select all" - -msgid "Unselect all" -msgstr "Unselect all" - -msgid "Ban" -msgstr "Ban" - -msgid "Delete" -msgstr "Delete" - -msgid "Change group" -msgstr "Change group" - -msgid "Bad IP message" -msgstr "The supplied IP address is not correctly formatted." - -msgid "Results view IP link" -msgstr "View IP stats" - -msgid "Results show posts link" -msgstr "Show posts" - -msgid "Results guest" -msgstr "Guest" - -msgid "Results no IP found" -msgstr "The supplied IP address could not be found in the database." - -msgid "No match" -msgstr "No match" diff --git a/lang/English/antispam.mo b/lang/English/antispam.mo deleted file mode 100644 index 2d884422712f3935e89b7acbab004e1cdb67f9c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 751 zcmYk4!EVz)5QYsDAsGn}7cLxzN=R^6mmm(2n*?auK&4bfB_KF(SjUrO!QM5qYf9b# z?r`JABk%w`1~;CC-*MBj^5@yvotfX>*}pfpzDF3B!ELY)u7CnG;|qwvS8xq{1J}V% za25OllM7Mw8+HtCT#TXt>^s;L_6O`O*gvoci!K37*LpDPvDLhfUFHHAJ9nqkk2U*X zoIP~|Jeq4$YuO&IP6=!3m_L~&bh9+pKB%c^>kA#6AZV=ZqSgymQ`Y5w z6{)B5(%2{SRwBz1CyPORba-@duHQ)>#6xETTU1?D5Dok}>{Nv|c9&*LEuKUF)pVq~ z=W&htoJAejnahn`q}0t!IQx*4*v4`8&Gi2VcK*%ZMN_FW-EH@Y83V-EGTO5w<2g@vD)NpKd(y& aJE8UE**+_hL{Eijh4kenLYnLKIQj?9tlQE6 diff --git a/lang/English/antispam.php b/lang/English/antispam.php deleted file mode 100644 index 67a827fb..00000000 --- a/lang/English/antispam.php +++ /dev/null @@ -1,23 +0,0 @@ - 'Are you human or robot?', - 'Robot question' => 'Please respond with a number to the question: %s', - 'Robot info' => 'Checking if this is requested by a real person and not an automated program.', - 'Robot test fail' => 'You answered incorrectly to the "Human or Robot" question.', -); - -$lang_antispam_questions = array( - 'What is two plus two?' => '4', - 'What is four minus one?' => '3', - 'What is three plus two?' => '5', - 'What is two times four?' => '8', - 'What is five minus two?' => '3', - 'What is six plus three?' => '9', - 'What is seven minus one?' => '6', - 'What is eight times two?' => '16', - 'What is six times two?' => '12', - 'What is nine minus seven?' => '2' -); diff --git a/lang/English/antispam.po b/lang/English/antispam.po deleted file mode 100644 index 75fa1d31..00000000 --- a/lang/English/antispam.po +++ /dev/null @@ -1,27 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Robot title" -msgstr "Are you human or robot?" - -msgid "Robot question" -msgstr "Please respond with a number to the question: %s" - -msgid "Robot info" -msgstr "Checking if this is requested by a real person and not an automated program." - -msgid "Robot test fail" -msgstr "You answered incorrectly to the \"Human or Robot\" question." diff --git a/lang/English/antispam_questions.mo b/lang/English/antispam_questions.mo deleted file mode 100644 index f3ff0a71bb65c8f0a8a5a078d57338b2408dd0e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 765 zcmZ{f&uUXa6vn5u{=06h;6LbM*1|+@ZOUy#3bsWGEd~iH?#ARKnUc(enUh!_!et+! zZ{Z`jbnU88C?X<-BHj4i^rR_L=iV>B`+alf%*ppVb9)Nw7PJ5{G!K1+%5{52sR!UZ zcprQud;va$e=qwi`DgGR@_q4Nz`O9@#2PYxQ_*3{x_#4Elj>Vq{ z{|HZo*HANAH{_%IZ&#rVx-QvG@QQqwn1j$lskdFr+9ge{(`C)BPf7E~uzJ4Hb|cb# z=ZF91VHhP3o~HHQ`AL1E5&7xP*j{!dxm`Wzl^1j)U1(M2mrOLSk^>hf#n}Hz&ziI` z@v5rFutQBYn=SK(VsgRPbXI@WFl&)4!uk7J((=*qOqj|V;L{4?F`+L(x+yA(`OR98$sEiUh9 zQ#2dC8CuSFYP$H~`24z>CZD}CFUeCpo1`A7vjCVAg%v6tE*Nfb#{uVEr)OVgrZv^JvZmFIttWR*WFwQU5)L`8Q zJ31wsDNWJHn&HSbhH@}ohuy*7v02p03M;dC#n@q<2tD#P_~Wb6Q6k`r*JxAm*0HN8a~HR*)OjYI zvDnmqKX*DVnTrM;i;}D1`}` z%WzOH=oTcN=)25+lYj!k@8VPmBqf;>E-{W3D5K?A91QZZ|+z@AMK-Aw9@Gf6bb H<1_pPbWa9S diff --git a/lang/English/bbeditor.po b/lang/English/bbeditor.po deleted file mode 100644 index 3deedec3..00000000 --- a/lang/English/bbeditor.po +++ /dev/null @@ -1,63 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "btnBold" -msgstr "Bold" - -msgid "btnItalic" -msgstr "Italic" - -msgid "btnUnderline" -msgstr "Underline" - -msgid "btnColor" -msgstr "Color" - -msgid "btnLeft" -msgstr "Left" - -msgid "btnRight" -msgstr "Right" - -msgid "btnJustify" -msgstr "Justify" - -msgid "btnCenter" -msgstr "Center" - -msgid "btnLink" -msgstr "Insert URL Link" - -msgid "btnPicture" -msgstr "Insert Image" - -msgid "btnList" -msgstr "Unordered List" - -msgid "btnQuote" -msgstr "Quote" - -msgid "btnCode" -msgstr "Code" - -msgid "promptImage" -msgstr "Enter the Image URL:" - -msgid "promptUrl" -msgstr "Enter the URL:" - -msgid "promptQuote" -msgstr "Please enter the username quoted (or leave blank):" diff --git a/lang/English/common.mo b/lang/English/common.mo deleted file mode 100644 index fc08237e6da5b22b1f2d17b687732e820380b425..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9404 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 diff --git a/lang/English/common.po b/lang/English/common.po deleted file mode 100644 index 8d5a40cd..00000000 --- a/lang/English/common.po +++ /dev/null @@ -1,473 +0,0 @@ -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "lang_direction" -msgstr "ltr" - -msgid "lang_identifier" -msgstr "en" - -msgid "lang_decimal_point" -msgstr "." - -msgid "lang_thousands_sep" -msgstr "," - -msgid "Bad request" -msgstr "Bad request. The link you followed is incorrect or outdated." - -msgid "No view" -msgstr "You do not have permission to view these forums." - -msgid "No permission" -msgstr "You do not have permission to access this page." - -msgid "Bad referrer" -msgstr "Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that 'Base URL' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the FluxBB documentation." - -msgid "No cookie" -msgstr "You appear to have logged in successfully, however a cookie has not been set. Please check your settings and if applicable, enable cookies for this website." - -msgid "Pun include extension" -msgstr "Unable to process user include %s from template %s. \"%s\" files are not allowed" - -msgid "Pun include directory" -msgstr "Unable to process user include %s from template %s. Directory traversal is not allowed" - -msgid "Pun include error" -msgstr "Unable to process user include %s from template %s. There is no such file in neither the template directory nor in the user include directory" - -msgid "Announcement" -msgstr "Announcement" - -msgid "Options" -msgstr "Options" - -msgid "Submit" -msgstr "Submit" - -msgid "Ban message" -msgstr "You are banned from this forum." - -msgid "Ban message 2" -msgstr "The ban expires at the end of" - -msgid "Ban message 3" -msgstr "The administrator or moderator that banned you left the following message:" - -msgid "Ban message 4" -msgstr "Please direct any inquiries to the forum administrator at" - -msgid "Never" -msgstr "Never" - -msgid "Today" -msgstr "Today" - -msgid "Yesterday" -msgstr "Yesterday" - -msgid "Info" -msgstr "Info" - -msgid "Go back" -msgstr "Go back" - -msgid "Maintenance" -msgstr "Maintenance" - -msgid "Redirecting" -msgstr "Redirecting" - -msgid "Click redirect" -msgstr "Click here if you do not want to wait any longer (or if your browser does not automatically forward you)" - -msgid "on" -msgstr "on" - -msgid "off" -msgstr "off" - -msgid "Invalid email" -msgstr "The email address you entered is invalid." - -msgid "Required" -msgstr "(Required)" - -msgid "required field" -msgstr "is a required field in this form." - -msgid "Last post" -msgstr "Last post" - -msgid "by" -msgstr "by" - -msgid "New posts" -msgstr "New posts" - -msgid "New posts info" -msgstr "Go to the first new post in this topic." - -msgid "Username" -msgstr "Username" - -msgid "Password" -msgstr "Password" - -msgid "Email" -msgstr "Email" - -msgid "Send email" -msgstr "Send email" - -msgid "Moderated by" -msgstr "Moderated by" - -msgid "Registered" -msgstr "Registered" - -msgid "Subject" -msgstr "Subject" - -msgid "Message" -msgstr "Message" - -msgid "Topic" -msgstr "Topic" - -msgid "Forum" -msgstr "Forum" - -msgid "Posts" -msgstr "Posts" - -msgid "Replies" -msgstr "Replies" - -msgid "Pages" -msgstr "Pages:" - -msgid "Page" -msgstr "Page %s" - -msgid "BBCode" -msgstr "BBCode:" - -msgid "url tag" -msgstr "[url] tag:" - -msgid "img tag" -msgstr "[img] tag:" - -msgid "Smilies" -msgstr "Smilies:" - -msgid "and" -msgstr "and" - -msgid "Image link" -msgstr "image" - -msgid "wrote" -msgstr "wrote:" - -msgid "Mailer" -msgstr "%s Mailer" - -msgid "Important information" -msgstr "Important information" - -msgid "Write message legend" -msgstr "Write your message and submit" - -msgid "Previous" -msgstr "Previous" - -msgid "Next" -msgstr "Next" - -msgid "Spacer" -msgstr "…" - -msgid "Title" -msgstr "Title" - -msgid "Member" -msgstr "Member" - -msgid "Moderator" -msgstr "Moderator" - -msgid "Administrator" -msgstr "Administrator" - -msgid "Banned" -msgstr "Banned" - -msgid "Guest" -msgstr "Guest" - -msgid "BBerr pcre" -msgstr "(%s) Message is too long or too complex. Please shorten." - -msgid "BBerr unexpected attribute" -msgstr "Unexpected attribute: \"%1$s\". (No attribute allowed for (%2$s)." - -msgid "BBerr unrecognized attribute" -msgstr "Unrecognized attribute: \"%1$s\", is not valid for (%2$s)." - -msgid "BBerr bbcode attribute" -msgstr "Attribute may NOT contain open or close bbcode tags" - -msgid "BBerr missing attribute" -msgstr "(%1$s) is missing a required attribute." - -msgid "BBerr nesting overflow" -msgstr "(%1$s) tag nesting depth: %2$d exceeds allowable limit: %3$d." - -msgid "BBerr self-nesting" -msgstr "(%s) was opened within itself, this is not allowed." - -msgid "BBerr invalid nesting" -msgstr "(%1$s) was opened within (%2$s), this is not allowed." - -msgid "BBerr invalid parent" -msgstr "(%1$s) cannot be within: (%2$s). Allowable parent tags: %3$s." - -msgid "BBerr Invalid URL name" -msgstr "Invalid URL name: %s" - -msgid "BBerr cannot post URLs" -msgstr "You are not allowed to post links" - -msgid "BBerr Invalid email address" -msgstr "Invalid email address: %s" - -msgid "BBerr Invalid color" -msgstr "Invalid color attribute: %s" - -msgid "BBerr invalid content" -msgstr "Invalid content, (%s) requires specific content." - -msgid "BBerr bad meta data" -msgstr "Unable to retrieve image data from remote url: %s" - -msgid "BBerr no file size" -msgstr "Unable to determine remote file size." - -msgid "BBerr non image" -msgstr "Remote url does not have Content-Type: \"image\"." - -msgid "BBerr bad http response" -msgstr "Bad HTTP response header: \"%s\"" - -msgid "BBerr bad headers" -msgstr "Unable to read remote image http headers." - -msgid "BBerr orphan close" -msgstr "Orphan close tag: (/%s) is missing its open tag." - -msgid "BBerr orphan open" -msgstr "Orphan open tag: (%s) is missing its close tag." - -msgid "BBmsg big image" -msgstr "Big image" - -msgid "BBmsg images disabled" -msgstr "Image display not currently enabled in this context" - -msgid "Index" -msgstr "Index" - -msgid "User list" -msgstr "User list" - -msgid "Rules" -msgstr "Rules" - -msgid "Search" -msgstr "Search" - -msgid "Register" -msgstr "Register" - -msgid "Login" -msgstr "Login" - -msgid "Not logged in" -msgstr "You are not logged in." - -msgid "Profile" -msgstr "Profile" - -msgid "Logout" -msgstr "Logout" - -msgid "Logged in as" -msgstr "Logged in as" - -msgid "Admin" -msgstr "Administration" - -msgid "Last visit" -msgstr "Last visit: %s" - -msgid "Topic searches" -msgstr "Topics:" - -msgid "New posts header" -msgstr "New" - -msgid "Active topics" -msgstr "Active" - -msgid "Unanswered topics" -msgstr "Unanswered" - -msgid "Posted topics" -msgstr "Posted" - -msgid "Show new posts" -msgstr "Find topics with new posts since your last visit." - -msgid "Show active topics" -msgstr "Find topics with recent posts." - -msgid "Show unanswered topics" -msgstr "Find topics with no replies." - -msgid "Show posted topics" -msgstr "Find topics you have posted to." - -msgid "Mark all as read" -msgstr "Mark all topics as read" - -msgid "Mark forum read" -msgstr "Mark this forum as read" - -msgid "Title separator" -msgstr " / " - -msgid "Board footer" -msgstr "Board footer" - -msgid "Jump to" -msgstr "Jump to" - -msgid "Go" -msgstr " Go " - -msgid "Moderate topic" -msgstr "Moderate topic" - -msgid "All" -msgstr "All" - -msgid "Move topic" -msgstr "Move topic" - -msgid "Open topic" -msgstr "Open topic" - -msgid "Close topic" -msgstr "Close topic" - -msgid "Unstick topic" -msgstr "Unstick topic" - -msgid "Stick topic" -msgstr "Stick topic" - -msgid "Moderate forum" -msgstr "Moderate forum" - -msgid "Powered by" -msgstr "Powered by %s" - -msgid "Debug table" -msgstr "Debug information" - -msgid "Querytime" -msgstr "Generated in %1$s seconds, %2$s queries executed" - -msgid "Memory usage" -msgstr "Memory usage: %1$s" - -msgid "Peak usage" -msgstr "(Peak: %1$s)" - -msgid "Query times" -msgstr "Time (s)" - -msgid "Query" -msgstr "Query" - -msgid "Total query time" -msgstr "Total query time: %s" - -msgid "RSS description" -msgstr "The most recent topics at %s." - -msgid "RSS description topic" -msgstr "The most recent posts in %s." - -msgid "RSS reply" -msgstr "Re: " - -msgid "RSS active topics feed" -msgstr "RSS active topics feed" - -msgid "Atom active topics feed" -msgstr "Atom active topics feed" - -msgid "RSS forum feed" -msgstr "RSS forum feed" - -msgid "Atom forum feed" -msgstr "Atom forum feed" - -msgid "RSS topic feed" -msgstr "RSS topic feed" - -msgid "Atom topic feed" -msgstr "Atom topic feed" - -msgid "New reports" -msgstr "There are new reports" - -msgid "Maintenance mode enabled" -msgstr "Maintenance mode is enabled!" - -msgid "Size unit B" -msgstr "%s B" - -msgid "Size unit KiB" -msgstr "%s KiB" - -msgid "Size unit MiB" -msgstr "%s MiB" - -msgid "Size unit GiB" -msgstr "%s GiB" - -msgid "Size unit TiB" -msgstr "%s TiB" - -msgid "Size unit PiB" -msgstr "%s PiB" - -msgid "Size unit EiB" -msgstr "%s EiB" diff --git a/lang/English/delete.mo b/lang/English/delete.mo deleted file mode 100644 index 6597bd8e9691f8fca8dfc14430312b9b6eff0bb9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1003 zcmZuv&2AGh5H=A0f~ZPQ2yvJqAr*laf_exEL8xg{Rcb|4wos5bIGaggw6RxSry&o* zYjES%XW<#(#*xq2O~Rj*Z@-!GWPUvJZKLv8;8cOTKnmOh&Vg{g16P0_zzyJM$(0L2 z+=9Fgz6QQm@fF)Q{{{{L-DrcZaQ%)l^yHGd4o(gSM%1>CKY09%g|K6e#CBPr`mlL%eI3GyWCZt8w8s?<})2!7p6m%dl@@r z@>F^2;B=_WaH57RV^-teBGPl!A8Ye+P^9SfBI|}Psz(P$d#n7l=t;G0jc0?XvkXZ+ zfAWvBRB6+sWTafqzI76JWPRlqvJcqFJ(Jiz9-~3^p7zT^8pNi0D)-s2D{AaoytJoU zRFAfCQ>gN_ow$VCMUDm)NfyJ4M@(T_G_w;LsWV0~HfKZLhS_1hq;o=XWG9|_oZ2Z3 zted;T#o^g_3Oj5FGAIox9_{<O9oe)r&{U@>3Z;zQSQ!igtGEpP4&5tspn9QAH1@9- K0wQHd6p3HzG7?h& diff --git a/lang/English/delete.po b/lang/English/delete.po deleted file mode 100644 index 208f9bdc..00000000 --- a/lang/English/delete.po +++ /dev/null @@ -1,42 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Delete post" -msgstr "Delete post" - -msgid "Warning" -msgstr "You are about to permanently delete this post." - -msgid "Topic warning" -msgstr "Warning! This is the first post in the topic, the whole topic will be permanently deleted." - -msgid "Delete info" -msgstr "The post you have chosen to delete is set out below for you to review before proceeding." - -msgid "Reply by" -msgstr "Reply by %s - %s" - -msgid "Topic by" -msgstr "Topic started by %s - %s" - -msgid "Delete" -msgstr "Delete" - -msgid "Post del redirect" -msgstr "Post deleted." - -msgid "Topic del redirect" -msgstr "Topic deleted." diff --git a/lang/English/forum.mo b/lang/English/forum.mo deleted file mode 100644 index b0b3a1649e976c79f203ea4e3c0c3d235a87f124..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 866 zcmZXR&u$Yj5XKD@3d`U20zw>Ii31=xG!=(vLjW}-C{iO>>=w8IhMFhfeegMW z58MH7g73iy?0}&@0q=lc!SGIkp{@YKorA9<{&k(Phu|6b3j7Ujg6lV`K2O01h_}E{ zzYRVH8(`?0fT8aph?WdkSeU)GJcqq*FV6uOv9QoDSa=_H4*gg=H;yvaDQ14o$HtZg z>pAYqkxQ)_;ihjgo*M0~$sK|dq!Qyi_hzP2Ht;Gvp0mMuJ=@n8Z`pyOQ^%6Lv@#c6 zV+$8^JzIpXwbSI)vGqdptroApY(|MSN0fTe%fta$r;Ltym!zMP-QA6n&qL9+2$2^b zrKgx9C%({$3Z>_%J?Xp{TB%(wy|F0TlX_Ch35g-e;!;QcR%V6LAI8;)(WqwZnXSr0m$*cFXcU6?*5D>^zgnbMP(H%7`| zEE03l(KqplG}&s$#89R@uh$y2H@K-nF)*b~sa?&8c{OAySv8#1OTbd_~&0(pJ;yKl;Wifv+_BU+%xIH`nR_ diff --git a/lang/English/forum.po b/lang/English/forum.po deleted file mode 100644 index 4a2b8880..00000000 --- a/lang/English/forum.po +++ /dev/null @@ -1,45 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Post topic" -msgstr "Post new topic" - -msgid "Views" -msgstr "Views" - -msgid "Moved" -msgstr "Moved:" - -msgid "Sticky" -msgstr "Sticky:" - -msgid "Closed" -msgstr "Closed:" - -msgid "Empty forum" -msgstr "Forum is empty." - -msgid "Mod controls" -msgstr "Moderator controls" - -msgid "Is subscribed" -msgstr "You are currently subscribed to this forum" - -msgid "Unsubscribe" -msgstr "Unsubscribe" - -msgid "Subscribe" -msgstr "Subscribe to this forum" diff --git a/lang/English/help.mo b/lang/English/help.mo deleted file mode 100644 index 0cc4462a25c7bd1f4e0b9612a952aefa7842a618..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4261 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 Jj@u=n{|{6llYIaH diff --git a/lang/English/help.po b/lang/English/help.po deleted file mode 100644 index 2d7c7c52..00000000 --- a/lang/English/help.po +++ /dev/null @@ -1,165 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Help" -msgstr "Help" - -msgid "produces" -msgstr "produces" - -msgid "BBCode" -msgstr "BBCode" - -msgid "BBCode info 1" -msgstr "BBCode is a collection of formatting tags that are used to change the look of text in this forum. BBCode is based on the same principal as, and is very similar to, HTML. Below is a list of all the available BBCodes and instructions on how to use them." - -msgid "BBCode info 2" -msgstr "Administrators have the ability to enable or disable BBCode. You can tell if BBCode is enabled or disabled out in the left margin whenever you post a message or edit your signature." - -msgid "Text style" -msgstr "Text style" - -msgid "Text style info" -msgstr "The following tags change the appearance of text:" - -msgid "Bold text" -msgstr "Bold text" - -msgid "Underlined text" -msgstr "Underlined text" - -msgid "Italic text" -msgstr "Italic text" - -msgid "Strike-through text" -msgstr "Strike-through text" - -msgid "Red text" -msgstr "Red text" - -msgid "Blue text" -msgstr "Blue text" - -msgid "Heading text" -msgstr "Heading text" - -msgid "Deleted text" -msgstr "Deleted text" - -msgid "Inserted text" -msgstr "Inserted text" - -msgid "Emphasised text" -msgstr "Emphasised text" - -msgid "Links and images" -msgstr "Links and images" - -msgid "Links info" -msgstr "You can create links to other documents or to email addresses using the following tags:" - -msgid "This help page" -msgstr "This help page" - -msgid "My email address" -msgstr "My email address" - -msgid "Images info" -msgstr "If you want to display an image you can use the img tag. The text appearing after the \"=\" sign in the opening tag is used for the alt attribute and should be included whenever possible." - -msgid "FeatherBB bbcode test" -msgstr "FeatherBB bbcode test" - -msgid "Test topic" -msgstr "Test topic" - -msgid "Test post" -msgstr "Test post" - -msgid "Test forum" -msgstr "Test forum" - -msgid "Test user" -msgstr "Test user" - -msgid "Quotes" -msgstr "Quotes" - -msgid "Quotes info" -msgstr "If you want to quote someone, you should use the quote tag." - -msgid "Quotes info 2" -msgstr "If you don't want to quote anyone in particular, you can use the quote tag without specifying a name." - -msgid "Quote text" -msgstr "This is the text I want to quote." - -msgid "produces quote box" -msgstr "produces a quote box like this:" - -msgid "quote note" -msgstr "Note: If a username contains the characters [ or ] you can enclose it in quote marks." - -msgid "Code" -msgstr "Code" - -msgid "Code info" -msgstr "When displaying source code you should make sure that you use the code tag. Text displayed with the code tag will use a monospaced font and will not be affected by other tags." - -msgid "Code text" -msgstr "This is some code." - -msgid "produces code box" -msgstr "produces a code box like this:" - -msgid "Nested tags" -msgstr "Nested tags" - -msgid "Nested tags info" -msgstr "BBCode can be nested to create more advanced formatting. For example:" - -msgid "Bold, underlined text" -msgstr "Bold, underlined text" - -msgid "Lists" -msgstr "Lists" - -msgid "List info" -msgstr "To create a list you can use the list tag. You can create 3 types of lists using the list tag." - -msgid "List text 1" -msgstr "Example list item 1." - -msgid "List text 2" -msgstr "Example list item 2." - -msgid "List text 3" -msgstr "Example list item 3." - -msgid "produces list" -msgstr "produces a bulleted list." - -msgid "produces decimal list" -msgstr "produces a numbered list." - -msgid "produces alpha list" -msgstr "produces an alphabetically labelled list." - -msgid "Smilies" -msgstr "Smilies" - -msgid "Smilies info" -msgstr "If you like (and if it is enabled), the forum can convert a series of smilies to images representations of that smiley. This forum recognizes the following smilies and replaces them with images:" diff --git a/lang/English/index.mo b/lang/English/index.mo deleted file mode 100644 index c8ab6fe21fdf82315b9166c34d7355ba818d7dc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1064 zcmZvaJC74F5XTK1ujP1GJPIR$#1#$%QA8VpP(pG<%H2iB9-_DcC+p-EcJ0XaavUW! zqCleI3((Nf(NR(G1*rH0lyp$=_j>nUI!mLUXFQ%6d*;`Lxeo;E4CE^0E#xBPAH=Ok zhX@J4K6na@NUMwO{>9Z^thVAhriq*=;I+m1d=bInuM zQ#vytm9s)MtvgNXx2>C!UTe|%LNgd@^<0cC>&NT~A|y(Nv?sXT5W3wChAR>4XsEEW zhun&g!p2s`%fz`>rU5sWMVd>Ka;r3)23$^aJ{2qyJlhqK-s5qW$OjXjVl=8LJ-r_+ z^_RLk`RldYK}Sg|B%*H3kkpD-_SP)riEPsG2G>T|)>_nKjU7LieIhjL%CU+QISpxJ zl-TV;LMmkNlr0J=w6AffM4VV!uQh6SapG0>Smk;wIzC58eUh@NuD?1fK4Vv#6JuSI z$`LSBxTe?k_B*6EOx5$SYPuFv+!b2HMgI$*NLijznP($3wwi_mPyB2gc(gAtMgZCU T;DluV\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Topics" -msgstr "Topics" - -msgid "Link to" -msgstr "Link to:" - -msgid "Empty board" -msgstr "Board is empty." - -msgid "Newest user" -msgstr "Newest registered user: %s" - -msgid "Users online" -msgstr "Registered users online: %s" - -msgid "Guests online" -msgstr "Guests online: %s" - -msgid "No of users" -msgstr "Total number of registered users: %s" - -msgid "No of topics" -msgstr "Total number of topics: %s" - -msgid "No of posts" -msgstr "Total number of posts: %s" - -msgid "Online" -msgstr "Online:" - -msgid "Board info" -msgstr "Board information" - -msgid "Board stats" -msgstr "Board statistics" - -msgid "User info" -msgstr "User information" diff --git a/lang/English/install.mo b/lang/English/install.mo deleted file mode 100644 index 1052a5282505b5b50a975dbac3799dc91ed6dd13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9441 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 R2&?E@J;D%*kPb2YzX2gx-ueIl diff --git a/lang/English/install.po b/lang/English/install.po deleted file mode 100644 index 03f10123..00000000 --- a/lang/English/install.po +++ /dev/null @@ -1,291 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Choose install language" -msgstr "Choose the install script language" - -msgid "Choose install language info" -msgstr "The language used for this install script. The default language used for the board itself can be set below." - -msgid "Install language" -msgstr "Install language" - -msgid "Change language" -msgstr "Change language" - -msgid "Already installed" -msgstr "It seems like FeatherBB is already installed. You should go here instead." - -msgid "You are running error" -msgstr "You are running %1$s version %2$s. FeatherBB %3$s requires at least %1$s %4$s to run properly. You must upgrade your %1$s installation before you can continue." - -msgid "My FeatherBB Forum" -msgstr "My FeatherBB Forum" - -msgid "Description" -msgstr "Lighter than a feather." - -msgid "Username 1" -msgstr "Usernames must be at least 2 characters long." - -msgid "Username 2" -msgstr "Usernames must not be more than 25 characters long." - -msgid "Username 3" -msgstr "The username guest is reserved." - -msgid "Username 4" -msgstr "Usernames may not be in the form of an IP address." - -msgid "Username 5" -msgstr "Usernames may not contain all the characters ', \" and [ or ] at once." - -msgid "Username 6" -msgstr "Usernames may not contain any of the text formatting tags (BBCode) that the forum uses." - -msgid "Short password" -msgstr "Passwords must be at least 6 characters long." - -msgid "Passwords not match" -msgstr "Passwords do not match." - -msgid "Wrong email" -msgstr "The administrator email address you entered is invalid." - -msgid "No board title" -msgstr "You must enter a board title." - -msgid "Error default language" -msgstr "The default language chosen doesn't seem to exist." - -msgid "Error default style" -msgstr "The default style chosen doesn't seem to exist." - -msgid "No DB extensions" -msgstr "This PHP environment does not have support for any of the databases that FeatherBB supports. PHP needs to have support for either MySQL, PostgreSQL or SQLite in order for FeatherBB to be installed." - -msgid "Administrator username" -msgstr "Administrator's username" - -msgid "Administrator email" -msgstr "Administrator's email" - -msgid "Board title" -msgstr "Board title" - -msgid "Base URL" -msgstr "The URL (without trailing slash) of your FeatherBB forum. This must be correct." - -msgid "Required field" -msgstr "is a required field in this form." - -msgid "FeatherBB Installation" -msgstr "FeatherBB Installation" - -msgid "Welcome" -msgstr "You are about to install FeatherBB. In order to install FeatherBB, you must complete the form set out below. If you encounter any difficulties with the installation, please refer to the documentation." - -msgid "Install" -msgstr "Install FeatherBB %s" - -msgid "Errors" -msgstr "The following errors need to be corrected:" - -msgid "Database setup" -msgstr "Database setup" - -msgid "Info 1" -msgstr "All information we need to create a connection with your database." - -msgid "Select database" -msgstr "Select your database type" - -msgid "Info 2" -msgstr "Select a database. We support SQLite, MySQL and PostgreSQL." - -msgid "Database type" -msgstr "Database type" - -msgid "Required" -msgstr "(Required)" - -msgid "Database hostname" -msgstr "Enter your database server hostname" - -msgid "Info 3" -msgstr "You should be able to get this info from your web host, if localhost does not work." - -msgid "Database server hostname" -msgstr "Database server hostname" - -msgid "Database enter name" -msgstr "Enter the name of your database" - -msgid "Info 4" -msgstr "The name of the database you want to install FeatherBB on." - -msgid "Database name" -msgstr "Database name" - -msgid "Database enter informations" -msgstr "Enter your database username and password" - -msgid "Database username" -msgstr "Database username" - -msgid "Info 5" -msgstr "Your MySQL username and password (ignore of SQLite)." - -msgid "Database password" -msgstr "Database password" - -msgid "Database enter prefix" -msgstr "Enter database table prefix" - -msgid "Info 6" -msgstr "If you want to run multiple FeatherBB installations in a single database, change this." - -msgid "Table prefix" -msgstr "Table prefix" - -msgid "Administration setup" -msgstr "Administration setup" - -msgid "Info 7" -msgstr "Create the very first account on your board." - -msgid "Info 8" -msgstr "Your username should be between 2 and 25 characters long. Your password must be at least 6 characters long. Remember that passwords are case-sensitive." - -msgid "Password" -msgstr "Password" - -msgid "Confirm password" -msgstr "Confirm password" - -msgid "Board setup" -msgstr "Board setup" - -msgid "Info 11" -msgstr "Settings for your board. You can change this later." - -msgid "General information" -msgstr "Enter your board's title and description." - -msgid "Board description" -msgstr "Board description (supports HTML)" - -msgid "Appearance" -msgstr "Appearance" - -msgid "Info 15" -msgstr "Make your forum yours. Choose a language and a style for your board." - -msgid "Default language" -msgstr "Default language" - -msgid "Default style" -msgstr "Default style" - -msgid "Start install" -msgstr "Start install" - -msgid "DB type not valid" -msgstr "'%s' is not a valid database type" - -msgid "Table prefix error" -msgstr "The table prefix '%s' contains illegal characters or is too long. The prefix may contain the letters a to z, any numbers and the underscore character. They must however not start with a number. The maximum length is 40 characters. Please choose a different prefix" - -msgid "Prefix reserved" -msgstr "The table prefix 'sqlite_' is reserved for use by the SQLite engine. Please choose a different prefix" - -msgid "Existing table error" -msgstr "A table called '%susers' is already present in the database '%s'. This could mean that FeatherBB is already installed or that another piece of software is installed and is occupying one or more of the table names FeatherBB requires. If you want to install multiple copies of FeatherBB in the same database, you must choose a different table prefix" - -msgid "InnoDB off" -msgstr "InnoDB does not seem to be enabled. Please choose a database layer that does not have InnoDB support, or enable InnoDB on your MySQL server" - -msgid "Administrators" -msgstr "Administrators" - -msgid "Administrator" -msgstr "Administrator" - -msgid "Moderators" -msgstr "Moderators" - -msgid "Moderator" -msgstr "Moderator" - -msgid "Guests" -msgstr "Guests" - -msgid "Guest" -msgstr "Guest" - -msgid "Members" -msgstr "Members" - -msgid "Announcement" -msgstr "Enter your announcement here." - -msgid "Rules" -msgstr "Enter your rules here" - -msgid "Maintenance message" -msgstr "The forums are temporarily down for maintenance. Please try again in a few minutes." - -msgid "Test post" -msgstr "Test topic" - -msgid "Message" -msgstr "You have successfully installed FeatherBB, congratulations! Now log in and head over to the administration control panel to configure your forum." - -msgid "Test category" -msgstr "Test category" - -msgid "Test forum" -msgstr "Test forum" - -msgid "This is just a test forum" -msgstr "This is just a test forum" - -msgid "Alert cache" -msgstr "The cache directory is currently not writable! In order for FeatherBB to function properly, the directory %s must be writable by PHP. Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777." - -msgid "Alert avatar" -msgstr "The avatar directory is currently not writable! If you want users to be able to upload their own avatar images you must see to it that the directory %s is writable by PHP. You can later choose to save avatar images in a different directory (see Admin/Options). Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777." - -msgid "Alert upload" -msgstr "File uploads appear to be disallowed on this server! If you want users to be able to upload their own avatar images you must enable the file_uploads configuration setting in PHP. Once file uploads have been enabled, avatar uploads can be enabled in Administration/Options/Features." - -msgid "FeatherBB has been installed" -msgstr "FeatherBB has been installed. To finalize the installation please follow the instructions below." - -msgid "Final instructions" -msgstr "Final instructions" - -msgid "Info 17" -msgstr "To finalize the installation, you need to click on the button below to download a file called config.php. You then need to upload this file to the root directory of your FeatherBB installation." - -msgid "Info 18" -msgstr "Once you have uploaded config.php, FeatherBB will be fully installed! At that point, you may go to the forum index." - -msgid "Download config.php file" -msgstr "Download config.php file" - -msgid "FeatherBB fully installed" -msgstr "FeatherBB has been fully installed! You may now go to the forum index." diff --git a/lang/English/login.mo b/lang/English/login.mo deleted file mode 100644 index cef79b30ccc81bc7fe3d011101c52b6cfabb7959..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1877 zcmZWp%Z?m16g4Egns*`r3nXrkK!B(kIs$3bLlcr=1`V1FtMQ%l!-`RUP}5eeSsr`>zYr3+ZAYO@I9Za>UX|$g~GaZ6Dc9pSY z?AR@aHCJrQ#l&-IJQq=>u8FjopYXihKX<+)_TKrRHf_n2cuyR0D`u)=F;OQ@cq$Vj zgHGMxDNjf2Y04OX(Qt@K+2$k>ZCMsNKl092)CBfBZ9Idz@w(0s@ig?v&f00{U*4lM z?7w8`QlGjn?{x;=eU8|&qcXe6J{V_vbjUhR*k8NW8N5Ht_C2PsXYc69J%TN}!KX%+ zE=|We#BAub4YiKWW6`m;Rii7;hODO>jP#~1r^dcLPA*2H994O%bN%T0!P;u>Mg7=e;9wjGgI5B~AQMkrNnrMt`WTiYq4clUINqXH1 zo}mxbB4kml*aFs^1~u!zG}mzZLLlU!i5zIeW9NBE1?k|jo2{iQ1fHv_cF{s2V8m$N zfDBP|t)DRC!iT0+3Y0__aEPd&xS7HeVn7eK86_Pz&eaz46$NHkkUH=Q^}6@T`D6xVmCoeW zUMgx++!E>HSI=hN&AdS?Qf=%ljTVroYj~3iwMQFO;xb4&M~v)vxg@~8sOMcplni2- zl&mLYs5pAcy7t&^=A$i}#G3AlMK$lbG3bor6_Je_L&DKbbhueep%D+UE+!NWejSmV zR7ACTZAf(L>UNJshszPFQrGB|TttR~n^VcQDB9}ExvA@AM5zfiS|;`0vLOEpBhk+% Z1_Gra)_tJXm)Np;J7^8L&qQyo{sSF\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Wrong user/pass" -msgstr "Wrong username and/or password." - -msgid "Forgotten pass" -msgstr "Forgotten your password?" - -msgid "Login redirect" -msgstr "Logged in successfully." - -msgid "Logout redirect" -msgstr "Logged out." - -msgid "No email match" -msgstr "There is no user registered with the email address" - -msgid "Request pass" -msgstr "Request password" - -msgid "Request pass legend" -msgstr "Enter the email address with which you registered" - -msgid "Request pass info" -msgstr "A new password together with a link to activate the new password will be sent to that address." - -msgid "Not registered" -msgstr "Not registered yet?" - -msgid "Login legend" -msgstr "Enter your username and password below" - -msgid "Remember me" -msgstr "Log me in automatically each time I visit." - -msgid "Login info" -msgstr "If you have not registered or have forgotten your password click on the appropriate link below." - -msgid "New password errors" -msgstr "Password request error" - -msgid "New passworderrors info" -msgstr "The following error needs to be corrected before a new password can be sent:" - -msgid "Forget mail" -msgstr "An email has been sent to the specified address with instructions on how to change your password. If it does not arrive you can contact the forum administrator at" - -msgid "Email flood" -msgstr "This account has already requested a password reset in the past hour. Please wait %s minutes before requesting a new password again." diff --git a/lang/English/mail_templates/activate_email.tpl b/lang/English/mail_templates/activate_email.tpl deleted file mode 100644 index 49095c01..00000000 --- a/lang/English/mail_templates/activate_email.tpl +++ /dev/null @@ -1,12 +0,0 @@ -Subject: Change email address requested - -Hello , - -You have requested to have a new email address assigned to your account in the discussion forum at . If you didn't request this or if you don't want to change your email address you should just ignore this message. Only if you visit the activation page below will your email address be changed. In order for the activation page to work, you must be logged in to the forum. - -To change your email address, please visit the following page: - - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/activate_password.tpl b/lang/English/mail_templates/activate_password.tpl deleted file mode 100644 index b408927b..00000000 --- a/lang/English/mail_templates/activate_password.tpl +++ /dev/null @@ -1,14 +0,0 @@ -Subject: New password requested - -Hello , - -You have requested to have a new password assigned to your account in the discussion forum at . If you didn't request this or if you don't want to change your password you should just ignore this message. Only if you visit the activation page below will your password be changed. - -Your new password is: - -To change your password, please visit the following page: - - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/banned_email_change.tpl b/lang/English/mail_templates/banned_email_change.tpl deleted file mode 100644 index 276662f3..00000000 --- a/lang/English/mail_templates/banned_email_change.tpl +++ /dev/null @@ -1,9 +0,0 @@ -Subject: Alert - Banned email detected - -User '' changed to banned email address: - -User profile: - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/banned_email_post.tpl b/lang/English/mail_templates/banned_email_post.tpl deleted file mode 100644 index f7e02433..00000000 --- a/lang/English/mail_templates/banned_email_post.tpl +++ /dev/null @@ -1,9 +0,0 @@ -Subject: Alert - Banned email detected - -User '' posted with banned email address: - -Post URL: - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/banned_email_register.tpl b/lang/English/mail_templates/banned_email_register.tpl deleted file mode 100644 index f0085ec4..00000000 --- a/lang/English/mail_templates/banned_email_register.tpl +++ /dev/null @@ -1,9 +0,0 @@ -Subject: Alert - Banned email detected - -User '' registered with banned email address: - -User profile: - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/dupe_email_change.tpl b/lang/English/mail_templates/dupe_email_change.tpl deleted file mode 100644 index 583fb246..00000000 --- a/lang/English/mail_templates/dupe_email_change.tpl +++ /dev/null @@ -1,9 +0,0 @@ -Subject: Alert - Duplicate email detected - -User '' changed to an email address that also belongs to: - -User profile: - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/dupe_email_register.tpl b/lang/English/mail_templates/dupe_email_register.tpl deleted file mode 100644 index b1cb3636..00000000 --- a/lang/English/mail_templates/dupe_email_register.tpl +++ /dev/null @@ -1,9 +0,0 @@ -Subject: Alert - Duplicate email detected - -User '' registered with an email address that also belongs to: - -User profile: - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/form_email.tpl b/lang/English/mail_templates/form_email.tpl deleted file mode 100644 index e3e0d5f7..00000000 --- a/lang/English/mail_templates/form_email.tpl +++ /dev/null @@ -1,13 +0,0 @@ -Subject: - - from has sent you a message. You can reply to by replying to this email. - -The message reads as follows: ------------------------------------------------------------------------ - - - ------------------------------------------------------------------------ - --- - Mailer diff --git a/lang/English/mail_templates/new_reply.tpl b/lang/English/mail_templates/new_reply.tpl deleted file mode 100644 index 286914ec..00000000 --- a/lang/English/mail_templates/new_reply.tpl +++ /dev/null @@ -1,11 +0,0 @@ -Subject: Reply to topic: '' - - has replied to the topic '' to which you are subscribed. There may be more new replies, but this is the only notification you will receive until you visit the board again. - -The post is located at - -You can unsubscribe by going to - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/new_reply_full.tpl b/lang/English/mail_templates/new_reply_full.tpl deleted file mode 100644 index 4fbc777e..00000000 --- a/lang/English/mail_templates/new_reply_full.tpl +++ /dev/null @@ -1,18 +0,0 @@ -Subject: Reply to topic: '' - - has replied to the topic '' to which you are subscribed. There may be more new replies, but this is the only notification you will receive until you visit the board again. - -The post is located at - -The message reads as follows: ------------------------------------------------------------------------ - - - ------------------------------------------------------------------------ - -You can unsubscribe by going to - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/new_report.tpl b/lang/English/mail_templates/new_report.tpl deleted file mode 100644 index dedb113b..00000000 --- a/lang/English/mail_templates/new_report.tpl +++ /dev/null @@ -1,9 +0,0 @@ -Subject: Report() - '' - -User '' has reported the following message: - -Reason: - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/new_topic.tpl b/lang/English/mail_templates/new_topic.tpl deleted file mode 100644 index 2bc048b1..00000000 --- a/lang/English/mail_templates/new_topic.tpl +++ /dev/null @@ -1,11 +0,0 @@ -Subject: New topic in forum: '' - - has posted a new topic '' in the forum '', to which you are subscribed. - -The topic is located at - -You can unsubscribe by going to - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/new_topic_full.tpl b/lang/English/mail_templates/new_topic_full.tpl deleted file mode 100644 index f70c7262..00000000 --- a/lang/English/mail_templates/new_topic_full.tpl +++ /dev/null @@ -1,18 +0,0 @@ -Subject: New topic in forum: '' - - has posted a new topic '' in the forum '', to which you are subscribed. - -The topic is located at - -The message reads as follows: ------------------------------------------------------------------------ - - - ------------------------------------------------------------------------ - -You can unsubscribe by going to - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/new_user.tpl b/lang/English/mail_templates/new_user.tpl deleted file mode 100644 index 30164e87..00000000 --- a/lang/English/mail_templates/new_user.tpl +++ /dev/null @@ -1,12 +0,0 @@ -Subject: Alert - New registration - -User '' registered in the forums at - -User profile: - -To administer this account, please visit the following page: - - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/rename.tpl b/lang/English/mail_templates/rename.tpl deleted file mode 100644 index 3cba50dd..00000000 --- a/lang/English/mail_templates/rename.tpl +++ /dev/null @@ -1,12 +0,0 @@ -Subject: User account renamed - -During an upgrade to the forums at it was determined your username is too similar to an existing user. Your username has been changed accordingly. - -Old username: -New username: - -We apologise for any inconvenience caused. - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/mail_templates/welcome.tpl b/lang/English/mail_templates/welcome.tpl deleted file mode 100644 index 779a5745..00000000 --- a/lang/English/mail_templates/welcome.tpl +++ /dev/null @@ -1,12 +0,0 @@ -Subject: Welcome to ! - -Thank you for registering in the forums at . Your account details are: - -Username: -Password: - -Login at to activate the account. - --- - Mailer -(Do not reply to this message) diff --git a/lang/English/misc.mo b/lang/English/misc.mo deleted file mode 100644 index 9a3f7859ab142662a032fa3356390c5918b31c2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5068 zcmb7`O^h5z701gE3|Rt+O(5aB65`;EGqYZQ#q8Sg$J!e#y!I-)i9rFOo|)R+#xvbR zcaJxVkU3xhhbRI>;1VIYAS8r@l0!}*7myGVAcRm3AS8qY95_Hu1cBi9ud1Gz-L*;F zn(E(Fb$z^g@6~(thuyb4V|X5+ypOW{24fQV)GfSt?$~L}-Eddr1MnTx=ir;*C3q+N z6nrNvBEJ&bza9BJo)i+sCj-5HSX{5ZE)wC!+dwbcTt~&`hF6=6+RBtuLU)} zAM4j*{p(Quz8Co%d^`0YL+#@ia5wxjl>Dzk$@5>Rb#8l$G5pNEyrhDCQ1k7FbTP-^ z1Uv(^{>Avc4W)-X)~~@ksDCx`yKoov=isgICs1EX9f^ZX7YZg0kzgQ0u$^QHgm8YTVDE&!?gG z^$eVXzlNWNJ20~3N}&4pp!$CvYMw8`_rkA1>EVY^{hx;i;7d^c@e0)VTXEWZ;N9>j zoPmgHO86moE%N&ixA9}u?*WP)#iSDy*`|KHJ*e!Z5U#vmN+)a~^nUuaNdgEJJ=U_L_8BfWF{%rVLwWrp$~Wk02Ua1--EihOJ9Gfl%o zTN-5x`Q^P7*-btrf72tonp54vC7lgh4q9cqNL#LBSMp-eyWWQ?@271umt(cVLE6#g0MXFf*_uAVk&bzR4Nl>OK=TgmP8*#86Oyi2aQ z(L@VLaXDCvwxqM=!VCyS0rp|A-@t{wa(Rmb^V86<*~ox6Zmep zN;&p@%=Q=Dy4=n0{z4x2UMpM;;Br1>oUj+rp4)Doty1sj z1&7CbOsr^^^@rhHOa7FZB~C|F6b4vY%hwSM0SBckO0%Ss5#I4A_?Ga$cIfe@(ezc? zzPxo)OSL*i`&^EKZ!y+mS$Vw)Xx=`>r6T2^dq+2m-9eFb8*=?}#%6tAEsr0Vwc+pa zy_vn|xSgJyomeb#IZESPr|~#@P4jHV&by?-KBrGlEM8o0%;5|b?Ts^d?Tn?Z@u<6! zs%zbJJ}Illa*vW1PUn+sb-)2_EW4yPHlsb3bb4uaawRO$YBlp>_2G$ya|>rj z>rXfLPY|jqPIY5>qtBw1d$OA9cat=mwe7W}C|z~@vE}*3(NRCGzT%3;*{q#+(rk6c z9&M%7P>>nCcH-lWM_i`UCm9!WLTF{Dn@5|6_!6p(rF>Ad-CS5>#)d`AC-Q+!@P}l3 zG{=XlwX_UzqWOAy`ZLfp^NQ@=hip59{FWOYLQQ9VM4k#Eycu)AvT}q~bab7j@wIYT zUF>o+93D9q{4o>$u&LdL|E-OFF`KW9LI#8Io#%sYcR>gYCO2H2Dc%qdj0 zfy#UY*Pr!-0F9=?UQpQBPW>_`%%XBk?7+@8r;wYP(CfE6Q7b2`$&^tG$|y*XRJOIj z0moH_2JAg3v5R;LlTN1~&Diy{+qKvxW+gJXx49BUJME`g znKDGUz2zjgnr^6+w8boN=vHfkzQ#=8X^q#85=7NAlaZ7wRqkBKEG~G zx$!)B2WQ5GO}RG2dL@jlUR>wVn!1LCgC-yM6OD3iy+-&lo@^B*dIL0tOJIt`#-tmf z!lo|-aM^9_OFUz^WpJcCb0Iivj|AJ+L4Ty{*O<&73m;dssTfwKax(0c4=4X;c(p#f z2uK>Q-q2mH=5MQYLW+lDdqBKFFE5pMJ%v|4TW$F?u8h zNxK+}hjlev3+jVkTcupn-5}_U`8S4Vrtr6hVL~Q0_ z?PHxkrM_p(Ox9mtB%4=bytVXooA6P{4\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Mark read redirect" -msgstr "All topics and forums have been marked as read." - -msgid "Mark forum read redirect" -msgstr "All topics in the specified forum have been marked as read." - -msgid "Form email disabled" -msgstr "The user you are trying to send an email to has disabled form email." - -msgid "No email subject" -msgstr "You must enter a subject." - -msgid "No email message" -msgstr "You must enter a message." - -msgid "Too long email message" -msgstr "Messages cannot be longer than 65535 characters (64 KB)." - -msgid "Email flood" -msgstr "At least %s seconds have to pass between sent emails. Please wait %s seconds and try sending again." - -msgid "Email sent redirect" -msgstr "Email sent." - -msgid "Send email to" -msgstr "Send email to" - -msgid "Email subject" -msgstr "Subject" - -msgid "Email message" -msgstr "Message" - -msgid "Email disclosure note" -msgstr "Please note that by using this form, your email address will be disclosed to the recipient." - -msgid "Write email" -msgstr "Write and submit your email message" - -msgid "No reason" -msgstr "You must enter a reason." - -msgid "Reason too long" -msgstr "Your message must be under 65535 bytes (~64kb)." - -msgid "Report flood" -msgstr "At least %s seconds have to pass between reports. Please wait %s seconds and try sending again." - -msgid "Report redirect" -msgstr "Post reported." - -msgid "Report post" -msgstr "Report post" - -msgid "Reason" -msgstr "Reason" - -msgid "Reason desc" -msgstr "Please enter a short reason why you are reporting this post" - -msgid "Already subscribed topic" -msgstr "You are already subscribed to this topic." - -msgid "Already subscribed forum" -msgstr "You are already subscribed to this forum." - -msgid "Subscribe redirect" -msgstr "Your subscription has been added." - -msgid "Not subscribed topic" -msgstr "You are not subscribed to this topic." - -msgid "Not subscribed forum" -msgstr "You are not subscribed to this forum." - -msgid "Unsubscribe redirect" -msgstr "Your subscription has been removed." - -msgid "Moderate" -msgstr "Moderate" - -msgid "Select" -msgstr "Select" - -msgid "Move" -msgstr "Move" - -msgid "Split" -msgstr "Split" - -msgid "Delete" -msgstr "Delete" - -msgid "Merge" -msgstr "Merge" - -msgid "Open" -msgstr "Open" - -msgid "Close" -msgstr "Close" - -msgid "Move topic" -msgstr "Move topic" - -msgid "Move topics" -msgstr "Move topics" - -msgid "Move legend" -msgstr "Select destination of move" - -msgid "Move to" -msgstr "Move to" - -msgid "Nowhere to move" -msgstr "There are no forums into which you can move topics." - -msgid "Leave redirect" -msgstr "Leave redirect topic(s)" - -msgid "Move topic redirect" -msgstr "Topic moved." - -msgid "Move topics redirect" -msgstr "Topics moved." - -msgid "Confirm delete legend" -msgstr "Please confirm deletion" - -msgid "Delete topics" -msgstr "Delete topics" - -msgid "Delete topics comply" -msgstr "Are you sure you want to delete the selected topics?" - -msgid "Delete topics redirect" -msgstr "Topics deleted." - -msgid "Open topic redirect" -msgstr "Topic opened." - -msgid "Open topics redirect" -msgstr "Topics opened." - -msgid "Close topic redirect" -msgstr "Topic closed." - -msgid "Close topics redirect" -msgstr "Topics closed." - -msgid "No topics selected" -msgstr "You must select at least one topic for move/delete/open/close." - -msgid "Not enough topics selected" -msgstr "You must select at least two topics for merge." - -msgid "Stick topic redirect" -msgstr "Topic sticked." - -msgid "Unstick topic redirect" -msgstr "Topic unsticked." - -msgid "Merge topics" -msgstr "Merge topics" - -msgid "Merge topics redirect" -msgstr "Topics merged." - -msgid "Confirm merge legend" -msgstr "Please confirm merge" - -msgid "New subject" -msgstr "New subject" - -msgid "Confirm split legend" -msgstr "Please confirm split of selected posts and select destination of move." - -msgid "Split posts" -msgstr "Split posts" - -msgid "Split posts comply" -msgstr "Are you sure you want to split the selected posts?" - -msgid "Split posts redirect" -msgstr "Posts have been split." - -msgid "Delete posts" -msgstr "Delete posts" - -msgid "Cannot select first" -msgstr "First post cannot be selected for split/delete." - -msgid "Delete posts comply" -msgstr "Are you sure you want to delete the selected posts?" - -msgid "Delete posts redirect" -msgstr "Posts deleted." - -msgid "No posts selected" -msgstr "You must select at least one post for split/delete." - -msgid "Host info 1" -msgstr "The IP address is: %s" - -msgid "Host info 2" -msgstr "The host name is: %s" - -msgid "Show more users" -msgstr "Show more users for this IP" diff --git a/lang/English/post.mo b/lang/English/post.mo deleted file mode 100644 index 58fde8300077007e4b07e61d358b4877b2e39f52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2395 zcma)-O=u)V6vta#bsax<*N^p+=fYwlcAJP`oESBUNeu4B!Hg0S!J6qeGbPo`beS-f9gh95kyTpmR?foe<#UIY1!vHT8rJ>(C-6W~YSwczJq1N;iS4*X#( z{|w#%`M0rr{EAvW1&Uq*%Kl|g>~4WKfP3ThJ}CAAcs2MsDEe=KH-hhj;@^j$?EhrU zFF^VJw_por`w6@s^1_u-6oW5;vhPihz;{8h^C|c-_$Bx$SfwzI*foH*A zLGk+poR-`@0gh7^orXMlWRJu}Vu2$^x8S`QFWjyCLK>=b1696+_;mG68H>-7FL~tL zl4J2t&Ww;$X8xsd6l~%+DLVv!upvJW!z_z z)=Q34?JC8*2qRLxz>a)yx`;M2Yg3Gs3(;1|K9Es4M^EdN$>%!L?4un!HGMD~f2GUD zTc=H5v?l%>4F93kf|sPoagmLpN?_-#^Rr{prf2I3!$S(T(A`=r9Peu$*245ut?}%x z&e#OPVMDYV)JXjCU8g&oM!ShOO(!Pqx5Xe_tW9O5Q(3%eUGAG?ic0h= z4=qzYT$wX;?+Pu>FE?7wN;=~0G=71d*VZ&?lT{e7TU%?io^8kL4kG5`r&Qo3VJ?0S zW<+%|bx!#Zx1BORQ^7hYol~Y?BJXjVRX+1YdQ7FcHc$3y6P-?CUH|dM`R(%?2lf|} zg~qxy0fC9zqXI?)UkncxnbKyNx&!4rhn45soAJ_to>=d(i#JTyrpRrRmO4629cdDq z#$LR|hF$Gr%SzB`Fv4Og94W5uS*+`092bH08 z0}9k9k~9hEC2AkK1qgd}CrB9-c-hI}AkJ(0sOYNj$|6M;(j?jrZf>rTcL1}fkOQv+2L2uw;H?yAx=anet)#Heb-E0_Ae zP};yWRGw1pyUL|A>aZuuxw@$HG9Rm^T!aDQvd>u(tpLfm)mS~GP1Yl;1geAC9rG*@m>LU?Jv?JGl2bRzw26i}U0t9EZM1^|R)hET_ zL-e98DKFs+3JhD+2|3RFxkrw)20>muh$124?M6^>S3#Y9m!Wn`L$=C#hQ*8Ad*lj1I#|CylqtF9Iipg51`9 zT<(DANE|tB)BQRFJYKoMtCl56iG+%8>y_$DDV-t_K@Nu3su`uh>G0t*=9>~IKKP` K^|bS0KKdIOKcS%j diff --git a/lang/English/post.po b/lang/English/post.po deleted file mode 100644 index 5472cbc5..00000000 --- a/lang/English/post.po +++ /dev/null @@ -1,93 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "No subject" -msgstr "Topics must contain a subject." - -msgid "No subject after censoring" -msgstr "Topics must contain a subject. After applying censoring filters, your subject was empty." - -msgid "Too long subject" -msgstr "Subjects cannot be longer than 70 characters." - -msgid "No message" -msgstr "You must enter a message." - -msgid "No message after censoring" -msgstr "You must enter a message. After applying censoring filters, your message was empty." - -msgid "Too long message" -msgstr "Posts cannot be longer than %s bytes." - -msgid "All caps subject" -msgstr "Subjects cannot contain only capital letters." - -msgid "All caps message" -msgstr "Posts cannot contain only capital letters." - -msgid "Empty after strip" -msgstr "It seems your post consisted of empty BBCodes only. It is possible that this happened because e.g. the innermost quote was discarded because of the maximum quote depth level." - -msgid "Post errors" -msgstr "Post errors" - -msgid "Post errors info" -msgstr "The following errors need to be corrected before the message can be posted:" - -msgid "Post preview" -msgstr "Post preview" - -msgid "Guest name" -msgstr "Name" - -msgid "Post redirect" -msgstr "Post entered." - -msgid "Post a reply" -msgstr "Post a reply" - -msgid "Post new topic" -msgstr "Post new topic" - -msgid "Hide smilies" -msgstr "Never show smilies as icons for this post" - -msgid "Subscribe" -msgstr "Subscribe to this topic" - -msgid "Stay subscribed" -msgstr "Stay subscribed to this topic" - -msgid "Topic review" -msgstr "Topic review (newest first)" - -msgid "Flood start" -msgstr "At least %s seconds have to pass between posts. Please wait %s seconds and try posting again." - -msgid "Preview" -msgstr "Preview" - -msgid "Edit post legend" -msgstr "Edit the post and submit changes" - -msgid "Silent edit" -msgstr "Silent edit (don't display \"Edited by ...\" in topic view)" - -msgid "Edit post" -msgstr "Edit post" - -msgid "Edit redirect" -msgstr "Post updated." diff --git a/lang/English/prof_reg.mo b/lang/English/prof_reg.mo deleted file mode 100644 index c20bbbd19e3f9ba8d8b6e49836bffc40de556cb9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5891 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 L%k^o>NbG+B>1OB{ diff --git a/lang/English/prof_reg.po b/lang/English/prof_reg.po deleted file mode 100644 index 9409aa33..00000000 --- a/lang/English/prof_reg.po +++ /dev/null @@ -1,225 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Email legend" -msgstr "Enter a valid email address" - -msgid "Email legend 2" -msgstr "Enter and confirm a valid email address" - -msgid "Localisation legend" -msgstr "Set your localisation options" - -msgid "Time zone" -msgstr "Time zone" - -msgid "Time zone info" -msgstr "For the forum to display times correctly you must select your local time zone. If Daylight Savings Time is in effect you should also check the option provided which will advance times by 1 hour." - -msgid "DST" -msgstr "Daylight Savings Time is in effect (advance time by 1 hour)." - -msgid "Time format" -msgstr "Time format" - -msgid "Date format" -msgstr "Date format" - -msgid "Default" -msgstr "Default" - -msgid "Language" -msgstr "Language" - -msgid "Email setting info" -msgstr "Select whether you want your email address to be viewable to other users or not and if you want other users to be able to send you email via the forum (form email) or not." - -msgid "Email setting 1" -msgstr "Display your email address to other users." - -msgid "Email setting 2" -msgstr "Hide your email address but allow form email." - -msgid "Email setting 3" -msgstr "Hide your email address and disallow form email." - -msgid "Privacy options legend" -msgstr "Set your privacy options" - -msgid "Confirm pass" -msgstr "Confirm password" - -msgid "Username too short" -msgstr "Usernames must be at least 2 characters long. Please choose another (longer) username." - -msgid "Username too long" -msgstr "Usernames must not be more than 25 characters long. Please choose another (shorter) username." - -msgid "Username guest" -msgstr "The username guest is reserved. Please choose another username." - -msgid "Username IP" -msgstr "Usernames may not be in the form of an IP address. Please choose another username." - -msgid "Username reserved chars" -msgstr "Usernames may not contain all the characters ', \" and [ or ] at once. Please choose another username." - -msgid "Username BBCode" -msgstr "Usernames may not contain any of the text formatting tags (BBCode) that the forum uses. Please choose another username." - -msgid "Banned username" -msgstr "The username you entered is banned in this forum. Please choose another username." - -msgid "Pass too short" -msgstr "Passwords must be at least 6 characters long. Please choose another (longer) password." - -msgid "Pass not match" -msgstr "Passwords do not match." - -msgid "Banned email" -msgstr "The email address you entered is banned in this forum. Please choose another email address." - -msgid "Dupe email" -msgstr "Someone else is already registered with that email address. Please choose another email address." - -msgid "Sig too long" -msgstr "Signatures cannot be longer than %1$s characters. Please reduce your signature by %2$s characters." - -msgid "Sig too many lines" -msgstr "Signatures cannot have more than %s lines." - -msgid "Bad ICQ" -msgstr "You entered an invalid ICQ UIN. Please go back and correct." - -msgid "UTC-12:00" -msgstr "(UTC-12:00) International Date Line West" - -msgid "UTC-11:00" -msgstr "(UTC-11:00) Niue, Samoa" - -msgid "UTC-10:00" -msgstr "(UTC-10:00) Hawaii-Aleutian, Cook Island" - -msgid "UTC-09:30" -msgstr "(UTC-09:30) Marquesas Islands" - -msgid "UTC-09:00" -msgstr "(UTC-09:00) Alaska, Gambier Island" - -msgid "UTC-08:30" -msgstr "(UTC-08:30) Pitcairn Islands" - -msgid "UTC-08:00" -msgstr "(UTC-08:00) Pacific" - -msgid "UTC-07:00" -msgstr "(UTC-07:00) Mountain" - -msgid "UTC-06:00" -msgstr "(UTC-06:00) Central" - -msgid "UTC-05:00" -msgstr "(UTC-05:00) Eastern" - -msgid "UTC-04:00" -msgstr "(UTC-04:00) Atlantic" - -msgid "UTC-03:30" -msgstr "(UTC-03:30) Newfoundland" - -msgid "UTC-03:00" -msgstr "(UTC-03:00) Amazon, Central Greenland" - -msgid "UTC-02:00" -msgstr "(UTC-02:00) Mid-Atlantic" - -msgid "UTC-01:00" -msgstr "(UTC-01:00) Azores, Cape Verde, Eastern Greenland" - -msgid "UTC" -msgstr "(UTC) Western European, Greenwich" - -msgid "UTC+01:00" -msgstr "(UTC+01:00) Central European, West African" - -msgid "UTC+02:00" -msgstr "(UTC+02:00) Eastern European, Central African" - -msgid "UTC+03:00" -msgstr "(UTC+03:00) Eastern African" - -msgid "UTC+03:30" -msgstr "(UTC+03:30) Iran" - -msgid "UTC+04:00" -msgstr "(UTC+04:00) Moscow, Gulf, Samara" - -msgid "UTC+04:30" -msgstr "(UTC+04:30) Afghanistan" - -msgid "UTC+05:00" -msgstr "(UTC+05:00) Pakistan" - -msgid "UTC+05:30" -msgstr "(UTC+05:30) India, Sri Lanka" - -msgid "UTC+05:45" -msgstr "(UTC+05:45) Nepal" - -msgid "UTC+06:00" -msgstr "(UTC+06:00) Bangladesh, Bhutan, Yekaterinburg" - -msgid "UTC+06:30" -msgstr "(UTC+06:30) Cocos Islands, Myanmar" - -msgid "UTC+07:00" -msgstr "(UTC+07:00) Indochina, Novosibirsk" - -msgid "UTC+08:00" -msgstr "(UTC+08:00) Greater China, Australian Western, Krasnoyarsk" - -msgid "UTC+08:45" -msgstr "(UTC+08:45) Southeastern Western Australia" - -msgid "UTC+09:00" -msgstr "(UTC+09:00) Japan, Korea, Chita, Irkutsk" - -msgid "UTC+09:30" -msgstr "(UTC+09:30) Australian Central" - -msgid "UTC+10:00" -msgstr "(UTC+10:00) Australian Eastern" - -msgid "UTC+10:30" -msgstr "(UTC+10:30) Lord Howe" - -msgid "UTC+11:00" -msgstr "(UTC+11:00) Solomon Island, Vladivostok" - -msgid "UTC+11:30" -msgstr "(UTC+11:30) Norfolk Island" - -msgid "UTC+12:00" -msgstr "(UTC+12:00) New Zealand, Fiji, Magadan" - -msgid "UTC+12:45" -msgstr "(UTC+12:45) Chatham Islands" - -msgid "UTC+13:00" -msgstr "(UTC+13:00) Tonga, Phoenix Islands, Kamchatka" - -msgid "UTC+14:00" -msgstr "(UTC+14:00) Line Islands" diff --git a/lang/English/profile.mo b/lang/English/profile.mo deleted file mode 100644 index 59c8f7e636ece29c768e9fb9322345b6a5d0afad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9585 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 Wx5GrZMcnV?pYc-s!(#42@&5r|czkyN diff --git a/lang/English/profile.po b/lang/English/profile.po deleted file mode 100644 index bbd7f00b..00000000 --- a/lang/English/profile.po +++ /dev/null @@ -1,378 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Profile menu" -msgstr "Profile menu" - -msgid "Section essentials" -msgstr "Essentials" - -msgid "Section personal" -msgstr "Personal" - -msgid "Section messaging" -msgstr "Messaging" - -msgid "Section personality" -msgstr "Personality" - -msgid "Section display" -msgstr "Display" - -msgid "Section privacy" -msgstr "Privacy" - -msgid "Section admin" -msgstr "Administration" - -msgid "Username and pass legend" -msgstr "Enter your username and password" - -msgid "Personal details legend" -msgstr "Enter your personal details" - -msgid "Contact details legend" -msgstr "Enter your messaging details" - -msgid "User activity" -msgstr "User activity" - -msgid "Paginate info" -msgstr "Enter the number of topics and posts you wish to view on each page." - -msgid "Pass key bad" -msgstr "The specified password activation key was incorrect or has expired. Please re-request a new password. If that fails, contact the forum administrator at" - -msgid "Pass updated" -msgstr "Your password has been updated. You can now login with your new password." - -msgid "Pass updated redirect" -msgstr "Password updated." - -msgid "Wrong pass" -msgstr "Wrong old password." - -msgid "Change pass" -msgstr "Change password" - -msgid "Change pass legend" -msgstr "Enter and confirm your new password" - -msgid "Old pass" -msgstr "Old password" - -msgid "New pass" -msgstr "New password" - -msgid "Confirm new pass" -msgstr "Confirm new password" - -msgid "Pass info" -msgstr "Passwords must be at least 6 characters long. Passwords are case sensitive." - -msgid "Email key bad" -msgstr "The specified email activation key was incorrect or has expired. Please re-request change of email address. If that fails, contact the forum administrator at" - -msgid "Email updated" -msgstr "Your email address has been updated." - -msgid "Activate email sent" -msgstr "An email has been sent to the specified address with instructions on how to activate the new email address. If it doesn't arrive you can contact the forum administrator at" - -msgid "Email legend" -msgstr "Enter your new email address" - -msgid "Email instructions" -msgstr "An email will be sent to your new address with an activation link. You must click the link in the email you receive to activate the new address." - -msgid "Change email" -msgstr "Change email address" - -msgid "New email" -msgstr "New email" - -msgid "Avatars disabled" -msgstr "The administrator has disabled avatar support." - -msgid "Too large ini" -msgstr "The selected file was too large to upload. The server didn't allow the upload." - -msgid "Partial upload" -msgstr "The selected file was only partially uploaded. Please try again." - -msgid "No tmp directory" -msgstr "PHP was unable to save the uploaded file to a temporary location." - -msgid "No file" -msgstr "You did not select a file for upload." - -msgid "Bad type" -msgstr "The file you tried to upload is not of an allowed type. Allowed types are gif, jpeg and png." - -msgid "Too wide or high" -msgstr "The file you tried to upload is wider and/or higher than the maximum allowed" - -msgid "Too large" -msgstr "The file you tried to upload is larger than the maximum allowed" - -msgid "pixels" -msgstr "pixels" - -msgid "bytes" -msgstr "bytes" - -msgid "Move failed" -msgstr "The server was unable to save the uploaded file. Please contact the forum administrator at" - -msgid "Unknown failure" -msgstr "An unknown error occurred. Please try again." - -msgid "Avatar upload redirect" -msgstr "Avatar uploaded." - -msgid "Avatar deleted redirect" -msgstr "Avatar deleted." - -msgid "Avatar desc" -msgstr "An avatar is a small image that will be displayed under your username in your posts. It must not be any bigger than" - -msgid "Upload avatar" -msgstr "Upload avatar" - -msgid "Upload avatar legend" -msgstr "Enter an avatar file to upload" - -msgid "Delete avatar" -msgstr "Delete avatar" - -msgid "File" -msgstr "File" - -msgid "Upload" -msgstr "Upload" - -msgid "Forbidden title" -msgstr "The title you entered contains a forbidden word. You must choose a different title." - -msgid "Profile redirect" -msgstr "Profile updated." - -msgid "Users profile" -msgstr "%s's profile" - -msgid "Username info" -msgstr "Username: %s" - -msgid "Email info" -msgstr "Email: %s" - -msgid "Posts info" -msgstr "Posts: %s" - -msgid "Registered info" -msgstr "Registered: %s" - -msgid "Last post info" -msgstr "Last post: %s" - -msgid "Last visit info" -msgstr "Last visit: %s" - -msgid "Show posts" -msgstr "Show all posts" - -msgid "Show topics" -msgstr "Show all topics" - -msgid "Show subscriptions" -msgstr "Show all subscriptions" - -msgid "Realname" -msgstr "Real name" - -msgid "Location" -msgstr "Location" - -msgid "Website" -msgstr "Website" - -msgid "Invalid website URL" -msgstr "The website URL you entered is invalid." - -msgid "Website not allowed" -msgstr "You are not allowed to add a website to your profile yet." - -msgid "Jabber" -msgstr "Jabber" - -msgid "ICQ" -msgstr "ICQ" - -msgid "MSN" -msgstr "Microsoft Account" - -msgid "AOL IM" -msgstr "AOL IM" - -msgid "Yahoo" -msgstr "Yahoo! Messenger" - -msgid "Avatar" -msgstr "Avatar" - -msgid "Signature" -msgstr "Signature" - -msgid "Sig max size" -msgstr "Max length: %s characters / Max lines: %s" - -msgid "Avatar legend" -msgstr "Set your avatar display options" - -msgid "Avatar info" -msgstr "An avatar is a small image that will be displayed with all your posts. You can upload an avatar by clicking the link below." - -msgid "Change avatar" -msgstr "Change avatar" - -msgid "Signature legend" -msgstr "Compose your signature" - -msgid "Signature info" -msgstr "A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature." - -msgid "Sig preview" -msgstr "Current signature preview:" - -msgid "No sig" -msgstr "No signature currently stored in profile." - -msgid "Signature quote/code/list/h" -msgstr "The quote, code, list, and heading BBCodes are not allowed in signatures." - -msgid "Topics per page" -msgstr "Topics" - -msgid "Posts per page" -msgstr "Posts" - -msgid "Leave blank" -msgstr "Leave blank to use forum default." - -msgid "Subscription legend" -msgstr "Set your subscription options" - -msgid "Notify full" -msgstr "Include a plain text version of new posts in subscription notification emails." - -msgid "Auto notify full" -msgstr "Automatically subscribe to every topic you post in." - -msgid "Show smilies" -msgstr "Show smilies as graphic icons." - -msgid "Show images" -msgstr "Show images in posts." - -msgid "Show images sigs" -msgstr "Show images in user signatures." - -msgid "Show avatars" -msgstr "Show user avatars in posts." - -msgid "Show sigs" -msgstr "Show user signatures." - -msgid "Style legend" -msgstr "Select your preferred style" - -msgid "Styles" -msgstr "Styles" - -msgid "Admin note" -msgstr "Admin note" - -msgid "Pagination legend" -msgstr "Enter your pagination options" - -msgid "Post display legend" -msgstr "Set your options for viewing posts" - -msgid "Post display info" -msgstr "If you are on a slow connection, disabling these options, particularly showing images in posts and signatures, will make pages load faster." - -msgid "Instructions" -msgstr "When you update your profile, you will be redirected back to this page." - -msgid "Group membership legend" -msgstr "Choose user group" - -msgid "Save" -msgstr "Save" - -msgid "Set mods legend" -msgstr "Set moderator access" - -msgid "Moderator in info" -msgstr "Choose which forums this user should be allowed to moderate. Note: This only applies to moderators. Administrators always have full permissions in all forums." - -msgid "Update forums" -msgstr "Update forums" - -msgid "Delete ban legend" -msgstr "Delete (administrators only) or ban user" - -msgid "Delete user" -msgstr "Delete user" - -msgid "Ban user" -msgstr "Ban user" - -msgid "Confirm delete legend" -msgstr "Important: read before deleting user" - -msgid "Confirm delete user" -msgstr "Confirm delete user" - -msgid "Confirmation info" -msgstr "Please confirm that you want to delete the user" - -msgid "Delete warning" -msgstr "Warning! Deleted users and/or posts cannot be restored. If you choose not to delete the posts made by this user, the posts can only be deleted manually at a later time." - -msgid "Delete posts" -msgstr "Delete any posts and topics this user has made." - -msgid "Delete" -msgstr "Delete" - -msgid "User delete redirect" -msgstr "User deleted." - -msgid "User promote redirect" -msgstr "User promoted." - -msgid "Group membership redirect" -msgstr "Group membership saved." - -msgid "Update forums redirect" -msgstr "Forum moderator rights updated." - -msgid "Ban redirect" -msgstr "Redirecting …" - -msgid "No delete admin message" -msgstr "Administrators cannot be deleted. In order to delete this user, you must first move him/her to a different user group." diff --git a/lang/English/register.mo b/lang/English/register.mo deleted file mode 100644 index f076b7ec197bfa69d341ed5f2390572d16f257ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3064 zcma)8O>Z1U5FH?VnGhg+BnKiD5+8|_nZ#BCW`iSQCq@d7^T*)> zpCx#X;(Z+N?|7fW`^9begXi?^NpdG}5qKByIpF=k^WFGzhg-k}%)beI0LZ}mfNh5# z0Pn^4<8J&p@L`O<0v-f@+kO8Lcn`)uci(>n3b((2hk*y~i0h94#md5r089_#?T1Yrz&E#7OueOgj÷`DxJcd}lEEz=P)iQ&`X+gioJ!mu!z=zK z7fQ#RtSOVTPS&g$R<0(lRi%@Q>~mU-u#{YqIjYRic0Y}6s8&rrO4hAwYjUk-pS)tp z@Pr(fKG{^>#~tC9=8{d3T;r1RU=OQ`%5mPrIa`l4Hyj3$0hU(2VJB1g;Z##uL+qS& ze!sbBY|rAMwiY&p8+8P(dv-?EOgS5GU9vMS+A+i7z2l|%xZA&}Tc>miuWR2UGY&() zvUHB(&z0kbo>-y96XzB-oqZerr5i>18aog6Jz8hgjM%NNE^J=yr)v&F%%>Ms!#%=W zdX2X$Svs4#tbCL9oibjl#yTvztW4RelG8q`de@2cf-36Dyf};|27}DH^8CV;jVqVt z_7}6$3rKXs2B%KPFxv3D&8e|gl{rWGNIB2V%Ju$wx;$Se)`#rUOD4BPWy&5c52|K| zNRQYoyq>;Bnl0B)krV^AI zn%b6Bo?{6$mK2$`9stKyya@5o2oD znq2ZB!p(JCFkv;t%~P=v+>$d37PZpY`o^Ec$XBHiKCnJ9B%?q8`&A z1#WelkEpf|6gGyzp^@5#Ni(H)TK18Q<5D>ZJdUe84MW9=^L}JoU6ArOumj;j`eUV7 zmnEyL?S!yi$&NZ4UbnuXp+wNO4V)zF3PcQ^!A7XIjIN>^gvHA7&NLTcsxv4O4dHh* zb{6Le;{uDfE0n*)tf+=i3{*zYQv>S3b18ihnJHt)L4|eUX%MJdqo-&pH;|e!Nc&oW z=UBN$GAh62;C~&bG5C^o~MOw-Onky`O^9*9=99#?M2Th@+As|5^u{`z^17g?F=l!n} zls}3@qhKT*@s2@OU>_Mr>~rhns=|1{IDc+xCw8Y4!nICRH;OGX| z40^C(G@j7*x@%aXBw~k>qgEkGs1jv6ZzQubvt-NGEN4h>)3`#5>AvBfZMZcf9MD*c zc3tBhkeKhL9=b;~KZ_ema4?<6T{tK`hSJ-bU6m_6uS`0w()Yy6)9Ldk{-0ZW%XA*Y RSt^%8lU+JHHxkP~`3D%zqaXkP diff --git a/lang/English/register.po b/lang/English/register.po deleted file mode 100644 index 7cde2e42..00000000 --- a/lang/English/register.po +++ /dev/null @@ -1,84 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "No new regs" -msgstr "This forum is not accepting new registrations." - -msgid "Reg cancel redirect" -msgstr "Registration cancelled." - -msgid "Forum rules" -msgstr "Forum rules" - -msgid "Rules legend" -msgstr "You must agree to the following in order to register" - -msgid "Registration flood" -msgstr "A new user was registered with the same IP address as you within the last hour. To prevent registration flooding, at least an hour has to pass between registrations from the same IP. Sorry for the inconvenience." - -msgid "Agree" -msgstr "Agree" - -msgid "Cancel" -msgstr "Cancel" - -msgid "Register" -msgstr "Register" - -msgid "Registration errors" -msgstr "Registration errors" - -msgid "Registration errors info" -msgstr "The following errors need to be corrected before you can register:" - -msgid "Username censor" -msgstr "The username you entered contains one or more censored words. Please choose a different username." - -msgid "Username dupe 1" -msgstr "Someone is already registered with the username" - -msgid "Username dupe 2" -msgstr "The username you entered is too similar. The username must differ from that by at least one alphanumerical character (a-z or 0-9). Please choose a different username." - -msgid "Email not match" -msgstr "Email addresses do not match." - -msgid "Reg email" -msgstr "Thank you for registering. Your password has been sent to the specified address. If it doesn't arrive you can contact the forum administrator at" - -msgid "Reg complete" -msgstr "Registration complete. You are now logged in." - -msgid "Desc 1" -msgstr "Registration will grant you access to a number of features and capabilities otherwise unavailable. These functions include the ability to edit and delete posts, design your own signature that accompanies your posts and much more. If you have any questions regarding this forum you should ask an administrator." - -msgid "Desc 2" -msgstr "Below is a form you must fill out in order to register. Once you are registered you should visit your profile and review the different settings you can change. The fields below only make up a small part of all the settings you can alter in your profile." - -msgid "Username legend" -msgstr "Please enter a username between 2 and 25 characters long" - -msgid "Pass legend" -msgstr "Please enter and confirm your chosen password" - -msgid "Pass info" -msgstr "Passwords must be at least 6 characters long. Passwords are case sensitive." - -msgid "Email info" -msgstr "You must enter a valid email address as your randomly generated password will be sent to that address." - -msgid "Confirm email" -msgstr "Confirm email address" diff --git a/lang/English/search.mo b/lang/English/search.mo deleted file mode 100644 index 1f68f853019433a51326c94ee5a3f1f980c6b99e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4068 zcma);Pi$009LGlmh2r0eB7!ie|v-AHqzxn-s zGuQf8yvC4*kvAe=y@9a_@Z3%KAicYSvDM&v;BDY1;631%;Jx5?;Ck>^@P3f3bnP2J zY99joz+>R8;IuD42d+VR4!j*~f_H=GLF)G=cnkQEFMkH!f%0W=EqE2Y6Z{2S1^xk& ze1ChczS+&Y4kUTEg7<+3K$3R`+zh55?fYfVPr(OJz5?RMuH!@d_zfhvRzfJ!M?Xk% zZv;t>T_Ek}0Js4>=G#M%_N76R<3$iZ_BK8w?}s4G^SQ78+Lyoe?LUEcq5V2Y`~M3h zeXho)iEBYxcQZJJv)cudeCP0?`Oky2zgNNS;6;$+_!-;+{tnXkeoVFw+yv6R!}vgz zY}A*Jg4FL6Nb)`lZUSo{$#(%Hy}biI4qgTy1^@KSVenp*%iuWpI+z2mfdz04lsgC( zK{CCwAn8BxY=ETab0DThVu8=6z!`IN-l!yLDEkN#E;G6L;5%m(mEGF90hyDm*4X3?}N17$G-g%Nb-IK z_JiMmB=?UXmbZ1JcS@wMJ;rB_Fzo*5^Um6WIaj=0Rlg zEjriT$a!S)J+hA+GNoM()+P`-x)My-ribV|ssovXQ8LR$8>X5nuBA{xl^tsFa%!qv zSJNgJn%7fpbWg2G>rr5<=VYsys!;b1=xON;YG{cC7q8G&>pLHoZ8^tN)u?4+9!PnoZ?Lw4f z)ltHuq>?Tub`M+FSZl;4s>hO7$Ov@TKqWO=bvBPLF4d(im$N)J-DQDUDcf4A3@^9X zv?CYRP1;2(NV`P3;wGxec1>n(b~qeFDpn$=;nwbEtOGdZO~nl*;ylc|ri(nO+oB%X zv!A=aBij?cWrPpy*xxs$QnKOvM3{eCDzd{OAD6;Zr8;z|Z|YY7y@7uw`Y3Kkj*lPYvNE|S>>{3KtJqPAd0en5n^C^=YhOO(rnRLwrocVgni zk%m=hP9L<{%VxP7AEl#zC! z6$~0m!2siyoyEt#GB$+?MAGuRa7$UaP>=q&g@i#=pe>|{@Fdc4H1hvJJZ5xn~wOTlx4bm?f+Z0C!kSfT6VVl_Krm0}OpZ#WC;Y&6r<04{q8H^QZ#>9Q`g##x&t9k&}Ob%9TjYH{=e zuDf6qUB^bXd`I#`F$=F%qh5R->TmbV&xsn`t8sc^u8bEZV0+Ge#BH zE^u*oTIeur-1Pxj=XlM(3YLN55uEduh0og_Vn=q3^|eAfh3 zNX#ZG6b`ISYa1N2RhSHOT*PtKfcat=LS_SD`%JT2`ZSI(fMW&jfawPAl8\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "User search" -msgstr "User search" - -msgid "No search permission" -msgstr "You do not have permission to use the search feature." - -msgid "Search flood" -msgstr "At least %s seconds have to pass between searches. Please wait %s seconds and try searching again." - -msgid "Search" -msgstr "Search" - -msgid "Search criteria legend" -msgstr "Enter your search criteria" - -msgid "Search info" -msgstr "To search by keyword, enter a term or terms to search for. Separate terms with spaces. Use AND, OR and NOT to refine your search. To search by author enter the username of the author whose posts you wish to search for. Use wildcard character * for partial matches." - -msgid "Keyword search" -msgstr "Keyword search" - -msgid "Author search" -msgstr "Author search" - -msgid "Search in legend" -msgstr "Select where to search" - -msgid "Search in info" -msgstr "Choose in which forum you would like to search and if you want to search in topic subjects, message text or both." - -msgid "Search multiple forums info" -msgstr "If no forums are selected, all forums will be searched." - -msgid "Forum search" -msgstr "Forum" - -msgid "Search in" -msgstr "Search in" - -msgid "Message and subject" -msgstr "Message text and topic subject" - -msgid "Message only" -msgstr "Message text only" - -msgid "Topic only" -msgstr "Topic subject only" - -msgid "Sort by" -msgstr "Sort by" - -msgid "Sort order" -msgstr "Sort order" - -msgid "Search results legend" -msgstr "Select how to view search results" - -msgid "Search results info" -msgstr "You can choose how you wish to sort and show your results." - -msgid "Sort by post time" -msgstr "Post time" - -msgid "Sort by author" -msgstr "Author" - -msgid "Sort by subject" -msgstr "Subject" - -msgid "Sort by forum" -msgstr "Forum" - -msgid "Ascending" -msgstr "Ascending" - -msgid "Descending" -msgstr "Descending" - -msgid "Show as" -msgstr "Show results as" - -msgid "Show as topics" -msgstr "Topics" - -msgid "Show as posts" -msgstr "Posts" - -msgid "Search results" -msgstr "Search results" - -msgid "Quick search show_new" -msgstr "New" - -msgid "Quick search show_recent" -msgstr "Active" - -msgid "Quick search show_unanswered" -msgstr "Unanswered" - -msgid "Quick search show_replies" -msgstr "Posted" - -msgid "Quick search show_user_topics" -msgstr "Topics by %s" - -msgid "Quick search show_user_posts" -msgstr "Posts by %s" - -msgid "Quick search show_subscriptions" -msgstr "Subscribed by %s" - -msgid "By keywords show as topics" -msgstr "Topics with posts containing '%s'" - -msgid "By keywords show as posts" -msgstr "Posts containing '%s'" - -msgid "By user show as topics" -msgstr "Topics with posts by %s" - -msgid "By user show as posts" -msgstr "Posts by %s" - -msgid "By both show as topics" -msgstr "Topics with posts containing '%s', by %s" - -msgid "By both show as posts" -msgstr "Posts containing '%s', by %s" - -msgid "No terms" -msgstr "You have to enter at least one keyword and/or an author to search for." - -msgid "No hits" -msgstr "Your search returned no hits." - -msgid "No user posts" -msgstr "There are no posts by this user in this forum." - -msgid "No user topics" -msgstr "There are no topics by this user in this forum." - -msgid "No subscriptions" -msgstr "This user is currently not subscribed to any topics." - -msgid "No new posts" -msgstr "There are no topics with new posts since your last visit." - -msgid "No recent posts" -msgstr "No new posts have been made within the last 24 hours." - -msgid "No unanswered" -msgstr "There are no unanswered posts in this forum." - -msgid "Go to post" -msgstr "Go to post" - -msgid "Go to topic" -msgstr "Go to topic" diff --git a/lang/English/stopwords.txt b/lang/English/stopwords.txt deleted file mode 100644 index 907a2600..00000000 --- a/lang/English/stopwords.txt +++ /dev/null @@ -1,175 +0,0 @@ -about -after -ago -all -almost -along -also -any -anybody -anywhere -are -arent -aren't -around -ask -been -before -being -between -but -came -can -cant -can't -come -could -couldnt -couldn't -did -didnt -didn't -does -doesnt -doesn't -dont -don't -each -either -else -even -every -everybody -everyone -find -for -from -get -going -gone -got -had -has -have -havent -haven't -having -her -here -hers -him -his -how -ill -i'll -i'm -into -isnt -isn't -itll -it'll -its -it's -ive -i've -just -know -less -like -make -many -may -more -most -much -must -near -never -none -nothing -now -off -often -once -one -only -other -our -ours -our's -out -over -please -rather -really -said -see -she -should -small -some -something -sometime -somewhere -take -than -thank -thanks -that -thats -that's -the -their -theirs -them -then -there -these -they -thing -think -this -those -though -through -thus -too -true -two -under -until -upon -use -very -want -was -way -well -were -what -when -where -which -who -whom -whose -why -will -with -within -without -would -yes -yet -you -your -youre -you're -yours -http -https -ftp -www -com -net -org diff --git a/lang/English/topic.mo b/lang/English/topic.mo deleted file mode 100644 index b5dbc93c8358f0e216f8001e84e2d1a83cfc13cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1487 zcmaiyyKfUg5XKi09x>q+-Y>BfkpkijK`4qY7@;_Eu$06maR_vr@7DIg`PSOqOJe>2 z3K}X9H5CArvn_(O z|20IBu2uXf{@axAK|0qb@DlhHJOKUy2f%)8rgNPK$!`chik}53?g&Wd%BADm>3Rty zU5g;;@<4p7g&!obrF8x=Nb#S56z>^$0(=3I{~M6}KY*0?3rJ5!IZwil!KjgDEXA=7 zf^=u}PTh^}i{78&(%DYKI_*f>p}Xib%6l9}x=z99JxCkr!1cuEI10vXLIlDHHtG3> z6_jkUsYqzUie>J2o)TK~K-TNRV@1t%RMoEXs~Al?+HgTmGt%R(42_b3X0u|M`xvoV ziJ+xgE$~Ayj8T^GQKA*J8Fe)`vgNz1ti+NpmO`vsnk9Z5)(4|;&^woWB zgc4rrIfq!j&{$|mW!QX29;;Ab?gmmr>O#1#n=Oi}_7SZdM9K-Qf>cdy^RN{Ub?(|2 zPrA9GkYC90;frG#$a*MTV--E?u29;Sq0I}zF%6-{$1~+p#mXxTF>g&cM%Wy4)*OyR zTRT&9T~_em{^9J^ zOdfYGLPTx1kkp73bEOqHemKV6hNHAFxrIu>8r|4O*=s^slc6g;Kdjq)wCbC6AvPCb z=AJbrLZK3kWl0arhqI&E>sU#K*1U|AEAmMWn+NMfNq;0OZxJanp?ClE9{$H&nh1n@KyQ|u$9~WBO*;Hv;1aDh+ Fe*tICQ3C(~ diff --git a/lang/English/topic.po b/lang/English/topic.po deleted file mode 100644 index bca23a6f..00000000 --- a/lang/English/topic.po +++ /dev/null @@ -1,93 +0,0 @@ -# -msgid "" -msgstr "" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Project-Id-Version: FeatherBB\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: FeatherBB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Post reply" -msgstr "Post reply" - -msgid "Topic closed" -msgstr "Topic closed" - -msgid "From" -msgstr "From:" - -msgid "Promote user" -msgstr "Promote user" - -msgid "IP address logged" -msgstr "IP address logged" - -msgid "Note" -msgstr "Note:" - -msgid "Posts topic" -msgstr "Posts:" - -msgid "Registered topic" -msgstr "Registered:" - -msgid "Replies" -msgstr "Replies:" - -msgid "Website" -msgstr "Website" - -msgid "Guest" -msgstr "Guest" - -msgid "Online" -msgstr "Online" - -msgid "Offline" -msgstr "Offline" - -msgid "Last edit" -msgstr "Last edited by" - -msgid "Report" -msgstr "Report" - -msgid "Delete" -msgstr "Delete" - -msgid "Edit" -msgstr "Edit" - -msgid "Quote" -msgstr "Quote" - -msgid "Is subscribed" -msgstr "You are currently subscribed to this topic" - -msgid "Unsubscribe" -msgstr "Unsubscribe" - -msgid "Subscribe" -msgstr "Subscribe to this topic" - -msgid "Quick post" -msgstr "Quick reply" - -msgid "Mod controls" -msgstr "Moderator controls" - -msgid "New icon" -msgstr "New post" - -msgid "Re" -msgstr "Re:" - -msgid "Preview" -msgstr "Preview" diff --git a/lang/English/update.mo b/lang/English/update.mo deleted file mode 100644 index 18d61df2ff3d7f864483f458fe703aa3bbddb701..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7678 zcmbW5TZ|-C8OIO0URXpFvyRys-PWSFC7k6hbz}{fuUdG*7kPu?3yH0l(R9E%Z zshZi@CyDWaXwU?CFc>e1nivve)L@VYP0*O&i-`$F6L=sRg^*~}7<^FtednC2>6spM zwKLWKIj5`6`L6%(JN4p~TOL<@4sgAnYs;IIIs?A?X1@6Bd5cn4f_noV2e&f*BzOh* zAox!30(dp}2>3qmtKjwEkHB|>&x6;1e+>9~n7`(&N?ptRG$_B{0lovgH((6Djq$mF ztDwm9Fevwb5xfk161)ohA$T453sB_y9VqMl4HWqhon2c`(Wqbq_{T~S9 z3KYE_1?Bl~g5rv2K(YIeL6Pe@@N)3ipzQm5Q0(w(7{3OJUayDomP?i5PhG|rrdL;k z^85AR;w4IHu+8`!n}~hC28zDl2Sv`Gfj5CKf)8{5rEGRT>zYP8b6hD6+p+%0zK#}V!pzQY~D1Lq#6np<9jGqU^k1vGrOCYXPFN31*U&HVJ z05OaE$hy;9a^GGqR8u!|-NyAHE==xhydRw9n&G;EOYB7$yExea%BSVQeedQQbEutM zH*yhrj#B`IS=2tRU0k?YX)f_6Zg6@7YMu)*Cq5q@n-QHp8pdJ=%;`RobMnE=?lToo zY$Ns*8$xX^Mz?|T`3TodTzj}~;UW~>N9;To{;%Nx|7_>Fm5b0)>dttWWQi?{sLTtU zXX&asJctTwO5M$~WmDKB&(vY}Z<%EMv43?^njzz&Fx^s{qR0!Y4p$5_9%hlKTbe?% z)aJ7~$$I%4{FFu=ld2<88FeCS^eD1+B`@O18NbNHjXKLqqmE`#CpF`WOw4G%(@~K= z+$d`5%A&gR(;}yy8z1ae3t3snq(>PqM`;r4Uc!dX7R^*Ge3(8FC0S{*DC-(E_P-t) zYoq?Ab6&|4X4pZf=Ejp|#fh0kL!(aS&g2{X#_WdOnW;u`RMtYC6gw>zW`xg0Z|Bp~ zrc)(p?8aGa&eyZDQ?SfwbFNAX6RR`bA{mvss4^QAJX1zR8Fo=;s%{s>dR3aPhPhas z^?oUHo#x$#!eeKhSjt1A?WoxO3GMfsq zaMST9>sQ2gYso~zu@&|HNGRxzp5LO=Y3D`%;MNlhCyuV|KiA&16%Hb8Sao&8rlmPw z?i{7$(!M(I51d^(*4ndnpX}Zn@WSM}G5qF*k8i z>bdrw_AUJ4hpjVtRdh`t#d+;FQA>lwYFnC-262qWKDv`fMXa4Z>nL^Gf96!Z!|Inl z^{sJg-7$BA)jM|cB|j{&b}vuUe5DB+t20Bu69^q4ILE;zo>%*!aw7ELraU~qe`okv zFZ7(mqaqnb#VRc5y+c^(RTLJLs-ft1H0!5{9n8wK?naqTO|)!ynBPb&Q9Cxhs7gx> z16HQ3@6J~Yg=1DHy$x$+1jxGeNSZ1oZSkzP;JUJ*^EVK36u}zAbu8kF1Wwwv-fxBn z?=qz$a3|o3*uqIICaT~mryTs}>x#{FoM%&|ez1Z@`jCm;wtpw9XyL_q?YxYlMPNIP zVwvbAo90N~ti(+>Q1+2#<|wqeyH7oxPY==R94kB-Axo=HgXuZ(b}Xi=tYB_f5gp zL+_wk-$4B%e8}!=W^dGJs>MoD4)n?(fxM2T)%in*^h#tgw=JVIHE~-4C`1IM76T1k zb(&>AOu?Te?Y)DX$)`M(wMT=|lq-^L6;>E$#4{g1P65)>Q5Nfgp+f3`1Y3riY87e; zXJ9U;1#z%mNmqhh%@A=-gs{$!L-DaWPgg=I^1LkeZ&qG=uAewJhg4Wc!a?>r%_jPZ zu@t)(4Y0AaAS9}oC79p(lDU$k>8y@=68q530Q(LjN}LGQ1RVKVbz$=;l|ae*#!AkQ z%RO7SEgH`_UaYfXO|v5RfzaKoJCg-{?0P$)Z|M8PkBuZgo2RH>)u>-Yt~=<-!u8E_ z?cME$e>;+7kzLYy2#qDgm2Yx<@D-*HnX_rET~eU#s zN3i``v*)*pNKILyt z$61@IBWb)At9AIge0Gf6_|($bqU( zWl8{Mh|S1kE~au%>2@UbEmQy$#O%(X68bi|0R4Iv-YCcs$LGxUIl>UxL$|x`P%^4f z{ZJEm9mAdOgn$_;(uh$%crm+aDMG9w#~7AK6GD!}tt3aKIVSHU+6I+y?5fZ}N$aTZ zUOI6+1bSFlQk0O`td*m1b3AS;pX6GEE^;XIzLsZ^!-YAKM+*;AM4h}Ub<1htVwIE+ zDoadicWy{mx2bilQdm>P2iyT6M9Rn9|jl#k&`YlI4WX zMRAKYtNor_qOIFzH70DhHhL8ef_~< z;vg@YHMgkKu2lF!q^9d5{ft^zqm(B3U|nAd5Tq8fW5h-)s4hi-l`2CkshL( zx?3OkCya?ezGnKI_R$dXyU~uNppaJH3(-Kl)#V_txC=mD7zh!$q>y6fogjfPOeI@y zay)JP;g6T@w(;;K#HDX>t4e1RJQemud@8f+e}a|WTSG^!6#Tl{I+iB#XheLo5%sN} z_Ahj1*fJa=ef~oIu=|GgM_3i*q%6p8LfO7YlaV{Om16PwJZw`n`@{P+8To*mq;rlt|6TAiAw|?1sHoWTdMr?A|af6g#dC6c6O*W~--Zdjcb!ls!u-yT@IdtX< zHKiSkJ0=ZO?C?;=?+V#>qZss*oIK~k*wbs52+`?~&ggnw(aWa!) u=vY&HP\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "Update" -msgstr "Update FluxBB" - -msgid "Update message" -msgstr "Your FluxBB database is out-of-date and must be upgraded in order to continue. If you are the board administrator, please follow the instructions below to complete the upgrade." - -msgid "Note" -msgstr "Note:" - -msgid "Members message" -msgstr "This process is for board administrators only. If you are a member there is nothing to worry about - the forums will be back shortly!" - -msgid "Administrator only" -msgstr "This step is for the board administrator only!" - -msgid "Database password info" -msgstr "To perform the database update please enter the database password with which FluxBB was installed. If you cannot remember, this is stored in your 'config.php' file." - -msgid "Database password note" -msgstr "If you are running SQLite (and hence have no database password) please use the database file name instead. This must exactly match the database file name given in your configuration file." - -msgid "Database password" -msgstr "Database password" - -msgid "Maintenance" -msgstr "Maintenance" - -msgid "Maintenance message info" -msgstr "The message that will be displayed to users during the updating process. This text will not be parsed like regular posts and thus may contain HTML." - -msgid "Maintenance message" -msgstr "Maintenance message" - -msgid "You are running error" -msgstr "You are running %1$s version %2$s. FluxBB %3$s requires at least %1$s %4$s to run properly. You must upgrade your %1$s installation before you can continue." - -msgid "Version mismatch error" -msgstr "Version mismatch. The database '%s' doesn't seem to be running a FluxBB database schema supported by this update script." - -msgid "Invalid file error" -msgstr "Invalid database file name. When using SQLite the database file name must be entered exactly as it appears in your '%s'" - -msgid "Invalid password error" -msgstr "Invalid database password. To upgrade FluxBB you must enter your database password exactly as it appears in your '%s'" - -msgid "No password error" -msgstr "No database password provided" - -msgid "Script runs error" -msgstr "It appears the update script is already being ran by someone else. If this is not the case, please manually delete the file '%s' and try again" - -msgid "No update error" -msgstr "Your forum is already as up-to-date as this script can make it" - -msgid "Intro 1" -msgstr "This script will update your forum database. The update procedure might take anything from a second to hours depending on the speed of the server and the size of the forum database. Don't forget to make a backup of the database before continuing." - -msgid "Intro 2" -msgstr "Did you read the update instructions in the documentation? If not, start there." - -msgid "No charset conversion" -msgstr "IMPORTANT! FluxBB has detected that this PHP environment does not have support for the encoding mechanisms required to do UTF-8 conversion from character sets other than ISO-8859-1. What this means is that if the current character set is not ISO-8859-1, FluxBB won't be able to convert your forum database to UTF-8 and you will have to do it manually. Instructions for doing manual charset conversion can be found in the update instructions." - -msgid "Enable conversion" -msgstr "Enable conversion: When enabled this update script will, after it has made the required structural changes to the database, convert all text in the database from the current character set to UTF-8. This conversion is required if you're upgrading from version 1.2." - -msgid "Current character set" -msgstr "Current character set: If the primary language in your forum is English, you can leave this at the default value. However, if your forum is non-English, you should enter the character set of the primary language pack used in the forum. Getting this wrong can corrupt your database so don't just guess! Note: This is required even if the old database is UTF-8." - -msgid "Charset conversion" -msgstr "Charset conversion" - -msgid "Enable conversion label" -msgstr "Enable conversion (perform database charset conversion)." - -msgid "Current character set label" -msgstr "Current character set" - -msgid "Current character set info" -msgstr "Accept default for English forums otherwise the character set of the primary language pack." - -msgid "Start update" -msgstr "Start update" - -msgid "Error converting users" -msgstr "Error converting users" - -msgid "Error info 1" -msgstr "There was an error converting some users. This can occur when converting from FluxBB v1.2 if multiple users have registered with very similar usernames, for example \"bob\" and \"böb\"." - -msgid "Error info 2" -msgstr "Below is a list of users who failed to convert. Please choose a new username for each user. Users who are renamed will automatically be sent an email alerting them of the change." - -msgid "New username" -msgstr "New username" - -msgid "Required" -msgstr "(Required)" - -msgid "Correct errors" -msgstr "The following errors need to be corrected:" - -msgid "Rename users" -msgstr "Rename users" - -msgid "Successfully updated" -msgstr "Your forum database was successfully updated. You may now %s." - -msgid "go to index" -msgstr "go to the forum index" - -msgid "Unable to lock error" -msgstr "Unable to write update lock. Please make sure PHP has write access to the directory '%s' and no-one else is currently running the update script." - -msgid "Converting" -msgstr "Converting %s …" - -msgid "Converting item" -msgstr "Converting %1$s %2$s …" - -msgid "Preparsing item" -msgstr "Preparsing %1$s %2$s …" - -msgid "Rebuilding index item" -msgstr "Rebuilding index for %1$s %2$s" - -msgid "ban" -msgstr "ban" - -msgid "categories" -msgstr "categories" - -msgid "censor words" -msgstr "censor words" - -msgid "configuration" -msgstr "configuration" - -msgid "forums" -msgstr "forums" - -msgid "groups" -msgstr "groups" - -msgid "post" -msgstr "post" - -msgid "report" -msgstr "report" - -msgid "topic" -msgstr "topic" - -msgid "user" -msgstr "user" - -msgid "signature" -msgstr "signature" - -msgid "Username too short error" -msgstr "Usernames must be at least 2 characters long. Please choose another (longer) username." - -msgid "Username too long error" -msgstr "Usernames must not be more than 25 characters long. Please choose another (shorter) username." - -msgid "Username Guest reserved error" -msgstr "The username guest is reserved. Please choose another username." - -msgid "Username IP format error" -msgstr "Usernames may not be in the form of an IP address. Please choose another username." - -msgid "Username bad characters error" -msgstr "Usernames may not contain all the characters ', \" and [ or ] at once. Please choose another username." - -msgid "Username BBCode error" -msgstr "Usernames may not contain any of the text formatting tags (BBCode) that the forum uses. Please choose another username." - -msgid "Username duplicate error" -msgstr "Someone is already registered with the username %s. The username you entered is too similar. The username must differ from that by at least one alphanumerical character (a-z or 0-9). Please choose a different username." diff --git a/lang/English/userlist.mo b/lang/English/userlist.mo deleted file mode 100644 index 74d6b6eaf7013ca1abd4270b4dcbf6b1c58fd784..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 898 zcmY+C!H&}~5QYORAc6!4t{jHjf=EgchbpBAwzO!a-KAo?2qX?T@gy~*c4WK2-Z>(1 zLgG>2%meTSh&!*qf#1z;yIA@(p7D%llHb3sZhVQb&V%b<3NC_AAgpiT0{9L>{0F!K zeu5bM2EqRWE`h&batgWN4EC>1N6}^2*Ra=M8`x0y5%w$WXV{mpn@C1UbQXlQ0m4k@ zf^%YpJ5drvkLsEhj;)LK44IM|TzgCIG;?d(5@EVSS0NTT`fe#$&|(X#Eo=c$hp!F%eFvH?^P`eVUdH;MG-E!MWIn6tXHC@x$wn|T^jAL#zh+nqunM6 kX~}Y>912+y>h%AgyZln6Nw@-!5&yR%`FM+T$u^Dt0lG5+eE\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-SourceCharset: UTF-8\n" - -msgid "User find legend" -msgstr "Find and sort users" - -msgid "User search info" -msgstr "Enter a username to search for and/or a user group to filter by. The username field can be left blank. Use the wildcard character * for partial matches." - -msgid "User sort info" -msgstr "Sort users by name, date registered or number of posts and in ascending/descending order." - -msgid "User group" -msgstr "User group" - -msgid "No of posts" -msgstr "Number of posts" - -msgid "All users" -msgstr "All" diff --git a/vendor/akrabat/rka-slim-controller/LICENSE b/vendor/akrabat/rka-slim-controller/LICENSE new file mode 100644 index 00000000..8ac2d43e --- /dev/null +++ b/vendor/akrabat/rka-slim-controller/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2014, Rob Allen (rob@akrabat.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * The name of Rob Allen may not be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/akrabat/rka-slim-controller/README.md b/vendor/akrabat/rka-slim-controller/README.md new file mode 100644 index 00000000..dfc37eb5 --- /dev/null +++ b/vendor/akrabat/rka-slim-controller/README.md @@ -0,0 +1,96 @@ +# RKA Slim Controller + +An extension to [Slim Framework][1] that allows you use to dynamically +instantiated controllers with action methods wherever you would use a +closure when routing. + +The controller can optionally be loaded from Slim's DI container, +allowing you to inject dependencies as required. + +[1]: http://www.slimframework.com/ + +## Installation + + composer require akrabat/rka-slim-controller + + +## Usage + +Use the string format `{controller class name}:{action method name}` +wherever you would usually use a closure: + +e.g. + + $app = new \RKA\Slim(); + $app->get('/hello:name', 'App\IndexController:home'); + + +You can also register the controller with Slim's DI container: + + $app = new \RKA\Slim(); + + $app->container->singleton('App\IndexController', function ($container) { + // Retrieve any required dependencies from the container and + // inject into the constructor of the controller + + return new \App\IndexController(); + }); + + $app->get('/', 'App\IndexController:index'); + + +## Controller class methods + +*RKA Slim Controller* will call the controller's `setApp()`, `setRequest()` +and `setResponse()` methods if they exist and populate appropriately. It will +then call the controller's `init()`` method. + +Hence, a typical controller may look like: + + app = $app; + } + + public function setRequest($request) + { + $this->request = $request; + } + + public function setResponse($response) + { + $this->response = $response; + } + + // Init + public function init() + { + // do things now that app, request and response are set. + } + } + + +## Example project + +Look at [slim-di](https://github.com/akrabat/slim-di). diff --git a/vendor/akrabat/rka-slim-controller/RKA/Slim.php b/vendor/akrabat/rka-slim-controller/RKA/Slim.php new file mode 100644 index 00000000..100c5e42 --- /dev/null +++ b/vendor/akrabat/rka-slim-controller/RKA/Slim.php @@ -0,0 +1,84 @@ +createControllerClosure($callable); + } + $args[] = $callable; + + return parent::mapRoute($args); + } + + /** + * Create a closure that instantiates (or gets from container) and then calls + * the action method. + * + * Also if the methods exist on the controller class, call setApp(), setRequest() + * and setResponse() passing in the appropriate object. + * + * @param string $name controller class name and action method name separated by a colon + * @return closure + */ + protected function createControllerClosure($name) + { + list($controllerName, $actionName) = explode(':', $name); + + // Create a callable that will find or create the controller instance + // and then execute the action + $app = $this; + $callable = function () use ($app, $controllerName, $actionName) { + + // Try to fetch the controller instance from Slim's container + if ($app->container->has($controllerName)) { + $controller = $app->container->get($controllerName); + } else { + // not in container, assume it can be directly instantiated + $controller = new $controllerName($app); + } + + // Set the app, request and response into the controller if we can + if (method_exists($controller, 'setApp')) { + $controller->setApp($app); + } + if (method_exists($controller, 'setRequest')) { + $controller->setRequest($app->request); + } + if (method_exists($controller, 'setResponse')) { + $controller->setResponse($app->response); + } + + // Call init in case the controller wants to do something now that + // it has an app, request and response. + if (method_exists($controller, 'init')) { + $controller->init(); + } + + return call_user_func_array(array($controller, $actionName), func_get_args()); + }; + + return $callable; + } +} diff --git a/vendor/akrabat/rka-slim-controller/composer.json b/vendor/akrabat/rka-slim-controller/composer.json new file mode 100644 index 00000000..ce454395 --- /dev/null +++ b/vendor/akrabat/rka-slim-controller/composer.json @@ -0,0 +1,26 @@ +{ + "name": "akrabat/rka-slim-controller", + "description": "Dynamically instantiated controller classes for Slim Framework", + "keywords": [ + "slim", "controller" + ], + "homepage": "http://github.com/akrabat/rka-slim-controller", + "type": "library", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + } + ], + "require": { + "php": ">=5.4", + "slim/slim": "~2.4" + }, + "autoload": { + "psr-4": { + "RKA\\": "RKA" + } + } +} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 958ecee3..5c77336e 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -18,6 +18,7 @@ 'FeatherBB\\Email' => $baseDir . '/include/classes/email.class.php', 'FeatherBB\\Error' => $baseDir . '/include/classes/error.class.php', 'FeatherBB\\Hooks' => $baseDir . '/include/classes/hooks.class.php', + 'FeatherBB\\Lister' => $baseDir . '/include/classes/lister.class.php', 'FeatherBB\\Loader' => $baseDir . '/include/classes/autoload.class.php', 'FeatherBB\\Plugin' => $baseDir . '/include/classes/plugin.class.php', 'FeatherBB\\Search' => $baseDir . '/include/classes/search.class.php', diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index b7fc0125..b00084d3 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -6,4 +6,6 @@ $baseDir = dirname($vendorDir); return array( + 'Slim' => array($vendorDir . '/slim/slim'), + '' => array($baseDir . '/'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 4f5d91ac..c5f4765d 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,5 +6,6 @@ $baseDir = dirname($vendorDir); return array( + 'RKA\\' => array($vendorDir . '/akrabat/rka-slim-controller/RKA'), 'Plugins\\' => array('/plugins'), ); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index fe51488c..e09b84fe 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1 +1,95 @@ -[] +[ + { + "name": "slim/slim", + "version": "2.6.2", + "version_normalized": "2.6.2.0", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim.git", + "reference": "20a02782f76830b67ae56a5c08eb1f563c351a37" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/20a02782f76830b67ae56a5c08eb1f563c351a37", + "reference": "20a02782f76830b67ae56a5c08eb1f563c351a37", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "suggest": { + "ext-mcrypt": "Required for HTTP cookie encryption" + }, + "time": "2015-03-08 18:41:17", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Slim": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Josh Lockhart", + "email": "info@joshlockhart.com", + "homepage": "http://www.joshlockhart.com/" + } + ], + "description": "Slim Framework, a PHP micro framework", + "homepage": "http://github.com/codeguy/Slim", + "keywords": [ + "microframework", + "rest", + "router" + ] + }, + { + "name": "akrabat/rka-slim-controller", + "version": "2.0.1", + "version_normalized": "2.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/akrabat/rka-slim-controller.git", + "reference": "7115f082a91af83fd22755e8d2d27e9fcffc636b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/akrabat/rka-slim-controller/zipball/7115f082a91af83fd22755e8d2d27e9fcffc636b", + "reference": "7115f082a91af83fd22755e8d2d27e9fcffc636b", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "slim/slim": "~2.4" + }, + "time": "2015-01-07 09:54:54", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "RKA\\": "RKA" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + } + ], + "description": "Dynamically instantiated controller classes for Slim Framework", + "homepage": "http://github.com/akrabat/rka-slim-controller", + "keywords": [ + "controller", + "slim" + ] + } +] diff --git a/vendor/slim/slim/.gitignore b/vendor/slim/slim/.gitignore new file mode 100644 index 00000000..485dee64 --- /dev/null +++ b/vendor/slim/slim/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/vendor/slim/slim/.travis.yml b/vendor/slim/slim/.travis.yml new file mode 100644 index 00000000..c70c36a9 --- /dev/null +++ b/vendor/slim/slim/.travis.yml @@ -0,0 +1,11 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - hhvm + +script: phpunit --coverage-text diff --git a/vendor/slim/slim/CONTRIBUTING.md b/vendor/slim/slim/CONTRIBUTING.md new file mode 100644 index 00000000..9bbb6b17 --- /dev/null +++ b/vendor/slim/slim/CONTRIBUTING.md @@ -0,0 +1,20 @@ +# How to Contribute + +## Pull Requests + +1. Fork the Slim Framework repository +2. Create a new branch for each feature or improvement +3. Send a pull request from each feature branch to the **develop** branch + +It is very important to separate new features or improvements into separate feature branches, and to send a +pull request for each branch. This allows me to review and pull in new features or improvements individually. + +## Style Guide + +All pull requests must adhere to the [PSR-2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). + +## Unit Testing + +All pull requests must be accompanied by passing unit tests and complete code coverage. The Slim Framework uses phpunit for testing. + +[Learn about PHPUnit](https://github.com/sebastianbergmann/phpunit/) diff --git a/vendor/slim/slim/LICENSE b/vendor/slim/slim/LICENSE new file mode 100644 index 00000000..ec361cbc --- /dev/null +++ b/vendor/slim/slim/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Josh Lockhart + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/slim/slim/README.markdown b/vendor/slim/slim/README.markdown new file mode 100644 index 00000000..2bbe264d --- /dev/null +++ b/vendor/slim/slim/README.markdown @@ -0,0 +1,208 @@ +# Slim Framework + +[![Build Status](https://travis-ci.org/slimphp/Slim.svg?branch=master)](https://travis-ci.org/slimphp/Slim) + +Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. +Slim is easy to use for both beginners and professionals. Slim favors cleanliness over terseness and common cases +over edge cases. Its interface is simple, intuitive, and extensively documented — both online and in the code itself. +Thank you for choosing the Slim Framework for your next project. I think you're going to love it. + +## Features + +* Powerful router + * Standard and custom HTTP methods + * Route parameters with wildcards and conditions + * Route redirect, halt, and pass + * Route middleware +* Resource Locator and DI container +* Template rendering with custom views +* Flash messages +* Encrypt cookie data +* HTTP caching +* Logging with custom log writers +* Error handling and debugging +* Middleware and hook architecture +* Simple configuration + +## Getting Started + +### Install + +You may install the Slim Framework with Composer (recommended) or manually. + +[Read how to install Slim](http://docs.slimframework.com/#Installation) + +### System Requirements + +You need **PHP >= 5.3.0**. If you use encrypted cookies, you'll also need the `mcrypt` extension. + +### Hello World Tutorial + +Instantiate a Slim application: + + $app = new \Slim\Slim(); + +Define a HTTP GET route: + + $app->get('/hello/:name', function ($name) { + echo "Hello, $name"; + }); + +Run the Slim application: + + $app->run(); + +### Setup your web server + +#### Apache + +Ensure the `.htaccess` and `index.php` files are in the same public-accessible directory. The `.htaccess` file +should contain this code: + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [QSA,L] + +Additionally, make sure your virtual host is configured with the AllowOverride option so that the .htaccess rewrite rules can be used: + + AllowOverride All + +#### Nginx + +The nginx configuration file should contain this code (along with other settings you may need) in your `location` block: + + try_files $uri $uri/ /index.php?$args; + +This assumes that Slim's `index.php` is in the root folder of your project (www root). + +#### HipHop Virtual Machine for PHP + +Your HipHop Virtual Machine configuration file should contain this code (along with other settings you may need). +Be sure you change the `ServerRoot` setting to point to your Slim app's document root directory. + + Server { + SourceRoot = /path/to/public/directory + } + + ServerVariables { + SCRIPT_NAME = /index.php + } + + VirtualHost { + * { + Pattern = .* + RewriteRules { + * { + pattern = ^(.*)$ + to = index.php/$1 + qsa = true + } + } + } + } + +#### lighttpd #### + +Your lighttpd configuration file should contain this code (along with other settings you may need). This code requires +lighttpd >= 1.4.24. + + url.rewrite-if-not-file = ("(.*)" => "/index.php/$0") + +This assumes that Slim's `index.php` is in the root folder of your project (www root). + +#### IIS + +Ensure the `Web.config` and `index.php` files are in the same public-accessible directory. The `Web.config` file should contain this code: + + + + + + + + + + + + + + + + + + + +#### Google App Engine + +Two steps are required to successfully run your Slim application on Google App Engine. First, ensure the `app.yaml` file includes a default handler to `index.php`: + + application: your-app-name + version: 1 + runtime: php + api_version: 1 + + handlers: + # ... + - url: /.* + script: public_html/index.php + +Next, edit your `index.php` file so Slim knows about the incoming URI: + + $app = new Slim(); + + // Google App Engine doesn't set $_SERVER['PATH_INFO'] + $app->environment['PATH_INFO'] = $_SERVER['REQUEST_URI']; + + // ... + $app->run(); + + +## Documentation + + + +## How to Contribute + +### Pull Requests + +1. Fork the Slim Framework repository +2. Create a new branch for each feature or improvement +3. Send a pull request from each feature branch to the **develop** branch + +It is very important to separate new features or improvements into separate feature branches, and to send a pull +request for each branch. This allows me to review and pull in new features or improvements individually. + +### Style Guide + +All pull requests must adhere to the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) standard. + +### Unit Testing + +All pull requests must be accompanied by passing unit tests and complete code coverage. The Slim Framework uses +`phpunit` for testing. + +[Learn about PHPUnit](https://github.com/sebastianbergmann/phpunit/) + +## Community + +### Forum and Knowledgebase + +Visit Slim's official forum and knowledge base at where you can find announcements, +chat with fellow Slim users, ask questions, help others, or show off your cool Slim Framework apps. + +### Twitter + +Follow [@slimphp](http://www.twitter.com/slimphp) on Twitter to receive news and updates about the framework. + +## Author + +The Slim Framework is created and maintained by [Josh Lockhart](http://www.joshlockhart.com). Josh is a senior +web developer at [New Media Campaigns](http://www.newmediacampaigns.com/). Josh also created and maintains +[PHP: The Right Way](http://www.phptherightway.com/), a popular movement in the PHP community to introduce new +PHP programmers to best practices and good information. + +## License + +The Slim Framework is released under the MIT public license. + + diff --git a/Slim/Environment.php b/vendor/slim/slim/Slim/Environment.php similarity index 100% rename from Slim/Environment.php rename to vendor/slim/slim/Slim/Environment.php diff --git a/Slim/Exception/Pass.php b/vendor/slim/slim/Slim/Exception/Pass.php similarity index 100% rename from Slim/Exception/Pass.php rename to vendor/slim/slim/Slim/Exception/Pass.php diff --git a/Slim/Exception/Stop.php b/vendor/slim/slim/Slim/Exception/Stop.php similarity index 100% rename from Slim/Exception/Stop.php rename to vendor/slim/slim/Slim/Exception/Stop.php diff --git a/Slim/Helper/Set.php b/vendor/slim/slim/Slim/Helper/Set.php similarity index 100% rename from Slim/Helper/Set.php rename to vendor/slim/slim/Slim/Helper/Set.php diff --git a/Slim/Http/Cookies.php b/vendor/slim/slim/Slim/Http/Cookies.php similarity index 100% rename from Slim/Http/Cookies.php rename to vendor/slim/slim/Slim/Http/Cookies.php diff --git a/Slim/Http/Headers.php b/vendor/slim/slim/Slim/Http/Headers.php similarity index 99% rename from Slim/Http/Headers.php rename to vendor/slim/slim/Slim/Http/Headers.php index 06fd71d9..c5e08f23 100644 --- a/Slim/Http/Headers.php +++ b/vendor/slim/slim/Slim/Http/Headers.php @@ -32,7 +32,7 @@ */ namespace Slim\Http; -/** + /** * HTTP Headers * * @package Slim diff --git a/Slim/Http/Request.php b/vendor/slim/slim/Slim/Http/Request.php similarity index 100% rename from Slim/Http/Request.php rename to vendor/slim/slim/Slim/Http/Request.php diff --git a/Slim/Http/Response.php b/vendor/slim/slim/Slim/Http/Response.php similarity index 99% rename from Slim/Http/Response.php rename to vendor/slim/slim/Slim/Http/Response.php index 245305be..48c76d8c 100644 --- a/Slim/Http/Response.php +++ b/vendor/slim/slim/Slim/Http/Response.php @@ -344,7 +344,7 @@ public function deleteCookie($name, $settings = array()) * @param string $url The redirect destination * @param int $status The redirect HTTP status code */ - public function redirect($url, $status = 302) + public function redirect ($url, $status = 302) { $this->setStatus($status); $this->headers->set('Location', $url); diff --git a/Slim/Http/Util.php b/vendor/slim/slim/Slim/Http/Util.php similarity index 100% rename from Slim/Http/Util.php rename to vendor/slim/slim/Slim/Http/Util.php diff --git a/Slim/Log.php b/vendor/slim/slim/Slim/Log.php similarity index 99% rename from Slim/Log.php rename to vendor/slim/slim/Slim/Log.php index 51a92178..13cb8259 100644 --- a/Slim/Log.php +++ b/vendor/slim/slim/Slim/Log.php @@ -305,7 +305,7 @@ public function log($level, $object, $context = array()) { if (!isset(self::$levels[$level])) { throw new \InvalidArgumentException('Invalid log level supplied to function'); - } elseif ($this->enabled && $this->writer && $level <= $this->level) { + } else if ($this->enabled && $this->writer && $level <= $this->level) { if (is_array($object) || (is_object($object) && !method_exists($object, "__toString"))) { $message = print_r($object, true); } else { diff --git a/Slim/LogWriter.php b/vendor/slim/slim/Slim/LogWriter.php similarity index 100% rename from Slim/LogWriter.php rename to vendor/slim/slim/Slim/LogWriter.php diff --git a/Slim/Middleware.php b/vendor/slim/slim/Slim/Middleware.php similarity index 100% rename from Slim/Middleware.php rename to vendor/slim/slim/Slim/Middleware.php diff --git a/Slim/Middleware/ContentTypes.php b/vendor/slim/slim/Slim/Middleware/ContentTypes.php similarity index 97% rename from Slim/Middleware/ContentTypes.php rename to vendor/slim/slim/Slim/Middleware/ContentTypes.php index 02d9c5c6..fcc22421 100644 --- a/Slim/Middleware/ContentTypes.php +++ b/vendor/slim/slim/Slim/Middleware/ContentTypes.php @@ -32,7 +32,7 @@ */ namespace Slim\Middleware; -/** + /** * Content Types * * This is middleware for a Slim application that intercepts @@ -91,7 +91,7 @@ public function call() * @param string $contentType * @return mixed */ - protected function parse($input, $contentType) + protected function parse ($input, $contentType) { if (isset($this->contentTypes[$contentType]) && is_callable($this->contentTypes[$contentType])) { $result = call_user_func($this->contentTypes[$contentType], $input); @@ -116,7 +116,7 @@ protected function parseJson($input) { if (function_exists('json_decode')) { $result = json_decode($input, true); - if (json_last_error() === JSON_ERROR_NONE) { + if(json_last_error() === JSON_ERROR_NONE) { return $result; } } diff --git a/Slim/Middleware/Flash.php b/vendor/slim/slim/Slim/Middleware/Flash.php similarity index 99% rename from Slim/Middleware/Flash.php rename to vendor/slim/slim/Slim/Middleware/Flash.php index 62176cf3..593082f8 100644 --- a/Slim/Middleware/Flash.php +++ b/vendor/slim/slim/Slim/Middleware/Flash.php @@ -32,7 +32,7 @@ */ namespace Slim\Middleware; -/** + /** * Flash * * This is middleware for a Slim application that enables @@ -206,4 +206,7 @@ public function count() { return count($this->getMessages()); } + + + } diff --git a/Slim/Middleware/MethodOverride.php b/vendor/slim/slim/Slim/Middleware/MethodOverride.php similarity index 99% rename from Slim/Middleware/MethodOverride.php rename to vendor/slim/slim/Slim/Middleware/MethodOverride.php index 788e09a5..1298767c 100644 --- a/Slim/Middleware/MethodOverride.php +++ b/vendor/slim/slim/Slim/Middleware/MethodOverride.php @@ -32,7 +32,7 @@ */ namespace Slim\Middleware; -/** + /** * HTTP Method Override * * This is middleware for a Slim application that allows traditional diff --git a/Slim/Middleware/PrettyExceptions.php b/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php similarity index 96% rename from Slim/Middleware/PrettyExceptions.php rename to vendor/slim/slim/Slim/Middleware/PrettyExceptions.php index 8bed30d7..aafda0f9 100644 --- a/Slim/Middleware/PrettyExceptions.php +++ b/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php @@ -6,7 +6,7 @@ * @copyright 2011 Josh Lockhart * @link http://www.slimframework.com * @license http://www.slimframework.com/license - * @version 2.6.3 + * @version 2.6.1 * @package Slim * * MIT LICENSE @@ -86,10 +86,10 @@ protected function renderBody(&$env, $exception) { $title = 'Slim Application Error'; $code = $exception->getCode(); - $message = htmlspecialchars($exception->getMessage()); + $message = $exception->getMessage(); $file = $exception->getFile(); $line = $exception->getLine(); - $trace = str_replace(array('#', "\n"), array('
    #', '
    '), htmlspecialchars($exception->getTraceAsString())); + $trace = str_replace(array('#', "\n"), array('
    #', '
    '), $exception->getTraceAsString()); $html = sprintf('

    %s

    ', $title); $html .= '

    The application could not run because of the following error:

    '; $html .= '

    Details

    '; diff --git a/Slim/Middleware/SessionCookie.php b/vendor/slim/slim/Slim/Middleware/SessionCookie.php similarity index 100% rename from Slim/Middleware/SessionCookie.php rename to vendor/slim/slim/Slim/Middleware/SessionCookie.php diff --git a/Slim/Route.php b/vendor/slim/slim/Slim/Route.php similarity index 98% rename from Slim/Route.php rename to vendor/slim/slim/Slim/Route.php index 6c6fa778..2127e626 100644 --- a/Slim/Route.php +++ b/vendor/slim/slim/Slim/Route.php @@ -165,7 +165,7 @@ public function setCallable($callable) if (is_string($callable) && preg_match('!^([^\:]+)\:([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)$!', $callable, $matches)) { $class = $matches[1]; $method = $matches[2]; - $callable = function () use ($class, $method) { + $callable = function() use ($class, $method) { static $obj = null; if ($obj === null) { $obj = new $class; @@ -288,7 +288,7 @@ public function getHttpMethods() public function appendHttpMethods() { $args = func_get_args(); - if (count($args) && is_array($args[0])) { + if(count($args) && is_array($args[0])){ $args = $args[0]; } $this->methods = array_merge($this->methods, $args); @@ -301,7 +301,7 @@ public function appendHttpMethods() public function via() { $args = func_get_args(); - if (count($args) && is_array($args[0])) { + if(count($args) && is_array($args[0])){ $args = $args[0]; } $this->methods = array_merge($this->methods, $args); diff --git a/Slim/Router.php b/vendor/slim/slim/Slim/Router.php similarity index 100% rename from Slim/Router.php rename to vendor/slim/slim/Slim/Router.php diff --git a/Slim/Slim.php b/vendor/slim/slim/Slim/Slim.php similarity index 96% rename from Slim/Slim.php rename to vendor/slim/slim/Slim/Slim.php index d0918792..4a835956 100644 --- a/Slim/Slim.php +++ b/vendor/slim/slim/Slim/Slim.php @@ -6,7 +6,7 @@ * @copyright 2011 Josh Lockhart * @link http://www.slimframework.com * @license http://www.slimframework.com/license - * @version 2.6.3 + * @version 2.6.1 * @package Slim * * MIT LICENSE @@ -54,7 +54,7 @@ class Slim /** * @const string */ - const VERSION = '2.6.3'; + const VERSION = '2.6.1'; /** * @var \Slim\Helper\Set @@ -99,10 +99,10 @@ class Slim ); /******************************************************************************** - * PSR-0 Autoloader - * - * Do not use if you are using Composer to autoload dependencies. - *******************************************************************************/ + * PSR-0 Autoloader + * + * Do not use if you are using Composer to autoload dependencies. + *******************************************************************************/ /** * Slim PSR-0 autoloader @@ -141,8 +141,8 @@ public static function registerAutoloader() } /******************************************************************************** - * Instantiation and Configuration - *******************************************************************************/ + * Instantiation and Configuration + *******************************************************************************/ /** * Constructor @@ -353,8 +353,8 @@ public function config($name, $value = null) } /******************************************************************************** - * Application Modes - *******************************************************************************/ + * Application Modes + *******************************************************************************/ /** * Get application mode @@ -390,8 +390,8 @@ public function configureMode($mode, $callable) } /******************************************************************************** - * Logging - *******************************************************************************/ + * Logging + *******************************************************************************/ /** * Get application log @@ -403,8 +403,8 @@ public function getLog() } /******************************************************************************** - * Routing - *******************************************************************************/ + * Routing + *******************************************************************************/ /** * Add GET|POST|PUT|PATCH|DELETE route @@ -662,8 +662,8 @@ protected function callErrorHandler($argument = null) } /******************************************************************************** - * Application Accessors - *******************************************************************************/ + * Application Accessors + *******************************************************************************/ /** * Get a reference to the Environment object @@ -733,8 +733,8 @@ public function view($viewClass = null) } /******************************************************************************** - * Rendering - *******************************************************************************/ + * Rendering + *******************************************************************************/ /** * Render a template @@ -758,8 +758,8 @@ public function render($template, $data = array(), $status = null) } /******************************************************************************** - * HTTP Caching - *******************************************************************************/ + * HTTP Caching + *******************************************************************************/ /** * Set Last-Modified HTTP Response Header @@ -847,8 +847,8 @@ public function expires($time) } /******************************************************************************** - * HTTP Cookies - *******************************************************************************/ + * HTTP Cookies + *******************************************************************************/ /** * Set HTTP cookie to be sent with the HTTP response @@ -981,8 +981,8 @@ public function deleteCookie($name, $path = null, $domain = null, $secure = null } /******************************************************************************** - * Helper Methods - *******************************************************************************/ + * Helper Methods + *******************************************************************************/ /** * Get the absolute path to this Slim application's root directory @@ -1118,8 +1118,8 @@ public function redirectTo($route, $params = array(), $status = 302){ } /******************************************************************************** - * Flash Messages - *******************************************************************************/ + * Flash Messages + *******************************************************************************/ /** * Set flash message for subsequent request @@ -1166,8 +1166,8 @@ public function flashData() } /******************************************************************************** - * Hooks - *******************************************************************************/ + * Hooks + *******************************************************************************/ /** * Assign hook @@ -1255,8 +1255,8 @@ public function clearHooks($name = null) } /******************************************************************************** - * Middleware - *******************************************************************************/ + * Middleware + *******************************************************************************/ /** * Add middleware @@ -1278,8 +1278,8 @@ public function add(\Slim\Middleware $newMiddleware) } /******************************************************************************** - * Runner - *******************************************************************************/ + * Runner + *******************************************************************************/ /** * Run @@ -1372,7 +1372,6 @@ public function call() $this->response()->write(ob_get_clean()); } catch (\Exception $e) { if ($this->config('debug')) { - ob_end_clean(); throw $e; } else { try { @@ -1386,8 +1385,8 @@ public function call() } /******************************************************************************** - * Error Handling and Debugging - *******************************************************************************/ + * Error Handling and Debugging + *******************************************************************************/ /** * Convert errors into ErrorException objects diff --git a/Slim/View.php b/vendor/slim/slim/Slim/View.php similarity index 100% rename from Slim/View.php rename to vendor/slim/slim/Slim/View.php diff --git a/vendor/slim/slim/composer.json b/vendor/slim/slim/composer.json new file mode 100644 index 00000000..0becfe68 --- /dev/null +++ b/vendor/slim/slim/composer.json @@ -0,0 +1,24 @@ +{ + "name": "slim/slim", + "type": "library", + "description": "Slim Framework, a PHP micro framework", + "keywords": ["microframework","rest","router"], + "homepage": "http://github.com/codeguy/Slim", + "license": "MIT", + "authors": [ + { + "name": "Josh Lockhart", + "email": "info@joshlockhart.com", + "homepage": "http://www.joshlockhart.com/" + } + ], + "require": { + "php": ">=5.3.0" + }, + "suggest": { + "ext-mcrypt": "Required for HTTP cookie encryption" + }, + "autoload": { + "psr-0": { "Slim": "." } + } +} diff --git a/vendor/slim/slim/index.php b/vendor/slim/slim/index.php new file mode 100644 index 00000000..355a8f57 --- /dev/null +++ b/vendor/slim/slim/index.php @@ -0,0 +1,169 @@ +get( + '/', + function () { + $template = << + + + + Slim Framework for PHP 5 + + + +
    + Slim +
    +

    Welcome to Slim!

    +

    + Congratulations! Your Slim application is running. If this is + your first time using Slim, start with this "Hello World" Tutorial. +

    +
    +

    Get Started

    +
      +
    1. The application code is in index.php
    2. +
    3. Read the online documentation
    4. +
    5. Follow @slimphp on Twitter
    6. +
    +
    +
    +

    Slim Framework Community

    + +

    Support Forum and Knowledge Base

    +

    + Visit the Slim support forum and knowledge base + to read announcements, chat with fellow Slim users, ask questions, help others, or show off your cool + Slim Framework apps. +

    + +

    Twitter

    +

    + Follow @slimphp on Twitter to receive the very latest news + and updates about the framework. +

    +
    +
    +

    Slim Framework Extras

    +

    + Custom View classes for Smarty, Twig, Mustache, and other template + frameworks are available online in a separate repository. +

    +

    Browse the Extras Repository

    +
    + + +EOT; + echo $template; + } +); + +// POST route +$app->post( + '/post', + function () { + echo 'This is a POST route'; + } +); + +// PUT route +$app->put( + '/put', + function () { + echo 'This is a PUT route'; + } +); + +// PATCH route +$app->patch('/patch', function () { + echo 'This is a PATCH route'; +}); + +// DELETE route +$app->delete( + '/delete', + function () { + echo 'This is a DELETE route'; + } +); + +/** + * Step 4: Run the Slim application + * + * This method should be called last. This executes the Slim application + * and returns the HTTP response to the HTTP client. + */ +$app->run(); diff --git a/vendor/slim/slim/phpunit.xml.dist b/vendor/slim/slim/phpunit.xml.dist new file mode 100644 index 00000000..c4da1720 --- /dev/null +++ b/vendor/slim/slim/phpunit.xml.dist @@ -0,0 +1,25 @@ + + + + + + ./tests/ + + + + + + ./Slim/ + + + diff --git a/vendor/slim/slim/tests/EnvironmentTest.php b/vendor/slim/slim/tests/EnvironmentTest.php new file mode 100644 index 00000000..db54a51e --- /dev/null +++ b/vendor/slim/slim/tests/EnvironmentTest.php @@ -0,0 +1,376 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class EnvironmentTest extends PHPUnit_Framework_TestCase +{ + /** + * Default server settings assume the Slim app is installed + * in a subdirectory `foo/` directly beneath the public document + * root directory; URL rewrite is disabled; requested app + * resource is GET `/bar/xyz` with three query params. + * + * These only provide a common baseline for the following + * tests; tests are free to override these values. + */ + public function setUp() + { + $_SERVER['DOCUMENT_ROOT'] = '/var/www'; + $_SERVER['SCRIPT_FILENAME'] = '/var/www/foo/index.php'; + $_SERVER['SERVER_NAME'] = 'slim'; + $_SERVER['SERVER_PORT'] = '80'; + $_SERVER['SCRIPT_NAME'] = '/foo/index.php'; + $_SERVER['REQUEST_URI'] = '/foo/index.php/bar/xyz'; + $_SERVER['PATH_INFO'] = '/bar/xyz'; + $_SERVER['REQUEST_METHOD'] = 'GET'; + $_SERVER['QUERY_STRING'] = 'one=1&two=2&three=3'; + $_SERVER['HTTPS'] = ''; + $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + unset($_SERVER['CONTENT_TYPE'], $_SERVER['CONTENT_LENGTH']); + } + + /** + * Test mock environment + * + * This should return the custom values where specified + * and the default values otherwise. + */ + public function testMockEnvironment() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'PUT' + )); + $env2 = \Slim\Environment::getInstance(); + $this->assertSame($env, $env2); + $this->assertInstanceOf('\Slim\Environment', $env); + $this->assertEquals('PUT', $env['REQUEST_METHOD']); + $this->assertEquals(80, $env['SERVER_PORT']); + $this->assertNull($env['foo']); + } + + /** + * Test sets HTTP method + */ + public function testSetsHttpMethod() + { + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('GET', $env['REQUEST_METHOD']); + } + + /** + * Test parses script name and path info + * + * Pre-conditions: + * URL Rewrite is disabled; + * App installed in subdirectory; + */ + public function testParsesPathsWithoutUrlRewriteInSubdirectory() + { + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('/bar/xyz', $env['PATH_INFO']); + $this->assertEquals('/foo/index.php', $env['SCRIPT_NAME']); + } + + /** + * Test parses script name and path info + * + * Pre-conditions: + * URL Rewrite is disabled; + * App installed in root directory; + */ + public function testParsesPathsWithoutUrlRewriteInRootDirectory() + { + $_SERVER['SCRIPT_FILENAME'] = '/var/www/index.php'; + $_SERVER['REQUEST_URI'] = '/index.php/bar/xyz'; + $_SERVER['SCRIPT_NAME'] = '/index.php'; + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('/bar/xyz', $env['PATH_INFO']); + $this->assertEquals('/index.php', $env['SCRIPT_NAME']); + } + + /** + * Test parses script name and path info + * + * Pre-conditions: + * URL Rewrite disabled; + * App installed in root directory; + * Requested resource is "/"; + */ + public function testParsesPathsWithoutUrlRewriteInRootDirectoryForAppRootUri() + { + $_SERVER['SCRIPT_FILENAME'] = '/var/www/index.php'; + $_SERVER['REQUEST_URI'] = '/index.php'; + $_SERVER['SCRIPT_NAME'] = '/index.php'; + unset($_SERVER['PATH_INFO']); + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('/', $env['PATH_INFO']); + $this->assertEquals('/index.php', $env['SCRIPT_NAME']); + } + + /** + * Test parses script name and path info + * + * Pre-conditions: + * URL Rewrite enabled; + * App installed in subdirectory; + */ + public function testParsesPathsWithUrlRewriteInSubdirectory() + { + $_SERVER['SCRIPT_NAME'] = '/foo/index.php'; + $_SERVER['REQUEST_URI'] = '/foo/bar/xyz'; + unset($_SERVER['PATH_INFO']); + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('/bar/xyz', $env['PATH_INFO']); + $this->assertEquals('/foo', $env['SCRIPT_NAME']); + } + + /** + * Test parses script name and path info + * + * Pre-conditions: + * URL Rewrite enabled; + * App installed in root directory; + */ + public function testParsesPathsWithUrlRewriteInRootDirectory() + { + $_SERVER['SCRIPT_FILENAME'] = '/var/www/index.php'; + $_SERVER['SCRIPT_NAME'] = '/index.php'; + $_SERVER['REQUEST_URI'] = '/bar/xyz'; + unset($_SERVER['PATH_INFO']); + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('/bar/xyz', $env['PATH_INFO']); + $this->assertEquals('', $env['SCRIPT_NAME']); + } + + /** + * Test parses script name and path info + * + * Pre-conditions: + * URL Rewrite enabled; + * App installed in root directory; + * Requested resource is "/" + */ + public function testParsesPathsWithUrlRewriteInRootDirectoryForAppRootUri() + { + $_SERVER['SCRIPT_FILENAME'] = '/var/www/index.php'; + $_SERVER['REQUEST_URI'] = '/'; + $_SERVER['SCRIPT_NAME'] = '/index.php'; + unset($_SERVER['PATH_INFO']); + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('/', $env['PATH_INFO']); + $this->assertEquals('', $env['SCRIPT_NAME']); + } + + /** + * Test parses query string + * + * Pre-conditions: + * $_SERVER['QUERY_STRING'] exists and is not empty; + */ + public function testParsesQueryString() + { + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('one=1&two=2&three=3', $env['QUERY_STRING']); + } + + /** + * Test removes query string from PATH_INFO when using URL Rewrite + * + * Pre-conditions: + * $_SERVER['QUERY_STRING'] exists and is not empty; + * URL Rewrite enabled; + */ + public function testRemovesQueryStringFromPathInfo() + { + $_SERVER['SCRIPT_NAME'] = '/foo/index.php'; + $_SERVER['REQUEST_URI'] = '/foo/bar/xyz?one=1&two=2&three=3'; + unset($_SERVER['PATH_INFO']); + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('/bar/xyz', $env['PATH_INFO']); + } + + /** + * Test environment's PATH_INFO retains URL encoded characters (e.g. #) + * + * In earlier version, \Slim\Environment would use PATH_INFO instead + * of REQUEST_URI to determine the root URI and resource URI. + * Unfortunately, the server would URL decode the PATH_INFO string + * before it was handed to PHP. This prevented certain URL-encoded + * characters like the octothorpe from being delivered correctly to + * the Slim application environment. This test ensures the + * REQUEST_URI is used instead and parsed as expected. + */ + public function testPathInfoRetainsUrlEncodedCharacters() + { + $_SERVER['SCRIPT_FILENAME'] = '/var/www/index.php'; + $_SERVER['SCRIPT_NAME'] = '/index.php'; + $_SERVER['REQUEST_URI'] = '/foo/%23bar'; //<-- URL-encoded "#bar" + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('/foo/%23bar', $env['PATH_INFO']); + } + + /** + * Test parses query string + * + * Pre-conditions: + * $_SERVER['QUERY_STRING'] does not exist; + */ + public function testParsesQueryStringThatDoesNotExist() + { + unset($_SERVER['QUERY_STRING']); + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('', $env['QUERY_STRING']); + } + + /** + * Test SERVER_NAME is not empty + */ + public function testServerNameIsNotEmpty() + { + $env = \Slim\Environment::getInstance(true); + $this->assertFalse(empty($env['SERVER_NAME'])); + } + + /** + * Test SERVER_PORT is not empty + */ + public function testServerPortIsNotEmpty() + { + $env = \Slim\Environment::getInstance(true); + $this->assertFalse(empty($env['SERVER_PORT'])); + } + + /** + * Test unsets HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH + * + * Pre-conditions: + * HTTP_CONTENT_TYPE is sent with HTTP request; + * HTTP_CONTENT_LENGTH is sent with HTTP request; + */ + public function testUnsetsContentTypeAndContentLength() + { + $_SERVER['HTTP_CONTENT_LENGTH'] = 150; + $env = \Slim\Environment::getInstance(true); + $this->assertFalse(isset($env['HTTP_CONTENT_LENGTH'])); + } + + /** + * Test sets special request headers if not empty + * + * Pre-conditions: + * CONTENT_TYPE, CONTENT_LENGTH, X_REQUESTED_WITH are sent in client HTTP request; + * CONTENT_TYPE, CONTENT_LENGTH, X_REQUESTED_WITH are not empty; + */ + public function testSetsSpecialHeaders() + { + $_SERVER['CONTENT_TYPE'] = 'text/csv'; + $_SERVER['CONTENT_LENGTH'] = '100'; + $_SERVER['HTTP_X_REQUESTED_WITH'] = 'XmlHttpRequest'; + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('text/csv', $env['CONTENT_TYPE']); + $this->assertEquals('100', $env['CONTENT_LENGTH']); + $this->assertEquals('XmlHttpRequest', $env['HTTP_X_REQUESTED_WITH']); + } + + /** + * Tests X-HTTP-Method-Override is allowed through unmolested. + * + * Pre-conditions: + * X_HTTP_METHOD_OVERRIDE is sent in client HTTP request; + * X_HTTP_METHOD_OVERRIDE is not empty; + */ + public function testSetsHttpMethodOverrideHeader() { + $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] = 'DELETE'; + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('DELETE', $env['HTTP_X_HTTP_METHOD_OVERRIDE']); + } + + /** + * Test detects HTTPS + * + * Pre-conditions: + * $_SERVER['HTTPS'] is set to a non-empty value; + */ + public function testHttps() + { + $_SERVER['HTTPS'] = 1; + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('https', $env['slim.url_scheme']); + } + + /** + * Test detects not HTTPS + * + * Pre-conditions: + * $_SERVER['HTTPS'] is set to an empty value; + */ + public function testNotHttps() + { + $_SERVER['HTTPS'] = ''; + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('http', $env['slim.url_scheme']); + } + + /** + * Test detects not HTTPS on IIS + * + * Pre-conditions: + * $_SERVER['HTTPS'] is set to "off"; + */ + public function testNotHttpsIIS() + { + $_SERVER['HTTPS'] = 'off'; + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('http', $env['slim.url_scheme']); + } + + /** + * Test input is an empty string (and not false) + * + * Pre-conditions: + * Input at php://input may only be read once; subsequent attempts + * will return `false`; in which case, use an empty string. + */ + public function testInputIsEmptyString() + { + $env = \Slim\Environment::getInstance(true); + $this->assertEquals('', $env['slim.input']); + } + + /** + * Test valid resource handle to php://stdErr + */ + public function testErrorResource() + { + $env = \Slim\Environment::getInstance(true); + $this->assertTrue(is_resource($env['slim.errors'])); + } +} diff --git a/vendor/slim/slim/tests/Foo.php b/vendor/slim/slim/tests/Foo.php new file mode 100644 index 00000000..d772d02e --- /dev/null +++ b/vendor/slim/slim/tests/Foo.php @@ -0,0 +1,7 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class SetTest extends PHPUnit_Framework_TestCase +{ + protected $bag; + protected $property; + + public function setUp() + { + $this->bag = new \Slim\Helper\Set(); + $this->property = new \ReflectionProperty($this->bag, 'data'); + $this->property->setAccessible(true); + } + + public function testSet() + { + $this->bag->set('foo', 'bar'); + $this->assertArrayHasKey('foo', $this->property->getValue($this->bag)); + $bag = $this->property->getValue($this->bag); + $this->assertEquals('bar', $bag['foo']); + } + + public function testGet() + { + $this->property->setValue($this->bag, array('foo' => 'bar')); + $this->assertEquals('bar', $this->bag->get('foo')); + } + + public function testGetNotExists() + { + $this->property->setValue($this->bag, array('foo' => 'bar')); + $this->assertEquals('default', $this->bag->get('abc', 'default')); + } + + public function testAdd() + { + $this->bag->replace(array( + 'abc' => '123', + 'foo' => 'bar' + )); + $this->assertArrayHasKey('abc', $this->property->getValue($this->bag)); + $this->assertArrayHasKey('foo', $this->property->getValue($this->bag)); + $bag = $this->property->getValue($this->bag); + $this->assertEquals('123', $bag['abc']); + $this->assertEquals('bar', $bag['foo']); + } + + public function testAll() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + $this->assertEquals($data, $this->bag->all()); + } + + public function testKeys() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + $this->assertEquals(array('abc', 'foo'), $this->bag->keys()); + } + + public function testRemove() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + $this->bag->remove('foo'); + $this->assertEquals(array('abc' => '123'), $this->property->getValue($this->bag)); + } + + public function testClear() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + $this->bag->clear(); + $this->assertEquals(array(), $this->property->getValue($this->bag)); + } + + public function testArrayAccessGet() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + $this->assertEquals('bar', $this->bag['foo']); + } + + public function testArrayAccessSet() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + $this->bag['foo'] = 'changed'; + $bag = $this->property->getValue($this->bag); + $this->assertEquals('changed', $bag['foo']); + } + + public function testArrayAccessExists() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + $this->assertTrue(isset($this->bag['foo'])); + $this->assertFalse(isset($this->bag['bar'])); + } + + public function testArrayAccessUnset() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + unset($this->bag['foo']); + $this->assertEquals(array('abc' => '123'), $this->property->getValue($this->bag)); + } + + public function testCount() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + $this->assertEquals(2, count($this->bag)); + } + + public function testGetIterator() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + $this->assertInstanceOf('\ArrayIterator', $this->bag->getIterator()); + } + + public function testPropertyOverloadGet() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + + $this->assertEquals('123', $this->bag->abc); + $this->assertEquals('bar', $this->bag->foo); + } + + public function testPropertyOverloadSet() + { + $this->bag->foo = 'bar'; + $this->assertArrayHasKey('foo', $this->property->getValue($this->bag)); + $this->assertEquals('bar', $this->bag->foo); + } + + public function testPropertyOverloadingIsset() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + + $this->assertTrue(isset($this->bag->abc)); + $this->assertTrue(isset($this->bag->foo)); + $this->assertFalse(isset($this->bag->foobar)); + } + + public function testPropertyOverloadingUnset() + { + $data = array( + 'abc' => '123', + 'foo' => 'bar' + ); + $this->property->setValue($this->bag, $data); + + $this->assertTrue(isset($this->bag->abc)); + unset($this->bag->abc); + $this->assertFalse(isset($this->bag->abc)); + $this->assertArrayNotHasKey('abc', $this->property->getValue($this->bag)); + $this->assertArrayHasKey('foo', $this->property->getValue($this->bag)); + } + + public function testProtect() + { + $callable = function () { + return 'foo'; + }; + $result = $this->bag->protect($callable); + + $this->assertInstanceOf('\Closure', $result); + $this->assertSame($callable, $result()); + } +} diff --git a/vendor/slim/slim/tests/Http/CookiesTest.php b/vendor/slim/slim/tests/Http/CookiesTest.php new file mode 100644 index 00000000..5ad18548 --- /dev/null +++ b/vendor/slim/slim/tests/Http/CookiesTest.php @@ -0,0 +1,92 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +class CookiesTest extends PHPUnit_Framework_TestCase +{ + public function testSetWithStringValue() + { + $c = new \Slim\Http\Cookies(); + $c->set('foo', 'bar'); + $this->assertAttributeEquals( + array( + 'foo' => array( + 'value' => 'bar', + 'expires' => null, + 'domain' => null, + 'path' => null, + 'secure' => false, + 'httponly' => false + ) + ), + 'data', + $c + ); + } + + public function testSetWithArrayValue() + { + $now = time(); + $c = new \Slim\Http\Cookies(); + $c->set('foo', array( + 'value' => 'bar', + 'expires' => $now + 86400, + 'domain' => '.example.com', + 'path' => '/', + 'secure' => true, + 'httponly' => true + )); + $this->assertAttributeEquals( + array( + 'foo' => array( + 'value' => 'bar', + 'expires' => $now + 86400, + 'domain' => '.example.com', + 'path' => '/', + 'secure' => true, + 'httponly' => true + ) + ), + 'data', + $c + ); + } + + public function testRemove() + { + $c = new \Slim\Http\Cookies(); + $c->remove('foo'); + $prop = new \ReflectionProperty($c, 'data'); + $prop->setAccessible(true); + $cValue = $prop->getValue($c); + $this->assertEquals('', $cValue['foo']['value']); + $this->assertLessThan(time(), $cValue['foo']['expires']); + } +} diff --git a/vendor/slim/slim/tests/Http/HeadersTest.php b/vendor/slim/slim/tests/Http/HeadersTest.php new file mode 100644 index 00000000..c0466eff --- /dev/null +++ b/vendor/slim/slim/tests/Http/HeadersTest.php @@ -0,0 +1,59 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class HeadersTest extends PHPUnit_Framework_TestCase +{ + public function testNormalizesKey() + { + $h = new \Slim\Http\Headers(); + $h->set('Http_Content_Type', 'text/html'); + $prop = new \ReflectionProperty($h, 'data'); + $prop->setAccessible(true); + $this->assertArrayHasKey('Content-Type', $prop->getValue($h)); + } + + public function testExtractHeaders() + { + $test = array( + 'HTTP_HOST' => 'foo.com', + 'SERVER_NAME' => 'foo', + 'CONTENT_TYPE' => 'text/html', + 'X_FORWARDED_FOR' => '127.0.0.1' + ); + $results = \Slim\Http\Headers::extract($test); + $this->assertEquals(array( + 'HTTP_HOST' => 'foo.com', + 'CONTENT_TYPE' => 'text/html', + 'X_FORWARDED_FOR' => '127.0.0.1' + ), $results); + } +} diff --git a/vendor/slim/slim/tests/Http/RequestTest.php b/vendor/slim/slim/tests/Http/RequestTest.php new file mode 100644 index 00000000..117b72c9 --- /dev/null +++ b/vendor/slim/slim/tests/Http/RequestTest.php @@ -0,0 +1,949 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class RequestTest extends PHPUnit_Framework_TestCase +{ + /** + * Test sets HTTP method + */ + public function testGetMethod() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'GET' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('GET', $req->getMethod()); + } + + /** + * Test HTTP GET method detection + */ + public function testIsGet() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'GET' + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isGet()); + } + + /** + * Test HTTP POST method detection + */ + public function testIsPost() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isPost()); + } + + /** + * Test HTTP PUT method detection + */ + public function testIsPut() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'PUT', + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isPut()); + } + + /** + * Test HTTP DELETE method detection + */ + public function testIsDelete() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'DELETE', + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isDelete()); + } + + /** + * Test HTTP OPTIONS method detection + */ + public function testIsOptions() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'OPTIONS', + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isOptions()); + } + + /** + * Test HTTP HEAD method detection + */ + public function testIsHead() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'HEAD', + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isHead()); + } + + /** + * Test HTTP PATCH method detection + */ + public function testIsPatch() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'PATCH', + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isPatch()); + } + + /** + * Test AJAX method detection w/ header + */ + public function testIsAjaxWithHeader() + { + $env = \Slim\Environment::mock(array( + 'X_REQUESTED_WITH' => 'XMLHttpRequest' + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isAjax()); + $this->assertTrue($req->isXhr()); + } + + /** + * Test AJAX method detection w/ query parameter + */ + public function testIsAjaxWithQueryParameter() + { + $env = \Slim\Environment::mock(array( + 'QUERY_STRING' => 'isajax=1', + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isAjax()); + $this->assertTrue($req->isXhr()); + } + + /** + * Test AJAX method detection without header or query parameter + */ + public function testIsAjaxWithoutHeaderOrQueryParameter() + { + $env = \Slim\Environment::mock(); + $req = new \Slim\Http\Request($env); + $this->assertFalse($req->isAjax()); + $this->assertFalse($req->isXhr()); + } + + /** + * Test AJAX method detection with misspelled header + */ + public function testIsAjaxWithMisspelledHeader() + { + $env = \Slim\Environment::mock(array( + 'X_REQUESTED_WITH' => 'foo' + )); + $req = new \Slim\Http\Request($env); + $this->assertFalse($req->isAjax()); + $this->assertFalse($req->isXhr()); + } + + /** + * Test params from query string + */ + public function testParamsFromQueryString() + { + $env = \Slim\Environment::mock(array( + 'QUERY_STRING' => 'one=1&two=2&three=3' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(3, count($req->params())); + $this->assertEquals('1', $req->params('one')); + $this->assertNull($req->params('foo')); + $this->assertEquals(1, $req->params('foo', 1)); + } + + /** + * Test params from request body + */ + public function testParamsFromRequestBody() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'QUERY_STRING' => 'one=1&two=2&three=3', + 'slim.input' => 'foo=bar&abc=123', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + 'CONTENT_LENGTH' => 15 + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(5, count($req->params())); //Union of GET and POST + $this->assertEquals('bar', $req->params('foo')); + } + + /** + * Test fetch GET params + */ + public function testGet() + { + $env = \Slim\Environment::mock(array( + 'QUERY_STRING' => 'one=1&two=2&three=3' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(3, count($req->get())); + $this->assertEquals('1', $req->get('one')); + $this->assertNull($req->get('foo')); + $this->assertFalse($req->get('foo', false)); + } + + /** + * Test fetch GET params without multibyte + */ + public function testGetWithoutMultibyte() + { + $env = \Slim\Environment::mock(array( + 'QUERY_STRING' => 'one=1&two=2&three=3', + 'slim.tests.ignore_multibyte' => true + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(3, count($req->get())); + $this->assertEquals('1', $req->get('one')); + $this->assertNull($req->get('foo')); + $this->assertFalse($req->get('foo', false)); + } + + /** + * Test fetch POST params + */ + public function testPost() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'slim.input' => 'foo=bar&abc=123', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + 'CONTENT_LENGTH' => 15 + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(2, count($req->post())); + $this->assertEquals('bar', $req->post('foo')); + $this->assertNull($req->post('xyz')); + $this->assertFalse($req->post('xyz', false)); + } + + /** + * Test fetch POST params without multibyte + */ + public function testPostWithoutMultibyte() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'slim.input' => 'foo=bar&abc=123', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + 'CONTENT_LENGTH' => 15, + 'slim.tests.ignore_multibyte' => true + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(2, count($req->post())); + $this->assertEquals('bar', $req->post('foo')); + $this->assertNull($req->post('xyz')); + $this->assertFalse($req->post('xyz', false)); + } + + /** + * Test fetch POST without slim.input + */ + public function testPostWithoutInput() + { + $this->setExpectedException('RuntimeException'); + $env = \Slim\Environment::mock(); + unset($env['slim.input']); + $req = new \Slim\Http\Request($env); + $req->post('foo'); + } + + /** + * Test fetch POST params even if multipart/form-data request + */ + public function testPostWithMultipartRequest() + { + $_POST = array('foo' => 'bar'); //<-- Set by PHP + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'slim.input' => '', //<-- "php://input" is empty for multipart/form-data requests + 'CONTENT_TYPE' => 'multipart/form-data', + 'CONTENT_LENGTH' => 0 + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(1, count($req->post())); + $this->assertEquals('bar', $req->post('foo')); + $this->assertNull($req->post('xyz')); + } + + /** + * Test fetch PUT params + */ + public function testPut() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'PUT', + 'slim.input' => 'foo=bar&abc=123', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + 'CONTENT_LENGTH' => 15 + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(2, count($req->put())); + $this->assertEquals('bar', $req->put('foo')); + $this->assertEquals('bar', $req->params('foo')); + $this->assertNull($req->put('xyz')); + $this->assertFalse($req->put('xyz', false)); + } + + /** + * Test fetch PATCH params + */ + public function testPatch() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'PATCH', + 'slim.input' => 'foo=bar&abc=123', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + 'CONTENT_LENGTH' => 15 + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(2, count($req->patch())); + $this->assertEquals('bar', $req->patch('foo')); + $this->assertEquals('bar', $req->params('foo')); + $this->assertNull($req->patch('xyz')); + $this->assertFalse($req->patch('xyz', false)); + } + + /** + * Test fetch DELETE params + */ + public function testDelete() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'DELETE', + 'slim.input' => 'foo=bar&abc=123', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + 'CONTENT_LENGTH' => 15 + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(2, count($req->delete())); + $this->assertEquals('bar', $req->delete('foo')); + $this->assertEquals('bar', $req->params('foo')); + $this->assertNull($req->delete('xyz')); + $this->assertFalse($req->delete('xyz', false)); + } + + /** + * Test fetch COOKIE params + */ + public function testCookies() + { + $env = \Slim\Environment::mock(array( + 'HTTP_COOKIE' => 'foo=bar; abc=123' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(2, count($req->cookies())); + $this->assertEquals('bar', $req->cookies('foo')); + $this->assertNull($req->cookies('xyz')); + } + + /** + * Test is form data + */ + public function testIsFormDataContentFormUrlencoded() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'PUT', + 'slim.input' => '', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded' + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isFormData()); + } + + /** + * Test is form data + */ + public function testIsFormDataPostContentUnknown() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'slim.input' => '', + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isFormData()); + } + + /** + * Test is form data + */ + public function testIsFormDataPostContentUnknownWithMethodOverride() + { + $env = \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'PUT', + )); + $env['slim.method_override.original_method'] = 'POST'; + $req = new \Slim\Http\Request($env); + $this->assertTrue($req->isPut()); + $this->assertTrue($req->isFormData()); + } + + /** + * Test is not form data + */ + public function testIsNotFormData() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => '', + 'CONTENT_TYPE' => 'application/json' + )); + $req = new \Slim\Http\Request($env); + $this->assertFalse($req->isFormData()); + } + + /** + * Test headers + */ + public function testHeaders() + { + $env = \Slim\Environment::mock(array( + 'HTTP_ACCEPT_ENCODING' => 'gzip' + )); + $req = new \Slim\Http\Request($env); + $headers = $req->headers(); + $this->assertInstanceOf('\Slim\Http\Headers', $headers); + $this->assertEquals('gzip', $req->headers('HTTP_ACCEPT_ENCODING')); + $this->assertEquals('gzip', $req->headers('HTTP-ACCEPT-ENCODING')); + $this->assertEquals('gzip', $req->headers('http_accept_encoding')); + $this->assertEquals('gzip', $req->headers('http-accept-encoding')); + $this->assertEquals('gzip', $req->headers('ACCEPT_ENCODING')); + $this->assertEquals('gzip', $req->headers('ACCEPT-ENCODING')); + $this->assertEquals('gzip', $req->headers('accept_encoding')); + $this->assertEquals('gzip', $req->headers('accept-encoding')); + $this->assertNull($req->headers('foo')); + } + + /** + * Test accurately removes HTTP_ prefix from input header name + */ + public function testHeaderRemovesHttpPrefix() + { + $env = \Slim\Environment::mock(array( + 'X_HTTP_METHOD_OVERRIDE' => 'PUT', + 'CONTENT_TYPE' => 'application/json' + )); + //fwrite(fopen('php://stdout', 'w'), print_r($env, true)); + $req = new \Slim\Http\Request($env); + $this->assertEquals('PUT', $req->headers('X_HTTP_METHOD_OVERRIDE')); + $this->assertNull($req->headers('X_METHOD_OVERRIDE')); //<-- Ensures `HTTP_` is not removed if not prefix + $this->assertEquals('application/json', $req->headers('HTTP_CONTENT_TYPE')); //<-- Ensures `HTTP_` is removed if prefix + } + + /** + * Test get body + */ + public function testGetBodyWhenExists() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => 'foo=bar&abc=123', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + 'CONTENT_LENGTH' => 15 + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('foo=bar&abc=123', $req->getBody()); + } + + /** + * Test get body + */ + public function testGetBodyWhenNotExists() + { + $env = \Slim\Environment::mock(); + $req = new \Slim\Http\Request($env); + $this->assertEquals('', $req->getBody()); + } + + /** + * Test get content type + */ + public function testGetContentTypeWhenExists() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => '', + 'CONTENT_TYPE' => 'application/json; charset=ISO-8859-4' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('application/json; charset=ISO-8859-4', $req->getContentType()); + } + + /** + * Test get content type for built-in PHP server + */ + public function testGetContentTypeForBuiltInServer() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => '', + 'HTTP_CONTENT_TYPE' => 'application/json; charset=ISO-8859-4' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('application/json; charset=ISO-8859-4', $req->getContentType()); + } + + /** + * Test get content type + */ + public function testGetContentTypeWhenNotExists() + { + $env = \Slim\Environment::mock(); + $req = new \Slim\Http\Request($env); + $this->assertNull($req->getContentType()); + } + + /** + * Test get content type with built-in server + */ + public function testGetContentTypeWithBuiltInServer() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => '', + 'HTTP_CONTENT_TYPE' => 'application/json; charset=ISO-8859-4' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('application/json; charset=ISO-8859-4', $req->getContentType()); + } + + /** + * Test get media type + */ + public function testGetMediaTypeWhenExists() + { + $env = \Slim\Environment::mock(array( + 'CONTENT_TYPE' => 'application/json;charset=utf-8' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('application/json', $req->getMediaType()); + } + + /** + * Test get media type + */ + public function testGetMediaTypeWhenNotExists() + { + $env = \Slim\Environment::mock(); + $req = new \Slim\Http\Request($env); + $this->assertNull($req->getMediaType()); + } + + /** + * Test get media type + */ + public function testGetMediaTypeWhenNoParamsExist() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => '', + 'CONTENT_TYPE' => 'application/json' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('application/json', $req->getMediaType()); + } + + /** + * Test get media type params + */ + public function testGetMediaTypeParams() + { + $env = \Slim\Environment::mock(array( + 'CONTENT_TYPE' => 'application/json; charset=ISO-8859-4' + )); + $req = new \Slim\Http\Request($env); + $params = $req->getMediaTypeParams(); + $this->assertEquals(1, count($params)); + $this->assertArrayHasKey('charset', $params); + $this->assertEquals('ISO-8859-4', $params['charset']); + } + + /** + * Test get media type params + */ + public function testGetMediaTypeParamsWhenNotExists() + { + $env = \Slim\Environment::mock(); + $req = new \Slim\Http\Request($env); + $params = $req->getMediaTypeParams(); + $this->assertTrue(is_array($params)); + $this->assertEquals(0, count($params)); + } + + /** + * Test get content charset + */ + public function testGetContentCharset() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => '', + 'CONTENT_TYPE' => 'application/json; charset=ISO-8859-4' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('ISO-8859-4', $req->getContentCharset()); + } + + /** + * Test get content charset + */ + public function testGetContentCharsetWhenNotExists() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => '', + 'CONTENT_TYPE' => 'application/json' + )); + $req = new \Slim\Http\Request($env); + $this->assertNull($req->getContentCharset()); + } + + /** + * Test get content length + */ + public function testGetContentLength() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => 'foo=bar&abc=123', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + 'CONTENT_LENGTH' => 15 + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(15, $req->getContentLength()); + } + + /** + * Test get content length + */ + public function testGetContentLengthWhenNotExists() + { + $env = \Slim\Environment::mock(array( + 'slim.input' => '', + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals(0, $req->getContentLength()); + } + + /** + * Test get host + */ + public function testGetHost() + { + $env = \Slim\Environment::mock(array( + 'SERVER_NAME' => 'slim', + 'HTTP_HOST' => 'slimframework.com' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('slimframework.com', $req->getHost()); //Uses HTTP_HOST if available + } + + /** + * Test get host when it has a port number + */ + public function testGetHostAndStripPort() + { + $env = \Slim\Environment::mock(array( + 'SERVER_NAME' => 'slim', + 'HTTP_HOST' => 'slimframework.com:80' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('slimframework.com', $req->getHost()); //Uses HTTP_HOST if available + } + + /** + * Test get host + */ + public function testGetHostWhenNotExists() + { + $env = \Slim\Environment::mock(array( + 'SERVER_NAME' => 'slim', + 'HTTP_HOST' => 'slimframework.com' + )); + unset($env['HTTP_HOST']); + $req = new \Slim\Http\Request($env); + $this->assertEquals('slim', $req->getHost()); //Uses SERVER_NAME as backup + } + + /** + * Test get host with port + */ + public function testGetHostWithPort() + { + $env = \Slim\Environment::mock(array( + 'HTTP_HOST' => 'slimframework.com', + 'SERVER_NAME' => 'slim', + 'SERVER_PORT' => 80, + 'slim.url_scheme' => 'http' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('slimframework.com:80', $req->getHostWithPort()); + } + + /** + * Test get host with port doesn't duplicate port numbers + */ + public function testGetHostDoesntDuplicatePort() + { + $env = \Slim\Environment::mock(array( + 'HTTP_HOST' => 'slimframework.com:80', + 'SERVER_NAME' => 'slim', + 'SERVER_PORT' => 80, + 'slim.url_scheme' => 'http' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('slimframework.com:80', $req->getHostWithPort()); + } + + /** + * Test get port + */ + public function testGetPort() + { + $env = \Slim\Environment::mock(array( + 'SERVER_PORT' => 80 + )); + $req = new \Slim\Http\Request($env); + $this->assertTrue(is_integer($req->getPort())); + $this->assertEquals(80, $req->getPort()); + } + + /** + * Test get scheme + */ + public function testGetSchemeIfHttp() + { + $env = \Slim\Environment::mock(array( + 'slim.url_scheme' => 'http' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('http', $req->getScheme()); + } + + /** + * Test get scheme + */ + public function testGetSchemeIfHttps() + { + $env = \Slim\Environment::mock(array( + 'slim.url_scheme' => 'https', + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('https', $req->getScheme()); + } + + /** + * Test get [script name, root uri, path, path info, resource uri] in subdirectory without htaccess + */ + public function testAppPathsInSubdirectoryWithoutHtaccess() + { + $env = \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo/index.php', //<-- Physical + 'PATH_INFO' => '/bar/xyz', //<-- Virtual + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('/foo/index.php', $req->getScriptName()); + $this->assertEquals('/foo/index.php', $req->getRootUri()); + $this->assertEquals('/foo/index.php/bar/xyz', $req->getPath()); + $this->assertEquals('/bar/xyz', $req->getPathInfo()); + $this->assertEquals('/bar/xyz', $req->getResourceUri()); + } + + /** + * Test get [script name, root uri, path, path info, resource uri] in subdirectory with htaccess + */ + public function testAppPathsInSubdirectoryWithHtaccess() + { + $env = \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar/xyz', //<-- Virtual + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('/foo', $req->getScriptName()); + $this->assertEquals('/foo', $req->getRootUri()); + $this->assertEquals('/foo/bar/xyz', $req->getPath()); + $this->assertEquals('/bar/xyz', $req->getPathInfo()); + $this->assertEquals('/bar/xyz', $req->getResourceUri()); + } + + /** + * Test get [script name, root uri, path, path info, resource uri] in root directory without htaccess + */ + public function testAppPathsInRootDirectoryWithoutHtaccess() + { + $env = \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', //<-- Physical + 'PATH_INFO' => '/bar/xyz', //<-- Virtual + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('/index.php', $req->getScriptName()); + $this->assertEquals('/index.php', $req->getRootUri()); + $this->assertEquals('/index.php/bar/xyz', $req->getPath()); + $this->assertEquals('/bar/xyz', $req->getPathInfo()); + $this->assertEquals('/bar/xyz', $req->getResourceUri()); + } + + /** + * Test get [script name, root uri, path, path info, resource uri] in root directory with htaccess + */ + public function testAppPathsInRootDirectoryWithHtaccess() + { + $env = \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '', //<-- Physical + 'PATH_INFO' => '/bar/xyz', //<-- Virtual + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('', $req->getScriptName()); + $this->assertEquals('', $req->getRootUri()); + $this->assertEquals('/bar/xyz', $req->getPath()); + $this->assertEquals('/bar/xyz', $req->getPathInfo()); + $this->assertEquals('/bar/xyz', $req->getResourceUri()); + } + + /** + * Test get URL + */ + public function testGetUrl() + { + $env = \Slim\Environment::mock(array( + 'HTTP_HOST' => 'slimframework.com', + 'SERVER_NAME' => 'slim', + 'SERVER_PORT' => 80, + 'slim.url_scheme' => 'http' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('http://slimframework.com', $req->getUrl()); + } + + /** + * Test get URL + */ + public function testGetUrlWithCustomPort() + { + $env = \Slim\Environment::mock(array( + 'HTTP_HOST' => 'slimframework.com', + 'SERVER_NAME' => 'slim', + 'SERVER_PORT' => 8080, + 'slim.url_scheme' => 'http' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('http://slimframework.com:8080', $req->getUrl()); + } + + /** + * Test get URL + */ + public function testGetUrlWithHttps() + { + $env = \Slim\Environment::mock(array( + 'HTTP_HOST' => 'slimframework.com', + 'SERVER_NAME' => 'slim', + 'SERVER_PORT' => 443, + 'slim.url_scheme' => 'https' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('https://slimframework.com', $req->getUrl()); + } + + /** + * Test get IP + * @dataProvider dataTestIp + */ + public function testGetIp(array $server, $expected) + { + $env = \Slim\Environment::mock($server); + $req = new \Slim\Http\Request($env); + $this->assertEquals($expected, $req->getIp()); + } + + public function dataTestIp() + { + return array( + array(array('REMOTE_ADDR' => '127.0.0.1'), '127.0.0.1'), + array(array('REMOTE_ADDR' => '127.0.0.1', 'CLIENT_IP' => '127.0.0.2'), '127.0.0.2'), + array(array('REMOTE_ADDR' => '127.0.0.1', 'CLIENT_IP' => '127.0.0.2', 'X_FORWARDED_FOR' => '127.0.0.3'), '127.0.0.3'), + array(array('REMOTE_ADDR' => '127.0.0.1', 'CLIENT_IP' => '127.0.0.2', 'HTTP_X_FORWARDED_FOR' => '127.0.0.4'), '127.0.0.4'), + array(array('REMOTE_ADDR' => '127.0.0.1', 'CLIENT_IP' => '127.0.0.2', 'X_FORWARDED_FOR' => '127.0.0.3', 'HTTP_X_FORWARDED_FOR' => '127.0.0.4'), '127.0.0.3'), + ); + } + + /** + * Test get referer + */ + public function testGetReferrer() + { + $env = \Slim\Environment::mock(array( + 'HTTP_REFERER' => 'http://foo.com' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('http://foo.com', $req->getReferrer()); + $this->assertEquals('http://foo.com', $req->getReferer()); + } + + /** + * Test get referer + */ + public function testGetReferrerWhenNotExists() + { + $env = \Slim\Environment::mock(); + $req = new \Slim\Http\Request($env); + $this->assertNull($req->getReferrer()); + $this->assertNull($req->getReferer()); + } + + /** + * Test get user agent string + */ + public function testGetUserAgent() + { + $env = \Slim\Environment::mock(array( + 'HTTP_USER_AGENT' => 'user-agent-string' + )); + $req = new \Slim\Http\Request($env); + $this->assertEquals('user-agent-string', $req->getUserAgent()); + } + + /** + * Test get user agent string when not set + */ + public function testGetUserAgentWhenNotExists() + { + $env = \Slim\Environment::mock(); + unset($env['HTTP_USER_AGENT']); + $req = new \Slim\Http\Request($env); + $this->assertNull($req->getUserAgent()); + } +} diff --git a/vendor/slim/slim/tests/Http/ResponseTest.php b/vendor/slim/slim/tests/Http/ResponseTest.php new file mode 100644 index 00000000..c251fa10 --- /dev/null +++ b/vendor/slim/slim/tests/Http/ResponseTest.php @@ -0,0 +1,271 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class ResponseTest extends PHPUnit_Framework_TestCase +{ + public function testConstructWithoutArgs() + { + $res = new \Slim\Http\Response(); + + $this->assertAttributeEquals(200, 'status', $res); + $this->assertAttributeEquals('', 'body', $res); + } + + public function testConstructWithArgs() + { + $res = new \Slim\Http\Response('Foo', 201); + + $this->assertAttributeEquals(201, 'status', $res); + $this->assertAttributeEquals('Foo', 'body', $res); + } + + public function testGetStatus() + { + $res = new \Slim\Http\Response(); + + $this->assertEquals(200, $res->getStatus()); + } + + public function testSetStatus() + { + $res = new \Slim\Http\Response(); + $res->setStatus(301); + + $this->assertAttributeEquals(301, 'status', $res); + } + + /** + * DEPRECATION WARNING! + */ + public function testStatusGetOld() + { + $res = new \Slim\Http\Response('', 201); + $this->assertEquals(201, $res->status()); + } + + /** + * DEPRECATION WARNING! + */ + public function testStatusSetOld() + { + $res = new \Slim\Http\Response(); + $prop = new \ReflectionProperty($res, 'status'); + $prop->setAccessible(true); + $res->status(301); + + $this->assertEquals(301, $prop->getValue($res)); + } + + public function testGetBody() + { + $res = new \Slim\Http\Response(); + $property = new \ReflectionProperty($res, 'body'); + $property->setAccessible(true); + $property->setValue($res, 'foo'); + + $this->assertEquals('foo', $res->getBody()); + } + + public function testSetBody() + { + $res = new \Slim\Http\Response('bar'); + $res->setBody('foo'); // <-- Should replace body + + $this->assertAttributeEquals('foo', 'body', $res); + } + + public function testWrite() + { + $res = new \Slim\Http\Response(); + $property = new \ReflectionProperty($res, 'body'); + $property->setAccessible(true); + $property->setValue($res, 'foo'); + $res->write('bar'); // <-- Should append to body + + $this->assertAttributeEquals('foobar', 'body', $res); + } + + public function testLength() + { + $res = new \Slim\Http\Response('foo'); // <-- Sets body and length + + $this->assertEquals(3, $res->getLength()); + } + + public function testFinalize() + { + $res = new \Slim\Http\Response(); + $resFinal = $res->finalize(); + + $this->assertTrue(is_array($resFinal)); + $this->assertEquals(3, count($resFinal)); + $this->assertEquals(200, $resFinal[0]); + $this->assertInstanceOf('\Slim\Http\Headers', $resFinal[1]); + $this->assertEquals('', $resFinal[2]); + } + + public function testFinalizeWithEmptyBody() + { + $res = new \Slim\Http\Response('Foo', 304); + $resFinal = $res->finalize(); + + $this->assertEquals('', $resFinal[2]); + } + + public function testRedirect() + { + $res = new \Slim\Http\Response(); + $res->redirect('/foo'); + + $pStatus = new \ReflectionProperty($res, 'status'); + $pStatus->setAccessible(true); + + $this->assertEquals(302, $pStatus->getValue($res)); + $this->assertEquals('/foo', $res->headers['Location']); + } + + public function testIsEmpty() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r1->setStatus(404); + $r2->setStatus(201); + $this->assertFalse($r1->isEmpty()); + $this->assertTrue($r2->isEmpty()); + } + + public function testIsClientError() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r1->setStatus(404); + $r2->setStatus(500); + $this->assertTrue($r1->isClientError()); + $this->assertFalse($r2->isClientError()); + } + + public function testIsForbidden() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r1->setStatus(403); + $r2->setStatus(500); + $this->assertTrue($r1->isForbidden()); + $this->assertFalse($r2->isForbidden()); + } + + public function testIsInformational() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r1->setStatus(100); + $r2->setStatus(200); + $this->assertTrue($r1->isInformational()); + $this->assertFalse($r2->isInformational()); + } + + public function testIsNotFound() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r1->setStatus(404); + $r2->setStatus(200); + $this->assertTrue($r1->isNotFound()); + $this->assertFalse($r2->isNotFound()); + } + + public function testIsOk() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r1->setStatus(200); + $r2->setStatus(201); + $this->assertTrue($r1->isOk()); + $this->assertFalse($r2->isOk()); + } + + public function testIsSuccessful() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r3 = new \Slim\Http\Response(); + $r1->setStatus(200); + $r2->setStatus(201); + $r3->setStatus(302); + $this->assertTrue($r1->isSuccessful()); + $this->assertTrue($r2->isSuccessful()); + $this->assertFalse($r3->isSuccessful()); + } + + public function testIsRedirect() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r1->setStatus(307); + $r2->setStatus(304); + $this->assertTrue($r1->isRedirect()); + $this->assertFalse($r2->isRedirect()); + } + + public function testIsRedirection() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r3 = new \Slim\Http\Response(); + $r1->setStatus(307); + $r2->setStatus(304); + $r3->setStatus(200); + $this->assertTrue($r1->isRedirection()); + $this->assertTrue($r2->isRedirection()); + $this->assertFalse($r3->isRedirection()); + } + + public function testIsServerError() + { + $r1 = new \Slim\Http\Response(); + $r2 = new \Slim\Http\Response(); + $r1->setStatus(500); + $r2->setStatus(400); + $this->assertTrue($r1->isServerError()); + $this->assertFalse($r2->isServerError()); + } + + public function testMessageForCode() + { + $this->assertEquals('200 OK', \Slim\Http\Response::getMessageForCode(200)); + } + + public function testMessageForCodeWithInvalidCode() + { + $this->assertNull(\Slim\Http\Response::getMessageForCode(600)); + } +} diff --git a/vendor/slim/slim/tests/Http/UtilTest.php b/vendor/slim/slim/tests/Http/UtilTest.php new file mode 100644 index 00000000..9abcfaba --- /dev/null +++ b/vendor/slim/slim/tests/Http/UtilTest.php @@ -0,0 +1,445 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class SlimHttpUtilTest extends PHPUnit_Framework_TestCase +{ + /** + * Test strip slashes when magic quotes disabled + */ + public function testStripSlashesWithoutMagicQuotes() + { + $data = "This should have \"quotes\" in it"; + $stripped = \Slim\Http\Util::stripSlashesIfMagicQuotes($data, false); + $this->assertEquals($data, $stripped); + } + + /** + * Test strip slashes from array when magic quotes disabled + */ + public function testStripSlashesFromArrayWithoutMagicQuotes() + { + $data = array("This should have \"quotes\" in it", "And this \"too\" has quotes"); + $stripped = \Slim\Http\Util::stripSlashesIfMagicQuotes($data, false); + $this->assertEquals($data, $stripped); + } + + /** + * Test strip slashes when magic quotes enabled + */ + public function testStripSlashesWithMagicQuotes() + { + $data = "This should have \"quotes\" in it"; + $stripped = \Slim\Http\Util::stripSlashesIfMagicQuotes($data, true); + $this->assertEquals('This should have "quotes" in it', $stripped); + } + + /** + * Test strip slashes from array when magic quotes enabled + */ + public function testStripSlashesFromArrayWithMagicQuotes() + { + $data = array("This should have \"quotes\" in it", "And this \"too\" has quotes"); + $stripped = \Slim\Http\Util::stripSlashesIfMagicQuotes($data, true); + $this->assertEquals($data = array('This should have "quotes" in it', 'And this "too" has quotes'), $stripped); + } + + /** + * Test encrypt and decrypt with valid data + */ + public function testEncryptAndDecryptWithValidData() + { + $data = 'foo'; + $key = 'secret'; + $iv = md5('initializationVector'); + $encrypted = \Slim\Http\Util::encrypt($data, $key, $iv); + $decrypted = \Slim\Http\Util::decrypt($encrypted, $key, $iv); + $this->assertEquals($data, $decrypted); + $this->assertTrue($data !== $encrypted); + } + + /** + * Test encrypt when data is empty string + */ + public function testEncryptWhenDataIsEmptyString() + { + $data = ''; + $key = 'secret'; + $iv = md5('initializationVector'); + $encrypted = \Slim\Http\Util::encrypt($data, $key, $iv); + $this->assertEquals('', $encrypted); + } + + /** + * Test decrypt when data is empty string + */ + public function testDecryptWhenDataIsEmptyString() + { + $data = ''; + $key = 'secret'; + $iv = md5('initializationVector'); + $decrypted = \Slim\Http\Util::decrypt($data, $key, $iv); + $this->assertEquals('', $decrypted); + } + + /** + * Test encrypt when IV and key sizes are too long + */ + public function testEncryptAndDecryptWhenKeyAndIvAreTooLong() + { + $data = 'foo'; + $key = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'; + $iv = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'; + $encrypted = \Slim\Http\Util::encrypt($data, $key, $iv); + $decrypted = \Slim\Http\Util::decrypt($encrypted, $key, $iv); + $this->assertEquals($data, $decrypted); + $this->assertTrue($data !== $encrypted); + } + + public function testEncodeAndDecodeSecureCookieWithValidData() + { + //Prepare cookie value + $value = 'foo'; + $expires = time() + 86400; + $secret = 'password'; + $algorithm = MCRYPT_RIJNDAEL_256; + $mode = MCRYPT_MODE_CBC; + $encodedValue = \Slim\Http\Util::encodeSecureCookie($value, $expires, $secret, $algorithm, $mode); + $decodedValue = \Slim\Http\Util::decodeSecureCookie($encodedValue, $secret, $algorithm, $mode); + + //Test secure cookie value + $parts = explode('|', $encodedValue); + $this->assertEquals(3, count($parts)); + $this->assertEquals($expires, $parts[0]); + $this->assertEquals($value, $decodedValue); + } + + /** + * Test encode/decode secure cookie with old expiration + * + * In this test, the expiration date is purposefully set to a time before now. + * When decoding the encoded cookie value, FALSE is returned since the cookie + * will have expired before it is decoded. + */ + public function testEncodeAndDecodeSecureCookieWithOldExpiration() + { + $value = 'foo'; + $expires = time() - 100; + $secret = 'password'; + $algorithm = MCRYPT_RIJNDAEL_256; + $mode = MCRYPT_MODE_CBC; + $encodedValue = \Slim\Http\Util::encodeSecureCookie($value, $expires, $secret, $algorithm, $mode); + $decodedValue = \Slim\Http\Util::decodeSecureCookie($encodedValue, $secret, $algorithm, $mode); + $this->assertFalse($decodedValue); + } + + /** + * Test encode/decode secure cookie with tampered data + * + * In this test, the encoded data is purposefully changed to simulate someone + * tampering with the client-side cookie data. When decoding the encoded cookie value, + * FALSE is returned since the verification key will not match. + */ + public function testEncodeAndDecodeSecureCookieWithTamperedData() + { + $value = 'foo'; + $expires = time() + 86400; + $secret = 'password'; + $algorithm = MCRYPT_RIJNDAEL_256; + $mode = MCRYPT_MODE_CBC; + $encodedValue = \Slim\Http\Util::encodeSecureCookie($value, $expires, $secret, $algorithm, $mode); + $encodedValueParts = explode('|', $encodedValue); + $encodedValueParts[1] = $encodedValueParts[1] . 'changed'; + $encodedValue = implode('|', $encodedValueParts); + $decodedValue = \Slim\Http\Util::decodeSecureCookie($encodedValue, $secret, $algorithm, $mode); + $this->assertFalse($decodedValue); + } + + public function testSetCookieHeaderWithNameAndValue() + { + $name = 'foo'; + $value = 'bar'; + $header = array(); + \Slim\Http\Util::setCookieHeader($header, $name, $value); + $this->assertEquals('foo=bar', $header['Set-Cookie']); + } + + public function testSetCookieHeaderWithNameAndValueWhenCookieAlreadySet() + { + $name = 'foo'; + $value = 'bar'; + $header = array('Set-Cookie' => 'one=two'); + \Slim\Http\Util::setCookieHeader($header, $name, $value); + $this->assertEquals("one=two\nfoo=bar", $header['Set-Cookie']); + } + + public function testSetCookieHeaderWithNameAndValueAndDomain() + { + $name = 'foo'; + $value = 'bar'; + $domain = 'foo.com'; + $header = array(); + \Slim\Http\Util::setCookieHeader($header, $name, array( + 'value' => $value, + 'domain' => $domain + )); + $this->assertEquals('foo=bar; domain=foo.com', $header['Set-Cookie']); + } + + public function testSetCookieHeaderWithNameAndValueAndDomainAndPath() + { + $name = 'foo'; + $value = 'bar'; + $domain = 'foo.com'; + $path = '/foo'; + $header = array(); + \Slim\Http\Util::setCookieHeader($header, $name, array( + 'value' => $value, + 'domain' => $domain, + 'path' => $path + )); + $this->assertEquals('foo=bar; domain=foo.com; path=/foo', $header['Set-Cookie']); + } + + public function testSetCookieHeaderWithNameAndValueAndDomainAndPathAndExpiresAsString() + { + $name = 'foo'; + $value = 'bar'; + $domain = 'foo.com'; + $path = '/foo'; + $expires = '2 days'; + $expiresFormat = gmdate('D, d-M-Y H:i:s e', strtotime($expires)); + $header = array(); + \Slim\Http\Util::setCookieHeader($header, $name, array( + 'value' => $value, + 'domain' => $domain, + 'path' => '/foo', + 'expires' => $expires + )); + $this->assertEquals('foo=bar; domain=foo.com; path=/foo; expires=' . $expiresFormat, $header['Set-Cookie']); + } + + public function testSetCookieHeaderWithNameAndValueAndDomainAndPathAndExpiresAsInteger() + { + $name = 'foo'; + $value = 'bar'; + $domain = 'foo.com'; + $path = '/foo'; + $expires = strtotime('2 days'); + $expiresFormat = gmdate('D, d-M-Y H:i:s e', $expires); + $header = array(); + \Slim\Http\Util::setCookieHeader($header, $name, array( + 'value' => $value, + 'domain' => $domain, + 'path' => '/foo', + 'expires' => $expires + )); + $this->assertEquals('foo=bar; domain=foo.com; path=/foo; expires=' . $expiresFormat, $header['Set-Cookie']); + } + + public function testSetCookieHeaderWithNameAndValueAndDomainAndPathAndExpiresAsZero() + { + $name = 'foo'; + $value = 'bar'; + $domain = 'foo.com'; + $path = '/foo'; + $expires = 0; + $header = array(); + \Slim\Http\Util::setCookieHeader($header, $name, array( + 'value' => $value, + 'domain' => $domain, + 'path' => '/foo', + 'expires' => $expires + )); + $this->assertEquals('foo=bar; domain=foo.com; path=/foo', $header['Set-Cookie']); + } + + public function testSetCookieHeaderWithNameAndValueAndDomainAndPathAndExpiresAndSecure() + { + $name = 'foo'; + $value = 'bar'; + $domain = 'foo.com'; + $path = '/foo'; + $expires = strtotime('2 days'); + $expiresFormat = gmdate('D, d-M-Y H:i:s e', $expires); + $secure = true; + $header = array(); + \Slim\Http\Util::setCookieHeader($header, $name, array( + 'value' => $value, + 'domain' => $domain, + 'path' => '/foo', + 'expires' => $expires, + 'secure' => $secure + )); + $this->assertEquals('foo=bar; domain=foo.com; path=/foo; expires=' . $expiresFormat . '; secure', $header['Set-Cookie']); + } + + public function testSetCookieHeaderWithNameAndValueAndDomainAndPathAndExpiresAndSecureAndHttpOnly() + { + $name = 'foo'; + $value = 'bar'; + $domain = 'foo.com'; + $path = '/foo'; + $expires = strtotime('2 days'); + $expiresFormat = gmdate('D, d-M-Y H:i:s e', $expires); + $secure = true; + $httpOnly = true; + $header = array(); + \Slim\Http\Util::setCookieHeader($header, $name, array( + 'value' => $value, + 'domain' => $domain, + 'path' => '/foo', + 'expires' => $expires, + 'secure' => $secure, + 'httponly' => $httpOnly + )); + $this->assertEquals('foo=bar; domain=foo.com; path=/foo; expires=' . $expiresFormat . '; secure; HttpOnly', $header['Set-Cookie']); + } + + /** + * Test serializeCookies and decrypt with string expires + * + * In this test a cookie with a string typed value for 'expires' is set, + * which should be parsed by `strtotime` to a timestamp when it's added to + * the headers; this timestamp should then be correctly parsed, and the + * value correctly decrypted, by `decodeSecureCookie`. + */ + public function testSerializeCookiesAndDecryptWithStringExpires() + { + $value = 'bar'; + + $headers = new \Slim\Http\Headers(); + + $settings = array( + 'cookies.encrypt' => true, + 'cookies.secret_key' => 'secret', + 'cookies.cipher' => MCRYPT_RIJNDAEL_256, + 'cookies.cipher_mode' => MCRYPT_MODE_CBC + ); + + $cookies = new \Slim\Http\Cookies(); + $cookies->set('foo', array( + 'value' => $value, + 'expires' => '1 hour' + )); + + \Slim\Http\Util::serializeCookies($headers, $cookies, $settings); + + $encrypted = $headers->get('Set-Cookie'); + $encrypted = strstr($encrypted, ';', true); + $encrypted = urldecode(substr(strstr($encrypted, '='), 1)); + + $decrypted = \Slim\Http\Util::decodeSecureCookie( + $encrypted, + $settings['cookies.secret_key'], + $settings['cookies.cipher'], + $settings['cookies.cipher_mode'] + ); + + $this->assertEquals($value, $decrypted); + $this->assertTrue($value !== $encrypted); + } + + public function testDeleteCookieHeaderWithSurvivingCookie() + { + $header = array('Set-Cookie' => "foo=bar\none=two"); + \Slim\Http\Util::deleteCookieHeader($header, 'foo'); + $this->assertEquals(1, preg_match("@^one=two\nfoo=; expires=@", $header['Set-Cookie'])); + } + + public function testDeleteCookieHeaderWithoutSurvivingCookie() + { + $header = array('Set-Cookie' => "foo=bar"); + \Slim\Http\Util::deleteCookieHeader($header, 'foo'); + $this->assertEquals(1, preg_match("@foo=; expires=@", $header['Set-Cookie'])); + } + + public function testDeleteCookieHeaderWithMatchingDomain() + { + $header = array('Set-Cookie' => "foo=bar; domain=foo.com"); + \Slim\Http\Util::deleteCookieHeader($header, 'foo', array( + 'domain' => 'foo.com' + )); + $this->assertEquals(1, preg_match("@foo=; domain=foo.com; expires=@", $header['Set-Cookie'])); + } + + public function testDeleteCookieHeaderWithoutMatchingDomain() + { + $header = array('Set-Cookie' => "foo=bar; domain=foo.com"); + \Slim\Http\Util::deleteCookieHeader($header, 'foo', array( + 'domain' => 'bar.com' + )); + $this->assertEquals(1, preg_match("@foo=bar; domain=foo\.com\nfoo=; domain=bar\.com@", $header['Set-Cookie'])); + } + + /** + * Test parses Cookie: HTTP header + */ + public function testParsesCookieHeader() + { + $header = 'foo=bar; one=two; colors=blue'; + $result = \Slim\Http\Util::parseCookieHeader($header); + $this->assertEquals(3, count($result)); + $this->assertEquals('bar', $result['foo']); + $this->assertEquals('two', $result['one']); + $this->assertEquals('blue', $result['colors']); + } + + /** + * Test parses Cookie: HTTP header with `=` in the cookie value + */ + public function testParsesCookieHeaderWithEqualSignInValue() + { + $header = 'foo=bar; one=two=; colors=blue'; + $result = \Slim\Http\Util::parseCookieHeader($header); + $this->assertEquals(3, count($result)); + $this->assertEquals('bar', $result['foo']); + $this->assertEquals('two=', $result['one']); + $this->assertEquals('blue', $result['colors']); + } + + public function testParsesCookieHeaderWithCommaSeparator() + { + $header = 'foo=bar, one=two, colors=blue'; + $result = \Slim\Http\Util::parseCookieHeader($header); + $this->assertEquals(3, count($result)); + $this->assertEquals('bar', $result['foo']); + $this->assertEquals('two', $result['one']); + $this->assertEquals('blue', $result['colors']); + } + + public function testPrefersLeftmostCookieWhenManyCookiesWithSameName() + { + $header = 'foo=bar; foo=beer'; + $result = \Slim\Http\Util::parseCookieHeader($header); + $this->assertEquals('bar', $result['foo']); + } +} diff --git a/vendor/slim/slim/tests/LogTest.php b/vendor/slim/slim/tests/LogTest.php new file mode 100644 index 00000000..28f99e8a --- /dev/null +++ b/vendor/slim/slim/tests/LogTest.php @@ -0,0 +1,208 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class MyWriter +{ + public function write( $object, $level ) + { + echo (string) $object; + + return true; + } +} + +class LogTest extends PHPUnit_Framework_TestCase +{ + public function testEnabled() + { + $log = new \Slim\Log(new MyWriter()); + $this->assertTrue($log->isEnabled()); //<-- Default case + $log->setEnabled(true); + $this->assertTrue($log->isEnabled()); + $log->setEnabled(false); + $this->assertFalse($log->isEnabled()); + } + + public function testGetLevel() + { + $log = new \Slim\Log(new MyWriter()); + $this->assertEquals(\Slim\Log::DEBUG, $log->getLevel()); + } + + public function testSetLevel() + { + $log = new \Slim\Log(new MyWriter()); + $log->setLevel(\Slim\Log::WARN); + $this->assertEquals(\Slim\Log::WARN, $log->getLevel()); + } + + public function testSetInvalidLevel() + { + $this->setExpectedException('InvalidArgumentException'); + $log = new \Slim\Log(new MyWriter()); + $log->setLevel(\Slim\Log::DEBUG + 1); + } + + public function testLogDebug() + { + $this->expectOutputString('Debug'); + $log = new \Slim\Log(new MyWriter()); + $result = $log->debug('Debug'); + $this->assertTrue($result); + } + + public function testLogDebugExcludedByLevel() + { + $log = new \Slim\Log(new MyWriter()); + $log->setLevel(\Slim\Log::INFO); + $this->assertFalse($log->debug('Debug')); + } + + public function testLogInfo() + { + $this->expectOutputString('Info'); + $log = new \Slim\Log(new MyWriter()); + $result = $log->info('Info'); + $this->assertTrue($result); + } + + public function testLogInfoExcludedByLevel() + { + $log = new \Slim\Log(new MyWriter()); + $log->setLevel(\Slim\Log::NOTICE); + $this->assertFalse($log->info('Info')); + } + + public function testLogNotice() + { + $this->expectOutputString('Notice'); + $log = new \Slim\Log(new MyWriter()); + $result = $log->notice('Notice'); + $this->assertTrue($result); + } + + public function testLogNoticeExcludedByLevel() + { + $log = new \Slim\Log(new MyWriter()); + $log->setLevel(\Slim\Log::WARN); + $this->assertFalse($log->info('Info')); + } + + public function testLogWarn() + { + $this->expectOutputString('Warn'); + $log = new \Slim\Log(new MyWriter()); + $result = $log->warning('Warn'); + $this->assertTrue($result); + } + + public function testLogWarnExcludedByLevel() + { + $log = new \Slim\Log(new MyWriter()); + $log->setLevel(\Slim\Log::ERROR); + $this->assertFalse($log->warning('Warn')); + } + + public function testLogError() + { + $this->expectOutputString('Error'); + $log = new \Slim\Log(new MyWriter()); + $result = $log->error('Error'); + $this->assertTrue($result); + } + + public function testLogErrorExcludedByLevel() + { + $log = new \Slim\Log(new MyWriter()); + $log->setLevel(\Slim\Log::CRITICAL); + $this->assertFalse($log->error('Error')); + } + + public function testLogCritical() + { + $this->expectOutputString('Critical'); + $log = new \Slim\Log(new MyWriter()); + $result = $log->critical('Critical'); + $this->assertTrue($result); + } + + public function testLogCriticalExcludedByLevel() + { + $log = new \Slim\Log(new MyWriter()); + $log->setLevel(\Slim\Log::ALERT); + $this->assertFalse($log->critical('Critical')); + } + + public function testLogAlert() + { + $this->expectOutputString('Alert'); + $log = new \Slim\Log(new MyWriter()); + $result = $log->alert('Alert'); + $this->assertTrue($result); + } + + public function testLogAlertExcludedByLevel() + { + $log = new \Slim\Log(new MyWriter()); + $log->setLevel(\Slim\Log::EMERGENCY); + $this->assertFalse($log->alert('Alert')); + } + + public function testLogEmergency() + { + $this->expectOutputString('Emergency'); + $log = new \Slim\Log(new MyWriter()); + $result = $log->emergency('Emergency'); + $this->assertTrue($result); + } + + public function testInterpolateMessage() + { + $this->expectOutputString('Hello Slim !'); + $log = new \Slim\Log(new MyWriter()); + $result = $log->debug( + 'Hello {framework} !', + array('framework' => "Slim") + ); + $this->assertTrue($result); + } + + public function testGetAndSetWriter() + { + $writer1 = new MyWriter(); + $writer2 = new MyWriter(); + $log = new \Slim\Log($writer1); + $this->assertSame($writer1, $log->getWriter()); + $log->setWriter($writer2); + $this->assertSame($writer2, $log->getWriter()); + } +} diff --git a/vendor/slim/slim/tests/LogWriterTest.php b/vendor/slim/slim/tests/LogWriterTest.php new file mode 100644 index 00000000..f36009d2 --- /dev/null +++ b/vendor/slim/slim/tests/LogWriterTest.php @@ -0,0 +1,48 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class LogWriterTest extends PHPUnit_Framework_TestCase +{ + public function testInstantiation() + { + $this->expectOutputString('Hello!' . PHP_EOL); + $handle = fopen('php://output', 'w'); + $fw = new \Slim\LogWriter($handle); + $this->assertTrue($fw->write('Hello!') > 0); //<-- Returns number of bytes written if successful + } + + public function testInstantiationWithNonResource() + { + $this->setExpectedException('InvalidArgumentException'); + $fw = new \Slim\LogWriter(@fopen('/foo/bar.txt', 'w')); + } +} diff --git a/vendor/slim/slim/tests/Middleware/ContentTypesTest.php b/vendor/slim/slim/tests/Middleware/ContentTypesTest.php new file mode 100644 index 00000000..4729a417 --- /dev/null +++ b/vendor/slim/slim/tests/Middleware/ContentTypesTest.php @@ -0,0 +1,162 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class ContentTypesTest extends PHPUnit_Framework_TestCase +{ + public function setUp() + { + ob_start(); + } + + public function tearDown() + { + ob_end_clean(); + } + + /** + * Test parses JSON + */ + public function testParsesJson() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'application/json', + 'CONENT_LENGTH' => 13, + 'slim.input' => '{"foo":"bar"}' + )); + $s = new \Slim\Slim(); + $s->add(new \Slim\Middleware\ContentTypes()); + $s->run(); + $body = $s->request()->getBody(); + $this->assertTrue(is_array($body)); + $this->assertEquals('bar', $body['foo']); + } + + /** + * Test ignores JSON with errors + */ + public function testParsesJsonWithError() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'application/json', + 'CONENT_LENGTH' => 12, + 'slim.input' => '{"foo":"bar"' //<-- This should be incorrect! + )); + $s = new \Slim\Slim(); + $s->add(new \Slim\Middleware\ContentTypes()); + $s->run(); + $body = $s->request()->getBody(); + $this->assertTrue(is_string($body)); + $this->assertEquals('{"foo":"bar"', $body); + } + + /** + * Test parses XML + */ + public function testParsesXml() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'application/xml', + 'CONENT_LENGTH' => 68, + 'slim.input' => '1Clive Cussler' + )); + $s = new \Slim\Slim(); + $s->add(new \Slim\Middleware\ContentTypes()); + $s->run(); + $body = $s->request()->getBody(); + $this->assertInstanceOf('SimpleXMLElement', $body); + $this->assertEquals('Clive Cussler', (string) $body->book->author); + } + + /** + * Test ignores XML with errors + */ + public function testParsesXmlWithError() + { + libxml_use_internal_errors(true); + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'application/xml', + 'CONTENT_LENGTH' => 68, + 'slim.input' => '1Clive Cussler' //<-- This should be incorrect! + )); + $s = new \Slim\Slim(); + $s->add(new \Slim\Middleware\ContentTypes()); + $s->run(); + $body = $s->request()->getBody(); + $this->assertTrue(is_string($body)); + $this->assertEquals('1Clive Cussler', $body); + } + + /** + * Test parses CSV + */ + public function testParsesCsv() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'text/csv', + 'CONTENT_LENGTH' => 44, + 'slim.input' => "John,Doe,000-111-2222\nJane,Doe,111-222-3333" + )); + $s = new \Slim\Slim(); + $s->add(new \Slim\Middleware\ContentTypes()); + $s->run(); + $body = $s->request()->getBody(); + $this->assertTrue(is_array($body)); + $this->assertEquals(2, count($body)); + $this->assertEquals('000-111-2222', $body[0][2]); + $this->assertEquals('Doe', $body[1][1]); + } + + /** + * Test parses request body based on media-type only, disregarding + * any extra content-type header parameters + */ + public function testParsesRequestBodyWithMediaType() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'application/json; charset=ISO-8859-4', + 'CONTENT_LENGTH' => 13, + 'slim.input' => '{"foo":"bar"}' + )); + $s = new \Slim\Slim(); + $s->add(new \Slim\Middleware\ContentTypes()); + $s->run(); + $body = $s->request()->getBody(); + $this->assertTrue(is_array($body)); + $this->assertEquals('bar', $body['foo']); + } +} diff --git a/vendor/slim/slim/tests/Middleware/FlashTest.php b/vendor/slim/slim/tests/Middleware/FlashTest.php new file mode 100644 index 00000000..2faf2c17 --- /dev/null +++ b/vendor/slim/slim/tests/Middleware/FlashTest.php @@ -0,0 +1,141 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class SlimFlashTest extends PHPUnit_Framework_TestCase +{ + /** + * Setup + */ + public function setUp() + { + $_SESSION = array(); + } + + /** + * Test set flash message for next request + */ + public function testSetFlashForNextRequest() + { + $f = new \Slim\Middleware\Flash(); + $f->set('foo', 'bar'); + $f->save(); + $this->assertEquals('bar', $_SESSION['slim.flash']['foo']); + } + + /** + * Test set flash message for current request + */ + public function testSetFlashForCurrentRequest() + { + $f = new \Slim\Middleware\Flash(); + $f->now('foo', 'bar'); + $this->assertEquals('bar', $f['foo']); + } + + /** + * Test loads flash from previous request + */ + public function testLoadsFlashFromPreviousRequest() + { + $_SESSION['slim.flash'] = array('info' => 'foo'); + $f = new \Slim\Middleware\Flash(); + $f->loadMessages(); + $this->assertEquals('foo', $f['info']); + } + + /** + * Test keep flash message for next request + */ + public function testKeepFlashFromPreviousRequest() + { + $_SESSION['slim.flash'] = array('info' => 'foo'); + $f = new \Slim\Middleware\Flash(); + $f->loadMessages(); + $f->keep(); + $f->save(); + $this->assertEquals('foo', $_SESSION['slim.flash']['info']); + } + + /** + * Test flash messages from previous request do not persist to next request + */ + public function testFlashMessagesFromPreviousRequestDoNotPersist() + { + $_SESSION['slim.flash'] = array('info' => 'foo'); + $f = new \Slim\Middleware\Flash(); + $f->save(); + $this->assertEmpty($_SESSION['slim.flash']); + } + + /** + * Test set Flash using array access + */ + public function testFlashArrayAccess() + { + $_SESSION['slim.flash'] = array('info' => 'foo'); + $f = new \Slim\Middleware\Flash(); + $f['info'] = 'bar'; + $f->save(); + $this->assertTrue(isset($f['info'])); + $this->assertEquals('bar', $f['info']); + unset($f['info']); + $this->assertFalse(isset($f['info'])); + } + + /** + * Test iteration + */ + public function testIteration() + { + $_SESSION['slim.flash'] = array('info' => 'foo', 'error' => 'bar'); + $f = new \Slim\Middleware\Flash(); + $f->loadMessages(); + $output = ''; + foreach ($f as $key => $value) { + $output .= $key . $value; + } + $this->assertEquals('infofooerrorbar', $output); + } + + /** + * Test countable + */ + public function testCountable() + { + $_SESSION['slim.flash'] = array('info' => 'foo', 'error' => 'bar'); + $f = new \Slim\MiddleWare\Flash(); + $f->loadMessages(); + $this->assertEquals(2, count($f)); + } + + +} diff --git a/vendor/slim/slim/tests/Middleware/MethodOverrideTest.php b/vendor/slim/slim/tests/Middleware/MethodOverrideTest.php new file mode 100644 index 00000000..c07e3974 --- /dev/null +++ b/vendor/slim/slim/tests/Middleware/MethodOverrideTest.php @@ -0,0 +1,149 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * We use a mock application, instead of a Slim application. + * so that we may easily test the Method Override middleware + * in isolation. + */ +class CustomAppMethod +{ + protected $environment; + + public function __construct() + { + $this->environment = \Slim\Environment::getInstance(); + } + + public function &environment() { + return $this->environment; + } + + public function call() + { + //Do nothing + } +} + +class MethodOverrideTest extends PHPUnit_Framework_TestCase +{ + /** + * Test overrides method as POST + */ + public function testOverrideMethodAsPost() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + 'CONTENT_LENGTH' => 11, + 'slim.input' => '_METHOD=PUT' + )); + $app = new CustomAppMethod(); + $mw = new \Slim\Middleware\MethodOverride(); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $env =& $app->environment(); + $this->assertEquals('PUT', $env['REQUEST_METHOD']); + $this->assertTrue(isset($env['slim.method_override.original_method'])); + $this->assertEquals('POST', $env['slim.method_override.original_method']); + } + + /** + * Test does not override method if not POST + */ + public function testDoesNotOverrideMethodIfNotPost() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'GET', + 'slim.input' => '' + )); + $app = new CustomAppMethod(); + $mw = new \Slim\Middleware\MethodOverride(); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $env =& $app->environment(); + $this->assertEquals('GET', $env['REQUEST_METHOD']); + $this->assertFalse(isset($env['slim.method_override.original_method'])); + } + + /** + * Test does not override method if no method override parameter + */ + public function testDoesNotOverrideMethodAsPostWithoutParameter() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'REMOTE_ADDR' => '127.0.0.1', + 'SCRIPT_NAME' => '/foo/index.php', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + 'QUERY_STRING' => 'foo=bar', + 'SERVER_NAME' => 'slim', + 'SERVER_PORT' => 80, + 'slim.url_scheme' => 'http', + 'slim.input' => '', + 'slim.errors' => fopen('php://stderr', 'w') + )); + $app = new CustomAppMethod(); + $mw = new \Slim\Middleware\MethodOverride(); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $env =& $app->environment(); + $this->assertEquals('POST', $env['REQUEST_METHOD']); + $this->assertFalse(isset($env['slim.method_override.original_method'])); + } + + /** + * Test overrides method with X-Http-Method-Override header + */ + public function testOverrideMethodAsHeader() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'application/json', + 'CONTENT_LENGTH' => 0, + 'slim.input' => '', + 'HTTP_X_HTTP_METHOD_OVERRIDE' => 'DELETE' + )); + $app = new CustomAppMethod(); + $mw = new \Slim\Middleware\MethodOverride(); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $env =& $app->environment(); + $this->assertEquals('DELETE', $env['REQUEST_METHOD']); + $this->assertTrue(isset($env['slim.method_override.original_method'])); + $this->assertEquals('POST', $env['slim.method_override.original_method']); + } +} diff --git a/vendor/slim/slim/tests/Middleware/PrettyExceptionsTest.php b/vendor/slim/slim/tests/Middleware/PrettyExceptionsTest.php new file mode 100644 index 00000000..0ba88835 --- /dev/null +++ b/vendor/slim/slim/tests/Middleware/PrettyExceptionsTest.php @@ -0,0 +1,153 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class PrettyExceptionsTest extends PHPUnit_Framework_TestCase +{ + /** + * Test middleware returns successful response unchanged + */ + public function testReturnsUnchangedSuccessResponse() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo' + )); + $app = new \Slim\Slim(); + $app->get('/foo', function () { + echo "Success"; + }); + $mw = new \Slim\Middleware\PrettyExceptions(); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $this->assertEquals(200, $app->response()->status()); + $this->assertEquals('Success', $app->response()->body()); + } + + /** + * Test middleware returns diagnostic screen for error response + */ + public function testReturnsDiagnosticsForErrorResponse() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo' + )); + $app = new \Slim\Slim(array( + 'log.enabled' => false + )); + $app->get('/foo', function () { + throw new \Exception('Test Message', 100); + }); + $mw = new \Slim\Middleware\PrettyExceptions(); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $this->assertEquals(1, preg_match('@Slim Application Error@', $app->response()->body())); + $this->assertEquals(500, $app->response()->status()); + } + + /** + * Test middleware overrides response content type to html + */ + public function testResponseContentTypeIsOverriddenToHtml() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo' + )); + $app = new \Slim\Slim(array( + 'log.enabled' => false + )); + $app->get('/foo', function () use ($app) { + $app->contentType('application/json;charset=utf-8'); //<-- set content type to something else + throw new \Exception('Test Message', 100); + }); + $mw = new \Slim\Middleware\PrettyExceptions(); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $response = $app->response(); + $this->assertEquals('text/html', $response['Content-Type']); + } + + /** + * Test exception type is in response body + */ + public function testExceptionTypeIsInResponseBody() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo' + )); + $app = new \Slim\Slim(array( + 'log.enabled' => false + )); + $app->get('/foo', function () use ($app) { + throw new \LogicException('Test Message', 100); + }); + $mw = new \Slim\Middleware\PrettyExceptions(); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + + $this->assertContains('LogicException', $app->response()->body()); + } + + /** + * Test with custom log + */ + public function testWithCustomLogWriter() + { + $this->setExpectedException('\LogicException'); + + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo' + )); + $app = new \Slim\Slim(array( + 'log.enabled' => false + )); + $app->container->singleton('log', function () use ($app) { + return new \Slim\Log(new \Slim\LogWriter('php://temp')); + }); + $app->get('/foo', function () use ($app) { + throw new \LogicException('Test Message', 100); + }); + $mw = new \Slim\Middleware\PrettyExceptions(); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + + $this->assertContains('LogicException', $app->response()->body()); + } +} diff --git a/vendor/slim/slim/tests/Middleware/SessionCookieTest.php b/vendor/slim/slim/tests/Middleware/SessionCookieTest.php new file mode 100644 index 00000000..39de500d --- /dev/null +++ b/vendor/slim/slim/tests/Middleware/SessionCookieTest.php @@ -0,0 +1,463 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class SessionCookieTest extends PHPUnit_Framework_TestCase +{ + public function setUp() + { + $_SESSION = array(); + } + + /** + * Test session cookie is set and constructed correctly + * + * We test for two things: + * + * 1) That the HTTP cookie exists with the correct name; + * 2) That the HTTP cookie's value is the expected value; + */ + public function testSessionCookieIsCreated() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo' + )); + $app = new \Slim\Slim(); + $app->get('/foo', function () { + $_SESSION['foo'] = 'bar'; + echo "Success"; + }); + $mw = new \Slim\Middleware\SessionCookie(array('expires' => '10 years')); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + list($status, $header, $body) = $app->response()->finalize(); + $this->assertTrue($app->response->cookies->has('slim_session')); + $cookie = $app->response->cookies->get('slim_session'); + $this->assertEquals('{"foo":"bar"}', $cookie['value']); + } + + /** + * Test $_SESSION is populated from an encrypted HTTP cookie + * + * The encrypted cookie contains the serialized array ['foo' => 'bar']. The + * global secret, cipher, and cipher mode are assumed to be the default + * values. + */ + // public function testSessionIsPopulatedFromEncryptedCookie() + // { + // \Slim\Environment::mock(array( + // 'SCRIPT_NAME' => '/index.php', + // 'PATH_INFO' => '/foo', + // 'HTTP_COOKIE' => 'slim_session=1644004961%7CLKkYPwqKIMvBK7MWl6D%2BxeuhLuMaW4quN%2F512ZAaVIY%3D%7Ce0f007fa852c7101e8224bb529e26be4d0dfbd63', + // )); + // $app = new \Slim\Slim(); + // // The cookie value in the test is encrypted, so cookies.encrypt must + // // be set to true + // $app->config('cookies.encrypt', true); + // $app->get('/foo', function () { + // echo "Success"; + // }); + // $mw = new \Slim\Middleware\SessionCookie(array('expires' => '10 years')); + // $mw->setApplication($app); + // $mw->setNextMiddleware($app); + // $mw->call(); + // $this->assertEquals(array('foo' => 'bar'), $_SESSION); + // } + + /** + * Test $_SESSION is populated from an unencrypted HTTP cookie + * + * The unencrypted cookie contains the serialized array ['foo' => 'bar']. + * The global cookies.encrypt setting is set to false + */ + public function testSessionIsPopulatedFromUnencryptedCookie() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo', + 'HTTP_COOKIE' => 'slim_session={"foo":"bar"}', + )); + $app = new \Slim\Slim(); + // The cookie value in the test is unencrypted, so cookies.encrypt must + // be set to false + $app->config('cookies.encrypt', false); + $app->get('/foo', function () { + echo "Success"; + }); + $mw = new \Slim\Middleware\SessionCookie(array('expires' => '10 years')); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $this->assertEquals(array('foo' => 'bar'), $_SESSION); + } + + /** + * Test $_SESSION is populated from an unencrypted HTTP cookie + * + * The unencrypted cookie contains the serialized array ['foo' => 'bar']. + * The global cookies.encrypt setting is set to false + */ + public function testSessionIsPopulatedFromMalformedCookieData() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo', + 'HTTP_COOKIE' => 'slim_session={"foo":"bar"sdkhguy5y}', + )); + $app = new \Slim\Slim(); + // The cookie value in the test is unencrypted, so cookies.encrypt must + // be set to false + $app->config('cookies.encrypt', false); + $app->get('/foo', function () { + echo "Success"; + }); + $mw = new \Slim\Middleware\SessionCookie(array('expires' => '10 years')); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $this->assertEquals(array(), $_SESSION); + } + + /** + * Test $_SESSION is populated as empty array if no HTTP cookie + */ + public function testSessionIsPopulatedAsEmptyIfNoCookie() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo' + )); + $app = new \Slim\Slim(); + $app->get('/foo', function () { + echo "Success"; + }); + $mw = new \Slim\Middleware\SessionCookie(array('expires' => '10 years')); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + $this->assertEquals(array(), $_SESSION); + } + + public function testSerializingTooLongValueWritesLogAndDoesntCreateCookie() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/index.php', + 'PATH_INFO' => '/foo' + )); + + $logWriter = $this->getMockBuilder('Slim\LogWriter') + ->disableOriginalConstructor() + ->getMock(); + + $logWriter->expects($this->once()) + ->method('write') + ->with('WARNING! Slim\Middleware\SessionCookie data size is larger than 4KB. Content save failed.', \Slim\Log::ERROR); + + $app = new \Slim\Slim(array( + 'log.writer' => $logWriter + )); + + $tooLongValue = $this->getTooLongValue(); + + $app->get('/foo', function () use ($tooLongValue) { + $_SESSION['test'] = $tooLongValue; + echo "Success"; + }); + + $mw = new \Slim\Middleware\SessionCookie(array('expires' => '10 years')); + $mw->setApplication($app); + $mw->setNextMiddleware($app); + $mw->call(); + list($status, $header, $body) = $app->response()->finalize(); + $this->assertFalse($app->response->cookies->has('slim_session')); + } + + /** + * Generated by http://www.random.org/strings/ + */ + protected function getTooLongValue() + { + return << + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class MyMiddleware extends \Slim\Middleware +{ + public function call() {} +} + +class MiddlewareTest extends PHPUnit_Framework_TestCase +{ + public function testSetApplication() + { + $app = new stdClass(); + $mw = new MyMiddleware(); + $mw->setApplication($app); + + $this->assertAttributeSame($app, 'app', $mw); + } + + public function testGetApplication() + { + $app = new stdClass(); + $mw = new MyMiddleware(); + $property = new \ReflectionProperty($mw, 'app'); + $property->setAccessible(true); + $property->setValue($mw, $app); + + $this->assertSame($app, $mw->getApplication()); + } + + public function testSetNextMiddleware() + { + $mw1 = new MyMiddleware(); + $mw2 = new MyMiddleware(); + $mw1->setNextMiddleware($mw2); + + $this->assertAttributeSame($mw2, 'next', $mw1); + } + + public function testGetNextMiddleware() + { + $mw1 = new MyMiddleware(); + $mw2 = new MyMiddleware(); + $property = new \ReflectionProperty($mw1, 'next'); + $property->setAccessible(true); + $property->setValue($mw1, $mw2); + + $this->assertSame($mw2, $mw1->getNextMiddleware()); + } +} diff --git a/vendor/slim/slim/tests/README b/vendor/slim/slim/tests/README new file mode 100644 index 00000000..7bc611c3 --- /dev/null +++ b/vendor/slim/slim/tests/README @@ -0,0 +1,18 @@ +Slim Framework Unit Tests + +Follow the directions below to run the Slim Framework unit tests. You'll need the latest version of PHPUnit. To save development time, these unit tests require PHP >= 5.3. However, the Slim Framework itself requires only PHP >= 5.2. + +1. Install the latest version of PHPUnit +Visit http://www.phpunit.de/ for installation instructions. + +2. Run PHPUnit +From the filesystem directory that contains the `tests` directory, you may run all unit tests or specific unit tests. Here are several examples. The '$>' in the examples below is your command prompt. + +To run all tests: +$> phpunit tests + +To run all HTTP-related tests: +$> phpunit tests/Http + +To run only the HTTP Request tests: +$> phpunit tests/Http/RequestTest \ No newline at end of file diff --git a/vendor/slim/slim/tests/RouteTest.php b/vendor/slim/slim/tests/RouteTest.php new file mode 100644 index 00000000..6817641b --- /dev/null +++ b/vendor/slim/slim/tests/RouteTest.php @@ -0,0 +1,617 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class LazyInitializeTestClass { + public static $initialized = false; + + public function __construct() { + self::$initialized = true; + } + + public function foo() { + } +} + +class FooTestClass { + public static $foo_invoked = false; + public static $foo_invoked_args = array(); + + public function foo() { + self::$foo_invoked = true; + self::$foo_invoked_args = func_get_args(); + } +} + +class RouteTest extends PHPUnit_Framework_TestCase +{ + public function testGetPattern() + { + $route = new \Slim\Route('/foo', function () {}); + + $this->assertEquals('/foo', $route->getPattern()); + } + + public function testGetName() + { + $route = new \Slim\Route('/foo', function () {}); + + $property = new \ReflectionProperty($route, 'name'); + $property->setAccessible(true); + $property->setValue($route, 'foo'); + + $this->assertEquals('foo', $route->getName()); + } + + public function testSetName() + { + $route = new \Slim\Route('/foo', function () {}); + $route->name('foo'); // <-- Alias for `setName()` + + $this->assertAttributeEquals('foo', 'name', $route); + } + + public function testGetCallable() + { + $callable = function () { + echo 'Foo'; + }; + $route = new \Slim\Route('/foo', $callable); + + $this->assertSame($callable, $route->getCallable()); + } + + public function testGetCallableAsClass() + { + FooTestClass::$foo_invoked = false; + FooTestClass::$foo_invoked_args = array(); + $route = new \Slim\Route('/foo', '\FooTestClass:foo'); + $route->setParams(array('bar' => '1234')); + + $this->assertFalse(FooTestClass::$foo_invoked); + $this->assertTrue($route->dispatch()); + $this->assertTrue(FooTestClass::$foo_invoked); + $this->assertEquals(array('1234'), FooTestClass::$foo_invoked_args); + } + + public function testGetCallableAsClassLazyInitialize() + { + LazyInitializeTestClass::$initialized = false; + + $route = new \Slim\Route('/foo', '\LazyInitializeTestClass:foo'); + $this->assertFalse(LazyInitializeTestClass::$initialized); + + $route->dispatch(); + $this->assertTrue(LazyInitializeTestClass::$initialized); + } + + public function testGetCallableAsStaticMethod() + { + $route = new \Slim\Route('/bar', '\Slim\Slim::getInstance'); + + $callable = $route->getCallable(); + $this->assertEquals('\Slim\Slim::getInstance', $callable); + } + + public function example_càllâble_wïth_wéird_chars() + { + return 'test'; + } + + public function testGetCallableWithOddCharsAsClass() + { + $route = new \Slim\Route('/foo', '\RouteTest:example_càllâble_wïth_wéird_chars'); + $callable = $route->getCallable(); + + $this->assertEquals('test', $callable()); + } + + public function testSetCallable() + { + $callable = function () { + echo 'Foo'; + }; + $route = new \Slim\Route('/foo', $callable); // <-- Called inside __construct() + + $this->assertAttributeSame($callable, 'callable', $route); + } + + public function testSetCallableWithInvalidArgument() + { + $this->setExpectedException('\InvalidArgumentException'); + $route = new \Slim\Route('/foo', 'doesNotExist'); // <-- Called inside __construct() + } + + public function testGetParams() + { + $route = new \Slim\Route('/hello/:first/:last', function () {}); + $route->matches('/hello/mr/anderson'); // <-- Parses params from argument + + $this->assertEquals(array( + 'first' => 'mr', + 'last' => 'anderson' + ), $route->getParams()); + } + + public function testSetParams() + { + $route = new \Slim\Route('/hello/:first/:last', function () {}); + $route->matches('/hello/mr/anderson'); // <-- Parses params from argument + $route->setParams(array( + 'first' => 'agent', + 'last' => 'smith' + )); + + $this->assertAttributeEquals(array( + 'first' => 'agent', + 'last' => 'smith' + ), 'params', $route); + } + + public function testGetParam() + { + $route = new \Slim\Route('/hello/:first/:last', function () {}); + + $property = new \ReflectionProperty($route, 'params'); + $property->setAccessible(true); + $property->setValue($route, array( + 'first' => 'foo', + 'last' => 'bar' + )); + + $this->assertEquals('foo', $route->getParam('first')); + } + + public function testGetParamThatDoesNotExist() + { + $this->setExpectedException('InvalidArgumentException'); + + $route = new \Slim\Route('/hello/:first/:last', function () {}); + + $property = new \ReflectionProperty($route, 'params'); + $property->setAccessible(true); + $property->setValue($route, array( + 'first' => 'foo', + 'last' => 'bar' + )); + + $route->getParam('middle'); + } + + public function testSetParam() + { + $route = new \Slim\Route('/hello/:first/:last', function () {}); + $route->matches('/hello/mr/anderson'); // <-- Parses params from argument + $route->setParam('last', 'smith'); + + $this->assertAttributeEquals(array( + 'first' => 'mr', + 'last' => 'smith' + ), 'params', $route); + } + + public function testSetParamThatDoesNotExist() + { + $this->setExpectedException('InvalidArgumentException'); + + $route = new \Slim\Route('/hello/:first/:last', function () {}); + $route->matches('/hello/mr/anderson'); // <-- Parses params from argument + $route->setParam('middle', 'smith'); // <-- Should trigger InvalidArgumentException + } + + public function testMatches() + { + $route = new \Slim\Route('/hello/:name', function () {}); + + $this->assertTrue($route->matches('/hello/josh')); + } + + public function testMatchesIsFalse() + { + $route = new \Slim\Route('/foo', function () {}); + + $this->assertFalse($route->matches('/bar')); + } + + public function testMatchesPatternWithTrailingSlash() + { + $route = new \Slim\Route('/foo/', function () {}); + + $this->assertTrue($route->matches('/foo/')); + $this->assertTrue($route->matches('/foo')); + } + + public function testMatchesPatternWithoutTrailingSlash() + { + $route = new \Slim\Route('/foo', function () {}); + + $this->assertFalse($route->matches('/foo/')); + $this->assertTrue($route->matches('/foo')); + } + + public function testMatchesWithConditions() + { + $route = new \Slim\Route('/hello/:first/and/:second', function () {}); + $route->conditions(array( + 'first' => '[a-zA-Z]{3,}' + )); + + $this->assertTrue($route->matches('/hello/Josh/and/John')); + } + + public function testMatchesWithConditionsIsFalse() + { + $route = new \Slim\Route('/hello/:first/and/:second', function () {}); + $route->conditions(array( + 'first' => '[a-z]{3,}' + )); + + $this->assertFalse($route->matches('/hello/Josh/and/John')); + } + + /* + * Route should match URI with valid path component according to rfc2396 + * + * "Uniform Resource Identifiers (URI): Generic Syntax" http://www.ietf.org/rfc/rfc2396.txt + * + * Excludes "+" which is valid but decodes into a space character + */ + public function testMatchesWithValidRfc2396PathComponent() + { + $symbols = ':@&=$,'; + $route = new \Slim\Route('/rfc2386/:symbols', function () {}); + + $this->assertTrue($route->matches('/rfc2386/' . $symbols)); + } + + /* + * Route should match URI including unreserved punctuation marks from rfc2396 + * + * "Uniform Resource Identifiers (URI): Generic Syntax" http://www.ietf.org/rfc/rfc2396.txt + */ + public function testMatchesWithUnreservedMarks() + { + $marks = "-_.!~*'()"; + $route = new \Slim\Route('/marks/:marks', function () {}); + + $this->assertTrue($route->matches('/marks/' . $marks)); + } + + public function testMatchesOptionalParameters() + { + $pattern = '/archive/:year(/:month(/:day))'; + + $route1 = new \Slim\Route($pattern, function () {}); + $this->assertTrue($route1->matches('/archive/2010')); + $this->assertEquals(array('year' => '2010'), $route1->getParams()); + + $route2 = new \Slim\Route($pattern, function () {}); + $this->assertTrue($route2->matches('/archive/2010/05')); + $this->assertEquals(array('year' => '2010', 'month' => '05'), $route2->getParams()); + + $route3 = new \Slim\Route($pattern, function () {}); + $this->assertTrue($route3->matches('/archive/2010/05/13')); + $this->assertEquals(array('year' => '2010', 'month' => '05', 'day' => '13'), $route3->getParams()); + } + + public function testMatchesIsCaseSensitiveByDefault() + { + $route = new \Slim\Route('/case/sensitive', function () {}); + $this->assertTrue($route->matches('/case/sensitive')); + $this->assertFalse($route->matches('/CaSe/SensItiVe')); + } + + public function testMatchesCanBeCaseInsensitive() + { + $route = new \Slim\Route('/Case/Insensitive', function () {}, false); + $this->assertTrue($route->matches('/Case/Insensitive')); + $this->assertTrue($route->matches('/CaSe/iNSensItiVe')); + } + + public function testGetConditions() + { + $route = new \Slim\Route('/foo', function () {}); + + $property = new \ReflectionProperty($route, 'conditions'); + $property->setAccessible(true); + $property->setValue($route, array('foo' => '\d{3}')); + + $this->assertEquals(array('foo' => '\d{3}'), $route->getConditions()); + } + + public function testSetDefaultConditions() + { + \Slim\Route::setDefaultConditions(array( + 'id' => '\d+' + )); + + $property = new \ReflectionProperty('\Slim\Route', 'defaultConditions'); + $property->setAccessible(true); + + $this->assertEquals(array( + 'id' => '\d+' + ), $property->getValue()); + } + + public function testGetDefaultConditions() + { + $property = new \ReflectionProperty('\Slim\Route', 'defaultConditions'); + $property->setAccessible(true); + $property->setValue(array( + 'id' => '\d+' + )); + + $this->assertEquals(array( + 'id' => '\d+' + ), \Slim\Route::getDefaultConditions()); + } + + public function testDefaultConditionsAssignedToInstance() + { + $staticProperty = new \ReflectionProperty('\Slim\Route', 'defaultConditions'); + $staticProperty->setAccessible(true); + $staticProperty->setValue(array( + 'id' => '\d+' + )); + $route = new \Slim\Route('/foo', function () {}); + + $this->assertAttributeEquals(array( + 'id' => '\d+' + ), 'conditions', $route); + } + + public function testMatchesWildcard() + { + $route = new \Slim\Route('/hello/:path+/world', function () {}); + + $this->assertTrue($route->matches('/hello/foo/bar/world')); + $this->assertAttributeEquals(array( + 'path' => array('foo', 'bar') + ), 'params', $route); + } + + public function testMatchesMultipleWildcards() + { + $route = new \Slim\Route('/hello/:path+/world/:date+', function () {}); + + $this->assertTrue($route->matches('/hello/foo/bar/world/2012/03/10')); + $this->assertAttributeEquals(array( + 'path' => array('foo', 'bar'), + 'date' => array('2012', '03', '10') + ), 'params', $route); + } + + public function testMatchesParamsAndWildcards() + { + $route = new \Slim\Route('/hello/:path+/world/:year/:month/:day/:path2+', function () {}); + + $this->assertTrue($route->matches('/hello/foo/bar/world/2012/03/10/first/second')); + $this->assertAttributeEquals(array( + 'path' => array('foo', 'bar'), + 'year' => '2012', + 'month' => '03', + 'day' => '10', + 'path2' => array('first', 'second') + ), 'params', $route); + } + + public function testMatchesParamsWithOptionalWildcard() + { + $route = new \Slim\Route('/hello(/:foo(/:bar+))', function () {}); + + $this->assertTrue($route->matches('/hello')); + $this->assertTrue($route->matches('/hello/world')); + $this->assertTrue($route->matches('/hello/world/foo')); + $this->assertTrue($route->matches('/hello/world/foo/bar')); + } + + public function testSetMiddleware() + { + $route = new \Slim\Route('/foo', function () {}); + $mw = function () { + echo 'Foo'; + }; + $route->setMiddleware($mw); + + $this->assertAttributeContains($mw, 'middleware', $route); + } + + public function testSetMiddlewareMultipleTimes() + { + $route = new \Slim\Route('/foo', function () {}); + $mw1 = function () { + echo 'Foo'; + }; + $mw2 = function () { + echo 'Bar'; + }; + $route->setMiddleware($mw1); + $route->setMiddleware($mw2); + + $this->assertAttributeContains($mw1, 'middleware', $route); + $this->assertAttributeContains($mw2, 'middleware', $route); + } + + public function testSetMiddlewareWithArray() + { + $route = new \Slim\Route('/foo', function () {}); + $mw1 = function () { + echo 'Foo'; + }; + $mw2 = function () { + echo 'Bar'; + }; + $route->setMiddleware(array($mw1, $mw2)); + + $this->assertAttributeContains($mw1, 'middleware', $route); + $this->assertAttributeContains($mw2, 'middleware', $route); + } + + public function testSetMiddlewareWithInvalidArgument() + { + $this->setExpectedException('InvalidArgumentException'); + + $route = new \Slim\Route('/foo', function () {}); + $route->setMiddleware('doesNotExist'); // <-- Should throw InvalidArgumentException + } + + public function testSetMiddlewareWithArrayWithInvalidArgument() + { + $this->setExpectedException('InvalidArgumentException'); + + $route = new \Slim\Route('/foo', function () {}); + $route->setMiddleware(array('doesNotExist')); + } + + public function testGetMiddleware() + { + $route = new \Slim\Route('/foo', function () {}); + + $property = new \ReflectionProperty($route, 'middleware'); + $property->setAccessible(true); + $property->setValue($route, array('foo' => 'bar')); + + $this->assertEquals(array('foo' => 'bar'), $route->getMiddleware()); + } + + public function testSetHttpMethods() + { + $route = new \Slim\Route('/foo', function () {}); + $route->setHttpMethods('GET', 'POST'); + + $this->assertAttributeEquals(array('GET', 'POST'), 'methods', $route); + } + + public function testGetHttpMethods() + { + $route = new \Slim\Route('/foo', function () {}); + + $property = new \ReflectionProperty($route, 'methods'); + $property->setAccessible(true); + $property->setValue($route, array('GET', 'POST')); + + $this->assertEquals(array('GET', 'POST'), $route->getHttpMethods()); + } + + public function testAppendHttpMethods() + { + $route = new \Slim\Route('/foo', function () {}); + + $property = new \ReflectionProperty($route, 'methods'); + $property->setAccessible(true); + $property->setValue($route, array('GET', 'POST')); + + $route->appendHttpMethods('PUT'); + + $this->assertAttributeEquals(array('GET', 'POST', 'PUT'), 'methods', $route); + } + + public function testAppendArrayOfHttpMethods() + { + $arrayOfMethods = array('GET','POST','PUT'); + $route = new \Slim\Route('/foo', function () {}); + $route->appendHttpMethods($arrayOfMethods); + + $this->assertAttributeEquals($arrayOfMethods,'methods',$route); + } + + public function testAppendHttpMethodsWithVia() + { + $route = new \Slim\Route('/foo', function () {}); + $route->via('PUT'); + + $this->assertAttributeContains('PUT', 'methods', $route); + } + + public function testAppendArrayOfHttpMethodsWithVia() + { + $arrayOfMethods = array('GET','POST','PUT'); + $route = new \Slim\Route('/foo', function () {}); + $route->via($arrayOfMethods); + + $this->assertAttributeEquals($arrayOfMethods,'methods',$route); + } + + public function testSupportsHttpMethod() + { + $route = new \Slim\Route('/foo', function () {}); + + $property = new \ReflectionProperty($route, 'methods'); + $property->setAccessible(true); + $property->setValue($route, array('POST')); + + $this->assertTrue($route->supportsHttpMethod('POST')); + $this->assertFalse($route->supportsHttpMethod('PUT')); + } + + /** + * Test dispatch with params + */ + public function testDispatch() + { + $this->expectOutputString('Hello josh'); + $route = new \Slim\Route('/hello/:name', function ($name) { echo "Hello $name"; }); + $route->matches('/hello/josh'); //<-- Extracts params from resource URI + $route->dispatch(); + } + + /** + * Test dispatch with middleware + */ + public function testDispatchWithMiddleware() + { + $this->expectOutputString('First! Second! Hello josh'); + $route = new \Slim\Route('/hello/:name', function ($name) { echo "Hello $name"; }); + $route->setMiddleware(function () { + echo "First! "; + }); + $route->setMiddleware(function () { + echo "Second! "; + }); + $route->matches('/hello/josh'); //<-- Extracts params from resource URI + $route->dispatch(); + } + + /** + * Test middleware with arguments + */ + public function testRouteMiddlwareArguments() + { + $this->expectOutputString('foobar'); + $route = new \Slim\Route('/foo', function () { echo "bar"; }); + $route->setName('foo'); + $route->setMiddleware(function ($route) { + echo $route->getName(); + }); + $route->matches('/foo'); //<-- Extracts params from resource URI + $route->dispatch(); + } +} diff --git a/vendor/slim/slim/tests/RouterTest.php b/vendor/slim/slim/tests/RouterTest.php new file mode 100644 index 00000000..edbb6d42 --- /dev/null +++ b/vendor/slim/slim/tests/RouterTest.php @@ -0,0 +1,250 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class RouterTest extends PHPUnit_Framework_TestCase +{ + /** + * Constructor should initialize routes as empty array + */ + public function testConstruct() + { + $router = new \Slim\Router(); + + $this->assertAttributeEquals(array(), 'routes', $router); + } + + /** + * Map should set and return instance of \Slim\Route + */ + public function testMap() + { + $router = new \Slim\Router(); + $route = new \Slim\Route('/foo', function() {}); + $router->map($route); + + $this->assertAttributeContains($route, 'routes', $router); + } + + /** + * Named route should be added and indexed by name + */ + public function testAddNamedRoute() + { + $router = new \Slim\Router(); + $route = new \Slim\Route('/foo', function () {}); + $router->addNamedRoute('foo', $route); + + $property = new \ReflectionProperty($router, 'namedRoutes'); + $property->setAccessible(true); + + $rV = $property->getValue($router); + $this->assertSame($route, $rV['foo']); + } + + /** + * Named route should have unique name + */ + public function testAddNamedRouteWithDuplicateKey() + { + $this->setExpectedException('RuntimeException'); + + $router = new \Slim\Router(); + $route = new \Slim\Route('/foo', function () {}); + $router->addNamedRoute('foo', $route); + $router->addNamedRoute('foo', $route); + } + + /** + * Router should return named route by name, or null if not found + */ + public function testGetNamedRoute() + { + $router = new \Slim\Router(); + $route = new \Slim\Route('/foo', function () {}); + + $property = new \ReflectionProperty($router, 'namedRoutes'); + $property->setAccessible(true); + $property->setValue($router, array('foo' => $route)); + + $this->assertSame($route, $router->getNamedRoute('foo')); + $this->assertNull($router->getNamedRoute('bar')); + } + + /** + * Router should determine named routes and cache results + */ + public function testGetNamedRoutes() + { + $router = new \Slim\Router(); + $route1 = new \Slim\Route('/foo', function () {}); + $route2 = new \Slim\Route('/bar', function () {}); + + // Init router routes to array + $propertyRouterRoutes = new \ReflectionProperty($router, 'routes'); + $propertyRouterRoutes->setAccessible(true); + $propertyRouterRoutes->setValue($router, array($route1, $route2)); + + // Init router named routes to null + $propertyRouterNamedRoutes = new \ReflectionProperty($router, 'namedRoutes'); + $propertyRouterNamedRoutes->setAccessible(true); + $propertyRouterNamedRoutes->setValue($router, null); + + // Init route name + $propertyRouteName = new \ReflectionProperty($route2, 'name'); + $propertyRouteName->setAccessible(true); + $propertyRouteName->setValue($route2, 'bar'); + + $namedRoutes = $router->getNamedRoutes(); + $this->assertCount(1, $namedRoutes); + $this->assertSame($route2, $namedRoutes['bar']); + } + + /** + * Router should detect presence of a named route by name + */ + public function testHasNamedRoute() + { + $router = new \Slim\Router(); + $route = new \Slim\Route('/foo', function () {}); + + $property = new \ReflectionProperty($router, 'namedRoutes'); + $property->setAccessible(true); + $property->setValue($router, array('foo' => $route)); + + $this->assertTrue($router->hasNamedRoute('foo')); + $this->assertFalse($router->hasNamedRoute('bar')); + } + + /** + * Router should return current route if set during iteration + */ + public function testGetCurrentRoute() + { + $router = new \Slim\Router(); + $route = new \Slim\Route('/foo', function () {}); + + $property = new \ReflectionProperty($router, 'currentRoute'); + $property->setAccessible(true); + $property->setValue($router, $route); + + $this->assertSame($route, $router->getCurrentRoute()); + } + + /** + * Router should return first matching route if current route not set yet by iteration + */ + public function testGetCurrentRouteIfMatchedRoutes() + { + $router = new \Slim\Router(); + $route = new \Slim\Route('/foo', function () {}); + + $propertyMatchedRoutes = new \ReflectionProperty($router, 'matchedRoutes'); + $propertyMatchedRoutes->setAccessible(true); + $propertyMatchedRoutes->setValue($router, array($route)); + + $propertyCurrentRoute = new \ReflectionProperty($router, 'currentRoute'); + $propertyCurrentRoute->setAccessible(true); + $propertyCurrentRoute->setValue($router, null); + + $this->assertSame($route, $router->getCurrentRoute()); + } + + /** + * Router should return `null` if current route not set yet and there are no matching routes + */ + public function testGetCurrentRouteIfNoMatchedRoutes() + { + $router = new \Slim\Router(); + + $propertyMatchedRoutes = new \ReflectionProperty($router, 'matchedRoutes'); + $propertyMatchedRoutes->setAccessible(true); + $propertyMatchedRoutes->setValue($router, array()); + + $propertyCurrentRoute = new \ReflectionProperty($router, 'currentRoute'); + $propertyCurrentRoute->setAccessible(true); + $propertyCurrentRoute->setValue($router, null); + + $this->assertNull($router->getCurrentRoute()); + } + + public function testGetMatchedRoutes() + { + $router = new \Slim\Router(); + + $route1 = new \Slim\Route('/foo', function () {}); + $route1 = $route1->via('GET'); + + $route2 = new \Slim\Route('/foo', function () {}); + $route2 = $route2->via('POST'); + + $route3 = new \Slim\Route('/bar', function () {}); + $route3 = $route3->via('PUT'); + + $routes = new \ReflectionProperty($router, 'routes'); + $routes->setAccessible(true); + $routes->setValue($router, array($route1, $route2, $route3)); + + $matchedRoutes = $router->getMatchedRoutes('GET', '/foo'); + $this->assertSame($route1, $matchedRoutes[0]); + } + + // Test url for named route + + public function testUrlFor() + { + $router = new \Slim\Router(); + + $route1 = new \Slim\Route('/hello/:first/:last', function () {}); + $route1 = $route1->via('GET')->name('hello'); + + $route2 = new \Slim\Route('/path/(:foo\.:bar)', function () {}); + $route2 = $route2->via('GET')->name('regexRoute'); + + $routes = new \ReflectionProperty($router, 'namedRoutes'); + $routes->setAccessible(true); + $routes->setValue($router, array( + 'hello' => $route1, + 'regexRoute' => $route2 + )); + + $this->assertEquals('/hello/Josh/Lockhart', $router->urlFor('hello', array('first' => 'Josh', 'last' => 'Lockhart'))); + $this->assertEquals('/path/Hello.Josh', $router->urlFor('regexRoute', array('foo' => 'Hello', 'bar' => 'Josh'))); + } + + public function testUrlForIfNoSuchRoute() + { + $this->setExpectedException('RuntimeException'); + + $router = new \Slim\Router(); + $router->urlFor('foo', array('abc' => '123')); + } +} diff --git a/vendor/slim/slim/tests/SlimTest.php b/vendor/slim/slim/tests/SlimTest.php new file mode 100644 index 00000000..d661b4da --- /dev/null +++ b/vendor/slim/slim/tests/SlimTest.php @@ -0,0 +1,1657 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +//Mock custom view +class CustomView extends \Slim\View +{ + public function render($template, $data = null) { echo "Custom view"; } +} + +//Echo Logger +class EchoErrorLogger +{ + public function error($object) { echo get_class($object) .':'.$object->getMessage(); } +} + +//Mock extending class +class Derived extends \Slim\Slim +{ + public static function getDefaultSettings() + { + return array_merge( + array("late-static-binding" => true) + , parent::getDefaultSettings()); + } +} + +//Mock middleware +class CustomMiddleware extends \Slim\Middleware +{ + public function call() + { + $env = $this->app->environment(); + $res = $this->app->response(); + $env['slim.test'] = 'Hello'; + $this->next->call(); + $res->header('X-Slim-Test', 'Hello'); + $res->write('Hello'); + } +} + +class SlimTest extends PHPUnit_Framework_TestCase +{ + public function setUp() + { + //Remove environment mode if set + unset($_ENV['SLIM_MODE']); + + //Reset session + $_SESSION = array(); + + //Prepare default environment variables + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + 'QUERY_STRING' => 'one=foo&two=bar', + 'SERVER_NAME' => 'slimframework.com', + )); + } + + /************************************************ + * INSTANTIATION + ************************************************/ + + /** + * Test version constant is string + */ + public function testHasVersionConstant() + { + $this->assertTrue(is_string(\Slim\Slim::VERSION)); + } + + /** + * Test default instance properties + */ + public function testDefaultInstanceProperties() + { + $s = new \Slim\Slim(); + $this->assertInstanceOf('\Slim\Http\Request', $s->request()); + $this->assertInstanceOf('\Slim\Http\Response', $s->response()); + $this->assertInstanceOf('\Slim\Router', $s->router()); + $this->assertInstanceOf('\Slim\View', $s->view()); + $this->assertInstanceOf('\Slim\Log', $s->getLog()); + $this->assertEquals(\Slim\Log::DEBUG, $s->getLog()->getLevel()); + $this->assertTrue($s->getLog()->getEnabled()); + $this->assertInstanceOf('\Slim\Environment', $s->environment()); + } + + /** + * Test get default instance + */ + public function testGetDefaultInstance() + { + $s = new \Slim\Slim(); + $s->setName('default'); //We must do this manually since a default app is already set in prev tests + $this->assertEquals('default', $s->getName()); + $this->assertInstanceOf('\Slim\Slim', \Slim\Slim::getInstance()); + $this->assertSame($s, \Slim\Slim::getInstance()); + } + + /** + * Test get named instance + */ + public function testGetNamedInstance() + { + $s = new \Slim\Slim(); + $s->setName('foo'); + $this->assertSame($s, \Slim\Slim::getInstance('foo')); + } + + /** + * Test Slim autoloader ignores non-Slim classes + * + * Pre-conditions: + * Instantiate a non-Slim class; + * + * Post-conditions: + * Slim autoloader returns without requiring a class file; + */ + public function testSlimAutoloaderIgnoresNonSlimClass() + { + $foo = new Foo(); + } + + /************************************************ + * SETTINGS + ************************************************/ + + /** + * Test get setting that exists + */ + public function testGetSettingThatExists() + { + $s = new \Slim\Slim(); + $this->assertEquals('./templates', $s->config('templates.path')); + } + + /** + * Test get setting that does not exist + */ + public function testGetSettingThatDoesNotExist() + { + $s = new \Slim\Slim(); + $this->assertNull($s->config('foo')); + } + + /** + * Test set setting + */ + public function testSetSetting() + { + $s = new \Slim\Slim(); + $this->assertEquals('./templates', $s->config('templates.path')); + $s->config('templates.path', './tmpl'); + $this->assertEquals('./tmpl', $s->config('templates.path')); + } + + /** + * Test batch set settings + */ + public function testBatchSetSettings() + { + $s = new \Slim\Slim(); + $this->assertEquals('./templates', $s->config('templates.path')); + $this->assertTrue($s->config('debug')); + $s->config(array( + 'templates.path' => './tmpl', + 'debug' => false + )); + $this->assertEquals('./tmpl', $s->config('templates.path')); + $this->assertFalse($s->config('debug')); + } + + /** + * Test set settings recursively + */ + public function testSetSettingsRecursively() + { + $config = array( + 'my_module' => array( + 'paths' => array( + './my_module/path/1', + ), + ) + ); + + $s = new \Slim\Slim($config); + + $override = array( + 'my_module' => array( + 'paths' => array( + './my_module/path/2', + './my_module/path/3', + ), + ) + ); + + // Test recursive batch behaviour + $s->config($override, true); + + $expected = array( + 'paths' => array( + './my_module/path/1', + './my_module/path/2', + './my_module/path/3', + ), + ); + + $this->assertEquals($expected, $s->config('my_module')); + + // Test default batch behaviour + $s = new \Slim\Slim($config); + $s->config($override); + + $this->assertNotEquals($expected, $s->config('my_module')); + } + + /************************************************ + * MODES + ************************************************/ + + /** + * Test default mode + */ + public function testGetDefaultMode() + { + $s = new \Slim\Slim(); + $this->assertEquals('development', $s->getMode()); + } + + /** + * Test custom mode from environment + */ + public function testGetModeFromEnvironment() + { + $_ENV['SLIM_MODE'] = 'production'; + $s = new \Slim\Slim(); + $this->assertEquals('production', $s->getMode()); + } + + /** + * Test custom mode from app settings + */ + public function testGetModeFromSettings() + { + $s = new \Slim\Slim(array( + 'mode' => 'test' + )); + $this->assertEquals('test', $s->getMode()); + } + + /** + * Test mode configuration + */ + public function testModeConfiguration() + { + $flag = 0; + $configureTest = function () use (&$flag) { + $flag = 'test'; + }; + $configureProduction = function () use (&$flag) { + $flag = 'production'; + }; + $s = new \Slim\Slim(array('mode' => 'test')); + $s->configureMode('test', $configureTest); + $s->configureMode('production', $configureProduction); + $this->assertEquals('test', $flag); + } + + /** + * Test mode configuration when mode does not match + */ + public function testModeConfigurationWhenModeDoesNotMatch() + { + $flag = 0; + $configureTest = function () use (&$flag) { + $flag = 'test'; + }; + $s = new \Slim\Slim(array('mode' => 'production')); + $s->configureMode('test', $configureTest); + $this->assertEquals(0, $flag); + } + + /** + * Test mode configuration when not callable + */ + public function testModeConfigurationWhenNotCallable() + { + $flag = 0; + $s = new \Slim\Slim(array('mode' => 'production')); + $s->configureMode('production', 'foo'); + $this->assertEquals(0, $flag); + } + + /** + * Test custom mode from getenv() + */ + public function testGetModeFromGetEnv() + { + putenv('SLIM_MODE=production'); + $s = new \Slim\Slim(); + $this->assertEquals('production', $s->getMode()); + } + + /************************************************ + * ROUTING + ************************************************/ + + /** + * Test GENERIC route + */ + public function testGenericRoute() + { + $s = new \Slim\Slim(); + $callable = function () { echo "foo"; }; + $route = $s->map('/bar', $callable); + $this->assertInstanceOf('\Slim\Route', $route); + $this->assertEmpty($route->getHttpMethods()); + } + + /** + * Test GET routes also get mapped as a HEAD route + */ + public function testGetRouteIsAlsoMappedAsHead() + { + $s = new \Slim\Slim(); + $route = $s->get('/foo', function () {}); + $this->assertTrue($route->supportsHttpMethod(\Slim\Http\Request::METHOD_GET)); + $this->assertTrue($route->supportsHttpMethod(\Slim\Http\Request::METHOD_HEAD)); + } + + /** + * Test GET route + */ + public function testGetRoute() + { + $s = new \Slim\Slim(); + $mw1 = function () { echo "foo"; }; + $mw2 = function () { echo "bar"; }; + $callable = function () { echo "xyz"; }; + $route = $s->get('/bar', $mw1, $mw2, $callable); + $s->call(); + $this->assertEquals('foobarxyz', $s->response()->body()); + $this->assertEquals('/bar', $route->getPattern()); + $this->assertSame($callable, $route->getCallable()); + } + + /** + * Test POST route + */ + public function testPostRoute() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'POST', + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $mw1 = function () { echo "foo"; }; + $mw2 = function () { echo "bar"; }; + $callable = function () { echo "xyz"; }; + $route = $s->post('/bar', $mw1, $mw2, $callable); + $s->call(); + $this->assertEquals('foobarxyz', $s->response()->body()); + $this->assertEquals('/bar', $route->getPattern()); + $this->assertSame($callable, $route->getCallable()); + } + + /** + * Test PUT route + */ + public function testPutRoute() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'PUT', + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $mw1 = function () { echo "foo"; }; + $mw2 = function () { echo "bar"; }; + $callable = function () { echo "xyz"; }; + $route = $s->put('/bar', $mw1, $mw2, $callable); + $s->call(); + $this->assertEquals('foobarxyz', $s->response()->body()); + $this->assertEquals('/bar', $route->getPattern()); + $this->assertSame($callable, $route->getCallable()); + } + + /** + * Test PATCH route + */ + public function testPatchRoute() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'PATCH', + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $mw1 = function () { echo "foo"; }; + $mw2 = function () { echo "bar"; }; + $callable = function () { echo "xyz"; }; + $route = $s->patch('/bar', $mw1, $mw2, $callable); + $s->call(); + $this->assertEquals('foobarxyz', $s->response()->body()); + $this->assertEquals('/bar', $route->getPattern()); + $this->assertSame($callable, $route->getCallable()); + } + + /** + * Test DELETE route + */ + public function testDeleteRoute() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'DELETE', + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $mw1 = function () { echo "foo"; }; + $mw2 = function () { echo "bar"; }; + $callable = function () { echo "xyz"; }; + $route = $s->delete('/bar', $mw1, $mw2, $callable); + $s->call(); + $this->assertEquals('foobarxyz', $s->response()->body()); + $this->assertEquals('/bar', $route->getPattern()); + $this->assertSame($callable, $route->getCallable()); + } + + /** + * Test OPTIONS route + */ + public function testOptionsRoute() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'OPTIONS', + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $mw1 = function () { echo "foo"; }; + $mw2 = function () { echo "bar"; }; + $callable = function () { echo "xyz"; }; + $route = $s->options('/bar', $mw1, $mw2, $callable); + $s->call(); + $this->assertEquals('foobarxyz', $s->response()->body()); + $this->assertEquals('/bar', $route->getPattern()); + $this->assertSame($callable, $route->getCallable()); + } + + /** + * Test route groups + */ + public function testRouteGroups() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'GET', + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar/baz', //<-- Virtual' + )); + $s = new \Slim\Slim(); + $mw1 = function () { echo "foo"; }; + $mw2 = function () { echo "bar"; }; + $callable = function () { echo "xyz"; }; + $s->group('/bar', $mw1, function () use ($s, $mw2, $callable) { + $s->get('/baz', $mw2, $callable); + }); + $s->call(); + $this->assertEquals('foobarxyz', $s->response()->body()); + } + + /* + * Test ANY route + */ + public function testAnyRoute() + { + $mw1 = function () { echo "foo"; }; + $mw2 = function () { echo "bar"; }; + $callable = function () { echo "xyz"; }; + $methods = array('GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'); + foreach ($methods as $i => $method) { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => $method, + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $route = $s->any('/bar', $mw1, $mw2, $callable); + $s->call(); + $this->assertEquals('foobarxyz', $s->response()->body()); + $this->assertEquals('/bar', $route->getPattern()); + $this->assertSame($callable, $route->getCallable()); + } + } + + /** + * Test if route does NOT expect trailing slash and URL has one + */ + public function testRouteWithoutSlashAndUrlWithOne() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar/', //<-- Virtual + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () { echo "xyz"; }); + $s->call(); + $this->assertEquals(404, $s->response()->status()); + } + + /** + * Tests if route will match in case-insensitive manner if configured to do so + */ + public function testRouteMatchesInCaseInsensitiveMannerIfConfigured() + { + \Slim\Environment::mock(array( + 'PATH_INFO' => '/BaR', // Does not match route case + )); + $s = new \Slim\Slim(array('routes.case_sensitive' => false)); + $route = $s->get('/bar', function () { echo "xyz"; }); + $s->call(); + $this->assertEquals(200, $s->response()->status()); + $this->assertEquals('xyz', $s->response()->body()); + $this->assertEquals('/bar', $route->getPattern()); + } + + /** + * Test if route contains URL encoded characters + */ + public function testRouteWithUrlEncodedCharacters() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar/jo%20hn/smi%20th', //<-- Virtual + )); + $s = new \Slim\Slim(); + $s->get('/bar/:one/:two', function ($one, $two) { echo $one . $two; }); + $s->call(); + $this->assertEquals('jo hnsmi th', $s->response()->body()); + } + + /************************************************ + * VIEW + ************************************************/ + + /** + * Test set view with string class name + */ + public function testSetSlimViewFromString() + { + $s = new \Slim\Slim(); + $this->assertInstanceOf('\Slim\View', $s->view()); + $s->view('CustomView'); + $this->assertInstanceOf('CustomView', $s->view()); + } + + /** + * Test set view with object instance + */ + public function testSetSlimViewFromInstance() + { + $s = new \Slim\Slim(); + $this->assertInstanceOf('\Slim\View', $s->view()); + $s->view(new CustomView()); + $this->assertInstanceOf('CustomView', $s->view()); + } + + /** + * Test view data is transferred to newer view + */ + public function testViewDataTransfer() + { + $data = array('foo' => 'bar'); + $s = new \Slim\Slim(); + $s->view()->setData($data); + $s->view('CustomView'); + $this->assertSame($data, $s->view()->getData()); + } + + /************************************************ + * RENDERING + ************************************************/ + + /** + * Test template path is passed to view + */ + public function testViewGetsTemplatesPath() + { + $path = dirname(__FILE__) . '/templates'; + $s = new \Slim\Slim(array('templates.path' => $path)); + $this->assertEquals($s->view->getTemplatesDirectory(), $path); + } + + /** + * Test render with template and data + */ + public function testRenderTemplateWithData() + { + $s = new \Slim\Slim(array('templates.path' => dirname(__FILE__) . '/templates')); + $s->get('/bar', function () use ($s) { + $s->render('test.php', array('foo' => 'bar')); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertEquals(200, $status); + $this->assertEquals('test output bar', $body); + } + + /** + * Test render with template and data and status + */ + public function testRenderTemplateWithDataAndStatus() + { + $s = new \Slim\Slim(array('templates.path' => dirname(__FILE__) . '/templates')); + $s->get('/bar', function () use ($s) { + $s->render('test.php', array('foo' => 'bar'), 500); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertEquals(500, $status); + $this->assertEquals('test output bar', $body); + } + + /************************************************ + * LOG + ************************************************/ + + /** + * Test get log + * + * This asserts that a Slim app has a default Log + * upon instantiation. The Log itself is tested + * separately in another file. + */ + public function testGetLog() + { + $s = new \Slim\Slim(); + $this->assertInstanceOf('\Slim\Log', $s->getLog()); + } + + /************************************************ + * HTTP CACHING + ************************************************/ + + /** + * Test Last-Modified match + */ + public function testLastModifiedMatch() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'GET', + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + 'HTTP_IF_MODIFIED_SINCE' => 'Sun, 03 Oct 2010 21:00:52 GMT', + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->lastModified(1286139652); + }); + $s->call(); + $this->assertEquals(304, $s->response()->status()); + } + + /** + * Test Last-Modified match + */ + public function testLastModifiedDoesNotMatch() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + 'IF_MODIFIED_SINCE' => 'Sun, 03 Oct 2010 21:00:52 GMT', + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->lastModified(1286139250); + }); + $s->call(); + $this->assertEquals(200, $s->response()->status()); + } + + public function testLastModifiedOnlyAcceptsIntegers() + { + $this->setExpectedException('\InvalidArgumentException'); + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->lastModified('Test'); + }); + $s->call(); + } + + /** + * Test Last Modified header format + */ + public function testLastModifiedHeaderFormat() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->lastModified(1286139652); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertTrue(isset($header['Last-Modified'])); + $this->assertEquals('Sun, 03 Oct 2010 21:00:52 GMT', $header['Last-Modified']); + } + + /** + * Test ETag matches + */ + public function testEtagMatches() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + 'HTTP_IF_NONE_MATCH' => '"abc123"', + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->etag('abc123'); + }); + $s->call(); + $this->assertEquals(304, $s->response()->status()); + } + + /** + * Test ETag does not match + */ + public function testEtagDoesNotMatch() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + 'IF_NONE_MATCH' => '"abc1234"', + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->etag('abc123'); + }); + $s->call(); + $this->assertEquals(200, $s->response()->status()); + } + + /** + * Test ETag with invalid type + */ + public function testETagWithInvalidType() + { + $this->setExpectedException('\InvalidArgumentException'); + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + 'IF_NONE_MATCH' => '"abc1234"', + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->etag('123','foo'); + }); + $s->call(); + } + + /** + * Test Expires + */ + public function testExpiresAsString() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->expires('5 days'); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertTrue(isset($header['Expires'])); + + $this->assertEquals( + strtotime('5 days'), + strtotime($header['Expires']), + 1 // delta + ); + } + + /** + * Test Expires + */ + public function testExpiresAsInteger() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $fiveDaysFromNow = time() + (60 * 60 * 24 * 5); + $expectedDate = gmdate('D, d M Y H:i:s T', $fiveDaysFromNow); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s, $fiveDaysFromNow) { + $s->expires($fiveDaysFromNow); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertTrue(isset($header['Expires'])); + $this->assertEquals($header['Expires'], $expectedDate); + } + + /************************************************ + * COOKIES + ************************************************/ + + /** + * Set cookie + * + * This tests that the Slim application instance sets + * a cookie in the HTTP response header. This does NOT + * test the implementation of setting the cookie; that is + * tested in a separate file. + */ + public function testSetCookie() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->setCookie('foo', 'bar', '2 days'); + $s->setCookie('foo1', 'bar1', '2 days'); + }); + $s->call(); + $cookie1 = $s->response->cookies->get('foo'); + $cookie2 = $s->response->cookies->get('foo1'); + $this->assertEquals(2, count($s->response->cookies)); + $this->assertEquals('bar', $cookie1['value']); + $this->assertEquals('bar1', $cookie2['value']); + } + + /** + * Test get cookie + * + * This method ensures that the `Cookie:` HTTP request + * header is parsed if present, and made accessible via the + * Request object. + */ + public function testGetCookie() + { + \Slim\Environment::mock(array( + 'REQUEST_METHOD' => 'GET', + 'REMOTE_ADDR' => '127.0.0.1', + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + 'QUERY_STRING' => 'one=foo&two=bar', + 'SERVER_NAME' => 'slimframework.com', + 'SERVER_PORT' => 80, + 'HTTP_COOKIE' => 'foo=bar; foo2=bar2', + 'slim.url_scheme' => 'http', + 'slim.input' => '', + 'slim.errors' => @fopen('php://stderr', 'w') + )); + $s = new \Slim\Slim(); + $this->assertEquals('bar', $s->getCookie('foo')); + $this->assertEquals('bar2', $s->getCookie('foo2')); + } + + /** + * Test get cookie when cookie does not exist + */ + public function testGetCookieThatDoesNotExist() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + )); + $s = new \Slim\Slim(); + $this->assertNull($s->getCookie('foo')); + } + + /** + * Test delete cookie + * + * This method ensures that the `Set-Cookie:` HTTP response + * header is set. The implementation of setting the response + * cookie is tested separately in another file. + */ + public function testDeleteCookie() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/bar', //<-- Virtual + 'COOKIE' => 'foo=bar; foo2=bar2', + )); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->setCookie('foo', 'bar'); + $s->deleteCookie('foo'); + }); + $s->call(); + $cookie = $s->response->cookies->get('foo'); + $this->assertEquals(1, count($s->response->cookies)); + $this->assertEquals('', $cookie['value']); + $this->assertLessThan(time(), $cookie['expires']); + } + + /************************************************ + * HELPERS + ************************************************/ + + /** + * Test get filesystem path to Slim app root directory + */ + public function testGetRoot() + { + $_SERVER['DOCUMENT_ROOT'] = dirname(__FILE__); //<-- No trailing slash + $s = new \Slim\Slim(); + $this->assertEquals($_SERVER['DOCUMENT_ROOT'] . '/foo/', $s->root()); //<-- Appends physical app path with trailing slash + } + + /** + * Test stop + */ + public function testStop() + { + $this->setExpectedException('\Slim\Exception\Stop'); + $s = new \Slim\Slim(); + $s->stop(); + } + + /** + * Test stop with subsequent output + */ + public function testStopWithSubsequentOutput() + { + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + echo "Foo"; //<-- Should be in response body! + $s->stop(); + echo "Bar"; //<-- Should not be in response body! + }); + $s->call(); + $this->assertEquals('Foo', $s->response()->body()); + } + + /** + * Test stop with output buffer on and pre content + */ + public function testStopOutputWithOutputBufferingOnAndPreContent() + { + $this->expectOutputString('1.2.Foo.3'); //<-- PHP unit uses OB here + echo "1."; + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + echo "Foo"; + $s->stop(); + }); + echo "2."; + $s->run(); //<-- Needs to be run to actually echo body + echo ".3"; + } + + /** + * Test stop does not leave output buffers open + */ + public function testStopDoesNotLeaveOutputBuffersOpen() + { + $level_start = ob_get_level(); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->stop(); + }); + $s->run(); + $this->assertEquals($level_start, ob_get_level()); + } + + /** + * Test halt + */ + public function testHalt() + { + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + echo "Foo!"; //<-- Should not be in response body! + $s->halt(500, 'Something broke'); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertEquals(500, $status); + $this->assertEquals('Something broke', $body); + } + + /** + * Test halt with output buffering and pre content + */ + public function testHaltOutputWithOutputBufferingOnAndPreContent() + { + $this->expectOutputString('1.2.Something broke.3'); //<-- PHP unit uses OB here + echo "1."; + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + echo "Foo!"; //<-- Should not be in response body! + $s->halt(500, 'Something broke'); + }); + echo "2."; + $s->run(); + echo ".3"; + } + + /** + * Test halt does not leave output buffers open + */ + public function testHaltDoesNotLeaveOutputBuffersOpen() + { + $level_start = ob_get_level(); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->halt(500, ''); + }); + $s->run(); + $this->assertEquals($level_start, ob_get_level()); + } + + /** + * Test pass cleans buffer and throws exception + */ + public function testPass() + { + ob_start(); + $s = new \Slim\Slim(); + echo "Foo"; + try { + $s->pass(); + $this->fail('Did not catch Slim_Exception_Pass'); + } catch ( \Slim\Exception\Pass $e ) {} + $output = ob_get_clean(); + $this->assertEquals('', $output); + } + + /** + * Test pass when there is a subsequent fallback route + */ + public function testPassWithSubsequentRoute() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/name/Frank', //<-- Virtual + )); + $s = new \Slim\Slim(); + $s->get('/name/Frank', function () use ($s) { + echo "Fail"; //<-- Should not be in response body! + $s->pass(); + }); + $s->get('/name/:name', function ($name) { + echo $name; //<-- Should be in response body! + }); + $s->call(); + $this->assertEquals('Frank', $s->response()->body()); + } + + /** + * Test pass when there is not a subsequent fallback route + */ + public function testPassWithoutSubsequentRoute() + { + \Slim\Environment::mock(array( + 'SCRIPT_NAME' => '/foo', //<-- Physical + 'PATH_INFO' => '/name/Frank', //<-- Virtual + )); + $s = new \Slim\Slim(); + $s->get('/name/Frank', function () use ($s) { + echo "Fail"; //<-- Should not be in response body! + $s->pass(); + }); + $s->call(); + $this->assertEquals(404, $s->response()->status()); + } + + /** + * Test content type + */ + public function testContentType() + { + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->contentType('application/json'); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertEquals('application/json', $header['Content-Type']); + } + + /** + * Test status + */ + public function testStatus() + { + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->status(403); + }); + $s->call(); + $this->assertEquals(403, $s->response()->status()); + } + + /** + * Test URL for + */ + public function testSlimUrlFor() + { + $s = new \Slim\Slim(); + $s->get('/hello/:name', function () {})->name('hello'); + $this->assertEquals('/foo/hello/Josh', $s->urlFor('hello', array('name' => 'Josh'))); //<-- Prepends physical path! + } + + /** + * Test redirect sets status and header + */ + public function testRedirect() + { + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + echo "Foo"; //<-- Should not be in response body! + $s->redirect('/somewhere/else', 303); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertEquals(303, $status); + $this->assertEquals('/somewhere/else', $header['Location']); + $this->assertEquals('', $body); + } + + /************************************************ + * RUNNER + ************************************************/ + + /** + * Test that runner sends headers and body + */ + public function testRun() + { + $this->expectOutputString('Foo'); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + echo "Foo"; + }); + $s->run(); + } + + /** + * Test runner output with output buffering on and pre content + */ + public function testRunOutputWithOutputBufferingOnAndPreContent() + { + $this->expectOutputString('1.2.Foo.3'); //<-- PHP unit uses OB here + $s = new \Slim\Slim(); + echo "1."; + $s->get('/bar', function () use ($s) { + echo "Foo"; + }); + echo "2."; + $s->run(); + echo ".3"; + } + + /** + * Test that runner does not leave output buffers open + */ + public function testRunDoesNotLeaveAnyOutputBuffersOpen() + { + $level_start = ob_get_level(); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) {}); + $s->run(); + $this->assertEquals($level_start, ob_get_level()); + } + + /************************************************ + * MIDDLEWARE + ************************************************/ + + /** + * Test add middleware + * + * This asserts that middleware are queued and called + * in sequence. This also asserts that the environment + * variables are passed by reference. + */ + public function testAddMiddleware() + { + $this->expectOutputString('FooHello'); + $s = new \Slim\Slim(); + $s->add(new CustomMiddleware()); //<-- See top of this file for class definition + $s->get('/bar', function () { + echo 'Foo'; + }); + $s->run(); + $this->assertEquals('Hello', $s->response()->header('X-Slim-Test')); + } + + /** + * Test exception when adding circular middleware queues + * + * This asserts that the same middleware can NOT be queued twice (usually by accident). + * Circular middleware stack causes a troublesome to debug PHP Fatal error: + * + * > Fatal error: Maximum function nesting level of '100' reached. aborting! + */ + public function testFailureWhenAddingCircularMiddleware() + { + $this->setExpectedException('\RuntimeException'); + $middleware = new CustomMiddleware; + $s = new \Slim\Slim; + $s->add($middleware); + $s->add(new CustomMiddleware); + $s->add($middleware); + $s->run(); + } + + /************************************************ + * FLASH MESSAGING + ************************************************/ + + public function testSetFlashForNextRequest() + { + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->flash('info', 'bar'); + }); + $this->assertFalse(isset($_SESSION['slim.flash'])); + $s->run(); + $this->assertEquals('bar', $_SESSION['slim.flash']['info']); + } + + public function testSetFlashForCurrentRequest() + { + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->flashNow('info', 'bar'); + }); + $s->run(); + $env = $s->environment(); + $this->assertEquals('bar', $env['slim.flash']['info']); + } + + public function testKeepFlashForNextRequest() + { + $_SESSION['slim.flash'] = array('info' => 'Foo'); + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->flashKeep(); + }); + $s->run(); + $this->assertEquals('Foo', $_SESSION['slim.flash']['info']); + } + + public function testFlashData() + { + $s = new \Slim\Slim(); + $s->get('/bar', function () use ($s) { + $s->flashNow('info', 'bar'); + }); + $s->run(); + $this->assertEquals(array('info' => 'bar'), $s->flashData()); + } + + /************************************************ + * NOT FOUND HANDLING + ************************************************/ + + /** + * Test custom Not Found handler + */ + public function testNotFound() + { + $s = new \Slim\Slim(); + $s->notFound(function () { + echo "Not Found"; + }); + $s->get('/foo', function () {}); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertEquals(404, $status); + $this->assertEquals('Not Found', $body); + } + + /************************************************ + * ERROR HANDLING + ************************************************/ + + /** + * Test default and custom error handlers + * + * Pre-conditions: + * Invoked app route calls default error handler; + * + * Post-conditions: + * Response status code is 500; + */ + public function testSlimError() + { + $s = new \Slim\Slim(array( + "log.enabled" => false + )); + $s->get('/bar', function () use ($s) { + $s->error(); + }); + $s->call(); + $this->assertEquals(500, $s->response()->status()); + } + + /** + * Test default error handler logs the error when debug is false. + * + * Pre-conditions: + * Invoked app route calls default error handler; + * + * Post-conditions: + * Error log is called + */ + public function testDefaultHandlerLogsTheErrorWhenDebugIsFalse() + { + $s = new \Slim\Slim(array('debug' => false)); + $s->container->singleton('log', function ($c) { + return new EchoErrorLogger(); + }); + $s->get('/bar', function () use ($s) { + throw new \InvalidArgumentException('my specific error message'); + }); + + ob_start(); + $s->run(); + $output = ob_get_clean(); + $this->assertTrue(strpos($output, 'InvalidArgumentException:my specific error message') !== false); + } + + /** + * Test triggered errors are converted to ErrorExceptions + * + * Pre-conditions: + * Custom error handler defined; + * Invoked app route triggers error; + * + * Post-conditions: + * Response status is 500; + * Response body is equal to triggered error message; + * Error handler's argument is ErrorException instance; + */ + public function DISABLEDtestTriggeredErrorsAreConvertedToErrorExceptions() + { + $s = new \Slim\Slim(array( + 'debug' => false + )); + $s->error(function ( $e ) { + if ($e instanceof \ErrorException) { + echo $e->getMessage(); + } + }); + $s->get('/bar', function () { + trigger_error('Foo I say!'); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertEquals(500, $status); + $this->assertEquals('Foo I say!', $body); + } + + /** + * Test error triggered with multiple applications + * + * Pre-conditions: + * Multiple Slim apps are instantiated; + * Both apps are run; + * One app returns 200 OK; + * One app triggers an error; + * + * Post-conditions: + * One app returns 200 OK with no Exceptions; + * One app returns 500 Error; + * Error triggered does not affect other app; + */ + public function testErrorWithMultipleApps() + { + $s1 = new \Slim\Slim(array( + 'debug' => false, + 'log.enabled' => false + )); + $s2 = new \Slim\Slim(); + $s1->get('/bar', function () use ($s1) { + $s1->error(); + }); + $s2->get('/bar', function () { + echo 'success'; + }); + $s1->call(); + $s2->call(); + $this->assertEquals(500, $s1->response()->status()); + $this->assertEquals(200, $s2->response()->status()); + } + + /** + * Test custom error handler uses existing Response object + */ + public function testErrorHandlerUsesCurrentResponseObject() + { + $s = new \Slim\Slim(array( + 'debug' => false + )); + $s->error(function ( \Exception $e ) use ($s) { + $r = $s->response(); + $r->status(503); + $r->write('Foo'); + $r['X-Powered-By'] = 'Slim'; + echo 'Bar'; + }); + $s->get('/bar', function () { + throw new \Exception('Foo'); + }); + $s->call(); + list($status, $header, $body) = $s->response()->finalize(); + $this->assertEquals(503, $status); + $this->assertEquals('FooBar', $body); + $this->assertEquals('Slim', $header['X-Powered-By']); + } + + /** + * Test custom global error handler + */ + public function testHandleErrors() + { + $defaultErrorReporting = error_reporting(); + + // Test 1 + error_reporting(E_ALL ^ E_NOTICE); // <-- Report all errors EXCEPT notices + try { + \Slim\Slim::handleErrors(E_NOTICE, 'test error', 'Slim.php', 119); + } catch (\ErrorException $e) { + $this->fail('Slim::handleErrors reported a disabled error level.'); + } + + // Test 2 + error_reporting(E_ALL | E_STRICT); // <-- Report all errors, including E_STRICT + try { + \Slim\Slim::handleErrors(E_STRICT, 'test error', 'Slim.php', 119); + $this->fail('Slim::handleErrors didn\'t report a enabled error level'); + } catch (\ErrorException $e) {} + + error_reporting($defaultErrorReporting); + } + + /** + * Slim should keep reference to a callable error callback + */ + public function testErrorHandler() { + $s = new \Slim\Slim(); + $errCallback = function () { echo "404"; }; + $s->error($errCallback); + $this->assertSame($errCallback, PHPUnit_Framework_Assert::readAttribute($s, 'error')); + } + + /** + * Slim should throw a Slim_Exception_Stop if error callback is not callable + */ + public function testErrorHandlerIfNotCallable() { + $this->setExpectedException('\Slim\Exception\Stop'); + $s = new \Slim\Slim(array("log.enabled" => false)); + $errCallback = 'foo'; + $s->error($errCallback); + } + + /** + * Slim should keep reference to a callable NotFound callback + */ + public function testNotFoundHandler() { + $s = new \Slim\Slim(); + $notFoundCallback = function () { echo "404"; }; + $s->notFound($notFoundCallback); + $this->assertSame($notFoundCallback, PHPUnit_Framework_Assert::readAttribute($s, 'notFound')); + } + + /** + * Slim should throw a Slim_Exception_Stop if NotFound callback is not callable + */ + public function testNotFoundHandlerIfNotCallable() { + $this->setExpectedException('\Slim\Exception\Stop'); + $s = new \Slim\Slim(); + $notFoundCallback = 'foo'; + $s->notFound($notFoundCallback); + } + + /************************************************ + * HOOKS + ************************************************/ + + /** + * Test hook listener + * + * Pre-conditions: + * Slim app instantiated; + * Hook name does not exist; + * Listeners are callable objects; + * + * Post-conditions: + * Callables are invoked in expected order; + */ + public function testRegistersAndCallsHooksByPriority() + { + $this->expectOutputString('barfoo'); + $app = new \Slim\Slim(); + $callable1 = function () { echo "foo"; }; + $callable2 = function () { echo "bar"; }; + $app->hook('test.hook.one', $callable1); //default is 10 + $app->hook('test.hook.one', $callable2, 8); + $hooks = $app->getHooks(); + $this->assertEquals(7, count($hooks)); //6 default, 1 custom + $app->applyHook('test.hook.one'); + } + + /** + * Test hook listener if listener is not callable + * + * Pre-conditions: + * Slim app instantiated; + * Hook name does not exist; + * Listener is NOT a callable object; + * + * Post-conditions: + * Hook is created; + * Callable is NOT assigned to hook; + */ + public function testHookInvalidCallable() + { + $app = new \Slim\Slim(); + $callable = 'test'; //NOT callable + $app->hook('test.hook.one', $callable); + $this->assertEquals(array(array()), $app->getHooks('test.hook.one')); + } + + /** + * Test hook invocation if hook does not exist + * + * Pre-conditions: + * Slim app instantiated; + * Hook name does not exist; + * + * Post-conditions: + * Hook is created; + * Hook initialized with empty array; + */ + public function testHookInvocationIfNotExists() + { + $app = new \Slim\Slim(); + $app->applyHook('test.hook.one'); + $this->assertEquals(array(array()), $app->getHooks('test.hook.one')); + } + + /** + * Test clear hooks + * + * Pre-conditions: + * Slim app instantiated; + * Two hooks exist, each with one listener; + * + * Post-conditions: + * Case A: Listeners for 'test.hook.one' are cleared; + * Case B: Listeners for all hooks are cleared; + */ + public function testHookClear() + { + $app = new \Slim\Slim(); + $app->hook('test.hook.one', function () {}); + $app->hook('test.hook.two', function () {}); + $app->clearHooks('test.hook.two'); + $this->assertEquals(array(array()), $app->getHooks('test.hook.two')); + $hookOne = $app->getHooks('test.hook.one'); + $this->assertTrue(count($hookOne[10]) === 1); + $app->clearHooks(); + $this->assertEquals(array(array()), $app->getHooks('test.hook.one')); + } + + /** + * Test hooks accept multiple arguments + * + * Pre-conditions: + * Slim app instantiated; + * Hook name does not exist; + * Listener is a callable object; + * + * Post-conditions: + * Callable invoked with 2 arguments + */ + public function testHooksMultipleArguments() + { + $testArgA = 'argumentA'; + $testArgB = 'argumentB'; + + $this->expectOutputString($testArgA . $testArgB); + + $app = new \Slim\Slim(); + + $app->hook('test.hook.one', function ($argA, $argB) { + echo $argA . $argB; + }); + $app->applyHook('test.hook.one', $testArgA, $testArgB); + } + + /** + * Test late static binding + * + * Pre-conditions: + * Slim app is extended by Derived class and instantiated; + * Derived class overrides the 'getDefaultSettings' function and adds an extra default config value + * Test that the new config value exists + * + * Post-conditions: + * Config value exists and is equal to expected value + */ + public function testDerivedClassCanOverrideStaticFunction() + { + $app = new Derived(); + $this->assertEquals($app->config("late-static-binding"), true); + } +} diff --git a/vendor/slim/slim/tests/ViewTest.php b/vendor/slim/slim/tests/ViewTest.php new file mode 100644 index 00000000..5d84b8bd --- /dev/null +++ b/vendor/slim/slim/tests/ViewTest.php @@ -0,0 +1,199 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.6.1 + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +class ViewTest extends PHPUnit_Framework_TestCase +{ + public function testGetDataAll() + { + $view = new \Slim\View(); + $prop = new \ReflectionProperty($view, 'data'); + $prop->setAccessible(true); + $prop->setValue($view, new \Slim\Helper\Set(array('foo' => 'bar'))); + + $this->assertSame(array('foo' => 'bar'), $view->getData()); + } + + public function testGetDataKeyExists() + { + $view = new \Slim\View(); + $prop = new \ReflectionProperty($view, 'data'); + $prop->setAccessible(true); + $prop->setValue($view, new \Slim\Helper\Set(array('foo' => 'bar'))); + + $this->assertEquals('bar', $view->getData('foo')); + } + + public function testGetDataKeyNotExists() + { + $view = new \Slim\View(); + $prop = new \ReflectionProperty($view, 'data'); + $prop->setAccessible(true); + $prop->setValue($view, new \Slim\Helper\Set(array('foo' => 'bar'))); + + $this->assertNull($view->getData('abc')); + } + + public function testSetDataKeyValue() + { + $view = new \Slim\View(); + $prop = new \ReflectionProperty($view, 'data'); + $prop->setAccessible(true); + $view->setData('foo', 'bar'); + + $this->assertEquals(array('foo' => 'bar'), $prop->getValue($view)->all()); + } + + public function testSetDataKeyValueAsClosure() + { + $view = new \Slim\View(); + $prop = new \ReflectionProperty($view, 'data'); + $prop->setAccessible(true); + + $view->setData('fooClosure', function () { + return 'foo'; + }); + + $value = $prop->getValue($view)->get('fooClosure'); + $this->assertInstanceOf('Closure', $value); + $this->assertEquals('foo', $value()); + } + + public function testSetDataArray() + { + $view = new \Slim\View(); + $prop = new \ReflectionProperty($view, 'data'); + $prop->setAccessible(true); + $view->setData(array('foo' => 'bar')); + + $this->assertEquals(array('foo' => 'bar'), $prop->getValue($view)->all()); + } + + public function testSetDataInvalidArgument() + { + $this->setExpectedException('InvalidArgumentException'); + + $view = new \Slim\View(); + $view->setData('foo'); + } + + public function testAppendData() + { + $view = new \Slim\View(); + $prop = new \ReflectionProperty($view, 'data'); + $prop->setAccessible(true); + $view->appendData(array('foo' => 'bar')); + + $this->assertEquals(array('foo' => 'bar'), $prop->getValue($view)->all()); + } + + public function testLocalData() + { + $view = new \Slim\View(); + $prop1 = new \ReflectionProperty($view, 'data'); + $prop1->setAccessible(true); + $prop1->setValue($view, new \Slim\Helper\Set(array('foo' => 'bar'))); + + $prop2 = new \ReflectionProperty($view, 'templatesDirectory'); + $prop2->setAccessible(true); + $prop2->setValue($view, dirname(__FILE__) . '/templates'); + + $output = $view->fetch('test.php', array('foo' => 'baz')); + $this->assertEquals('test output baz', $output); + } + + public function testAppendDataOverwrite() + { + $view = new \Slim\View(); + $prop = new \ReflectionProperty($view, 'data'); + $prop->setAccessible(true); + $prop->setValue($view, new \Slim\Helper\Set(array('foo' => 'bar'))); + $view->appendData(array('foo' => '123')); + + $this->assertEquals(array('foo' => '123'), $prop->getValue($view)->all()); + } + + public function testAppendDataInvalidArgument() + { + $this->setExpectedException('InvalidArgumentException'); + + $view = new \Slim\View(); + $view->appendData('foo'); + } + + public function testGetTemplatesDirectory() + { + $view = new \Slim\View(); + $property = new \ReflectionProperty($view, 'templatesDirectory'); + $property->setAccessible(true); + $property->setValue($view, 'templates'); + + $this->assertEquals('templates', $view->getTemplatesDirectory()); + } + + public function testSetTemplatesDirectory() + { + $view = new \Slim\View(); + $directory = 'templates' . DIRECTORY_SEPARATOR; + $view->setTemplatesDirectory($directory); // <-- Should strip trailing slash + + $this->assertAttributeEquals('templates', 'templatesDirectory', $view); + } + + public function testDisplay() + { + $this->expectOutputString('test output bar'); + + $view = new \Slim\View(); + $prop1 = new \ReflectionProperty($view, 'data'); + $prop1->setAccessible(true); + $prop1->setValue($view, new \Slim\Helper\Set(array('foo' => 'bar'))); + + $prop2 = new \ReflectionProperty($view, 'templatesDirectory'); + $prop2->setAccessible(true); + $prop2->setValue($view, dirname(__FILE__) . '/templates'); + + $view->display('test.php'); + } + + public function testDisplayTemplateThatDoesNotExist() + { + $this->setExpectedException('\RuntimeException'); + + $view = new \Slim\View(); + + $prop2 = new \ReflectionProperty($view, 'templatesDirectory'); + $prop2->setAccessible(true); + $prop2->setValue($view, dirname(__FILE__) . '/templates'); + + $view->display('foo.php'); + } +} diff --git a/vendor/slim/slim/tests/bootstrap.php b/vendor/slim/slim/tests/bootstrap.php new file mode 100644 index 00000000..c2533500 --- /dev/null +++ b/vendor/slim/slim/tests/bootstrap.php @@ -0,0 +1,22 @@ + From 7352db45b755ee0361abe4f2732603fc39786d11 Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 01:06:14 +0200 Subject: [PATCH 281/353] Controller and model folders into /app --- {controller => app/controller}/admin/bans.php | 4 +- .../controller}/admin/categories.php | 4 +- .../controller}/admin/censoring.php | 4 +- .../controller}/admin/forums.php | 6 +- .../controller}/admin/groups.php | 4 +- .../controller}/admin/index.php | 2 +- .../controller}/admin/maintenance.php | 4 +- .../controller}/admin/options.php | 4 +- .../controller}/admin/parser.php | 4 +- .../controller}/admin/permissions.php | 4 +- .../controller}/admin/plugins.php | 2 +- .../controller}/admin/reports.php | 4 +- .../controller}/admin/statistics.php | 4 +- .../controller}/admin/users.php | 4 +- {controller => app/controller}/auth.php | 2 +- {controller => app/controller}/delete.php | 4 +- {controller => app/controller}/edit.php | 4 +- {controller => app/controller}/help.php | 2 +- {controller => app/controller}/index.php | 4 +- {controller => app/controller}/install.php | 4 +- {controller => app/controller}/login.php | 4 +- {controller => app/controller}/misc.php | 4 +- {controller => app/controller}/moderate.php | 4 +- {controller => app/controller}/post.php | 4 +- {controller => app/controller}/profile.php | 4 +- {controller => app/controller}/register.php | 4 +- {controller => app/controller}/search.php | 4 +- {controller => app/controller}/userlist.php | 4 +- {controller => app/controller}/viewforum.php | 4 +- {controller => app/controller}/viewtopic.php | 4 +- {model => app/model}/admin/bans.php | 2 +- {model => app/model}/admin/categories.php | 4 +- {model => app/model}/admin/censoring.php | 2 +- {model => app/model}/admin/forums.php | 4 +- {model => app/model}/admin/groups.php | 2 +- {model => app/model}/admin/maintenance.php | 2 +- {model => app/model}/admin/options.php | 2 +- {model => app/model}/admin/parser.php | 2 +- {model => app/model}/admin/permissions.php | 2 +- {model => app/model}/admin/reports.php | 2 +- {model => app/model}/admin/statistics.php | 2 +- {model => app/model}/admin/users.php | 2 +- {model => app/model}/auth.php | 2 +- {model => app/model}/cache.php | 2 +- {model => app/model}/debug.php | 2 +- {model => app/model}/delete.php | 2 +- {model => app/model}/edit.php | 2 +- {model => app/model}/header.php | 2 +- {model => app/model}/index.php | 4 +- {model => app/model}/install.php | 2 +- {model => app/model}/login.php | 4 +- {model => app/model}/misc.php | 2 +- {model => app/model}/moderate.php | 2 +- {model => app/model}/post.php | 2 +- {model => app/model}/profile.php | 4 +- {model => app/model}/register.php | 4 +- {model => app/model}/search.php | 2 +- {model => app/model}/userlist.php | 2 +- {model => app/model}/viewforum.php | 2 +- {model => app/model}/viewtopic.php | 2 +- include/routes.php | 138 +++++++++--------- index.php | 1 - 62 files changed, 162 insertions(+), 163 deletions(-) rename {controller => app/controller}/admin/bans.php (97%) rename {controller => app/controller}/admin/categories.php (97%) rename {controller => app/controller}/admin/censoring.php (95%) rename {controller => app/controller}/admin/forums.php (98%) rename {controller => app/controller}/admin/groups.php (98%) rename {controller => app/controller}/admin/index.php (98%) rename {controller => app/controller}/admin/maintenance.php (96%) rename {controller => app/controller}/admin/options.php (94%) rename {controller => app/controller}/admin/parser.php (99%) rename {controller => app/controller}/admin/permissions.php (93%) rename {controller => app/controller}/admin/plugins.php (99%) rename {controller => app/controller}/admin/reports.php (94%) rename {controller => app/controller}/admin/statistics.php (95%) rename {controller => app/controller}/admin/users.php (99%) rename {controller => app/controller}/auth.php (99%) rename {controller => app/controller}/delete.php (97%) rename {controller => app/controller}/edit.php (98%) rename {controller => app/controller}/help.php (97%) rename {controller => app/controller}/index.php (94%) rename {controller => app/controller}/install.php (99%) rename {controller => app/controller}/login.php (97%) rename {controller => app/controller}/misc.php (98%) rename {controller => app/controller}/moderate.php (99%) rename {controller => app/controller}/post.php (99%) rename {controller => app/controller}/profile.php (99%) rename {controller => app/controller}/register.php (98%) rename {controller => app/controller}/search.php (97%) rename {controller => app/controller}/userlist.php (97%) rename {controller => app/controller}/viewforum.php (98%) rename {controller => app/controller}/viewtopic.php (98%) rename {model => app/model}/admin/bans.php (99%) rename {model => app/model}/admin/categories.php (97%) rename {model => app/model}/admin/censoring.php (99%) rename {model => app/model}/admin/forums.php (98%) rename {model => app/model}/admin/groups.php (99%) rename {model => app/model}/admin/maintenance.php (99%) rename {model => app/model}/admin/options.php (99%) rename {model => app/model}/admin/parser.php (97%) rename {model => app/model}/admin/permissions.php (98%) rename {model => app/model}/admin/reports.php (99%) rename {model => app/model}/admin/statistics.php (99%) rename {model => app/model}/admin/users.php (99%) rename {model => app/model}/auth.php (99%) rename {model => app/model}/cache.php (99%) rename {model => app/model}/debug.php (98%) rename {model => app/model}/delete.php (99%) rename {model => app/model}/edit.php (99%) rename {model => app/model}/header.php (96%) rename {model => app/model}/index.php (99%) rename {model => app/model}/install.php (99%) rename {model => app/model}/login.php (99%) rename {model => app/model}/misc.php (99%) rename {model => app/model}/moderate.php (99%) rename {model => app/model}/post.php (99%) rename {model => app/model}/profile.php (99%) rename {model => app/model}/register.php (99%) rename {model => app/model}/search.php (99%) rename {model => app/model}/userlist.php (99%) rename {model => app/model}/viewforum.php (99%) rename {model => app/model}/viewtopic.php (99%) diff --git a/controller/admin/bans.php b/app/controller/admin/bans.php similarity index 97% rename from controller/admin/bans.php rename to app/controller/admin/bans.php index 6423631f..75985312 100644 --- a/controller/admin/bans.php +++ b/app/controller/admin/bans.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class bans { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\bans(); + $this->model = new \app\model\admin\bans(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/bans.mo'); if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { diff --git a/controller/admin/categories.php b/app/controller/admin/categories.php similarity index 97% rename from controller/admin/categories.php rename to app/controller/admin/categories.php index affa990b..d1d4b3ba 100644 --- a/controller/admin/categories.php +++ b/app/controller/admin/categories.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher. */ -namespace controller\admin; +namespace app\controller\admin; class categories { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\categories(); + $this->model = new \app\model\admin\categories(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/categories.mo'); } diff --git a/controller/admin/censoring.php b/app/controller/admin/censoring.php similarity index 95% rename from controller/admin/censoring.php rename to app/controller/admin/censoring.php index 396c4089..8bc50123 100644 --- a/controller/admin/censoring.php +++ b/app/controller/admin/censoring.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class censoring { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\censoring(); + $this->model = new \app\model\admin\censoring(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/censoring.mo'); } diff --git a/controller/admin/forums.php b/app/controller/admin/forums.php similarity index 98% rename from controller/admin/forums.php rename to app/controller/admin/forums.php index 425a857f..2a60d5b6 100644 --- a/controller/admin/forums.php +++ b/app/controller/admin/forums.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class forums { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\forums(); + $this->model = new \app\model\admin\forums(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/forums.mo'); } @@ -173,7 +173,7 @@ public function display() \FeatherBB\AdminUtils::generateAdminMenu('forums'); - $categories_model = new \model\admin\categories(); + $categories_model = new \app\model\admin\categories(); $this->feather->view2->setPageInfo(array( 'title' => array($this->feather->utils->escape($this->config['o_board_title']), __('Admin'), __('Forums')), 'active_page' => 'admin', diff --git a/controller/admin/groups.php b/app/controller/admin/groups.php similarity index 98% rename from controller/admin/groups.php rename to app/controller/admin/groups.php index bd5e75f8..8e4bf3c8 100644 --- a/controller/admin/groups.php +++ b/app/controller/admin/groups.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class groups { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\groups(); + $this->model = new \app\model\admin\groups(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/groups.mo'); } diff --git a/controller/admin/index.php b/app/controller/admin/index.php similarity index 98% rename from controller/admin/index.php rename to app/controller/admin/index.php index 74dbfa95..86f10359 100644 --- a/controller/admin/index.php +++ b/app/controller/admin/index.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class index { diff --git a/controller/admin/maintenance.php b/app/controller/admin/maintenance.php similarity index 96% rename from controller/admin/maintenance.php rename to app/controller/admin/maintenance.php index 21762614..e818ccc7 100644 --- a/controller/admin/maintenance.php +++ b/app/controller/admin/maintenance.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class maintenance { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \model\admin\maintenance(); + $this->model = new \app\model\admin\maintenance(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/admin/maintenance.mo'); } diff --git a/controller/admin/options.php b/app/controller/admin/options.php similarity index 94% rename from controller/admin/options.php rename to app/controller/admin/options.php index bc9091dd..968261dc 100644 --- a/controller/admin/options.php +++ b/app/controller/admin/options.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class options { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\options(); + $this->model = new \app\model\admin\options(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/options.mo'); } diff --git a/controller/admin/parser.php b/app/controller/admin/parser.php similarity index 99% rename from controller/admin/parser.php rename to app/controller/admin/parser.php index c086b3e7..b58a7fc5 100644 --- a/controller/admin/parser.php +++ b/app/controller/admin/parser.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class parser { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\parser(); + $this->model = new \app\model\admin\parser(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/parser.mo'); } diff --git a/controller/admin/permissions.php b/app/controller/admin/permissions.php similarity index 93% rename from controller/admin/permissions.php rename to app/controller/admin/permissions.php index e54c86ab..523c0f80 100644 --- a/controller/admin/permissions.php +++ b/app/controller/admin/permissions.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class permissions { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\permissions(); + $this->model = new \app\model\admin\permissions(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/permissions.mo'); } diff --git a/controller/admin/plugins.php b/app/controller/admin/plugins.php similarity index 99% rename from controller/admin/plugins.php rename to app/controller/admin/plugins.php index c38a1ef2..bb44a4b3 100644 --- a/controller/admin/plugins.php +++ b/app/controller/admin/plugins.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class plugins { diff --git a/controller/admin/reports.php b/app/controller/admin/reports.php similarity index 94% rename from controller/admin/reports.php rename to app/controller/admin/reports.php index d1d95586..8e8fd555 100644 --- a/controller/admin/reports.php +++ b/app/controller/admin/reports.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; use FeatherBB\AdminUtils; @@ -20,7 +20,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\reports(); + $this->model = new \app\model\admin\reports(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/reports.mo'); } diff --git a/controller/admin/statistics.php b/app/controller/admin/statistics.php similarity index 95% rename from controller/admin/statistics.php rename to app/controller/admin/statistics.php index 382ec3cc..6ac24ca5 100644 --- a/controller/admin/statistics.php +++ b/app/controller/admin/statistics.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class statistics { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\statistics(); + $this->model = new \app\model\admin\statistics(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/index.mo'); } diff --git a/controller/admin/users.php b/app/controller/admin/users.php similarity index 99% rename from controller/admin/users.php rename to app/controller/admin/users.php index ce6be2ec..870949bc 100644 --- a/controller/admin/users.php +++ b/app/controller/admin/users.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller\admin; +namespace app\controller\admin; class users { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\admin\users(); + $this->model = new \app\model\admin\users(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/users.mo'); } diff --git a/controller/auth.php b/app/controller/auth.php similarity index 99% rename from controller/auth.php rename to app/controller/auth.php index cde81fbc..6fc9d9ce 100644 --- a/controller/auth.php +++ b/app/controller/auth.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; use DB; class auth { diff --git a/controller/delete.php b/app/controller/delete.php similarity index 97% rename from controller/delete.php rename to app/controller/delete.php index c7b5b111..14319516 100644 --- a/controller/delete.php +++ b/app/controller/delete.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class delete { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \model\delete(); + $this->model = new \app\model\delete(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/delete.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); } diff --git a/controller/edit.php b/app/controller/edit.php similarity index 98% rename from controller/edit.php rename to app/controller/edit.php index 71d671e9..91dc6662 100644 --- a/controller/edit.php +++ b/app/controller/edit.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class edit { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\edit(); + $this->model = new \app\model\edit(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/post.mo'); diff --git a/controller/help.php b/app/controller/help.php similarity index 97% rename from controller/help.php rename to app/controller/help.php index ade00b45..ab6d423a 100644 --- a/controller/help.php +++ b/app/controller/help.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class help { diff --git a/controller/index.php b/app/controller/index.php similarity index 94% rename from controller/index.php rename to app/controller/index.php index 4bf1b867..e3f4cf5d 100644 --- a/controller/index.php +++ b/app/controller/index.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class index { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \model\index(); + $this->model = new \app\model\index(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/index.mo'); } diff --git a/controller/install.php b/app/controller/install.php similarity index 99% rename from controller/install.php rename to app/controller/install.php index 0df7f051..d3c0b347 100644 --- a/controller/install.php +++ b/app/controller/install.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class install { @@ -26,7 +26,7 @@ class install public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \model\install(); + $this->model = new \app\model\install(); $this->available_langs = \FeatherBB\Lister::getLangs(); $this->feather->view2->setStyle('FeatherBB'); } diff --git a/controller/login.php b/app/controller/login.php similarity index 97% rename from controller/login.php rename to app/controller/login.php index 0c101c1d..68641f7c 100644 --- a/controller/login.php +++ b/app/controller/login.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class login { @@ -20,7 +20,7 @@ public function __construct() $this->request = $this->feather->request; - $this->model = new \model\login(); + $this->model = new \app\model\login(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/login.mo'); } diff --git a/controller/misc.php b/app/controller/misc.php similarity index 98% rename from controller/misc.php rename to app/controller/misc.php index eb598ba1..d6c71a97 100644 --- a/controller/misc.php +++ b/app/controller/misc.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class misc { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \model\misc(); + $this->model = new \app\model\misc(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/register.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/misc.mo'); } diff --git a/controller/moderate.php b/app/controller/moderate.php similarity index 99% rename from controller/moderate.php rename to app/controller/moderate.php index a090451d..43d84b61 100644 --- a/controller/moderate.php +++ b/app/controller/moderate.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class moderate { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\moderate(); + $this->model = new \app\model\moderate(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/topic.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/forum.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/misc.mo'); diff --git a/controller/post.php b/app/controller/post.php similarity index 99% rename from controller/post.php rename to app/controller/post.php index 99ec3dae..75ba6187 100644 --- a/controller/post.php +++ b/app/controller/post.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class post { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \model\post(); + $this->model = new \app\model\post(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/prof_reg.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/register.mo'); diff --git a/controller/profile.php b/app/controller/profile.php similarity index 99% rename from controller/profile.php rename to app/controller/profile.php index 8cd36d60..187f33cb 100644 --- a/controller/profile.php +++ b/app/controller/profile.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class profile { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\profile(); + $this->model = new \app\model\profile(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/profile.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); diff --git a/controller/register.php b/app/controller/register.php similarity index 98% rename from controller/register.php rename to app/controller/register.php index f6bf8415..7a670f99 100644 --- a/controller/register.php +++ b/app/controller/register.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class register { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\register(); + $this->model = new \app\model\register(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/antispam.mo'); diff --git a/controller/search.php b/app/controller/search.php similarity index 97% rename from controller/search.php rename to app/controller/search.php index 42c6cec6..3866dd19 100644 --- a/controller/search.php +++ b/app/controller/search.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class search { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \model\search(); + $this->model = new \app\model\search(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/userlist.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/search.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/forum.mo'); diff --git a/controller/userlist.php b/app/controller/userlist.php similarity index 97% rename from controller/userlist.php rename to app/controller/userlist.php index 63869bba..fef46842 100644 --- a/controller/userlist.php +++ b/app/controller/userlist.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class userlist { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \model\userlist(); + $this->model = new \app\model\userlist(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/userlist.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/search.mo'); } diff --git a/controller/viewforum.php b/app/controller/viewforum.php similarity index 98% rename from controller/viewforum.php rename to app/controller/viewforum.php index 4be4857f..a2457107 100644 --- a/controller/viewforum.php +++ b/app/controller/viewforum.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class viewforum { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \model\viewforum(); + $this->model = new \app\model\viewforum(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/forum.mo'); } diff --git a/controller/viewtopic.php b/app/controller/viewtopic.php similarity index 98% rename from controller/viewtopic.php rename to app/controller/viewtopic.php index 2725e422..abf5180c 100644 --- a/controller/viewtopic.php +++ b/app/controller/viewtopic.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace controller; +namespace app\controller; class viewtopic { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \model\viewtopic(); + $this->model = new \app\model\viewtopic(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/topic.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/bbeditor.mo'); diff --git a/model/admin/bans.php b/app/model/admin/bans.php similarity index 99% rename from model/admin/bans.php rename to app/model/admin/bans.php index 1671ab10..9e8b0426 100644 --- a/model/admin/bans.php +++ b/app/model/admin/bans.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/admin/categories.php b/app/model/admin/categories.php similarity index 97% rename from model/admin/categories.php rename to app/model/admin/categories.php index d2ac4352..fb6bb823 100644 --- a/model/admin/categories.php +++ b/app/model/admin/categories.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher. */ -namespace model\admin; +namespace app\model\admin; use DB; @@ -60,7 +60,7 @@ public function delete_category($cat_to_delete) foreach ($forums_in_cat as $forum) { // Prune all posts and topics - $this->maintenance = new \model\admin\maintenance(); + $this->maintenance = new \app\model\admin\maintenance(); $this->maintenance->prune($forum->id, 1, -1); // Delete forum diff --git a/model/admin/censoring.php b/app/model/admin/censoring.php similarity index 99% rename from model/admin/censoring.php rename to app/model/admin/censoring.php index 80d17127..4aa81719 100644 --- a/model/admin/censoring.php +++ b/app/model/admin/censoring.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/admin/forums.php b/app/model/admin/forums.php similarity index 98% rename from model/admin/forums.php rename to app/model/admin/forums.php index 67bfeb69..6fed815e 100644 --- a/model/admin/forums.php +++ b/app/model/admin/forums.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; @@ -61,7 +61,7 @@ public function delete_forum($forum_id) $forum_id = $this->hook->fire('delete_forum_start', $forum_id); // Prune all posts and topics - $this->maintenance = new \model\admin\maintenance(); + $this->maintenance = new \app\model\admin\maintenance(); $this->maintenance->prune($forum_id, 1, -1); // Delete the forum diff --git a/model/admin/groups.php b/app/model/admin/groups.php similarity index 99% rename from model/admin/groups.php rename to app/model/admin/groups.php index aae8939e..ec37cacc 100644 --- a/model/admin/groups.php +++ b/app/model/admin/groups.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/admin/maintenance.php b/app/model/admin/maintenance.php similarity index 99% rename from model/admin/maintenance.php rename to app/model/admin/maintenance.php index e637d8b2..d6681e02 100644 --- a/model/admin/maintenance.php +++ b/app/model/admin/maintenance.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/admin/options.php b/app/model/admin/options.php similarity index 99% rename from model/admin/options.php rename to app/model/admin/options.php index dc2be5e5..f4b0de7a 100644 --- a/model/admin/options.php +++ b/app/model/admin/options.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/admin/parser.php b/app/model/admin/parser.php similarity index 97% rename from model/admin/parser.php rename to app/model/admin/parser.php index a2c25a20..efe93725 100644 --- a/model/admin/parser.php +++ b/app/model/admin/parser.php @@ -8,7 +8,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/admin/permissions.php b/app/model/admin/permissions.php similarity index 98% rename from model/admin/permissions.php rename to app/model/admin/permissions.php index 5267b64b..3616297a 100644 --- a/model/admin/permissions.php +++ b/app/model/admin/permissions.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/admin/reports.php b/app/model/admin/reports.php similarity index 99% rename from model/admin/reports.php rename to app/model/admin/reports.php index 23c768dc..aaa2a90c 100644 --- a/model/admin/reports.php +++ b/app/model/admin/reports.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/admin/statistics.php b/app/model/admin/statistics.php similarity index 99% rename from model/admin/statistics.php rename to app/model/admin/statistics.php index 64417069..8e6e730d 100644 --- a/model/admin/statistics.php +++ b/app/model/admin/statistics.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/admin/users.php b/app/model/admin/users.php similarity index 99% rename from model/admin/users.php rename to app/model/admin/users.php index 7af9db8e..9c367a8c 100644 --- a/model/admin/users.php +++ b/app/model/admin/users.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model\admin; +namespace app\model\admin; use DB; diff --git a/model/auth.php b/app/model/auth.php similarity index 99% rename from model/auth.php rename to app/model/auth.php index 8266e574..55c32ddd 100644 --- a/model/auth.php +++ b/app/model/auth.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; class auth diff --git a/model/cache.php b/app/model/cache.php similarity index 99% rename from model/cache.php rename to app/model/cache.php index 92d596b3..05d9e424 100644 --- a/model/cache.php +++ b/app/model/cache.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; class cache diff --git a/model/debug.php b/app/model/debug.php similarity index 98% rename from model/debug.php rename to app/model/debug.php index c1049c44..a5486687 100644 --- a/model/debug.php +++ b/app/model/debug.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; class debug diff --git a/model/delete.php b/app/model/delete.php similarity index 99% rename from model/delete.php rename to app/model/delete.php index 4ad61140..0f33e614 100644 --- a/model/delete.php +++ b/app/model/delete.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/edit.php b/app/model/edit.php similarity index 99% rename from model/edit.php rename to app/model/edit.php index e83c09a4..e896c531 100644 --- a/model/edit.php +++ b/app/model/edit.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/header.php b/app/model/header.php similarity index 96% rename from model/header.php rename to app/model/header.php index 56192f72..b09481a3 100644 --- a/model/header.php +++ b/app/model/header.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/index.php b/app/model/index.php similarity index 99% rename from model/index.php rename to app/model/index.php index c67ec5dc..1e4d1bde 100644 --- a/model/index.php +++ b/app/model/index.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; @@ -310,4 +310,4 @@ public function fetch_users_online() return $online; } -} \ No newline at end of file +} diff --git a/model/install.php b/app/model/install.php similarity index 99% rename from model/install.php rename to app/model/install.php index dde9faac..82c9ffbb 100644 --- a/model/install.php +++ b/app/model/install.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/login.php b/app/model/login.php similarity index 99% rename from model/login.php rename to app/model/login.php index a7ae06ec..fee16d59 100644 --- a/model/login.php +++ b/app/model/login.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; $this->email = $this->feather->email; - $this->auth = new \model\auth(); + $this->auth = new \app\model\auth(); } public function login() diff --git a/model/misc.php b/app/model/misc.php similarity index 99% rename from model/misc.php rename to app/model/misc.php index f3f4f716..e5c53f63 100644 --- a/model/misc.php +++ b/app/model/misc.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/moderate.php b/app/model/moderate.php similarity index 99% rename from model/moderate.php rename to app/model/moderate.php index 9fec90aa..7644c249 100644 --- a/model/moderate.php +++ b/app/model/moderate.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/post.php b/app/model/post.php similarity index 99% rename from model/post.php rename to app/model/post.php index b7d3e9ff..9f94f158 100644 --- a/model/post.php +++ b/app/model/post.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/profile.php b/app/model/profile.php similarity index 99% rename from model/profile.php rename to app/model/profile.php index 754ecc72..0c0ca688 100644 --- a/model/profile.php +++ b/app/model/profile.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; $this->email = $this->feather->email; - $this->auth = new \model\auth(); + $this->auth = new \app\model\auth(); } public function change_pass($id) diff --git a/model/register.php b/app/model/register.php similarity index 99% rename from model/register.php rename to app/model/register.php index e2fdef8d..c7261775 100644 --- a/model/register.php +++ b/app/model/register.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; $this->email = $this->feather->email; - $this->auth = new \model\auth(); + $this->auth = new \app\model\auth(); } public function check_for_errors() diff --git a/model/search.php b/app/model/search.php similarity index 99% rename from model/search.php rename to app/model/search.php index c253794b..95c9143e 100644 --- a/model/search.php +++ b/app/model/search.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/userlist.php b/app/model/userlist.php similarity index 99% rename from model/userlist.php rename to app/model/userlist.php index 9fd8b1c3..65c41121 100644 --- a/model/userlist.php +++ b/app/model/userlist.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/viewforum.php b/app/model/viewforum.php similarity index 99% rename from model/viewforum.php rename to app/model/viewforum.php index 0dad4af8..27248135 100644 --- a/model/viewforum.php +++ b/app/model/viewforum.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/model/viewtopic.php b/app/model/viewtopic.php similarity index 99% rename from model/viewtopic.php rename to app/model/viewtopic.php index ccb78697..c6003e5d 100644 --- a/model/viewtopic.php +++ b/app/model/viewtopic.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace model; +namespace app\model; use DB; diff --git a/include/routes.php b/include/routes.php index a30a097a..a530ed7b 100644 --- a/include/routes.php +++ b/include/routes.php @@ -8,20 +8,20 @@ */ // Index -$feather->get('/', '\controller\index:display'); +$feather->get('/', '\app\controller\index:display'); // Viewforum -$feather->get('/forum/:id(/:name)(/page/:page)(/)', '\controller\viewforum:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); +$feather->get('/forum/:id(/:name)(/page/:page)(/)', '\app\controller\viewforum:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); // Viewtopic $feather->group('/topic', function() use ($feather) { - $feather->get('/:id(/:name)(/page/:page)(/)', '\controller\viewtopic:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); - $feather->get('/:id/action/:action(/)', '\controller\viewtopic:action')->conditions(array('id' => '[0-9]+')); + $feather->get('/:id(/:name)(/page/:page)(/)', '\app\controller\viewtopic:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); + $feather->get('/:id/action/:action(/)', '\app\controller\viewtopic:action')->conditions(array('id' => '[0-9]+')); }); -$feather->get('/post/:pid(/)', '\controller\viewtopic:viewpost')->conditions(array('pid' => '[0-9]+')); +$feather->get('/post/:pid(/)', '\app\controller\viewtopic:viewpost')->conditions(array('pid' => '[0-9]+')); // Userlist -$feather->get('/userlist(/)', '\controller\userlist:display'); +$feather->get('/userlist(/)', '\app\controller\userlist:display'); // Auth routes $feather->group('/auth', function() use ($feather) { @@ -32,54 +32,54 @@ $this->feather->url->redirect($this->feather->url->get('/auth/login')); } }); - $feather->map('/login(/)', '\controller\auth:login')->via('GET', 'POST'); - $feather->map('/forget(/)', '\controller\auth:forget')->via('GET', 'POST'); - $feather->get('/logout/token/:token(/)', '\controller\auth:logout'); + $feather->map('/login(/)', '\app\controller\auth:login')->via('GET', 'POST'); + $feather->map('/forget(/)', '\app\controller\auth:forget')->via('GET', 'POST'); + $feather->get('/logout/token/:token(/)', '\app\controller\auth:logout'); }); // Register routes $feather->group('/register', function() use ($feather) { - $feather->get('(/)', '\controller\register:rules'); - $feather->map('/agree(/)', '\controller\register:display')->via('GET', 'POST'); - $feather->get('/cancel(/)', '\controller\register:cancel'); + $feather->get('(/)', '\app\controller\register:rules'); + $feather->map('/agree(/)', '\app\controller\register:display')->via('GET', 'POST'); + $feather->get('/cancel(/)', '\app\controller\register:cancel'); }); // Post routes $feather->group('/post', function() use ($feather) { - $feather->map('/new-topic/:fid(/)', '\controller\post:newpost')->conditions(array('fid' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/reply/:tid(/)(/quote/:qid)(/)', '\controller\post:newreply')->conditions(array('tid' => '[0-9]+', 'qid' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/new-topic/:fid(/)', '\app\controller\post:newpost')->conditions(array('fid' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/reply/:tid(/)(/quote/:qid)(/)', '\app\controller\post:newreply')->conditions(array('tid' => '[0-9]+', 'qid' => '[0-9]+'))->via('GET', 'POST'); }); // Edit -$feather->map('/edit/:id(/)', '\controller\edit:editpost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->map('/edit/:id(/)', '\app\controller\edit:editpost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); // Delete -$feather->map('/delete/:id(/)', '\controller\delete:deletepost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->map('/delete/:id(/)', '\app\controller\delete:deletepost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); // Search routes $feather->group('/search', function() use ($feather) { - $feather->get('(/)', '\controller\search:display'); - $feather->get('/show/:show(/)', '\controller\search:quicksearches'); + $feather->get('(/)', '\app\controller\search:display'); + $feather->get('/show/:show(/)', '\app\controller\search:quicksearches'); }); // Help -$feather->get('/help(/)', '\controller\help:display'); +$feather->get('/help(/)', '\app\controller\help:display'); // Misc -$feather->get('/rules(/)', '\controller\misc:rules'); -$feather->get('/mark-read(/)', '\controller\misc:markread'); -$feather->get('/mark-forum-read/:id(/)', '\controller\misc:markforumread')->conditions(array('id' => '[0-9]+')); -$feather->map('/email/:id(/)', '\controller\misc:email')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); -$feather->map('/report/:id(/)', '\controller\misc:report')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); -$feather->get('/subscribe/forum/:id(/)', '\controller\misc:subscribeforum')->conditions(array('id' => '[0-9]+')); -$feather->get('/unsubscribe/forum/:id(/)', '\controller\misc:unsubscribeforum')->conditions(array('id' => '[0-9]+')); -$feather->get('/subscribe/topic/:id(/)', '\controller\misc:subscribetopic')->conditions(array('id' => '[0-9]+')); -$feather->get('/unsubscribe/topic/:id(/)', '\controller\misc:unsubscribetopic')->conditions(array('id' => '[0-9]+')); +$feather->get('/rules(/)', '\app\controller\misc:rules'); +$feather->get('/mark-read(/)', '\app\controller\misc:markread'); +$feather->get('/mark-forum-read/:id(/)', '\app\controller\misc:markforumread')->conditions(array('id' => '[0-9]+')); +$feather->map('/email/:id(/)', '\app\controller\misc:email')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->map('/report/:id(/)', '\app\controller\misc:report')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->get('/subscribe/forum/:id(/)', '\app\controller\misc:subscribeforum')->conditions(array('id' => '[0-9]+')); +$feather->get('/unsubscribe/forum/:id(/)', '\app\controller\misc:unsubscribeforum')->conditions(array('id' => '[0-9]+')); +$feather->get('/subscribe/topic/:id(/)', '\app\controller\misc:subscribetopic')->conditions(array('id' => '[0-9]+')); +$feather->get('/unsubscribe/topic/:id(/)', '\app\controller\misc:unsubscribetopic')->conditions(array('id' => '[0-9]+')); // Profile routes $feather->group('/user', function() use ($feather) { - $feather->map('/:id(/section/:section)(/)', '\controller\profile:display')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/:id(/action/:action)(/)', '\controller\profile:action')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/:id(/section/:section)(/)', '\app\controller\profile:display')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/:id(/action/:action)(/)', '\app\controller\profile:action')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); }); /** @@ -93,12 +93,12 @@ // Moderate routes $feather->group('/moderate', $isAdmmod, function() use ($feather) { - $feather->get('/forum/:id(/:name)(/page/:page)(/)', '\controller\moderate:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); - $feather->get('/get-host/post/:pid(/)', '\controller\moderate:gethostpost')->conditions(array('pid' => '[0-9]+')); - $feather->get('/get-host/ip/:ip(/)', '\controller\moderate:gethostip'); - $feather->map('/topic/:id/forum/:fid/action/:action(/param/:param)(/)', '\controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/topic/:id/forum/:fid/action/:action(/page/:param)(/)', '\controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); - $feather->post('/forum/:fid(/page/:page)(/)', '\controller\moderate:dealposts')->conditions(array('fid' => '[0-9]+', 'page' => '[0-9]+')); + $feather->get('/forum/:id(/:name)(/page/:page)(/)', '\app\controller\moderate:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); + $feather->get('/get-host/post/:pid(/)', '\app\controller\moderate:gethostpost')->conditions(array('pid' => '[0-9]+')); + $feather->get('/get-host/ip/:ip(/)', '\app\controller\moderate:gethostip'); + $feather->map('/topic/:id/forum/:fid/action/:action(/param/:param)(/)', '\app\controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/topic/:id/forum/:fid/action/:action(/page/:param)(/)', '\app\controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); + $feather->post('/forum/:fid(/page/:page)(/)', '\app\controller\moderate:dealposts')->conditions(array('fid' => '[0-9]+', 'page' => '[0-9]+')); }); // Admin routes @@ -114,76 +114,76 @@ }; // Admin index - $feather->get('(/action/:action)(/)', '\controller\admin\index:display'); - $feather->get('/index(/)', '\controller\admin\index:display'); + $feather->get('(/action/:action)(/)', '\app\controller\admin\index:display'); + $feather->get('/index(/)', '\app\controller\admin\index:display'); // Admin bans $feather->group('/bans', function() use ($feather) { - $feather->get('(/)', '\controller\admin\bans:display'); - $feather->get('/delete/:id(/)', '\controller\admin\bans:delete')->conditions(array('id' => '[0-9]+')); - $feather->map('/edit/:id(/)', '\controller\admin\bans:edit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/add(/:id)(/)', '\controller\admin\bans:add')->via('GET', 'POST'); + $feather->get('(/)', '\app\controller\admin\bans:display'); + $feather->get('/delete/:id(/)', '\app\controller\admin\bans:delete')->conditions(array('id' => '[0-9]+')); + $feather->map('/edit/:id(/)', '\app\controller\admin\bans:edit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/add(/:id)(/)', '\app\controller\admin\bans:add')->via('GET', 'POST'); }); // Admin options - $feather->map('/options(/)', $isAdmin, '\controller\admin\options:display')->via('GET', 'POST'); + $feather->map('/options(/)', $isAdmin, '\app\controller\admin\options:display')->via('GET', 'POST'); // Admin categories $feather->group('/categories', $isAdmin, function() use ($feather) { - $feather->get('(/)', '\controller\admin\categories:display'); - $feather->post('/add(/)', '\controller\admin\categories:add_category'); - $feather->post('/edit(/)', '\controller\admin\categories:edit_categories'); - $feather->post('/delete(/)', '\controller\admin\categories:delete_category'); + $feather->get('(/)', '\app\controller\admin\categories:display'); + $feather->post('/add(/)', '\app\controller\admin\categories:add_category'); + $feather->post('/edit(/)', '\app\controller\admin\categories:edit_categories'); + $feather->post('/delete(/)', '\app\controller\admin\categories:delete_category'); }); // Admin censoring - $feather->map('/censoring(/)', $isAdmin, '\controller\admin\censoring:display')->via('GET', 'POST'); + $feather->map('/censoring(/)', $isAdmin, '\app\controller\admin\censoring:display')->via('GET', 'POST'); // Admin reports - $feather->map('/reports(/)', '\controller\admin\reports:display')->via('GET', 'POST'); + $feather->map('/reports(/)', '\app\controller\admin\reports:display')->via('GET', 'POST'); // Admin permissions - $feather->map('/permissions(/)', $isAdmin, '\controller\admin\permissions:display')->via('GET', 'POST'); + $feather->map('/permissions(/)', $isAdmin, '\app\controller\admin\permissions:display')->via('GET', 'POST'); // Admin statistics - $feather->get('/statistics(/)', '\controller\admin\statistics:display'); - $feather->get('/phpinfo(/)', '\controller\admin\statistics:phpinfo'); + $feather->get('/statistics(/)', '\app\controller\admin\statistics:display'); + $feather->get('/phpinfo(/)', '\app\controller\admin\statistics:phpinfo'); // Admin forums $feather->group('/forums', $isAdmin, function() use ($feather) { - $feather->map('(/)', '\controller\admin\forums:display')->via('GET', 'POST'); - $feather->post('/add(/)', '\controller\admin\forums:add_forum'); - $feather->map('/edit/:id(/)', '\controller\admin\forums:edit_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/delete/:id(/)', '\controller\admin\forums:delete_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('(/)', '\app\controller\admin\forums:display')->via('GET', 'POST'); + $feather->post('/add(/)', '\app\controller\admin\forums:add_forum'); + $feather->map('/edit/:id(/)', '\app\controller\admin\forums:edit_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/delete/:id(/)', '\app\controller\admin\forums:delete_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); }); // Admin groups $feather->group('/groups', $isAdmin, function() use ($feather) { - $feather->map('(/)', '\controller\admin\groups:display')->via('GET', 'POST'); - $feather->map('/add(/)', '\controller\admin\groups:addedit')->via('GET', 'POST'); - $feather->map('/edit/:id(/)', '\controller\admin\groups:addedit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/delete/:id(/)', '\controller\admin\groups:delete')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('(/)', '\app\controller\admin\groups:display')->via('GET', 'POST'); + $feather->map('/add(/)', '\app\controller\admin\groups:addedit')->via('GET', 'POST'); + $feather->map('/edit/:id(/)', '\app\controller\admin\groups:addedit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/delete/:id(/)', '\app\controller\admin\groups:delete')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); }); // Admin plugins $feather->group('/plugins', function() use ($feather) { - $feather->map('/(/)', '\controller\admin\plugins:index')->via('GET', 'POST'); - $feather->map('/activate(/)', '\controller\admin\plugins:activate')->via('GET'); - $feather->map('/deactivate(/)', '\controller\admin\plugins:deactivate')->via('GET'); - // $feather->map('/loader(/)', '\controller\admin\plugins:display')->via('GET', 'POST'); + $feather->map('/(/)', '\app\controller\admin\plugins:index')->via('GET', 'POST'); + $feather->map('/activate(/)', '\app\controller\admin\plugins:activate')->via('GET'); + $feather->map('/deactivate(/)', '\app\controller\admin\plugins:deactivate')->via('GET'); + // $feather->map('/loader(/)', '\app\controller\admin\plugins:display')->via('GET', 'POST'); }); // Admin maintenance - $feather->map('/maintenance(/)', $isAdmin, '\controller\admin\maintenance:display')->via('GET', 'POST'); + $feather->map('/maintenance(/)', $isAdmin, '\app\controller\admin\maintenance:display')->via('GET', 'POST'); // Admin parser - $feather->map('/parser(/)', $isAdmin, '\controller\admin\parser:display')->via('GET', 'POST'); + $feather->map('/parser(/)', $isAdmin, '\app\controller\admin\parser:display')->via('GET', 'POST'); // Admin users $feather->group('/users', function() use ($feather) { - $feather->map('(/)', '\controller\admin\users:display')->via('GET', 'POST'); - $feather->get('/ip-stats/id/:id(/)', '\controller\admin\users:ipstats')->conditions(array('id' => '[0-9]+')); - $feather->get('/show-users/ip/:ip(/)', '\controller\admin\users:showusers'); + $feather->map('(/)', '\app\controller\admin\users:display')->via('GET', 'POST'); + $feather->get('/ip-stats/id/:id(/)', '\app\controller\admin\users:ipstats')->conditions(array('id' => '[0-9]+')); + $feather->get('/show-users/ip/:ip(/)', '\app\controller\admin\users:showusers'); }); }); diff --git a/index.php b/index.php index 29a82294..73cc5305 100644 --- a/index.php +++ b/index.php @@ -15,7 +15,6 @@ // Load Slim Framework require 'vendor/autoload.php'; -// \Slim\Slim::registerAutoloader(); // Instantiate Slim and add CSRF $feather = new \Slim\Slim(); From 07c905a4171b2e919c7a21e3cd90efceb60f985b Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 12:03:07 +0200 Subject: [PATCH 282/353] Move classes into Core --- .../Core/AdminUtils.php | 2 +- .../auth.class.php => app/Core/Auth.php | 6 +- .../cache.class.php => app/Core/Cache.php | 0 .../core.class.php => app/Core/Core.php | 5 +- .../csrf.class.php => app/Core/Csrf.php | 0 .../Core/Database.php | 0 .../email.class.php => app/Core/Email.php | 0 .../error.class.php => app/Core/Error.php | 0 .../hooks.class.php => app/Core/Hooks.php | 0 .../lister.class.php => app/Core/Lister.php | 0 .../plugin.class.php => app/Core/Plugin.php | 0 .../search.class.php => app/Core/Search.php | 2 +- .../classes/url.class.php => app/Core/Url.php | 0 .../utils.class.php => app/Core/Utils.php | 2 +- .../view.class.php => app/Core/View.php | 8 +- .../classes => app/Core}/pomo/.editorconfig | 0 {include/classes => app/Core}/pomo/MO.php | 0 {include/classes => app/Core}/pomo/PO.php | 0 .../Core}/pomo/Streams/CachedFileReader.php | 0 .../pomo/Streams/CachedIntFileReader.php | 0 .../Core}/pomo/Streams/FileReader.php | 0 .../Core}/pomo/Streams/Reader.php | 0 .../Core}/pomo/Streams/StringReader.php | 0 .../pomo/Translations/EntryTranslations.php | 0 .../pomo/Translations/GettextTranslations.php | 0 .../pomo/Translations/NOOPTranslations.php | 0 .../Core}/pomo/Translations/Translations.php | 0 .../Translations/TranslationsInterface.php | 0 app/model/moderate.php | 6 -- composer.json | 57 ++++++----- include/classes/autoload.class.php | 30 ------ include/functions.php | 6 +- index.php | 2 + vendor/akrabat/rka-slim-controller/LICENSE | 26 ----- vendor/akrabat/rka-slim-controller/README.md | 96 ------------------- .../akrabat/rka-slim-controller/RKA/Slim.php | 84 ---------------- .../akrabat/rka-slim-controller/composer.json | 26 ----- vendor/composer/autoload_classmap.php | 38 ++------ vendor/composer/autoload_psr4.php | 2 +- vendor/composer/installed.json | 45 --------- 40 files changed, 57 insertions(+), 386 deletions(-) rename include/classes/adminutils.class.php => app/Core/AdminUtils.php (94%) rename include/classes/auth.class.php => app/Core/Auth.php (98%) rename include/classes/cache.class.php => app/Core/Cache.php (100%) mode change 100755 => 100644 rename include/classes/core.class.php => app/Core/Core.php (96%) rename include/classes/csrf.class.php => app/Core/Csrf.php (100%) rename include/classes/database.class.php => app/Core/Database.php (100%) rename include/classes/email.class.php => app/Core/Email.php (100%) rename include/classes/error.class.php => app/Core/Error.php (100%) rename include/classes/hooks.class.php => app/Core/Hooks.php (100%) rename include/classes/lister.class.php => app/Core/Lister.php (100%) rename include/classes/plugin.class.php => app/Core/Plugin.php (100%) rename include/classes/search.class.php => app/Core/Search.php (99%) rename include/classes/url.class.php => app/Core/Url.php (100%) rename include/classes/utils.class.php => app/Core/Utils.php (99%) rename include/classes/view.class.php => app/Core/View.php (97%) rename {include/classes => app/Core}/pomo/.editorconfig (100%) rename {include/classes => app/Core}/pomo/MO.php (100%) rename {include/classes => app/Core}/pomo/PO.php (100%) rename {include/classes => app/Core}/pomo/Streams/CachedFileReader.php (100%) rename {include/classes => app/Core}/pomo/Streams/CachedIntFileReader.php (100%) rename {include/classes => app/Core}/pomo/Streams/FileReader.php (100%) rename {include/classes => app/Core}/pomo/Streams/Reader.php (100%) rename {include/classes => app/Core}/pomo/Streams/StringReader.php (100%) rename {include/classes => app/Core}/pomo/Translations/EntryTranslations.php (100%) rename {include/classes => app/Core}/pomo/Translations/GettextTranslations.php (100%) rename {include/classes => app/Core}/pomo/Translations/NOOPTranslations.php (100%) rename {include/classes => app/Core}/pomo/Translations/Translations.php (100%) rename {include/classes => app/Core}/pomo/Translations/TranslationsInterface.php (100%) delete mode 100644 include/classes/autoload.class.php delete mode 100644 vendor/akrabat/rka-slim-controller/LICENSE delete mode 100644 vendor/akrabat/rka-slim-controller/README.md delete mode 100644 vendor/akrabat/rka-slim-controller/RKA/Slim.php delete mode 100644 vendor/akrabat/rka-slim-controller/composer.json diff --git a/include/classes/adminutils.class.php b/app/Core/AdminUtils.php similarity index 94% rename from include/classes/adminutils.class.php rename to app/Core/AdminUtils.php index 4f60e514..1a276f74 100644 --- a/include/classes/adminutils.class.php +++ b/app/Core/AdminUtils.php @@ -53,7 +53,7 @@ public static function breadcrumbs_admin(array $links) public static function get_admin_ids() { if (!$this->feather->cache->isCached('admin_ids')) { - $this->feather->cache->store('admin_ids', \model\cache::get_admin_ids()); + $this->feather->cache->store('admin_ids', \app\model\cache::get_admin_ids()); } return $this->feather->cache->retrieve('admin_ids'); diff --git a/include/classes/auth.class.php b/app/Core/Auth.php similarity index 98% rename from include/classes/auth.class.php rename to app/Core/Auth.php index a35309f1..553dbab4 100644 --- a/include/classes/auth.class.php +++ b/app/Core/Auth.php @@ -21,7 +21,7 @@ class Auth extends \Slim\Middleware public function __construct() { - $this->model = new \model\auth(); + $this->model = new \app\model\auth(); } public function get_cookie_data($cookie_name, $cookie_seed) @@ -184,7 +184,7 @@ public function check_bans() // If we removed any expired bans during our run-through, we need to regenerate the bans cache if ($bans_altered) { - $this->app->cache->store('bans', \model\cache::get_bans()); + $this->app->cache->store('bans', \app\model\cache::get_bans()); } } @@ -272,7 +272,7 @@ public function call() // Load bans from cache if (!$this->app->cache->isCached('bans')) { - $this->app->cache->store('bans', \model\cache::get_bans()); + $this->app->cache->store('bans', \app\model\cache::get_bans()); } $feather_bans = $this->app->cache->retrieve('bans'); diff --git a/include/classes/cache.class.php b/app/Core/Cache.php old mode 100755 new mode 100644 similarity index 100% rename from include/classes/cache.class.php rename to app/Core/Cache.php diff --git a/include/classes/core.class.php b/app/Core/Core.php similarity index 96% rename from include/classes/core.class.php rename to app/Core/Core.php index b6da52c6..ce1d9cc5 100644 --- a/include/classes/core.class.php +++ b/app/Core/Core.php @@ -43,10 +43,7 @@ public function __construct(array $data) // Load files require $this->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; require $this->forum_env['FEATHER_ROOT'].'include/functions.php'; - require $this->forum_env['FEATHER_ROOT'].'include/classes/pomo/MO.php'; require $this->forum_env['FEATHER_ROOT'].'include/l10n.php'; - require $this->forum_env['FEATHER_ROOT'].'include/classes/database.class.php'; - // require $this->forum_env['FEATHER_ROOT'].'plugins/test/plugintest.php'; // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); @@ -238,7 +235,7 @@ public function call() 'cookies.secret_key' => $this->forum_settings['cookie_seed'])); if (!$this->app->cache->isCached('config')) { - $this->app->cache->store('config', \model\cache::get_config()); + $this->app->cache->store('config', \app\model\cache::get_config()); } // Finalize forum_settings array diff --git a/include/classes/csrf.class.php b/app/Core/Csrf.php similarity index 100% rename from include/classes/csrf.class.php rename to app/Core/Csrf.php diff --git a/include/classes/database.class.php b/app/Core/Database.php similarity index 100% rename from include/classes/database.class.php rename to app/Core/Database.php diff --git a/include/classes/email.class.php b/app/Core/Email.php similarity index 100% rename from include/classes/email.class.php rename to app/Core/Email.php diff --git a/include/classes/error.class.php b/app/Core/Error.php similarity index 100% rename from include/classes/error.class.php rename to app/Core/Error.php diff --git a/include/classes/hooks.class.php b/app/Core/Hooks.php similarity index 100% rename from include/classes/hooks.class.php rename to app/Core/Hooks.php diff --git a/include/classes/lister.class.php b/app/Core/Lister.php similarity index 100% rename from include/classes/lister.class.php rename to app/Core/Lister.php diff --git a/include/classes/plugin.class.php b/app/Core/Plugin.php similarity index 100% rename from include/classes/plugin.class.php rename to app/Core/Plugin.php diff --git a/include/classes/search.class.php b/app/Core/Search.php similarity index 99% rename from include/classes/search.class.php rename to app/Core/Search.php index 4d1ab048..f513f3f4 100644 --- a/include/classes/search.class.php +++ b/app/Core/Search.php @@ -93,7 +93,7 @@ public function validate_search_word($word, $idx) if (!isset($stopwords)) { if (!$this->feather->cache->isCached('stopwords')) { - $this->feather->cache->store('stopwords', \model\cache::get_config(), '+1 week'); + $this->feather->cache->store('stopwords', \app\model\cache::get_config(), '+1 week'); } $stopwords = $this->feather->cache->retrieve('stopwords'); } diff --git a/include/classes/url.class.php b/app/Core/Url.php similarity index 100% rename from include/classes/url.class.php rename to app/Core/Url.php diff --git a/include/classes/utils.class.php b/app/Core/Utils.php similarity index 99% rename from include/classes/utils.class.php rename to app/Core/Utils.php index 195bde27..e76ba680 100644 --- a/include/classes/utils.class.php +++ b/app/Core/Utils.php @@ -19,7 +19,7 @@ public function __construct() // // Return current timestamp (with microseconds) as a float // - function get_microtime() + public static function get_microtime() { list($usec, $sec) = explode(' ', microtime()); return ((float)$usec + (float)$sec); diff --git a/include/classes/view.class.php b/app/Core/View.php similarity index 97% rename from include/classes/view.class.php rename to app/Core/View.php index 6cc73e71..510c6e46 100644 --- a/include/classes/view.class.php +++ b/app/Core/View.php @@ -362,7 +362,7 @@ protected function getDefaultPageInfo() { // Check if config file exists to avoid error when installing forum if (!$this->app->cache->isCached('quickjump') && is_file($this->app->forum_env['FORUM_CONFIG_FILE'])) { - $this->app->cache->store('quickjump', \model\cache::get_quickjump()); + $this->app->cache->store('quickjump', \app\model\cache::get_quickjump()); } $data = array( @@ -383,13 +383,13 @@ protected function getDefaultPageInfo() ); if (is_object($this->app->user) && $this->app->user->is_admmod) { - $data['has_reports'] = \model\header::get_reports(); + $data['has_reports'] = \app\model\header::get_reports(); } if ($this->app->forum_env['FEATHER_SHOW_INFO']) { - $data['exec_info'] = \model\debug::get_info(); + $data['exec_info'] = \app\model\debug::get_info(); if ($this->app->forum_env['FEATHER_SHOW_QUERIES']) { - $data['queries_info'] = \model\debug::get_queries(); + $data['queries_info'] = \app\model\debug::get_queries(); } } diff --git a/include/classes/pomo/.editorconfig b/app/Core/pomo/.editorconfig similarity index 100% rename from include/classes/pomo/.editorconfig rename to app/Core/pomo/.editorconfig diff --git a/include/classes/pomo/MO.php b/app/Core/pomo/MO.php similarity index 100% rename from include/classes/pomo/MO.php rename to app/Core/pomo/MO.php diff --git a/include/classes/pomo/PO.php b/app/Core/pomo/PO.php similarity index 100% rename from include/classes/pomo/PO.php rename to app/Core/pomo/PO.php diff --git a/include/classes/pomo/Streams/CachedFileReader.php b/app/Core/pomo/Streams/CachedFileReader.php similarity index 100% rename from include/classes/pomo/Streams/CachedFileReader.php rename to app/Core/pomo/Streams/CachedFileReader.php diff --git a/include/classes/pomo/Streams/CachedIntFileReader.php b/app/Core/pomo/Streams/CachedIntFileReader.php similarity index 100% rename from include/classes/pomo/Streams/CachedIntFileReader.php rename to app/Core/pomo/Streams/CachedIntFileReader.php diff --git a/include/classes/pomo/Streams/FileReader.php b/app/Core/pomo/Streams/FileReader.php similarity index 100% rename from include/classes/pomo/Streams/FileReader.php rename to app/Core/pomo/Streams/FileReader.php diff --git a/include/classes/pomo/Streams/Reader.php b/app/Core/pomo/Streams/Reader.php similarity index 100% rename from include/classes/pomo/Streams/Reader.php rename to app/Core/pomo/Streams/Reader.php diff --git a/include/classes/pomo/Streams/StringReader.php b/app/Core/pomo/Streams/StringReader.php similarity index 100% rename from include/classes/pomo/Streams/StringReader.php rename to app/Core/pomo/Streams/StringReader.php diff --git a/include/classes/pomo/Translations/EntryTranslations.php b/app/Core/pomo/Translations/EntryTranslations.php similarity index 100% rename from include/classes/pomo/Translations/EntryTranslations.php rename to app/Core/pomo/Translations/EntryTranslations.php diff --git a/include/classes/pomo/Translations/GettextTranslations.php b/app/Core/pomo/Translations/GettextTranslations.php similarity index 100% rename from include/classes/pomo/Translations/GettextTranslations.php rename to app/Core/pomo/Translations/GettextTranslations.php diff --git a/include/classes/pomo/Translations/NOOPTranslations.php b/app/Core/pomo/Translations/NOOPTranslations.php similarity index 100% rename from include/classes/pomo/Translations/NOOPTranslations.php rename to app/Core/pomo/Translations/NOOPTranslations.php diff --git a/include/classes/pomo/Translations/Translations.php b/app/Core/pomo/Translations/Translations.php similarity index 100% rename from include/classes/pomo/Translations/Translations.php rename to app/Core/pomo/Translations/Translations.php diff --git a/include/classes/pomo/Translations/TranslationsInterface.php b/app/Core/pomo/Translations/TranslationsInterface.php similarity index 100% rename from include/classes/pomo/Translations/TranslationsInterface.php rename to app/Core/pomo/Translations/TranslationsInterface.php diff --git a/app/model/moderate.php b/app/model/moderate.php index 7644c249..0ae0a7be 100644 --- a/app/model/moderate.php +++ b/app/model/moderate.php @@ -222,15 +222,9 @@ public function split_posts($tid, $fid, $p = null) $new_subject = $this->request->post('new_subject') ? $this->feather->utils->trim($this->request->post('new_subject')) : ''; if ($new_subject == '') { -<<<<<<< HEAD throw new \FeatherBB\Error(__('No subject'), 400); } elseif (feather_strlen($new_subject) > 70) { throw new \FeatherBB\Error(__('Too long subject'), 400); -======= - message(__('No subject')); - } elseif ($this->feather->utils->strlen($new_subject) > 70) { - message(__('Too long subject')); ->>>>>>> origin/development } // Get data from the new first post diff --git a/composer.json b/composer.json index 3bf3df86..d3258f91 100644 --- a/composer.json +++ b/composer.json @@ -1,25 +1,36 @@ { - "name": "featherbb/featherbb", - "type": "project", - "license": "GNU General Public Licence", - "description": "A multi-framework Composer library installer", - "keywords": ["forum", "lightweight", "featherbb"], - "homepage": "http://featherbb.github.com/installers/", - "authors": [ - {"name": "adaur"}, - {"name": "capkokoon"}, - {"name": "beaver"} - ], - "autoload": { - "classmap": ["include/classes/"], - "psr-4" : { - "Plugins\\" : "/plugins" - }, - "psr-0": { "": "" } - }, - "require": { - "php": ">=5.3", - "slim/slim": "^2.6", - "akrabat/rka-slim-controller": "^2.0" - } + "name": "featherbb/featherbb", + "type": "project", + "license": "GNU General Public Licence", + "description": "Lighter than a feather.", + "keywords": ["forum", "lightweight", "featherbb"], + "homepage": "http://featherbb.org/", + "authors": [{ + "name": "adaur", + "role": "Project Leader" + }, { + "name": "capkokoon", + "role": "Contributor" + }, { + "name": "beaver", + "role": "Contributor" + }], + "autoload": { + "classmap": ["app/Core/Database.php", "app/Core/pomo/MO.php"], + "psr-4": { + "Plugins\\": "/plugins", + "FeatherBB\\": "app/Core" + }, + "psr-0": { + "": "" + } + }, + "require": { + "php": ">=5.3", + "slim/slim": "^2.6" + }, + "support": { + "email": "admin@featherbb.org", + "issues": "https://github.com/featherbb/featherbb/issues" + } } diff --git a/include/classes/autoload.class.php b/include/classes/autoload.class.php deleted file mode 100644 index 9349d336..00000000 --- a/include/classes/autoload.class.php +++ /dev/null @@ -1,30 +0,0 @@ -cache->isCached('admin_ids')) { - $feather->cache->store('admin_ids', \model\cache::get_admin_ids()); + $feather->cache->store('admin_ids', \app\model\cache::get_admin_ids()); } return $feather->cache->retrieve('admin_ids'); @@ -350,12 +350,12 @@ function censor_words($text) $feather = \Slim\Slim::getInstance(); if (!$feather->cache->isCached('search_for')) { - $feather->cache->store('search_for', \model\cache::get_censoring('search_for')); + $feather->cache->store('search_for', \app\model\cache::get_censoring('search_for')); $search_for = $feather->cache->retrieve('search_for'); } if (!$feather->cache->isCached('replace_with')) { - $feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); + $feather->cache->store('replace_with', \app\model\cache::get_censoring('replace_with')); $replace_with = $feather->cache->retrieve('replace_with'); } diff --git a/index.php b/index.php index 73cc5305..a68f2527 100644 --- a/index.php +++ b/index.php @@ -26,6 +26,8 @@ $feather->add(new \FeatherBB\Auth()); $feather->add(new \FeatherBB\Core($feather_settings)); + + // Load the routes require 'include/routes.php'; diff --git a/vendor/akrabat/rka-slim-controller/LICENSE b/vendor/akrabat/rka-slim-controller/LICENSE deleted file mode 100644 index 8ac2d43e..00000000 --- a/vendor/akrabat/rka-slim-controller/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2014, Rob Allen (rob@akrabat.com) -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * The name of Rob Allen may not be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/akrabat/rka-slim-controller/README.md b/vendor/akrabat/rka-slim-controller/README.md deleted file mode 100644 index dfc37eb5..00000000 --- a/vendor/akrabat/rka-slim-controller/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# RKA Slim Controller - -An extension to [Slim Framework][1] that allows you use to dynamically -instantiated controllers with action methods wherever you would use a -closure when routing. - -The controller can optionally be loaded from Slim's DI container, -allowing you to inject dependencies as required. - -[1]: http://www.slimframework.com/ - -## Installation - - composer require akrabat/rka-slim-controller - - -## Usage - -Use the string format `{controller class name}:{action method name}` -wherever you would usually use a closure: - -e.g. - - $app = new \RKA\Slim(); - $app->get('/hello:name', 'App\IndexController:home'); - - -You can also register the controller with Slim's DI container: - - $app = new \RKA\Slim(); - - $app->container->singleton('App\IndexController', function ($container) { - // Retrieve any required dependencies from the container and - // inject into the constructor of the controller - - return new \App\IndexController(); - }); - - $app->get('/', 'App\IndexController:index'); - - -## Controller class methods - -*RKA Slim Controller* will call the controller's `setApp()`, `setRequest()` -and `setResponse()` methods if they exist and populate appropriately. It will -then call the controller's `init()`` method. - -Hence, a typical controller may look like: - - app = $app; - } - - public function setRequest($request) - { - $this->request = $request; - } - - public function setResponse($response) - { - $this->response = $response; - } - - // Init - public function init() - { - // do things now that app, request and response are set. - } - } - - -## Example project - -Look at [slim-di](https://github.com/akrabat/slim-di). diff --git a/vendor/akrabat/rka-slim-controller/RKA/Slim.php b/vendor/akrabat/rka-slim-controller/RKA/Slim.php deleted file mode 100644 index 100c5e42..00000000 --- a/vendor/akrabat/rka-slim-controller/RKA/Slim.php +++ /dev/null @@ -1,84 +0,0 @@ -createControllerClosure($callable); - } - $args[] = $callable; - - return parent::mapRoute($args); - } - - /** - * Create a closure that instantiates (or gets from container) and then calls - * the action method. - * - * Also if the methods exist on the controller class, call setApp(), setRequest() - * and setResponse() passing in the appropriate object. - * - * @param string $name controller class name and action method name separated by a colon - * @return closure - */ - protected function createControllerClosure($name) - { - list($controllerName, $actionName) = explode(':', $name); - - // Create a callable that will find or create the controller instance - // and then execute the action - $app = $this; - $callable = function () use ($app, $controllerName, $actionName) { - - // Try to fetch the controller instance from Slim's container - if ($app->container->has($controllerName)) { - $controller = $app->container->get($controllerName); - } else { - // not in container, assume it can be directly instantiated - $controller = new $controllerName($app); - } - - // Set the app, request and response into the controller if we can - if (method_exists($controller, 'setApp')) { - $controller->setApp($app); - } - if (method_exists($controller, 'setRequest')) { - $controller->setRequest($app->request); - } - if (method_exists($controller, 'setResponse')) { - $controller->setResponse($app->response); - } - - // Call init in case the controller wants to do something now that - // it has an app, request and response. - if (method_exists($controller, 'init')) { - $controller->init(); - } - - return call_user_func_array(array($controller, $actionName), func_get_args()); - }; - - return $callable; - } -} diff --git a/vendor/akrabat/rka-slim-controller/composer.json b/vendor/akrabat/rka-slim-controller/composer.json deleted file mode 100644 index ce454395..00000000 --- a/vendor/akrabat/rka-slim-controller/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "akrabat/rka-slim-controller", - "description": "Dynamically instantiated controller classes for Slim Framework", - "keywords": [ - "slim", "controller" - ], - "homepage": "http://github.com/akrabat/rka-slim-controller", - "type": "library", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - } - ], - "require": { - "php": ">=5.4", - "slim/slim": "~2.4" - }, - "autoload": { - "psr-4": { - "RKA\\": "RKA" - } - } -} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 5c77336e..7b42861a 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,36 +6,10 @@ $baseDir = dirname($vendorDir); return array( - 'CachedFileReader' => $baseDir . '/include/classes/pomo/Streams/CachedFileReader.php', - 'CachedIntFileReader' => $baseDir . '/include/classes/pomo/Streams/CachedIntFileReader.php', - 'DB' => $baseDir . '/include/classes/database.class.php', - 'EntryTranslations' => $baseDir . '/include/classes/pomo/Translations/EntryTranslations.php', - 'FeatherBB\\AdminUtils' => $baseDir . '/include/classes/adminutils.class.php', - 'FeatherBB\\Auth' => $baseDir . '/include/classes/auth.class.php', - 'FeatherBB\\Cache' => $baseDir . '/include/classes/cache.class.php', - 'FeatherBB\\Core' => $baseDir . '/include/classes/core.class.php', - 'FeatherBB\\Csrf' => $baseDir . '/include/classes/csrf.class.php', - 'FeatherBB\\Email' => $baseDir . '/include/classes/email.class.php', - 'FeatherBB\\Error' => $baseDir . '/include/classes/error.class.php', - 'FeatherBB\\Hooks' => $baseDir . '/include/classes/hooks.class.php', - 'FeatherBB\\Lister' => $baseDir . '/include/classes/lister.class.php', - 'FeatherBB\\Loader' => $baseDir . '/include/classes/autoload.class.php', - 'FeatherBB\\Plugin' => $baseDir . '/include/classes/plugin.class.php', - 'FeatherBB\\Search' => $baseDir . '/include/classes/search.class.php', - 'FeatherBB\\Url' => $baseDir . '/include/classes/url.class.php', - 'FeatherBB\\Utils' => $baseDir . '/include/classes/utils.class.php', - 'FeatherBB\\View' => $baseDir . '/include/classes/view.class.php', - 'FileReader' => $baseDir . '/include/classes/pomo/Streams/FileReader.php', - 'GettextTranslations' => $baseDir . '/include/classes/pomo/Translations/GettextTranslations.php', - 'IdiormMethodMissingException' => $baseDir . '/include/classes/database.class.php', - 'IdiormResultSet' => $baseDir . '/include/classes/database.class.php', - 'IdiormString' => $baseDir . '/include/classes/database.class.php', - 'IdiormStringException' => $baseDir . '/include/classes/database.class.php', - 'MO' => $baseDir . '/include/classes/pomo/MO.php', - 'NOOPTranslations' => $baseDir . '/include/classes/pomo/Translations/NOOPTranslations.php', - 'PO' => $baseDir . '/include/classes/pomo/PO.php', - 'Reader' => $baseDir . '/include/classes/pomo/Streams/Reader.php', - 'StringReader' => $baseDir . '/include/classes/pomo/Streams/StringReader.php', - 'Translations' => $baseDir . '/include/classes/pomo/Translations/Translations.php', - 'TranslationsInterface' => $baseDir . '/include/classes/pomo/Translations/TranslationsInterface.php', + 'DB' => $baseDir . '/app/Core/Database.php', + 'IdiormMethodMissingException' => $baseDir . '/app/Core/Database.php', + 'IdiormResultSet' => $baseDir . '/app/Core/Database.php', + 'IdiormString' => $baseDir . '/app/Core/Database.php', + 'IdiormStringException' => $baseDir . '/app/Core/Database.php', + 'MO' => $baseDir . '/app/Core/pomo/MO.php', ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index c5f4765d..cfbc382d 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,6 +6,6 @@ $baseDir = dirname($vendorDir); return array( - 'RKA\\' => array($vendorDir . '/akrabat/rka-slim-controller/RKA'), 'Plugins\\' => array('/plugins'), + 'FeatherBB\\' => array($baseDir . '/app/Core'), ); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index e09b84fe..ea58c1a1 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -46,50 +46,5 @@ "rest", "router" ] - }, - { - "name": "akrabat/rka-slim-controller", - "version": "2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/akrabat/rka-slim-controller.git", - "reference": "7115f082a91af83fd22755e8d2d27e9fcffc636b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/akrabat/rka-slim-controller/zipball/7115f082a91af83fd22755e8d2d27e9fcffc636b", - "reference": "7115f082a91af83fd22755e8d2d27e9fcffc636b", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "slim/slim": "~2.4" - }, - "time": "2015-01-07 09:54:54", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "RKA\\": "RKA" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - } - ], - "description": "Dynamically instantiated controller classes for Slim Framework", - "homepage": "http://github.com/akrabat/rka-slim-controller", - "keywords": [ - "controller", - "slim" - ] } ] From 8cc34c08a24384e3fdddec6c142d0637530fed15 Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 13:41:00 +0200 Subject: [PATCH 283/353] Namespace convention fixes --- app/Core/Lister.php | 1 + app/controller/admin/categories.php | 2 +- app/controller/admin/forums.php | 10 +++++----- app/controller/auth.php | 20 ++++++++++---------- composer.json | 4 +--- vendor/composer/autoload_namespaces.php | 1 - vendor/composer/autoload_psr4.php | 1 + 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/app/Core/Lister.php b/app/Core/Lister.php index 414c7bf7..2a2d120c 100644 --- a/app/Core/Lister.php +++ b/app/Core/Lister.php @@ -47,6 +47,7 @@ public static function getValidPlugins($folder = '') $relative_path = DIRECTORY_SEPARATOR.preg_replace("/" . preg_quote($feather_root, "/") . "/", '', $file_path); preg_match('/^(.+)\.php$/i', $relative_path, $class_name); $parts = explode(DIRECTORY_SEPARATOR, $class_name[1]); + $parts[1] = ucfirst($parts[1]); // Replace \plugins to \Plugins for convention $name_space = join($parts, "\\"); // Check if plugin follows PSR-4 conventions and extends base forum plugin if (class_exists($name_space) && property_exists($name_space, 'isValidFBPlugin')) { diff --git a/app/controller/admin/categories.php b/app/controller/admin/categories.php index d1d4b3ba..940ec4ec 100644 --- a/app/controller/admin/categories.php +++ b/app/controller/admin/categories.php @@ -58,7 +58,7 @@ public function edit_categories() } // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); redirect($this->feather->url->get('admin/categories/'), __('Categories updated redirect')); } diff --git a/app/controller/admin/forums.php b/app/controller/admin/forums.php index 2a60d5b6..dbb68602 100644 --- a/app/controller/admin/forums.php +++ b/app/controller/admin/forums.php @@ -41,7 +41,7 @@ public function add_forum() if ($fid = $this->model->add_forum($cat_id, __('New forum'))) { // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/edit/'.$fid.'/'), __('Forum added redirect')); } else { redirect($this->feather->url->get('admin/forums/'), __('Unable to add forum')); @@ -98,7 +98,7 @@ public function edit_forum($forum_id) } // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); @@ -106,7 +106,7 @@ public function edit_forum($forum_id) $this->model->delete_permissions($forum_id); // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Perms reverted redirect')); } @@ -132,7 +132,7 @@ public function delete_forum($forum_id) if($this->request->isPost()) { $this->model->delete_forum($forum_id); // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/'), __('Forum deleted redirect')); @@ -160,7 +160,7 @@ public function edit_positions() } // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/'), __('Forums updated redirect')); } diff --git a/app/controller/auth.php b/app/controller/auth.php index 6fc9d9ce..dbdfd42a 100644 --- a/app/controller/auth.php +++ b/app/controller/auth.php @@ -29,25 +29,25 @@ public function login() $form_password = $this->feather->utils->trim($this->feather->request->post('req_password')); $save_pass = (bool) $this->feather->request->post('save_pass'); - $user = \model\auth::get_user_from_name($form_username); + $user = \app\model\auth::get_user_from_name($form_username); if (!empty($user->password)) { $form_password_hash = \FeatherBB\Utils::feather_hash($form_password); // Will result in a SHA-1 hash if ($user->password == $form_password_hash) { if ($user->group_id == FEATHER_UNVERIFIED) { - \model\auth::update_group($user->id, $this->feather->forum_settings['o_default_user_group']); + \app\model\auth::update_group($user->id, $this->feather->forum_settings['o_default_user_group']); if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \model\cache::get_users_info()); + $this->feather->cache->store('users_info', \app\model\cache::get_users_info()); } } - \model\auth::delete_online_by_ip($this->feather->request->getIp()); + \app\model\auth::delete_online_by_ip($this->feather->request->getIp()); // Reset tracked topics set_tracked_topics(null); $expire = ($save_pass) ? $this->feather->now + 1209600 : $this->feather->now + $this->feather->forum_settings['o_timeout_visit']; $expire = $this->feather->hooks->fire('expire_login', $expire); - \model\auth::feather_setcookie($user->id, $form_password_hash, $expire); + \app\model\auth::feather_setcookie($user->id, $form_password_hash, $expire); $this->feather->url->redirect($this->feather->url->base(), __('Login redirect')); } @@ -72,14 +72,14 @@ public function logout($token) $this->feather->url->redirect($this->feather->url->get('/'), 'Not logged in'); } - \model\auth::delete_online_by_id($this->feather->user->id); + \app\model\auth::delete_online_by_id($this->feather->user->id); // Update last_visit (make sure there's something to update it with) if (isset($this->feather->user->logged)) { - \model\auth::set_last_visit($this->feather->user->id, $this->feather->user->logged); + \app\model\auth::set_last_visit($this->feather->user->id, $this->feather->user->logged); } - \model\auth::feather_setcookie(1, \FeatherBB\Utils::feather_hash(uniqid(rand(), true)), time() + 31536000); + \app\model\auth::feather_setcookie(1, \FeatherBB\Utils::feather_hash(uniqid(rand(), true)), time() + 31536000); $this->feather->hooks->fire('logout_end'); redirect($this->feather->url->base(), __('Logout redirect')); @@ -97,7 +97,7 @@ public function forget() if (!$this->feather->email->is_valid_email($email)) { throw new \FeatherBB\Error(__('Invalid email'), 400); } - $user = \model\auth::get_user_from_email($email); + $user = \app\model\auth::get_user_from_email($email); if ($user) { // Load the "activate password" template @@ -123,7 +123,7 @@ public function forget() $new_password = random_pass(12); $new_password_key = random_pass(8); - \model\auth::set_new_password($new_password, $new_password_key, $user->id); + \app\model\auth::set_new_password($new_password, $new_password_key, $user->id); // Do the user specific replacements to the template $cur_mail_message = str_replace('', $user->username, $mail_message); diff --git a/composer.json b/composer.json index d3258f91..74b29ce1 100644 --- a/composer.json +++ b/composer.json @@ -19,9 +19,7 @@ "classmap": ["app/Core/Database.php", "app/Core/pomo/MO.php"], "psr-4": { "Plugins\\": "/plugins", - "FeatherBB\\": "app/Core" - }, - "psr-0": { + "FeatherBB\\": "app/Core", "": "" } }, diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index b00084d3..58e60b16 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -7,5 +7,4 @@ return array( 'Slim' => array($vendorDir . '/slim/slim'), - '' => array($baseDir . '/'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index cfbc382d..5efbc9f2 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -8,4 +8,5 @@ return array( 'Plugins\\' => array('/plugins'), 'FeatherBB\\' => array($baseDir . '/app/Core'), + '' => array($baseDir . '/'), ); From edeb9f70d5fe52ea28baba948c78df9145eacf9a Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 14:39:07 +0200 Subject: [PATCH 284/353] Follow PSR-1 naming --- .../bans.php => Controller/Admin/Bans.php} | 6 +- .../Admin/Categories.php} | 8 +- .../Admin/Censoring.php} | 6 +- .../Admin/Forums.php} | 18 +-- .../Admin/Groups.php} | 6 +- .../index.php => Controller/Admin/Index.php} | 4 +- .../Admin/Maintenance.php} | 6 +- .../Admin/Options.php} | 6 +- .../Admin/Parser.php} | 8 +- .../Admin/Permissions.php} | 6 +- .../Admin/Plugins.php} | 4 +- .../Admin/Reports.php} | 6 +- .../Admin/Statistics.php} | 6 +- .../users.php => Controller/Admin/Users.php} | 6 +- .../auth.php => Controller/Auth.php} | 25 ++-- app/Core/AdminUtils.php | 2 +- app/Core/Auth.php | 6 +- app/Core/Core.php | 2 +- app/Core/Search.php | 2 +- app/Core/View.php | 8 +- .../admin/bans.php => Model/Admin/Bans.php} | 2 +- .../Admin/Categories.php} | 4 +- .../Admin/Censoring.php} | 2 +- .../forums.php => Model/Admin/Forums.php} | 4 +- .../groups.php => Model/Admin/Groups.php} | 2 +- .../Admin/Maintenance.php} | 2 +- .../options.php => Model/Admin/Options.php} | 2 +- .../parser.php => Model/Admin/Parser.php} | 2 +- .../Admin/Permissions.php} | 2 +- .../reports.php => Model/Admin/Reports.php} | 2 +- .../Admin/Statistics.php} | 2 +- .../admin/users.php => Model/Admin/Users.php} | 2 +- app/{model/auth.php => Model/Auth.php} | 2 +- app/{model/cache.php => Model/Cache.php} | 2 +- app/{model/debug.php => Model/Debug.php} | 2 +- app/{model/delete.php => Model/Delete.php} | 2 +- app/{model/edit.php => Model/Edit.php} | 2 +- app/{model/header.php => Model/Header.php} | 2 +- app/{model/index.php => Model/Index.php} | 2 +- app/{model/install.php => Model/Install.php} | 2 +- app/{model/login.php => Model/Login.php} | 4 +- app/{model/misc.php => Model/Misc.php} | 2 +- .../moderate.php => Model/Moderate.php} | 2 +- app/{model/post.php => Model/Post.php} | 2 +- app/{model/profile.php => Model/Profile.php} | 4 +- .../register.php => Model/Register.php} | 4 +- app/{model/search.php => Model/Search.php} | 2 +- .../userlist.php => Model/Userlist.php} | 2 +- .../viewforum.php => Model/Viewforum.php} | 2 +- .../viewtopic.php => Model/Viextopic.php} | 2 +- app/controller/delete.php | 6 +- app/controller/edit.php | 6 +- app/controller/help.php | 4 +- app/controller/index.php | 6 +- app/controller/install.php | 6 +- app/controller/login.php | 6 +- app/controller/misc.php | 6 +- app/controller/moderate.php | 6 +- app/controller/post.php | 6 +- app/controller/profile.php | 6 +- app/controller/register.php | 6 +- app/controller/search.php | 6 +- app/controller/userlist.php | 6 +- app/controller/viewforum.php | 6 +- app/controller/viewtopic.php | 6 +- include/functions.php | 6 +- include/routes.php | 138 +++++++++--------- 67 files changed, 222 insertions(+), 221 deletions(-) rename app/{controller/admin/bans.php => Controller/Admin/Bans.php} (97%) rename app/{controller/admin/categories.php => Controller/Admin/Categories.php} (95%) rename app/{controller/admin/censoring.php => Controller/Admin/Censoring.php} (94%) rename app/{controller/admin/forums.php => Controller/Admin/Forums.php} (93%) rename app/{controller/admin/groups.php => Controller/Admin/Groups.php} (97%) rename app/{controller/admin/index.php => Controller/Admin/Index.php} (98%) rename app/{controller/admin/maintenance.php => Controller/Admin/Maintenance.php} (96%) rename app/{controller/admin/options.php => Controller/Admin/Options.php} (93%) rename app/{controller/admin/parser.php => Controller/Admin/Parser.php} (98%) rename app/{controller/admin/permissions.php => Controller/Admin/Permissions.php} (92%) rename app/{controller/admin/plugins.php => Controller/Admin/Plugins.php} (99%) rename app/{controller/admin/reports.php => Controller/Admin/Reports.php} (93%) rename app/{controller/admin/statistics.php => Controller/Admin/Statistics.php} (94%) rename app/{controller/admin/users.php => Controller/Admin/Users.php} (98%) rename app/{controller/auth.php => Controller/Auth.php} (91%) rename app/{model/admin/bans.php => Model/Admin/Bans.php} (99%) rename app/{model/admin/categories.php => Model/Admin/Categories.php} (97%) rename app/{model/admin/censoring.php => Model/Admin/Censoring.php} (99%) rename app/{model/admin/forums.php => Model/Admin/Forums.php} (99%) rename app/{model/admin/groups.php => Model/Admin/Groups.php} (99%) rename app/{model/admin/maintenance.php => Model/Admin/Maintenance.php} (99%) rename app/{model/admin/options.php => Model/Admin/Options.php} (99%) rename app/{model/admin/parser.php => Model/Admin/Parser.php} (97%) rename app/{model/admin/permissions.php => Model/Admin/Permissions.php} (98%) rename app/{model/admin/reports.php => Model/Admin/Reports.php} (99%) rename app/{model/admin/statistics.php => Model/Admin/Statistics.php} (99%) rename app/{model/admin/users.php => Model/Admin/Users.php} (99%) rename app/{model/auth.php => Model/Auth.php} (99%) rename app/{model/cache.php => Model/Cache.php} (99%) rename app/{model/debug.php => Model/Debug.php} (98%) rename app/{model/delete.php => Model/Delete.php} (99%) rename app/{model/edit.php => Model/Edit.php} (99%) rename app/{model/header.php => Model/Header.php} (96%) rename app/{model/index.php => Model/Index.php} (99%) rename app/{model/install.php => Model/Install.php} (99%) rename app/{model/login.php => Model/Login.php} (99%) rename app/{model/misc.php => Model/Misc.php} (99%) rename app/{model/moderate.php => Model/Moderate.php} (99%) rename app/{model/post.php => Model/Post.php} (99%) rename app/{model/profile.php => Model/Profile.php} (99%) rename app/{model/register.php => Model/Register.php} (99%) rename app/{model/search.php => Model/Search.php} (99%) rename app/{model/userlist.php => Model/Userlist.php} (99%) rename app/{model/viewforum.php => Model/Viewforum.php} (99%) rename app/{model/viewtopic.php => Model/Viextopic.php} (99%) diff --git a/app/controller/admin/bans.php b/app/Controller/Admin/Bans.php similarity index 97% rename from app/controller/admin/bans.php rename to app/Controller/Admin/Bans.php index 75985312..ed472f75 100644 --- a/app/controller/admin/bans.php +++ b/app/Controller/Admin/Bans.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class bans +class Bans { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\bans(); + $this->model = new \App\Model\Admin\Bans(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/bans.mo'); if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { diff --git a/app/controller/admin/categories.php b/app/Controller/Admin/Categories.php similarity index 95% rename from app/controller/admin/categories.php rename to app/Controller/Admin/Categories.php index 940ec4ec..610e5724 100644 --- a/app/controller/admin/categories.php +++ b/app/Controller/Admin/Categories.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher. */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class categories +class Categories { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\categories(); + $this->model = new \App\Model\Admin\Categories(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/categories.mo'); } @@ -58,7 +58,7 @@ public function edit_categories() } // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/categories/'), __('Categories updated redirect')); } diff --git a/app/controller/admin/censoring.php b/app/Controller/Admin/Censoring.php similarity index 94% rename from app/controller/admin/censoring.php rename to app/Controller/Admin/Censoring.php index 8bc50123..8e641352 100644 --- a/app/controller/admin/censoring.php +++ b/app/Controller/Admin/Censoring.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class censoring +class Censoring { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\censoring(); + $this->model = new \App\Model\Admin\Censoring(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/censoring.mo'); } diff --git a/app/controller/admin/forums.php b/app/Controller/Admin/Forums.php similarity index 93% rename from app/controller/admin/forums.php rename to app/Controller/Admin/Forums.php index dbb68602..98a73bea 100644 --- a/app/controller/admin/forums.php +++ b/app/Controller/Admin/Forums.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class forums +class Forums { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\forums(); + $this->model = new \App\Model\Admin\forums(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/forums.mo'); } @@ -41,7 +41,7 @@ public function add_forum() if ($fid = $this->model->add_forum($cat_id, __('New forum'))) { // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/edit/'.$fid.'/'), __('Forum added redirect')); } else { redirect($this->feather->url->get('admin/forums/'), __('Unable to add forum')); @@ -98,7 +98,7 @@ public function edit_forum($forum_id) } // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); @@ -106,7 +106,7 @@ public function edit_forum($forum_id) $this->model->delete_permissions($forum_id); // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Perms reverted redirect')); } @@ -132,7 +132,7 @@ public function delete_forum($forum_id) if($this->request->isPost()) { $this->model->delete_forum($forum_id); // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/'), __('Forum deleted redirect')); @@ -160,7 +160,7 @@ public function edit_positions() } // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \app\model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/'), __('Forums updated redirect')); } @@ -173,7 +173,7 @@ public function display() \FeatherBB\AdminUtils::generateAdminMenu('forums'); - $categories_model = new \app\model\admin\categories(); + $categories_model = new \App\Model\Admin\Categories(); $this->feather->view2->setPageInfo(array( 'title' => array($this->feather->utils->escape($this->config['o_board_title']), __('Admin'), __('Forums')), 'active_page' => 'admin', diff --git a/app/controller/admin/groups.php b/app/Controller/Admin/Groups.php similarity index 97% rename from app/controller/admin/groups.php rename to app/Controller/Admin/Groups.php index 8e4bf3c8..0208c6d2 100644 --- a/app/controller/admin/groups.php +++ b/app/Controller/Admin/Groups.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class groups +class Groups { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\groups(); + $this->model = new \App\Model\Admin\groups(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/groups.mo'); } diff --git a/app/controller/admin/index.php b/app/Controller/Admin/Index.php similarity index 98% rename from app/controller/admin/index.php rename to app/Controller/Admin/Index.php index 86f10359..36b5ec88 100644 --- a/app/controller/admin/index.php +++ b/app/Controller/Admin/Index.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class index +class Index { public function __construct() { diff --git a/app/controller/admin/maintenance.php b/app/Controller/Admin/Maintenance.php similarity index 96% rename from app/controller/admin/maintenance.php rename to app/Controller/Admin/Maintenance.php index e818ccc7..2fcb24dd 100644 --- a/app/controller/admin/maintenance.php +++ b/app/Controller/Admin/Maintenance.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class maintenance +class Maintenance { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \app\model\admin\maintenance(); + $this->model = new \App\Model\Admin\maintenance(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/admin/maintenance.mo'); } diff --git a/app/controller/admin/options.php b/app/Controller/Admin/Options.php similarity index 93% rename from app/controller/admin/options.php rename to app/Controller/Admin/Options.php index 968261dc..e7095fd2 100644 --- a/app/controller/admin/options.php +++ b/app/Controller/Admin/Options.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class options +class Options { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\options(); + $this->model = new \App\Model\Admin\options(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/options.mo'); } diff --git a/app/controller/admin/parser.php b/app/Controller/Admin/Parser.php similarity index 98% rename from app/controller/admin/parser.php rename to app/Controller/Admin/Parser.php index b58a7fc5..1ceea1e9 100644 --- a/app/controller/admin/parser.php +++ b/app/Controller/Admin/Parser.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class parser +class Parser { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\parser(); + $this->model = new \App\Model\Admin\parser(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/parser.mo'); } @@ -32,7 +32,7 @@ public function display() global $lang_admin_parser; // Legacy - require FEATHER_ROOT . 'lang/' . $this->user->language . '/admin/parser.php'; + require FEATHER_ROOT . 'app/lang/' . $this->user->language . '/admin/parser.php'; // This is where the parser data lives and breathes. $cache_file = FEATHER_ROOT.'cache/cache_parser_data.php'; diff --git a/app/controller/admin/permissions.php b/app/Controller/Admin/Permissions.php similarity index 92% rename from app/controller/admin/permissions.php rename to app/Controller/Admin/Permissions.php index 523c0f80..975aa386 100644 --- a/app/controller/admin/permissions.php +++ b/app/Controller/Admin/Permissions.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class permissions +class Permissions { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\permissions(); + $this->model = new \App\Model\Admin\permissions(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/permissions.mo'); } diff --git a/app/controller/admin/plugins.php b/app/Controller/Admin/Plugins.php similarity index 99% rename from app/controller/admin/plugins.php rename to app/Controller/Admin/Plugins.php index bb44a4b3..41446601 100644 --- a/app/controller/admin/plugins.php +++ b/app/Controller/Admin/Plugins.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class plugins +class Plugins { public function __construct() { diff --git a/app/controller/admin/reports.php b/app/Controller/Admin/Reports.php similarity index 93% rename from app/controller/admin/reports.php rename to app/Controller/Admin/Reports.php index 8e8fd555..85b996cb 100644 --- a/app/controller/admin/reports.php +++ b/app/Controller/Admin/Reports.php @@ -7,11 +7,11 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; use FeatherBB\AdminUtils; -class reports +class Reports { public function __construct() { @@ -20,7 +20,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\reports(); + $this->model = new \App\Model\Admin\reports(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/reports.mo'); } diff --git a/app/controller/admin/statistics.php b/app/Controller/Admin/Statistics.php similarity index 94% rename from app/controller/admin/statistics.php rename to app/Controller/Admin/Statistics.php index 6ac24ca5..4e00bf94 100644 --- a/app/controller/admin/statistics.php +++ b/app/Controller/Admin/Statistics.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class statistics +class Statistics { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\statistics(); + $this->model = new \App\Model\Admin\statistics(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/index.mo'); } diff --git a/app/controller/admin/users.php b/app/Controller/Admin/Users.php similarity index 98% rename from app/controller/admin/users.php rename to app/Controller/Admin/Users.php index 870949bc..398ccb96 100644 --- a/app/controller/admin/users.php +++ b/app/Controller/Admin/Users.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller\admin; +namespace App\Controller\Admin; -class users +class Users { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\admin\users(); + $this->model = new \App\Model\Admin\users(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/users.mo'); } diff --git a/app/controller/auth.php b/app/Controller/Auth.php similarity index 91% rename from app/controller/auth.php rename to app/Controller/Auth.php index dbdfd42a..72a0352c 100644 --- a/app/controller/auth.php +++ b/app/Controller/Auth.php @@ -7,9 +7,10 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; use DB; -class auth + +class Auth { public function __construct() { @@ -29,25 +30,25 @@ public function login() $form_password = $this->feather->utils->trim($this->feather->request->post('req_password')); $save_pass = (bool) $this->feather->request->post('save_pass'); - $user = \app\model\auth::get_user_from_name($form_username); + $user = \App\Model\Auth::get_user_from_name($form_username); if (!empty($user->password)) { $form_password_hash = \FeatherBB\Utils::feather_hash($form_password); // Will result in a SHA-1 hash if ($user->password == $form_password_hash) { if ($user->group_id == FEATHER_UNVERIFIED) { - \app\model\auth::update_group($user->id, $this->feather->forum_settings['o_default_user_group']); + \App\Model\Auth::update_group($user->id, $this->feather->forum_settings['o_default_user_group']); if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \app\model\cache::get_users_info()); + $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); } } - \app\model\auth::delete_online_by_ip($this->feather->request->getIp()); + \App\Model\Auth::delete_online_by_ip($this->feather->request->getIp()); // Reset tracked topics set_tracked_topics(null); $expire = ($save_pass) ? $this->feather->now + 1209600 : $this->feather->now + $this->feather->forum_settings['o_timeout_visit']; $expire = $this->feather->hooks->fire('expire_login', $expire); - \app\model\auth::feather_setcookie($user->id, $form_password_hash, $expire); + \App\Model\Auth::feather_setcookie($user->id, $form_password_hash, $expire); $this->feather->url->redirect($this->feather->url->base(), __('Login redirect')); } @@ -72,14 +73,14 @@ public function logout($token) $this->feather->url->redirect($this->feather->url->get('/'), 'Not logged in'); } - \app\model\auth::delete_online_by_id($this->feather->user->id); + \App\Model\Auth::delete_online_by_id($this->feather->user->id); // Update last_visit (make sure there's something to update it with) if (isset($this->feather->user->logged)) { - \app\model\auth::set_last_visit($this->feather->user->id, $this->feather->user->logged); + \App\Model\Auth::set_last_visit($this->feather->user->id, $this->feather->user->logged); } - \app\model\auth::feather_setcookie(1, \FeatherBB\Utils::feather_hash(uniqid(rand(), true)), time() + 31536000); + \App\Model\Auth::feather_setcookie(1, \FeatherBB\Utils::feather_hash(uniqid(rand(), true)), time() + 31536000); $this->feather->hooks->fire('logout_end'); redirect($this->feather->url->base(), __('Logout redirect')); @@ -97,7 +98,7 @@ public function forget() if (!$this->feather->email->is_valid_email($email)) { throw new \FeatherBB\Error(__('Invalid email'), 400); } - $user = \app\model\auth::get_user_from_email($email); + $user = \App\Model\Auth::get_user_from_email($email); if ($user) { // Load the "activate password" template @@ -123,7 +124,7 @@ public function forget() $new_password = random_pass(12); $new_password_key = random_pass(8); - \app\model\auth::set_new_password($new_password, $new_password_key, $user->id); + \App\Model\Auth::set_new_password($new_password, $new_password_key, $user->id); // Do the user specific replacements to the template $cur_mail_message = str_replace('', $user->username, $mail_message); diff --git a/app/Core/AdminUtils.php b/app/Core/AdminUtils.php index 1a276f74..a27eaa58 100644 --- a/app/Core/AdminUtils.php +++ b/app/Core/AdminUtils.php @@ -53,7 +53,7 @@ public static function breadcrumbs_admin(array $links) public static function get_admin_ids() { if (!$this->feather->cache->isCached('admin_ids')) { - $this->feather->cache->store('admin_ids', \app\model\cache::get_admin_ids()); + $this->feather->cache->store('admin_ids', \App\Model\Cache::get_admin_ids()); } return $this->feather->cache->retrieve('admin_ids'); diff --git a/app/Core/Auth.php b/app/Core/Auth.php index 553dbab4..873eee5a 100644 --- a/app/Core/Auth.php +++ b/app/Core/Auth.php @@ -21,7 +21,7 @@ class Auth extends \Slim\Middleware public function __construct() { - $this->model = new \app\model\auth(); + $this->model = new \App\Model\Auth(); } public function get_cookie_data($cookie_name, $cookie_seed) @@ -184,7 +184,7 @@ public function check_bans() // If we removed any expired bans during our run-through, we need to regenerate the bans cache if ($bans_altered) { - $this->app->cache->store('bans', \app\model\cache::get_bans()); + $this->app->cache->store('bans', \App\Model\Cache::get_bans()); } } @@ -272,7 +272,7 @@ public function call() // Load bans from cache if (!$this->app->cache->isCached('bans')) { - $this->app->cache->store('bans', \app\model\cache::get_bans()); + $this->app->cache->store('bans', \App\Model\Cache::get_bans()); } $feather_bans = $this->app->cache->retrieve('bans'); diff --git a/app/Core/Core.php b/app/Core/Core.php index ce1d9cc5..ab78dc95 100644 --- a/app/Core/Core.php +++ b/app/Core/Core.php @@ -235,7 +235,7 @@ public function call() 'cookies.secret_key' => $this->forum_settings['cookie_seed'])); if (!$this->app->cache->isCached('config')) { - $this->app->cache->store('config', \app\model\cache::get_config()); + $this->app->cache->store('config', \App\Model\Cache::get_config()); } // Finalize forum_settings array diff --git a/app/Core/Search.php b/app/Core/Search.php index f513f3f4..9405b421 100644 --- a/app/Core/Search.php +++ b/app/Core/Search.php @@ -93,7 +93,7 @@ public function validate_search_word($word, $idx) if (!isset($stopwords)) { if (!$this->feather->cache->isCached('stopwords')) { - $this->feather->cache->store('stopwords', \app\model\cache::get_config(), '+1 week'); + $this->feather->cache->store('stopwords', \App\Model\Cache::get_config(), '+1 week'); } $stopwords = $this->feather->cache->retrieve('stopwords'); } diff --git a/app/Core/View.php b/app/Core/View.php index 510c6e46..fc845332 100644 --- a/app/Core/View.php +++ b/app/Core/View.php @@ -362,7 +362,7 @@ protected function getDefaultPageInfo() { // Check if config file exists to avoid error when installing forum if (!$this->app->cache->isCached('quickjump') && is_file($this->app->forum_env['FORUM_CONFIG_FILE'])) { - $this->app->cache->store('quickjump', \app\model\cache::get_quickjump()); + $this->app->cache->store('quickjump', \App\Model\Cache::get_quickjump()); } $data = array( @@ -383,13 +383,13 @@ protected function getDefaultPageInfo() ); if (is_object($this->app->user) && $this->app->user->is_admmod) { - $data['has_reports'] = \app\model\header::get_reports(); + $data['has_reports'] = \App\Model\Header::get_reports(); } if ($this->app->forum_env['FEATHER_SHOW_INFO']) { - $data['exec_info'] = \app\model\debug::get_info(); + $data['exec_info'] = \App\Model\Debug::get_info(); if ($this->app->forum_env['FEATHER_SHOW_QUERIES']) { - $data['queries_info'] = \app\model\debug::get_queries(); + $data['queries_info'] = \App\Model\Debug::get_queries(); } } diff --git a/app/model/admin/bans.php b/app/Model/Admin/Bans.php similarity index 99% rename from app/model/admin/bans.php rename to app/Model/Admin/Bans.php index 9e8b0426..33e47e6c 100644 --- a/app/model/admin/bans.php +++ b/app/Model/Admin/Bans.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/admin/categories.php b/app/Model/Admin/Categories.php similarity index 97% rename from app/model/admin/categories.php rename to app/Model/Admin/Categories.php index fb6bb823..2eb4fde7 100644 --- a/app/model/admin/categories.php +++ b/app/Model/Admin/Categories.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher. */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; @@ -60,7 +60,7 @@ public function delete_category($cat_to_delete) foreach ($forums_in_cat as $forum) { // Prune all posts and topics - $this->maintenance = new \app\model\admin\maintenance(); + $this->maintenance = new \App\Model\Admin\maintenance(); $this->maintenance->prune($forum->id, 1, -1); // Delete forum diff --git a/app/model/admin/censoring.php b/app/Model/Admin/Censoring.php similarity index 99% rename from app/model/admin/censoring.php rename to app/Model/Admin/Censoring.php index 4aa81719..74581ad4 100644 --- a/app/model/admin/censoring.php +++ b/app/Model/Admin/Censoring.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/admin/forums.php b/app/Model/Admin/Forums.php similarity index 99% rename from app/model/admin/forums.php rename to app/Model/Admin/Forums.php index 6fed815e..823a0f73 100644 --- a/app/model/admin/forums.php +++ b/app/Model/Admin/Forums.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; @@ -61,7 +61,7 @@ public function delete_forum($forum_id) $forum_id = $this->hook->fire('delete_forum_start', $forum_id); // Prune all posts and topics - $this->maintenance = new \app\model\admin\maintenance(); + $this->maintenance = new \App\Model\Admin\maintenance(); $this->maintenance->prune($forum_id, 1, -1); // Delete the forum diff --git a/app/model/admin/groups.php b/app/Model/Admin/Groups.php similarity index 99% rename from app/model/admin/groups.php rename to app/Model/Admin/Groups.php index ec37cacc..04faffcb 100644 --- a/app/model/admin/groups.php +++ b/app/Model/Admin/Groups.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/admin/maintenance.php b/app/Model/Admin/Maintenance.php similarity index 99% rename from app/model/admin/maintenance.php rename to app/Model/Admin/Maintenance.php index d6681e02..2b283169 100644 --- a/app/model/admin/maintenance.php +++ b/app/Model/Admin/Maintenance.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/admin/options.php b/app/Model/Admin/Options.php similarity index 99% rename from app/model/admin/options.php rename to app/Model/Admin/Options.php index f4b0de7a..e6e780dd 100644 --- a/app/model/admin/options.php +++ b/app/Model/Admin/Options.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/admin/parser.php b/app/Model/Admin/Parser.php similarity index 97% rename from app/model/admin/parser.php rename to app/Model/Admin/Parser.php index efe93725..2472abfd 100644 --- a/app/model/admin/parser.php +++ b/app/Model/Admin/Parser.php @@ -8,7 +8,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/admin/permissions.php b/app/Model/Admin/Permissions.php similarity index 98% rename from app/model/admin/permissions.php rename to app/Model/Admin/Permissions.php index 3616297a..e9143582 100644 --- a/app/model/admin/permissions.php +++ b/app/Model/Admin/Permissions.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/admin/reports.php b/app/Model/Admin/Reports.php similarity index 99% rename from app/model/admin/reports.php rename to app/Model/Admin/Reports.php index aaa2a90c..faf582ba 100644 --- a/app/model/admin/reports.php +++ b/app/Model/Admin/Reports.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/admin/statistics.php b/app/Model/Admin/Statistics.php similarity index 99% rename from app/model/admin/statistics.php rename to app/Model/Admin/Statistics.php index 8e6e730d..e165b873 100644 --- a/app/model/admin/statistics.php +++ b/app/Model/Admin/Statistics.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/admin/users.php b/app/Model/Admin/Users.php similarity index 99% rename from app/model/admin/users.php rename to app/Model/Admin/Users.php index 9c367a8c..b2ad7561 100644 --- a/app/model/admin/users.php +++ b/app/Model/Admin/Users.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model\admin; +namespace App\Model\Admin; use DB; diff --git a/app/model/auth.php b/app/Model/Auth.php similarity index 99% rename from app/model/auth.php rename to app/Model/Auth.php index 55c32ddd..0b4068ea 100644 --- a/app/model/auth.php +++ b/app/Model/Auth.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; class auth diff --git a/app/model/cache.php b/app/Model/Cache.php similarity index 99% rename from app/model/cache.php rename to app/Model/Cache.php index 05d9e424..c5c60849 100644 --- a/app/model/cache.php +++ b/app/Model/Cache.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; class cache diff --git a/app/model/debug.php b/app/Model/Debug.php similarity index 98% rename from app/model/debug.php rename to app/Model/Debug.php index a5486687..327dbbb5 100644 --- a/app/model/debug.php +++ b/app/Model/Debug.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; class debug diff --git a/app/model/delete.php b/app/Model/Delete.php similarity index 99% rename from app/model/delete.php rename to app/Model/Delete.php index 0f33e614..4723e754 100644 --- a/app/model/delete.php +++ b/app/Model/Delete.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/edit.php b/app/Model/Edit.php similarity index 99% rename from app/model/edit.php rename to app/Model/Edit.php index e896c531..5afdf1ce 100644 --- a/app/model/edit.php +++ b/app/Model/Edit.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/header.php b/app/Model/Header.php similarity index 96% rename from app/model/header.php rename to app/Model/Header.php index b09481a3..6601f41b 100644 --- a/app/model/header.php +++ b/app/Model/Header.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/index.php b/app/Model/Index.php similarity index 99% rename from app/model/index.php rename to app/Model/Index.php index 1e4d1bde..1fed1f45 100644 --- a/app/model/index.php +++ b/app/Model/Index.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/install.php b/app/Model/Install.php similarity index 99% rename from app/model/install.php rename to app/Model/Install.php index 82c9ffbb..3c955d2c 100644 --- a/app/model/install.php +++ b/app/Model/Install.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/login.php b/app/Model/Login.php similarity index 99% rename from app/model/login.php rename to app/Model/Login.php index fee16d59..a8d8abbb 100644 --- a/app/model/login.php +++ b/app/Model/Login.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; $this->email = $this->feather->email; - $this->auth = new \app\model\auth(); + $this->auth = new \App\Model\Auth(); } public function login() diff --git a/app/model/misc.php b/app/Model/Misc.php similarity index 99% rename from app/model/misc.php rename to app/Model/Misc.php index e5c53f63..7d13731c 100644 --- a/app/model/misc.php +++ b/app/Model/Misc.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/moderate.php b/app/Model/Moderate.php similarity index 99% rename from app/model/moderate.php rename to app/Model/Moderate.php index 0ae0a7be..551321db 100644 --- a/app/model/moderate.php +++ b/app/Model/Moderate.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/post.php b/app/Model/Post.php similarity index 99% rename from app/model/post.php rename to app/Model/Post.php index 9f94f158..90e80845 100644 --- a/app/model/post.php +++ b/app/Model/Post.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/profile.php b/app/Model/Profile.php similarity index 99% rename from app/model/profile.php rename to app/Model/Profile.php index 0c0ca688..9d9b5c0e 100644 --- a/app/model/profile.php +++ b/app/Model/Profile.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; $this->email = $this->feather->email; - $this->auth = new \app\model\auth(); + $this->auth = new \App\Model\Auth(); } public function change_pass($id) diff --git a/app/model/register.php b/app/Model/Register.php similarity index 99% rename from app/model/register.php rename to app/Model/Register.php index c7261775..01e7a8ae 100644 --- a/app/model/register.php +++ b/app/Model/Register.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; $this->email = $this->feather->email; - $this->auth = new \app\model\auth(); + $this->auth = new \App\Model\Auth(); } public function check_for_errors() diff --git a/app/model/search.php b/app/Model/Search.php similarity index 99% rename from app/model/search.php rename to app/Model/Search.php index 95c9143e..643002e9 100644 --- a/app/model/search.php +++ b/app/Model/Search.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/userlist.php b/app/Model/Userlist.php similarity index 99% rename from app/model/userlist.php rename to app/Model/Userlist.php index 65c41121..0c21409e 100644 --- a/app/model/userlist.php +++ b/app/Model/Userlist.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/viewforum.php b/app/Model/Viewforum.php similarity index 99% rename from app/model/viewforum.php rename to app/Model/Viewforum.php index 27248135..f4c67fa7 100644 --- a/app/model/viewforum.php +++ b/app/Model/Viewforum.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/model/viewtopic.php b/app/Model/Viextopic.php similarity index 99% rename from app/model/viewtopic.php rename to app/Model/Viextopic.php index c6003e5d..b756b3bd 100644 --- a/app/model/viewtopic.php +++ b/app/Model/Viextopic.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\model; +namespace App\Model; use DB; diff --git a/app/controller/delete.php b/app/controller/delete.php index 14319516..6a00ff4a 100644 --- a/app/controller/delete.php +++ b/app/controller/delete.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class delete +class Delete { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \app\model\delete(); + $this->model = new \App\Model\Delete(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/delete.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); } diff --git a/app/controller/edit.php b/app/controller/edit.php index 91dc6662..466b19b9 100644 --- a/app/controller/edit.php +++ b/app/controller/edit.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class edit +class Edit { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\edit(); + $this->model = new \App\Model\edit(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/post.mo'); diff --git a/app/controller/help.php b/app/controller/help.php index ab6d423a..25b5ff4a 100644 --- a/app/controller/help.php +++ b/app/controller/help.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class help +class Help { public function __construct() { diff --git a/app/controller/index.php b/app/controller/index.php index e3f4cf5d..219f6b72 100644 --- a/app/controller/index.php +++ b/app/controller/index.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class index +class Index { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \app\model\index(); + $this->model = new \App\Model\Index(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/index.mo'); } diff --git a/app/controller/install.php b/app/controller/install.php index d3c0b347..177d57b2 100644 --- a/app/controller/install.php +++ b/app/controller/install.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class install +class Install { protected $supported_dbs = array('mysql' => 'MySQL', 'pgsql' => 'PostgreSQL', @@ -26,7 +26,7 @@ class install public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \app\model\install(); + $this->model = new \App\Model\install(); $this->available_langs = \FeatherBB\Lister::getLangs(); $this->feather->view2->setStyle('FeatherBB'); } diff --git a/app/controller/login.php b/app/controller/login.php index 68641f7c..a409a330 100644 --- a/app/controller/login.php +++ b/app/controller/login.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class login +class Login { public function __construct() { @@ -20,7 +20,7 @@ public function __construct() $this->request = $this->feather->request; - $this->model = new \app\model\login(); + $this->model = new \App\Model\Login(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/login.mo'); } diff --git a/app/controller/misc.php b/app/controller/misc.php index d6c71a97..1916080a 100644 --- a/app/controller/misc.php +++ b/app/controller/misc.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class misc +class Misc { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \app\model\misc(); + $this->model = new \App\Model\Misc(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/register.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/misc.mo'); } diff --git a/app/controller/moderate.php b/app/controller/moderate.php index 43d84b61..0993e8be 100644 --- a/app/controller/moderate.php +++ b/app/controller/moderate.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class moderate +class Moderate { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\moderate(); + $this->model = new \App\Model\Moderate(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/topic.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/forum.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/misc.mo'); diff --git a/app/controller/post.php b/app/controller/post.php index 75ba6187..88190020 100644 --- a/app/controller/post.php +++ b/app/controller/post.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class post +class Post { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \app\model\post(); + $this->model = new \App\Model\Post(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/prof_reg.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/register.mo'); diff --git a/app/controller/profile.php b/app/controller/profile.php index 187f33cb..30381a8f 100644 --- a/app/controller/profile.php +++ b/app/controller/profile.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class profile +class Profile { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\profile(); + $this->model = new \App\Model\Profile(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/profile.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); diff --git a/app/controller/register.php b/app/controller/register.php index 7a670f99..a1fc750c 100644 --- a/app/controller/register.php +++ b/app/controller/register.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class register +class Register { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\register(); + $this->model = new \App\Model\Register(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/antispam.mo'); diff --git a/app/controller/search.php b/app/controller/search.php index 3866dd19..e833f3b0 100644 --- a/app/controller/search.php +++ b/app/controller/search.php @@ -7,9 +7,9 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class search +class Search { public function __construct() { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \app\model\search(); + $this->model = new \App\Model\search(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/userlist.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/search.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/forum.mo'); diff --git a/app/controller/userlist.php b/app/controller/userlist.php index fef46842..3954c01c 100644 --- a/app/controller/userlist.php +++ b/app/controller/userlist.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class userlist +class Userlist { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \app\model\userlist(); + $this->model = new \App\Model\Userlist(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/userlist.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/search.mo'); } diff --git a/app/controller/viewforum.php b/app/controller/viewforum.php index a2457107..523b4a83 100644 --- a/app/controller/viewforum.php +++ b/app/controller/viewforum.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class viewforum +class Viewforum { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \app\model\viewforum(); + $this->model = new \App\Model\Viewforum(); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/forum.mo'); } diff --git a/app/controller/viewtopic.php b/app/controller/viewtopic.php index abf5180c..4ba812cd 100644 --- a/app/controller/viewtopic.php +++ b/app/controller/viewtopic.php @@ -7,14 +7,14 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace app\controller; +namespace App\Controller; -class viewtopic +class Viewtopic { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \app\model\viewtopic(); + $this->model = new \App\Model\Viewtopic(); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/topic.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/bbeditor.mo'); diff --git a/include/functions.php b/include/functions.php index 91e5784c..3cd0fd7c 100644 --- a/include/functions.php +++ b/include/functions.php @@ -16,7 +16,7 @@ function get_admin_ids() // Get Slim current session $feather = \Slim\Slim::getInstance(); if (!$feather->cache->isCached('admin_ids')) { - $feather->cache->store('admin_ids', \app\model\cache::get_admin_ids()); + $feather->cache->store('admin_ids', \App\Model\Cache::get_admin_ids()); } return $feather->cache->retrieve('admin_ids'); @@ -350,12 +350,12 @@ function censor_words($text) $feather = \Slim\Slim::getInstance(); if (!$feather->cache->isCached('search_for')) { - $feather->cache->store('search_for', \app\model\cache::get_censoring('search_for')); + $feather->cache->store('search_for', \App\Model\Cache::get_censoring('search_for')); $search_for = $feather->cache->retrieve('search_for'); } if (!$feather->cache->isCached('replace_with')) { - $feather->cache->store('replace_with', \app\model\cache::get_censoring('replace_with')); + $feather->cache->store('replace_with', \App\Model\Cache::get_censoring('replace_with')); $replace_with = $feather->cache->retrieve('replace_with'); } diff --git a/include/routes.php b/include/routes.php index a530ed7b..617db5b9 100644 --- a/include/routes.php +++ b/include/routes.php @@ -8,20 +8,20 @@ */ // Index -$feather->get('/', '\app\controller\index:display'); +$feather->get('/', '\App\Controller\index:display'); // Viewforum -$feather->get('/forum/:id(/:name)(/page/:page)(/)', '\app\controller\viewforum:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); +$feather->get('/forum/:id(/:name)(/page/:page)(/)', '\App\Controller\viewforum:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); // Viewtopic $feather->group('/topic', function() use ($feather) { - $feather->get('/:id(/:name)(/page/:page)(/)', '\app\controller\viewtopic:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); - $feather->get('/:id/action/:action(/)', '\app\controller\viewtopic:action')->conditions(array('id' => '[0-9]+')); + $feather->get('/:id(/:name)(/page/:page)(/)', '\App\Controller\viewtopic:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); + $feather->get('/:id/action/:action(/)', '\App\Controller\viewtopic:action')->conditions(array('id' => '[0-9]+')); }); -$feather->get('/post/:pid(/)', '\app\controller\viewtopic:viewpost')->conditions(array('pid' => '[0-9]+')); +$feather->get('/post/:pid(/)', '\App\Controller\viewtopic:viewpost')->conditions(array('pid' => '[0-9]+')); // Userlist -$feather->get('/userlist(/)', '\app\controller\userlist:display'); +$feather->get('/userlist(/)', '\App\Controller\userlist:display'); // Auth routes $feather->group('/auth', function() use ($feather) { @@ -32,54 +32,54 @@ $this->feather->url->redirect($this->feather->url->get('/auth/login')); } }); - $feather->map('/login(/)', '\app\controller\auth:login')->via('GET', 'POST'); - $feather->map('/forget(/)', '\app\controller\auth:forget')->via('GET', 'POST'); - $feather->get('/logout/token/:token(/)', '\app\controller\auth:logout'); + $feather->map('/login(/)', '\App\Controller\auth:login')->via('GET', 'POST'); + $feather->map('/forget(/)', '\App\Controller\auth:forget')->via('GET', 'POST'); + $feather->get('/logout/token/:token(/)', '\App\Controller\auth:logout'); }); // Register routes $feather->group('/register', function() use ($feather) { - $feather->get('(/)', '\app\controller\register:rules'); - $feather->map('/agree(/)', '\app\controller\register:display')->via('GET', 'POST'); - $feather->get('/cancel(/)', '\app\controller\register:cancel'); + $feather->get('(/)', '\App\Controller\register:rules'); + $feather->map('/agree(/)', '\App\Controller\register:display')->via('GET', 'POST'); + $feather->get('/cancel(/)', '\App\Controller\register:cancel'); }); // Post routes $feather->group('/post', function() use ($feather) { - $feather->map('/new-topic/:fid(/)', '\app\controller\post:newpost')->conditions(array('fid' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/reply/:tid(/)(/quote/:qid)(/)', '\app\controller\post:newreply')->conditions(array('tid' => '[0-9]+', 'qid' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/new-topic/:fid(/)', '\App\Controller\post:newpost')->conditions(array('fid' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/reply/:tid(/)(/quote/:qid)(/)', '\App\Controller\post:newreply')->conditions(array('tid' => '[0-9]+', 'qid' => '[0-9]+'))->via('GET', 'POST'); }); // Edit -$feather->map('/edit/:id(/)', '\app\controller\edit:editpost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->map('/edit/:id(/)', '\App\Controller\edit:editpost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); // Delete -$feather->map('/delete/:id(/)', '\app\controller\delete:deletepost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->map('/delete/:id(/)', '\App\Controller\delete:deletepost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); // Search routes $feather->group('/search', function() use ($feather) { - $feather->get('(/)', '\app\controller\search:display'); - $feather->get('/show/:show(/)', '\app\controller\search:quicksearches'); + $feather->get('(/)', '\App\Controller\search:display'); + $feather->get('/show/:show(/)', '\App\Controller\search:quicksearches'); }); // Help -$feather->get('/help(/)', '\app\controller\help:display'); +$feather->get('/help(/)', '\App\Controller\help:display'); // Misc -$feather->get('/rules(/)', '\app\controller\misc:rules'); -$feather->get('/mark-read(/)', '\app\controller\misc:markread'); -$feather->get('/mark-forum-read/:id(/)', '\app\controller\misc:markforumread')->conditions(array('id' => '[0-9]+')); -$feather->map('/email/:id(/)', '\app\controller\misc:email')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); -$feather->map('/report/:id(/)', '\app\controller\misc:report')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); -$feather->get('/subscribe/forum/:id(/)', '\app\controller\misc:subscribeforum')->conditions(array('id' => '[0-9]+')); -$feather->get('/unsubscribe/forum/:id(/)', '\app\controller\misc:unsubscribeforum')->conditions(array('id' => '[0-9]+')); -$feather->get('/subscribe/topic/:id(/)', '\app\controller\misc:subscribetopic')->conditions(array('id' => '[0-9]+')); -$feather->get('/unsubscribe/topic/:id(/)', '\app\controller\misc:unsubscribetopic')->conditions(array('id' => '[0-9]+')); +$feather->get('/rules(/)', '\App\Controller\misc:rules'); +$feather->get('/mark-read(/)', '\App\Controller\misc:markread'); +$feather->get('/mark-forum-read/:id(/)', '\App\Controller\misc:markforumread')->conditions(array('id' => '[0-9]+')); +$feather->map('/email/:id(/)', '\App\Controller\misc:email')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->map('/report/:id(/)', '\App\Controller\misc:report')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->get('/subscribe/forum/:id(/)', '\App\Controller\misc:subscribeforum')->conditions(array('id' => '[0-9]+')); +$feather->get('/unsubscribe/forum/:id(/)', '\App\Controller\misc:unsubscribeforum')->conditions(array('id' => '[0-9]+')); +$feather->get('/subscribe/topic/:id(/)', '\App\Controller\misc:subscribetopic')->conditions(array('id' => '[0-9]+')); +$feather->get('/unsubscribe/topic/:id(/)', '\App\Controller\misc:unsubscribetopic')->conditions(array('id' => '[0-9]+')); // Profile routes $feather->group('/user', function() use ($feather) { - $feather->map('/:id(/section/:section)(/)', '\app\controller\profile:display')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/:id(/action/:action)(/)', '\app\controller\profile:action')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/:id(/section/:section)(/)', '\App\Controller\profile:display')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/:id(/action/:action)(/)', '\App\Controller\profile:action')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); }); /** @@ -93,12 +93,12 @@ // Moderate routes $feather->group('/moderate', $isAdmmod, function() use ($feather) { - $feather->get('/forum/:id(/:name)(/page/:page)(/)', '\app\controller\moderate:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); - $feather->get('/get-host/post/:pid(/)', '\app\controller\moderate:gethostpost')->conditions(array('pid' => '[0-9]+')); - $feather->get('/get-host/ip/:ip(/)', '\app\controller\moderate:gethostip'); - $feather->map('/topic/:id/forum/:fid/action/:action(/param/:param)(/)', '\app\controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/topic/:id/forum/:fid/action/:action(/page/:param)(/)', '\app\controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); - $feather->post('/forum/:fid(/page/:page)(/)', '\app\controller\moderate:dealposts')->conditions(array('fid' => '[0-9]+', 'page' => '[0-9]+')); + $feather->get('/forum/:id(/:name)(/page/:page)(/)', '\App\Controller\moderate:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); + $feather->get('/get-host/post/:pid(/)', '\App\Controller\moderate:gethostpost')->conditions(array('pid' => '[0-9]+')); + $feather->get('/get-host/ip/:ip(/)', '\App\Controller\moderate:gethostip'); + $feather->map('/topic/:id/forum/:fid/action/:action(/param/:param)(/)', '\App\Controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/topic/:id/forum/:fid/action/:action(/page/:param)(/)', '\App\Controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); + $feather->post('/forum/:fid(/page/:page)(/)', '\App\Controller\moderate:dealposts')->conditions(array('fid' => '[0-9]+', 'page' => '[0-9]+')); }); // Admin routes @@ -114,76 +114,76 @@ }; // Admin index - $feather->get('(/action/:action)(/)', '\app\controller\admin\index:display'); - $feather->get('/index(/)', '\app\controller\admin\index:display'); + $feather->get('(/action/:action)(/)', '\App\Controller\Admin\index:display'); + $feather->get('/index(/)', '\App\Controller\Admin\index:display'); // Admin bans $feather->group('/bans', function() use ($feather) { - $feather->get('(/)', '\app\controller\admin\bans:display'); - $feather->get('/delete/:id(/)', '\app\controller\admin\bans:delete')->conditions(array('id' => '[0-9]+')); - $feather->map('/edit/:id(/)', '\app\controller\admin\bans:edit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/add(/:id)(/)', '\app\controller\admin\bans:add')->via('GET', 'POST'); + $feather->get('(/)', '\App\Controller\Admin\Bans:display'); + $feather->get('/delete/:id(/)', '\App\Controller\Admin\Bans:delete')->conditions(array('id' => '[0-9]+')); + $feather->map('/edit/:id(/)', '\App\Controller\Admin\Bans:edit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/add(/:id)(/)', '\App\Controller\Admin\Bans:add')->via('GET', 'POST'); }); // Admin options - $feather->map('/options(/)', $isAdmin, '\app\controller\admin\options:display')->via('GET', 'POST'); + $feather->map('/options(/)', $isAdmin, '\App\Controller\Admin\options:display')->via('GET', 'POST'); // Admin categories $feather->group('/categories', $isAdmin, function() use ($feather) { - $feather->get('(/)', '\app\controller\admin\categories:display'); - $feather->post('/add(/)', '\app\controller\admin\categories:add_category'); - $feather->post('/edit(/)', '\app\controller\admin\categories:edit_categories'); - $feather->post('/delete(/)', '\app\controller\admin\categories:delete_category'); + $feather->get('(/)', '\App\Controller\Admin\categories:display'); + $feather->post('/add(/)', '\App\Controller\Admin\categories:add_category'); + $feather->post('/edit(/)', '\App\Controller\Admin\categories:edit_categories'); + $feather->post('/delete(/)', '\App\Controller\Admin\categories:delete_category'); }); // Admin censoring - $feather->map('/censoring(/)', $isAdmin, '\app\controller\admin\censoring:display')->via('GET', 'POST'); + $feather->map('/censoring(/)', $isAdmin, '\App\Controller\Admin\censoring:display')->via('GET', 'POST'); // Admin reports - $feather->map('/reports(/)', '\app\controller\admin\reports:display')->via('GET', 'POST'); + $feather->map('/reports(/)', '\App\Controller\Admin\reports:display')->via('GET', 'POST'); // Admin permissions - $feather->map('/permissions(/)', $isAdmin, '\app\controller\admin\permissions:display')->via('GET', 'POST'); + $feather->map('/permissions(/)', $isAdmin, '\App\Controller\Admin\permissions:display')->via('GET', 'POST'); // Admin statistics - $feather->get('/statistics(/)', '\app\controller\admin\statistics:display'); - $feather->get('/phpinfo(/)', '\app\controller\admin\statistics:phpinfo'); + $feather->get('/statistics(/)', '\App\Controller\Admin\statistics:display'); + $feather->get('/phpinfo(/)', '\App\Controller\Admin\statistics:phpinfo'); // Admin forums $feather->group('/forums', $isAdmin, function() use ($feather) { - $feather->map('(/)', '\app\controller\admin\forums:display')->via('GET', 'POST'); - $feather->post('/add(/)', '\app\controller\admin\forums:add_forum'); - $feather->map('/edit/:id(/)', '\app\controller\admin\forums:edit_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/delete/:id(/)', '\app\controller\admin\forums:delete_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('(/)', '\App\Controller\Admin\forums:display')->via('GET', 'POST'); + $feather->post('/add(/)', '\App\Controller\Admin\forums:add_forum'); + $feather->map('/edit/:id(/)', '\App\Controller\Admin\forums:edit_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/delete/:id(/)', '\App\Controller\Admin\forums:delete_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); }); // Admin groups $feather->group('/groups', $isAdmin, function() use ($feather) { - $feather->map('(/)', '\app\controller\admin\groups:display')->via('GET', 'POST'); - $feather->map('/add(/)', '\app\controller\admin\groups:addedit')->via('GET', 'POST'); - $feather->map('/edit/:id(/)', '\app\controller\admin\groups:addedit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/delete/:id(/)', '\app\controller\admin\groups:delete')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('(/)', '\App\Controller\Admin\groups:display')->via('GET', 'POST'); + $feather->map('/add(/)', '\App\Controller\Admin\groups:addedit')->via('GET', 'POST'); + $feather->map('/edit/:id(/)', '\App\Controller\Admin\groups:addedit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/delete/:id(/)', '\App\Controller\Admin\groups:delete')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); }); // Admin plugins $feather->group('/plugins', function() use ($feather) { - $feather->map('/(/)', '\app\controller\admin\plugins:index')->via('GET', 'POST'); - $feather->map('/activate(/)', '\app\controller\admin\plugins:activate')->via('GET'); - $feather->map('/deactivate(/)', '\app\controller\admin\plugins:deactivate')->via('GET'); - // $feather->map('/loader(/)', '\app\controller\admin\plugins:display')->via('GET', 'POST'); + $feather->map('/(/)', '\App\Controller\Admin\plugins:index')->via('GET', 'POST'); + $feather->map('/activate(/)', '\App\Controller\Admin\plugins:activate')->via('GET'); + $feather->map('/deactivate(/)', '\App\Controller\Admin\plugins:deactivate')->via('GET'); + // $feather->map('/loader(/)', '\App\Controller\Admin\plugins:display')->via('GET', 'POST'); }); // Admin maintenance - $feather->map('/maintenance(/)', $isAdmin, '\app\controller\admin\maintenance:display')->via('GET', 'POST'); + $feather->map('/maintenance(/)', $isAdmin, '\App\Controller\Admin\maintenance:display')->via('GET', 'POST'); // Admin parser - $feather->map('/parser(/)', $isAdmin, '\app\controller\admin\parser:display')->via('GET', 'POST'); + $feather->map('/parser(/)', $isAdmin, '\App\Controller\Admin\parser:display')->via('GET', 'POST'); // Admin users $feather->group('/users', function() use ($feather) { - $feather->map('(/)', '\app\controller\admin\users:display')->via('GET', 'POST'); - $feather->get('/ip-stats/id/:id(/)', '\app\controller\admin\users:ipstats')->conditions(array('id' => '[0-9]+')); - $feather->get('/show-users/ip/:ip(/)', '\app\controller\admin\users:showusers'); + $feather->map('(/)', '\App\Controller\Admin\users:display')->via('GET', 'POST'); + $feather->get('/ip-stats/id/:id(/)', '\App\Controller\Admin\users:ipstats')->conditions(array('id' => '[0-9]+')); + $feather->get('/show-users/ip/:ip(/)', '\App\Controller\Admin\users:showusers'); }); }); From 0847cee497967382722f9777b44220323fed047f Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 15:48:42 +0200 Subject: [PATCH 285/353] Fixes & move more files into /app folder --- .gitignore | 4 +- app/Controller/Admin/Parser.php | 10 +- .../delete.php => Controller/Delete.php} | 2 +- .../edit.php => Controller/Edit.php} | 2 +- .../help.php => Controller/Help.php} | 0 .../index.php => Controller/Index.php} | 0 .../install.php => Controller/Install.php} | 0 .../login.php => Controller/Login.php} | 0 .../misc.php => Controller/Misc.php} | 0 .../moderate.php => Controller/Moderate.php} | 0 .../post.php => Controller/Post.php} | 0 .../profile.php => Controller/Profile.php} | 14 +- .../register.php => Controller/Register.php} | 0 .../search.php => Controller/Search.php} | 2 +- .../userlist.php => Controller/Userlist.php} | 0 .../Viewforum.php} | 0 app/Controller/Viewtopic.php | 149 ++++++++++++++++++ .../Viextopic.php} | 0 app/Core/Cache.php | 2 +- app/Core/Core.php | 14 +- app/Core/Email.php | 2 +- app/Core/Lister.php | 4 +- {include => app/Helpers}/bbcd_compile.php | 4 +- {include => app/Helpers}/bbcd_source.php | 0 {include => app/Helpers}/functions.php | 4 +- {include => app/Helpers}/l10n.php | 0 {include => app/Helpers}/parser.php | 8 +- {include => app/Helpers}/srand.php | 0 .../Helpers}/utf8/mbstring/core.php | 0 {include => app/Helpers}/utf8/native/core.php | 0 {include => app/Helpers}/utf8/ord.php | 0 .../Helpers}/utf8/str_ireplace.php | 0 {include => app/Helpers}/utf8/str_pad.php | 0 {include => app/Helpers}/utf8/str_split.php | 0 {include => app/Helpers}/utf8/strcasecmp.php | 0 {include => app/Helpers}/utf8/strcspn.php | 0 {include => app/Helpers}/utf8/stristr.php | 0 {include => app/Helpers}/utf8/strrev.php | 0 {include => app/Helpers}/utf8/strspn.php | 0 .../Helpers}/utf8/substr_replace.php | 0 {include => app/Helpers}/utf8/trim.php | 0 {include => app/Helpers}/utf8/ucfirst.php | 0 {include => app/Helpers}/utf8/ucwords.php | 0 {include => app/Helpers}/utf8/utf8.php | 0 {include => app/Helpers}/utf8/utils/ascii.php | 0 {include => app/Helpers}/utf8/utils/bad.php | 0 .../Helpers}/utf8/utils/patterns.php | 0 .../Helpers}/utf8/utils/position.php | 0 .../Helpers}/utf8/utils/specials.php | 0 .../Helpers}/utf8/utils/unicode.php | 0 .../Helpers}/utf8/utils/validation.php | 0 app/Model/Admin/Permissions.php | 2 +- app/Model/Edit.php | 4 +- app/Model/Moderate.php | 2 +- app/Model/Post.php | 6 +- app/Model/Profile.php | 2 +- app/Model/{Viextopic.php => Viewtopic.php} | 0 {include => app}/routes.php | 0 cache/.htaccess | 3 - extern.php | 10 +- index.php | 8 +- style/themes/FeatherBB/view/help.php | 2 +- style/themes/FeatherBB/view/post.php | 2 +- style/themes/MyFeatherBB/view/help.php | 2 +- style/themes/MyFeatherBB/view/post.php | 2 +- view/help.php | 2 +- view/post.php | 2 +- 67 files changed, 207 insertions(+), 63 deletions(-) rename app/{controller/delete.php => Controller/Delete.php} (97%) rename app/{controller/edit.php => Controller/Edit.php} (98%) rename app/{controller/help.php => Controller/Help.php} (100%) rename app/{controller/index.php => Controller/Index.php} (100%) rename app/{controller/install.php => Controller/Install.php} (100%) rename app/{controller/login.php => Controller/Login.php} (100%) rename app/{controller/misc.php => Controller/Misc.php} (100%) rename app/{controller/moderate.php => Controller/Moderate.php} (100%) rename app/{controller/post.php => Controller/Post.php} (100%) rename app/{controller/profile.php => Controller/Profile.php} (96%) rename app/{controller/register.php => Controller/Register.php} (100%) rename app/{controller/search.php => Controller/Search.php} (97%) rename app/{controller/userlist.php => Controller/Userlist.php} (100%) rename app/{controller/viewforum.php => Controller/Viewforum.php} (100%) create mode 100644 app/Controller/Viewtopic.php rename app/{controller/viewtopic.php => Controller/Viextopic.php} (100%) rename {include => app/Helpers}/bbcd_compile.php (99%) rename {include => app/Helpers}/bbcd_source.php (100%) rename {include => app/Helpers}/functions.php (99%) rename {include => app/Helpers}/l10n.php (100%) rename {include => app/Helpers}/parser.php (99%) rename {include => app/Helpers}/srand.php (100%) rename {include => app/Helpers}/utf8/mbstring/core.php (100%) rename {include => app/Helpers}/utf8/native/core.php (100%) rename {include => app/Helpers}/utf8/ord.php (100%) rename {include => app/Helpers}/utf8/str_ireplace.php (100%) rename {include => app/Helpers}/utf8/str_pad.php (100%) rename {include => app/Helpers}/utf8/str_split.php (100%) rename {include => app/Helpers}/utf8/strcasecmp.php (100%) rename {include => app/Helpers}/utf8/strcspn.php (100%) rename {include => app/Helpers}/utf8/stristr.php (100%) rename {include => app/Helpers}/utf8/strrev.php (100%) rename {include => app/Helpers}/utf8/strspn.php (100%) rename {include => app/Helpers}/utf8/substr_replace.php (100%) rename {include => app/Helpers}/utf8/trim.php (100%) rename {include => app/Helpers}/utf8/ucfirst.php (100%) rename {include => app/Helpers}/utf8/ucwords.php (100%) rename {include => app/Helpers}/utf8/utf8.php (100%) rename {include => app/Helpers}/utf8/utils/ascii.php (100%) rename {include => app/Helpers}/utf8/utils/bad.php (100%) rename {include => app/Helpers}/utf8/utils/patterns.php (100%) rename {include => app/Helpers}/utf8/utils/position.php (100%) rename {include => app/Helpers}/utf8/utils/specials.php (100%) rename {include => app/Helpers}/utf8/utils/unicode.php (100%) rename {include => app/Helpers}/utf8/utils/validation.php (100%) rename app/Model/{Viextopic.php => Viewtopic.php} (100%) rename {include => app}/routes.php (100%) delete mode 100644 cache/.htaccess diff --git a/.gitignore b/.gitignore index 40221181..4728b64b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -cache/ -include/config.php +app/cache/ +app/config.php .idea/ nbproject/ lang/French diff --git a/app/Controller/Admin/Parser.php b/app/Controller/Admin/Parser.php index 1ceea1e9..aafe88da 100644 --- a/app/Controller/Admin/Parser.php +++ b/app/Controller/Admin/Parser.php @@ -35,16 +35,16 @@ public function display() require FEATHER_ROOT . 'app/lang/' . $this->user->language . '/admin/parser.php'; // This is where the parser data lives and breathes. - $cache_file = FEATHER_ROOT.'cache/cache_parser_data.php'; + $cache_file = FEATHER_ROOT.'app/cache/cache_parser_data.php'; // If RESET button pushed, or no cache file, re-compile master bbcode source file. if ($this->request->post('reset') || !file_exists($cache_file)) { - require_once(FEATHER_ROOT.'include/bbcd_source.php'); - require_once(FEATHER_ROOT.'include/bbcd_compile.php'); + require_once(FEATHER_ROOT.'app/Helpers/bbcd_source.php'); + require_once(FEATHER_ROOT.'app/Helpers/bbcd_compile.php'); redirect($this->feather->url->get('admin/parser/'), $lang_admin_parser['reset_success']); } - // Load the current BBCode $pd array from include/parser_data.inc.php. + // Load the current BBCode $pd array from app/Helpers/parser_data.inc.php. require_once($cache_file); // Fetch $pd compiled global regex data. $bbcd = $pd['bbcd']; // Local scratch copy of $bbcd. $smilies = $pd['smilies']; // Local scratch copy of $smilies. @@ -198,7 +198,7 @@ public function display() } } - require_once('include/bbcd_compile.php'); // Compile $bbcd and save into $pd['bbcd'] + require_once('app/Helpers/bbcd_compile.php'); // Compile $bbcd and save into $pd['bbcd'] redirect($this->feather->url->get('admin/parser/'), $lang_admin_parser['save_success']); } diff --git a/app/controller/delete.php b/app/Controller/Delete.php similarity index 97% rename from app/controller/delete.php rename to app/Controller/Delete.php index 6a00ff4a..643dd871 100644 --- a/app/controller/delete.php +++ b/app/Controller/Delete.php @@ -57,7 +57,7 @@ public function deletepost($id) $this->model->handle_deletion($is_topic_post, $id, $cur_post['tid'], $cur_post['fid']); } - require $this->feather->forum_env['FEATHER_ROOT'].'include/parser.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'app/Helpers/parser.php'; $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); $this->feather->view2->setPageInfo(array( diff --git a/app/controller/edit.php b/app/Controller/Edit.php similarity index 98% rename from app/controller/edit.php rename to app/Controller/Edit.php index 466b19b9..59c38a50 100644 --- a/app/controller/edit.php +++ b/app/Controller/Edit.php @@ -81,7 +81,7 @@ public function editpost($id) } if ($this->request->post('preview')) { - require_once FEATHER_ROOT.'include/parser.php'; + require_once FEATHER_ROOT.'app/Helpers/parser.php'; $preview_message = parse_message($post['message'], $post['hide_smilies']); } else { $preview_message = ''; diff --git a/app/controller/help.php b/app/Controller/Help.php similarity index 100% rename from app/controller/help.php rename to app/Controller/Help.php diff --git a/app/controller/index.php b/app/Controller/Index.php similarity index 100% rename from app/controller/index.php rename to app/Controller/Index.php diff --git a/app/controller/install.php b/app/Controller/Install.php similarity index 100% rename from app/controller/install.php rename to app/Controller/Install.php diff --git a/app/controller/login.php b/app/Controller/Login.php similarity index 100% rename from app/controller/login.php rename to app/Controller/Login.php diff --git a/app/controller/misc.php b/app/Controller/Misc.php similarity index 100% rename from app/controller/misc.php rename to app/Controller/Misc.php diff --git a/app/controller/moderate.php b/app/Controller/Moderate.php similarity index 100% rename from app/controller/moderate.php rename to app/Controller/Moderate.php diff --git a/app/controller/post.php b/app/Controller/Post.php similarity index 100% rename from app/controller/post.php rename to app/Controller/Post.php diff --git a/app/controller/profile.php b/app/Controller/Profile.php similarity index 96% rename from app/controller/profile.php rename to app/Controller/Profile.php index 30381a8f..11dca00d 100644 --- a/app/controller/profile.php +++ b/app/Controller/Profile.php @@ -34,9 +34,9 @@ public function display($id, $section = null) global $pd, $forum_time_formats, $forum_date_formats; // Include UTF-8 function - require FEATHER_ROOT.'include/utf8/substr_replace.php'; - require FEATHER_ROOT.'include/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace - require FEATHER_ROOT.'include/utf8/strcasecmp.php'; + require FEATHER_ROOT.'app/Helpers/utf8/substr_replace.php'; + require FEATHER_ROOT.'app/Helpers/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace + require FEATHER_ROOT.'app/Helpers/utf8/strcasecmp.php'; if ($this->request->post('update_group_membership')) { if ($this->user->g_id > FEATHER_ADMIN) { @@ -93,7 +93,7 @@ public function display($id, $section = null) $user = $this->model->get_user_info($id); if ($user['signature'] != '') { - require FEATHER_ROOT.'include/parser.php'; + require FEATHER_ROOT.'app/Helpers/parser.php'; $parsed_signature = parse_signature($user['signature']); } @@ -244,9 +244,9 @@ public function display($id, $section = null) public function action($id, $action) { // Include UTF-8 function - require FEATHER_ROOT.'include/utf8/substr_replace.php'; - require FEATHER_ROOT.'include/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace - require FEATHER_ROOT.'include/utf8/strcasecmp.php'; + require FEATHER_ROOT.'app/Helpers/utf8/substr_replace.php'; + require FEATHER_ROOT.'app/Helpers/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace + require FEATHER_ROOT.'app/Helpers/utf8/strcasecmp.php'; if ($action != 'change_pass' || !$this->request->get('key')) { if ($this->user->g_read_board == '0') { diff --git a/app/controller/register.php b/app/Controller/Register.php similarity index 100% rename from app/controller/register.php rename to app/Controller/Register.php diff --git a/app/controller/search.php b/app/Controller/Search.php similarity index 97% rename from app/controller/search.php rename to app/Controller/Search.php index e833f3b0..64bf41fd 100644 --- a/app/controller/search.php +++ b/app/Controller/Search.php @@ -47,7 +47,7 @@ public function display() if (isset($search['is_result'])) { if ($search['show_as'] == 'posts') { - require FEATHER_ROOT.'include/parser.php'; + require FEATHER_ROOT.'app/Helpers/parser.php'; } $this->feather->view2->setPageInfo(array( diff --git a/app/controller/userlist.php b/app/Controller/Userlist.php similarity index 100% rename from app/controller/userlist.php rename to app/Controller/Userlist.php diff --git a/app/controller/viewforum.php b/app/Controller/Viewforum.php similarity index 100% rename from app/controller/viewforum.php rename to app/Controller/Viewforum.php diff --git a/app/Controller/Viewtopic.php b/app/Controller/Viewtopic.php new file mode 100644 index 00000000..dca95c9b --- /dev/null +++ b/app/Controller/Viewtopic.php @@ -0,0 +1,149 @@ +feather = \Slim\Slim::getInstance(); + $this->model = new \App\Model\Viewtopic(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/topic.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/bbeditor.mo'); + } + + public function display($id = null, $name = null, $page = null, $pid = null) + { + global $pd; + + if ($this->feather->user->g_read_board == '0') { + throw new \FeatherBB\Error(__('No view'), 403); + } + + // Antispam feature + require $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/antispam.php'; + $index_questions = rand(0, count($lang_antispam_questions)-1); + + // Fetch some informations about the topic + $cur_topic = $this->model->get_info_topic($id); + + // Sort out who the moderators are and if we are currently a moderator (or an admin) + $mods_array = ($cur_topic['moderators'] != '') ? unserialize($cur_topic['moderators']) : array(); + $is_admmod = ($this->feather->user->g_id == FEATHER_ADMIN || ($this->feather->user->g_moderator == '1' && array_key_exists($this->feather->user->username, $mods_array))) ? true : false; + if ($is_admmod) { + $admin_ids = get_admin_ids(); + } + + // Can we or can we not post replies? + $post_link = $this->model->get_post_link($id, $cur_topic['closed'], $cur_topic['post_replies'], $is_admmod); + + // Add/update this topic in our list of tracked topics + if (!$this->feather->user->is_guest) { + $tracked_topics = get_tracked_topics(); + $tracked_topics['topics'][$id] = time(); + set_tracked_topics($tracked_topics); + } + + // Determine the post offset (based on $_GET['p']) + $num_pages = ceil(($cur_topic['num_replies'] + 1) / $this->feather->user->disp_posts); + + $p = (!isset($page) || $page <= 1 || $page > $num_pages) ? 1 : intval($page); + $start_from = $this->feather->user->disp_posts * ($p - 1); + + $url_topic = $this->feather->url->url_friendly($cur_topic['subject']); + $url_forum = $this->feather->url->url_friendly($cur_topic['forum_name']); + + // Generate paging links + $paging_links = ''.__('Pages').' '.$this->feather->url->paginate($num_pages, $p, 'topic/'.$id.'/'.$url_topic.'/#'); + + if ($this->feather->forum_settings['o_censoring'] == '1') { + $cur_topic['subject'] = censor_words($cur_topic['subject']); + } + + $quickpost = $this->model->is_quickpost($cur_topic['post_replies'], $cur_topic['closed'], $is_admmod); + $subscraction = $this->model->get_subscraction($cur_topic['is_subscribed'], $id); + + require $this->feather->forum_env['FEATHER_ROOT'].'app/Helpers/parser.php'; + $lang_bbeditor = array( + 'btnBold' => __('btnBold'), + 'btnItalic' => __('btnItalic'), + 'btnUnderline' => __('btnUnderline'), + 'btnColor' => __('btnColor'), + 'btnLeft' => __('btnLeft'), + 'btnRight' => __('btnRight'), + 'btnJustify' => __('btnJustify'), + 'btnCenter' => __('btnCenter'), + 'btnLink' => __('btnLink'), + 'btnPicture' => __('btnPicture'), + 'btnList' => __('btnList'), + 'btnQuote' => __('btnQuote'), + 'btnCode' => __('btnCode'), + 'promptImage' => __('promptImage'), + 'promptUrl' => __('promptUrl'), + 'promptQuote' => __('promptQuote') + ); + + $this->feather->view2->addAsset('canonical', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/')); + if ($num_pages > 1) { + if ($p > 1) { + $this->feather->view2->addAsset('prev', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); + } + if ($p < $num_pages) { + $this->feather->view2->addAsset('next', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); + } + } + + if ($this->feather->forum_settings['o_feed_type'] == '1') { + $this->feather->view2->addAsset('feed', 'extern.php?action=feed&fid='.$id.'&type=rss', array('title' => __('RSS forum feed'))); + } elseif ($this->feather->forum_settings['o_feed_type'] == '2') { + $this->feather->view2->addAsset('feed', 'extern.php?action=feed&fid='.$id.'&type=atom', array('title' => __('Atom forum feed'))); + } + + $this->feather->view2->setPageInfo(array( + 'title' => array($this->feather->utils->escape($this->feather->forum_settings['o_board_title']), $this->feather->utils->escape($cur_topic['forum_name']), $this->feather->utils->escape($cur_topic['subject'])), + 'active_page' => 'viewtopic', + 'page_number' => $p, + 'paging_links' => $paging_links, + 'is_indexed' => true, + 'id' => $id, + 'pid' => $pid, + 'tid' => $id, + 'fid' => $cur_topic['forum_id'], + 'post_data' => $this->model->print_posts($id, $start_from, $cur_topic, $is_admmod), + 'cur_topic' => $cur_topic, + 'subscraction' => $subscraction, + 'post_link' => $post_link, + 'start_from' => $start_from, + 'lang_antispam' => $lang_antispam, + 'quickpost' => $quickpost, + 'index_questions' => $index_questions, + 'lang_antispam_questions' => $lang_antispam_questions, + 'lang_bbeditor' => $lang_bbeditor, + 'url_forum' => $url_forum, + 'url_topic' => $url_topic, + ))->addTemplate('viewtopic.php')->display(); + + // Increment "num_views" for topic + $this->model->increment_views($id); + } + + public function viewpost($pid) + { + $post = $this->model->redirect_to_post($pid); + + return $this->display($post['topic_id'], null, $post['get_p'], $pid); + } + + public function action($id, $action) + { + $this->model->handle_actions($id, $action); + } +} diff --git a/app/controller/viewtopic.php b/app/Controller/Viextopic.php similarity index 100% rename from app/controller/viewtopic.php rename to app/Controller/Viextopic.php diff --git a/app/Core/Cache.php b/app/Core/Cache.php index 98647dc7..3843e430 100644 --- a/app/Core/Cache.php +++ b/app/Core/Cache.php @@ -54,7 +54,7 @@ public function __construct($config = array()) protected static function getDefaultSettings() { return array('name' => 'default', - 'path' => 'cache/', + 'path' => 'app/cache/', 'extension' => '.cache'); } diff --git a/app/Core/Core.php b/app/Core/Core.php index ab78dc95..fc198e7e 100644 --- a/app/Core/Core.php +++ b/app/Core/Core.php @@ -27,8 +27,8 @@ class Core extends \Slim\Middleware public function __construct(array $data) { // Handle empty values in data - $data = array_merge(array('config_file' => 'include/config.php', - 'cache_dir' => 'cache/', + $data = array_merge(array('config_file' => 'app/config.php', + 'cache_dir' => 'app/cache/', 'debug' => false), $data); // Define some core variables $this->forum_env['FEATHER_ROOT'] = realpath(dirname(__FILE__).'/../../').'/'; @@ -41,9 +41,9 @@ public function __construct(array $data) $this->env_to_globals($this->forum_env); // Legacy // Load files - require $this->forum_env['FEATHER_ROOT'].'include/utf8/utf8.php'; - require $this->forum_env['FEATHER_ROOT'].'include/functions.php'; - require $this->forum_env['FEATHER_ROOT'].'include/l10n.php'; + require $this->forum_env['FEATHER_ROOT'].'app/Helpers/utf8/utf8.php'; + require $this->forum_env['FEATHER_ROOT'].'app/Helpers/functions.php'; + require $this->forum_env['FEATHER_ROOT'].'app/Helpers/l10n.php'; // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); @@ -54,8 +54,8 @@ public static function load_default_forum_env() return array( 'FEATHER' => true, // Legacy 'FEATHER_ROOT' => '', - 'FORUM_CONFIG_FILE' => 'include/config.php', - 'FORUM_CACHE_DIR' => 'cache/', + 'FORUM_CONFIG_FILE' => 'app/config.php', + 'FORUM_CACHE_DIR' => 'app/cache/', 'FORUM_VERSION' => '1.0.0', 'FORUM_NAME' => 'FeatherBB', 'FORUM_DB_REVISION' => 21, diff --git a/app/Core/Email.php b/app/Core/Email.php index 9088a3bf..59a64c85 100644 --- a/app/Core/Email.php +++ b/app/Core/Email.php @@ -15,7 +15,7 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->config = $this->feather->config; - require FEATHER_ROOT . 'include/utf8/utils/ascii.php'; + require FEATHER_ROOT . 'app/Helpers/utf8/utils/ascii.php'; } // diff --git a/app/Core/Lister.php b/app/Core/Lister.php index 2a2d120c..8d572d9d 100644 --- a/app/Core/Lister.php +++ b/app/Core/Lister.php @@ -68,7 +68,7 @@ public static function getStyles() $feather = \Slim\Slim::getInstance(); $styles = array(); - $iterator = new \DirectoryIterator($feather->forum_env['FEATHER_ROOT'].'style/themes'); + $iterator = new \DirectoryIterator($feather->forum_env['FEATHER_ROOT'].'style/themes/'); foreach ($iterator as $child) { if(!$child->isDot() && $child->isDir() && file_exists($child->getPathname().DIRECTORY_SEPARATOR.'style.css')) { // If the theme is well formed, add it to the list @@ -88,7 +88,7 @@ public static function getLangs($folder = '') $feather = \Slim\Slim::getInstance(); $langs = array(); - $iterator = new \DirectoryIterator($feather->forum_env['FEATHER_ROOT'].'lang'); + $iterator = new \DirectoryIterator($feather->forum_env['FEATHER_ROOT'].'app/lang/'); foreach ($iterator as $child) { if(!$child->isDot() && $child->isDir() && file_exists($child->getPathname().DIRECTORY_SEPARATOR.'common.po')) { // If the lang pack is well formed, add it to the list diff --git a/include/bbcd_compile.php b/app/Helpers/bbcd_compile.php similarity index 99% rename from include/bbcd_compile.php rename to app/Helpers/bbcd_compile.php index 02b2c3b3..4aadb11c 100644 --- a/include/bbcd_compile.php +++ b/app/Helpers/bbcd_compile.php @@ -9,7 +9,7 @@ */ // This script compiles the $options, $smilies and $bbcd arrays (from bbcd_source.php script -// or from an admin page web form) into the cache/cache_parser_data.php. +// or from an admin page web form) into the app/cache/cache_parser_data.php. // Initialize a new global parser data array $pd: $pd = array( @@ -419,7 +419,7 @@ function file2title($file) $s .= ";\n"; $s .= "?>"; -file_put_contents(FEATHER_ROOT.'cache/cache_parser_data.php', $s); +file_put_contents(FEATHER_ROOT.'app/cache/cache_parser_data.php', $s); // Clean up our global variables. unset($all_tags); unset($all_block_tags); diff --git a/include/bbcd_source.php b/app/Helpers/bbcd_source.php similarity index 100% rename from include/bbcd_source.php rename to app/Helpers/bbcd_source.php diff --git a/include/functions.php b/app/Helpers/functions.php similarity index 99% rename from include/functions.php rename to app/Helpers/functions.php index 3cd0fd7c..715dded2 100644 --- a/include/functions.php +++ b/app/Helpers/functions.php @@ -31,7 +31,7 @@ function check_username($username, $errors, $exclude_id = null) global $feather, $errors, $feather_bans; // Include UTF-8 function - require_once FEATHER_ROOT.'include/utf8/strcasecmp.php'; + require_once FEATHER_ROOT.'app/Helpers/utf8/strcasecmp.php'; load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/register.mo'); load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/prof_reg.mo'); @@ -454,7 +454,7 @@ function message($msg, $http_status = null, $no_back_link = false) function random_key($len, $readable = false, $hash = false) { if (!function_exists('secure_random_bytes')) { - include FEATHER_ROOT.'include/srand.php'; + include FEATHER_ROOT.'app/Helpers/srand.php'; } $key = secure_random_bytes($len); diff --git a/include/l10n.php b/app/Helpers/l10n.php similarity index 100% rename from include/l10n.php rename to app/Helpers/l10n.php diff --git a/include/parser.php b/app/Helpers/parser.php similarity index 99% rename from include/parser.php rename to app/Helpers/parser.php index fa9f2215..a6fcb7da 100644 --- a/include/parser.php +++ b/app/Helpers/parser.php @@ -16,11 +16,11 @@ define('FEATHER_PARSER', '11-Feb-2011 13:33'); // globals. we share one array: $pd -if (file_exists(FEATHER_ROOT.'cache/cache_parser_data.php')) { // If file already exists - require_once(FEATHER_ROOT.'cache/cache_parser_data.php'); +if (file_exists(FEATHER_ROOT.'app/cache/cache_parser_data.php')) { // If file already exists + require_once(FEATHER_ROOT.'app/cache/cache_parser_data.php'); } else { // It needs to be re-generated. - require_once(FEATHER_ROOT.'include/bbcd_source.php'); - require_once(FEATHER_ROOT.'include/bbcd_compile.php'); + require_once(FEATHER_ROOT.'app/Helpers/bbcd_source.php'); + require_once(FEATHER_ROOT.'app/Helpers/bbcd_compile.php'); } // !!!! AVOIDING PCRE STACK OVERFLOWS WHICH SEG-FAULT CRASH APACHE/PHP !!!! // By default, PHP sets up pcre.recursion_limit way too high (100000). According diff --git a/include/srand.php b/app/Helpers/srand.php similarity index 100% rename from include/srand.php rename to app/Helpers/srand.php diff --git a/include/utf8/mbstring/core.php b/app/Helpers/utf8/mbstring/core.php similarity index 100% rename from include/utf8/mbstring/core.php rename to app/Helpers/utf8/mbstring/core.php diff --git a/include/utf8/native/core.php b/app/Helpers/utf8/native/core.php similarity index 100% rename from include/utf8/native/core.php rename to app/Helpers/utf8/native/core.php diff --git a/include/utf8/ord.php b/app/Helpers/utf8/ord.php similarity index 100% rename from include/utf8/ord.php rename to app/Helpers/utf8/ord.php diff --git a/include/utf8/str_ireplace.php b/app/Helpers/utf8/str_ireplace.php similarity index 100% rename from include/utf8/str_ireplace.php rename to app/Helpers/utf8/str_ireplace.php diff --git a/include/utf8/str_pad.php b/app/Helpers/utf8/str_pad.php similarity index 100% rename from include/utf8/str_pad.php rename to app/Helpers/utf8/str_pad.php diff --git a/include/utf8/str_split.php b/app/Helpers/utf8/str_split.php similarity index 100% rename from include/utf8/str_split.php rename to app/Helpers/utf8/str_split.php diff --git a/include/utf8/strcasecmp.php b/app/Helpers/utf8/strcasecmp.php similarity index 100% rename from include/utf8/strcasecmp.php rename to app/Helpers/utf8/strcasecmp.php diff --git a/include/utf8/strcspn.php b/app/Helpers/utf8/strcspn.php similarity index 100% rename from include/utf8/strcspn.php rename to app/Helpers/utf8/strcspn.php diff --git a/include/utf8/stristr.php b/app/Helpers/utf8/stristr.php similarity index 100% rename from include/utf8/stristr.php rename to app/Helpers/utf8/stristr.php diff --git a/include/utf8/strrev.php b/app/Helpers/utf8/strrev.php similarity index 100% rename from include/utf8/strrev.php rename to app/Helpers/utf8/strrev.php diff --git a/include/utf8/strspn.php b/app/Helpers/utf8/strspn.php similarity index 100% rename from include/utf8/strspn.php rename to app/Helpers/utf8/strspn.php diff --git a/include/utf8/substr_replace.php b/app/Helpers/utf8/substr_replace.php similarity index 100% rename from include/utf8/substr_replace.php rename to app/Helpers/utf8/substr_replace.php diff --git a/include/utf8/trim.php b/app/Helpers/utf8/trim.php similarity index 100% rename from include/utf8/trim.php rename to app/Helpers/utf8/trim.php diff --git a/include/utf8/ucfirst.php b/app/Helpers/utf8/ucfirst.php similarity index 100% rename from include/utf8/ucfirst.php rename to app/Helpers/utf8/ucfirst.php diff --git a/include/utf8/ucwords.php b/app/Helpers/utf8/ucwords.php similarity index 100% rename from include/utf8/ucwords.php rename to app/Helpers/utf8/ucwords.php diff --git a/include/utf8/utf8.php b/app/Helpers/utf8/utf8.php similarity index 100% rename from include/utf8/utf8.php rename to app/Helpers/utf8/utf8.php diff --git a/include/utf8/utils/ascii.php b/app/Helpers/utf8/utils/ascii.php similarity index 100% rename from include/utf8/utils/ascii.php rename to app/Helpers/utf8/utils/ascii.php diff --git a/include/utf8/utils/bad.php b/app/Helpers/utf8/utils/bad.php similarity index 100% rename from include/utf8/utils/bad.php rename to app/Helpers/utf8/utils/bad.php diff --git a/include/utf8/utils/patterns.php b/app/Helpers/utf8/utils/patterns.php similarity index 100% rename from include/utf8/utils/patterns.php rename to app/Helpers/utf8/utils/patterns.php diff --git a/include/utf8/utils/position.php b/app/Helpers/utf8/utils/position.php similarity index 100% rename from include/utf8/utils/position.php rename to app/Helpers/utf8/utils/position.php diff --git a/include/utf8/utils/specials.php b/app/Helpers/utf8/utils/specials.php similarity index 100% rename from include/utf8/utils/specials.php rename to app/Helpers/utf8/utils/specials.php diff --git a/include/utf8/utils/unicode.php b/app/Helpers/utf8/utils/unicode.php similarity index 100% rename from include/utf8/utils/unicode.php rename to app/Helpers/utf8/utils/unicode.php diff --git a/include/utf8/utils/validation.php b/app/Helpers/utf8/utils/validation.php similarity index 100% rename from include/utf8/utils/validation.php rename to app/Helpers/utf8/utils/validation.php diff --git a/app/Model/Admin/Permissions.php b/app/Model/Admin/Permissions.php index e9143582..56584c81 100644 --- a/app/Model/Admin/Permissions.php +++ b/app/Model/Admin/Permissions.php @@ -43,7 +43,7 @@ public function update_permissions() // Regenerate the config cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; + require FEATHER_ROOT.'app/Helpers/cache.php'; } generate_config_cache(); diff --git a/app/Model/Edit.php b/app/Model/Edit.php index 5afdf1ce..3923bba2 100644 --- a/app/Model/Edit.php +++ b/app/Model/Edit.php @@ -93,7 +93,7 @@ public function check_errors_before_edit($can_edit_subject, $errors) // Validate BBCode syntax if ($this->config['p_message_bbcode'] == '1') { - require FEATHER_ROOT.'include/parser.php'; + require FEATHER_ROOT.'app/Helpers/parser.php'; $message = preparse_bbcode($message, $errors); } @@ -135,7 +135,7 @@ public function setup_variables($cur_post, $is_admmod, $can_edit_subject, $error // Validate BBCode syntax if ($this->config['p_message_bbcode'] == '1') { - require_once FEATHER_ROOT.'include/parser.php'; + require_once FEATHER_ROOT.'app/Helpers/parser.php'; $post['message'] = preparse_bbcode($post['message'], $errors); } diff --git a/app/Model/Moderate.php b/app/Model/Moderate.php index 551321db..a12e49f6 100644 --- a/app/Model/Moderate.php +++ b/app/Model/Moderate.php @@ -424,7 +424,7 @@ public function display_posts_view($tid, $start_from) $post_data = array(); - require FEATHER_ROOT.'include/parser.php'; + require FEATHER_ROOT.'app/Helpers/parser.php'; $post_count = 0; // Keep track of post numbers diff --git a/app/Model/Post.php b/app/Model/Post.php index 90e80845..ffa41188 100644 --- a/app/Model/Post.php +++ b/app/Model/Post.php @@ -164,7 +164,7 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) // Validate BBCode syntax if ($this->config['p_message_bbcode'] == '1') { - require FEATHER_ROOT.'include/parser.php'; + require FEATHER_ROOT.'app/Helpers/parser.php'; $message = preparse_bbcode($message, $errors); $message = $this->hook->fire('check_errors_before_post_bbcode', $message); } @@ -217,7 +217,7 @@ public function setup_variables($errors, $is_admmod) // Validate BBCode syntax if ($this->config['p_message_bbcode'] == '1') { - require_once FEATHER_ROOT.'include/parser.php'; + require_once FEATHER_ROOT.'app/Helpers/parser.php'; $post['message'] = preparse_bbcode($post['message'], $errors); } @@ -877,7 +877,7 @@ public function topic_review($tid) $post_data = $this->hook->fire('topic_review_start', $post_data, $tid); - require_once FEATHER_ROOT.'include/parser.php'; + require_once FEATHER_ROOT.'app/Helpers/parser.php'; $select_topic_review = array('poster', 'message', 'hide_smilies', 'posted'); diff --git a/app/Model/Profile.php b/app/Model/Profile.php index 9d9b5c0e..6ef4e073 100644 --- a/app/Model/Profile.php +++ b/app/Model/Profile.php @@ -905,7 +905,7 @@ public function update_profile($id, $info, $section) // Validate BBCode syntax if ($this->config['p_sig_bbcode'] == '1') { - require FEATHER_ROOT.'include/parser.php'; + require FEATHER_ROOT.'app/Helpers/parser.php'; $errors = array(); diff --git a/app/Model/Viextopic.php b/app/Model/Viewtopic.php similarity index 100% rename from app/Model/Viextopic.php rename to app/Model/Viewtopic.php diff --git a/include/routes.php b/app/routes.php similarity index 100% rename from include/routes.php rename to app/routes.php diff --git a/cache/.htaccess b/cache/.htaccess deleted file mode 100644 index 5f727798..00000000 --- a/cache/.htaccess +++ /dev/null @@ -1,3 +0,0 @@ - -Deny from All - diff --git a/extern.php b/extern.php index e35e5335..dede103d 100644 --- a/extern.php +++ b/extern.php @@ -62,15 +62,15 @@ \Slim\Slim::registerAutoloader(); // Load FeatherBB -require 'include/classes/autoload.class.php'; +require 'app/Helpers/classes/autoload.class.php'; \FeatherBB\Loader::registerAutoloader(); // Instantiate Slim and add CSRF $feather = new \Slim\Slim(); $feather->add(new \FeatherBB\Csrf()); -$feather_settings = array('config_file' => 'include/config.php', - 'cache_dir' => 'cache/', +$feather_settings = array('config_file' => 'app/config.php', + 'cache_dir' => 'app/cache/', 'debug' => 'all'); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) $feather->add(new \FeatherBB\Auth()); $feather->add(new \FeatherBB\Core($feather_settings)); @@ -439,7 +439,7 @@ function output_html($feed) // Show recent discussions if ($action == 'feed') { - require FEATHER_ROOT.'include/parser.php'; + require FEATHER_ROOT.'app/Helpers/parser.php'; // Determine what type of feed to output $type = isset($_GET['type']) ? strtolower($_GET['type']) : 'html'; @@ -650,7 +650,7 @@ function output_html($feed) // Output feed as PHP code if (isset($cache_id)) { if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'include/cache.php'; + require FEATHER_ROOT.'app/Helpers/cache.php'; } $content = 'forum_settings['o_feed_ttl'] * 60)).';'."\n\n".'?>'; diff --git a/index.php b/index.php index a68f2527..e77f054d 100644 --- a/index.php +++ b/index.php @@ -20,16 +20,14 @@ $feather = new \Slim\Slim(); $feather->add(new \FeatherBB\Csrf()); -$feather_settings = array('config_file' => 'include/config.php', - 'cache_dir' => 'cache/', +$feather_settings = array('config_file' => 'app/config.php', + 'cache_dir' => 'app/cache/', 'debug' => 'all'); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) $feather->add(new \FeatherBB\Auth()); $feather->add(new \FeatherBB\Core($feather_settings)); - - // Load the routes -require 'include/routes.php'; +require 'app/routes.php'; // Run it, baby! $feather->run(); diff --git a/style/themes/FeatherBB/view/help.php b/style/themes/FeatherBB/view/help.php index a6e83ae6..34632d06 100644 --- a/style/themes/FeatherBB/view/help.php +++ b/style/themes/FeatherBB/view/help.php @@ -125,7 +125,7 @@ request->post('preview')) { - require_once FEATHER_ROOT.'include/parser.php'; + require_once FEATHER_ROOT.'app/Helpers/parser.php'; $preview_message = parse_message($post['message'], $post['hide_smilies']); ?> diff --git a/style/themes/MyFeatherBB/view/help.php b/style/themes/MyFeatherBB/view/help.php index 1e7decf9..dd449bc4 100644 --- a/style/themes/MyFeatherBB/view/help.php +++ b/style/themes/MyFeatherBB/view/help.php @@ -124,7 +124,7 @@ request->post('preview')) { - require_once FEATHER_ROOT.'include/parser.php'; + require_once FEATHER_ROOT.'app/Helpers/parser.php'; $preview_message = parse_message($post['message'], $post['hide_smilies']); ?> diff --git a/view/help.php b/view/help.php index 1e7decf9..dd449bc4 100644 --- a/view/help.php +++ b/view/help.php @@ -124,7 +124,7 @@ request->post('preview')) { - require_once FEATHER_ROOT.'include/parser.php'; + require_once FEATHER_ROOT.'app/Helpers/parser.php'; $preview_message = parse_message($post['message'], $post['hide_smilies']); ?> From 3037098ec7cf40aedccc28124dd5c798b180f316 Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 15:50:10 +0200 Subject: [PATCH 286/353] Fix typo --- app/Controller/Viextopic.php | 149 ----------------------------------- 1 file changed, 149 deletions(-) delete mode 100644 app/Controller/Viextopic.php diff --git a/app/Controller/Viextopic.php b/app/Controller/Viextopic.php deleted file mode 100644 index 4ba812cd..00000000 --- a/app/Controller/Viextopic.php +++ /dev/null @@ -1,149 +0,0 @@ -feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\Viewtopic(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/topic.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/bbeditor.mo'); - } - - public function display($id = null, $name = null, $page = null, $pid = null) - { - global $pd; - - if ($this->feather->user->g_read_board == '0') { - throw new \FeatherBB\Error(__('No view'), 403); - } - - // Antispam feature - require $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/antispam.php'; - $index_questions = rand(0, count($lang_antispam_questions)-1); - - // Fetch some informations about the topic - $cur_topic = $this->model->get_info_topic($id); - - // Sort out who the moderators are and if we are currently a moderator (or an admin) - $mods_array = ($cur_topic['moderators'] != '') ? unserialize($cur_topic['moderators']) : array(); - $is_admmod = ($this->feather->user->g_id == FEATHER_ADMIN || ($this->feather->user->g_moderator == '1' && array_key_exists($this->feather->user->username, $mods_array))) ? true : false; - if ($is_admmod) { - $admin_ids = get_admin_ids(); - } - - // Can we or can we not post replies? - $post_link = $this->model->get_post_link($id, $cur_topic['closed'], $cur_topic['post_replies'], $is_admmod); - - // Add/update this topic in our list of tracked topics - if (!$this->feather->user->is_guest) { - $tracked_topics = get_tracked_topics(); - $tracked_topics['topics'][$id] = time(); - set_tracked_topics($tracked_topics); - } - - // Determine the post offset (based on $_GET['p']) - $num_pages = ceil(($cur_topic['num_replies'] + 1) / $this->feather->user->disp_posts); - - $p = (!isset($page) || $page <= 1 || $page > $num_pages) ? 1 : intval($page); - $start_from = $this->feather->user->disp_posts * ($p - 1); - - $url_topic = $this->feather->url->url_friendly($cur_topic['subject']); - $url_forum = $this->feather->url->url_friendly($cur_topic['forum_name']); - - // Generate paging links - $paging_links = ''.__('Pages').' '.$this->feather->url->paginate($num_pages, $p, 'topic/'.$id.'/'.$url_topic.'/#'); - - if ($this->feather->forum_settings['o_censoring'] == '1') { - $cur_topic['subject'] = censor_words($cur_topic['subject']); - } - - $quickpost = $this->model->is_quickpost($cur_topic['post_replies'], $cur_topic['closed'], $is_admmod); - $subscraction = $this->model->get_subscraction($cur_topic['is_subscribed'], $id); - - require $this->feather->forum_env['FEATHER_ROOT'].'include/parser.php'; - $lang_bbeditor = array( - 'btnBold' => __('btnBold'), - 'btnItalic' => __('btnItalic'), - 'btnUnderline' => __('btnUnderline'), - 'btnColor' => __('btnColor'), - 'btnLeft' => __('btnLeft'), - 'btnRight' => __('btnRight'), - 'btnJustify' => __('btnJustify'), - 'btnCenter' => __('btnCenter'), - 'btnLink' => __('btnLink'), - 'btnPicture' => __('btnPicture'), - 'btnList' => __('btnList'), - 'btnQuote' => __('btnQuote'), - 'btnCode' => __('btnCode'), - 'promptImage' => __('promptImage'), - 'promptUrl' => __('promptUrl'), - 'promptQuote' => __('promptQuote') - ); - - $this->feather->view2->addAsset('canonical', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/')); - if ($num_pages > 1) { - if ($p > 1) { - $this->feather->view2->addAsset('prev', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/page/'.($p - 1).'/')); - } - if ($p < $num_pages) { - $this->feather->view2->addAsset('next', $this->feather->url->get('forum/'.$id.'/'.$url_forum.'/page/'.($p + 1).'/')); - } - } - - if ($this->feather->forum_settings['o_feed_type'] == '1') { - $this->feather->view2->addAsset('feed', 'extern.php?action=feed&fid='.$id.'&type=rss', array('title' => __('RSS forum feed'))); - } elseif ($this->feather->forum_settings['o_feed_type'] == '2') { - $this->feather->view2->addAsset('feed', 'extern.php?action=feed&fid='.$id.'&type=atom', array('title' => __('Atom forum feed'))); - } - - $this->feather->view2->setPageInfo(array( - 'title' => array($this->feather->utils->escape($this->feather->forum_settings['o_board_title']), $this->feather->utils->escape($cur_topic['forum_name']), $this->feather->utils->escape($cur_topic['subject'])), - 'active_page' => 'viewtopic', - 'page_number' => $p, - 'paging_links' => $paging_links, - 'is_indexed' => true, - 'id' => $id, - 'pid' => $pid, - 'tid' => $id, - 'fid' => $cur_topic['forum_id'], - 'post_data' => $this->model->print_posts($id, $start_from, $cur_topic, $is_admmod), - 'cur_topic' => $cur_topic, - 'subscraction' => $subscraction, - 'post_link' => $post_link, - 'start_from' => $start_from, - 'lang_antispam' => $lang_antispam, - 'quickpost' => $quickpost, - 'index_questions' => $index_questions, - 'lang_antispam_questions' => $lang_antispam_questions, - 'lang_bbeditor' => $lang_bbeditor, - 'url_forum' => $url_forum, - 'url_topic' => $url_topic, - ))->addTemplate('viewtopic.php')->display(); - - // Increment "num_views" for topic - $this->model->increment_views($id); - } - - public function viewpost($pid) - { - $post = $this->model->redirect_to_post($pid); - - return $this->display($post['topic_id'], null, $post['get_p'], $pid); - } - - public function action($id, $action) - { - $this->model->handle_actions($id, $action); - } -} From 522f2834c19e052414e8880ca4215bf2078bc3da Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 16:09:46 +0200 Subject: [PATCH 287/353] Fixes. --- app/Core/Auth.php | 2 +- app/Core/Core.php | 2 +- app/Core/View.php | 4 +++- app/Model/Admin/Bans.php | 4 ++-- app/Model/Admin/Censoring.php | 12 ++++++------ app/Model/Admin/Groups.php | 4 ++-- app/Model/Admin/Options.php | 2 +- app/Model/Admin/Users.php | 4 ++-- app/Model/Index.php | 2 +- app/Model/Login.php | 2 +- app/Model/Profile.php | 12 ++++++------ app/Model/Register.php | 2 +- extern.php | 2 +- style/themes/FeatherBB/view/header.php | 2 +- style/themes/FeatherBB/view/install.php | 2 +- view/header.php | 2 +- view/install.php | 2 +- 17 files changed, 32 insertions(+), 30 deletions(-) diff --git a/app/Core/Auth.php b/app/Core/Auth.php index 873eee5a..13b1a53a 100644 --- a/app/Core/Auth.php +++ b/app/Core/Auth.php @@ -12,8 +12,8 @@ */ namespace FeatherBB; + use DB; -// use model\auth; class Auth extends \Slim\Middleware { diff --git a/app/Core/Core.php b/app/Core/Core.php index fc198e7e..7044ba22 100644 --- a/app/Core/Core.php +++ b/app/Core/Core.php @@ -214,7 +214,7 @@ public function call() $this->app->hooks->fire('core.start'); if (!is_file($this->forum_env['FORUM_CONFIG_FILE'])) { - $installer = new \controller\install; + $installer = new \App\Controller\Install; $installer->run(); return; } diff --git a/app/Core/View.php b/app/Core/View.php index fc845332..dc44590c 100644 --- a/app/Core/View.php +++ b/app/Core/View.php @@ -208,7 +208,9 @@ public function getTemplatePathname($file) public function display($nested = true) { - $this->setStyle($this->app->user->style); + if ($this->app->user) { + $this->setStyle($this->app->user->style); + } echo $this->fetch($nested); } diff --git a/app/Model/Admin/Bans.php b/app/Model/Admin/Bans.php index 33e47e6c..4dcec087 100644 --- a/app/Model/Admin/Bans.php +++ b/app/Model/Admin/Bans.php @@ -274,7 +274,7 @@ public function insert_ban() } // Regenerate the bans cache - $this->feather->cache->store('bans', \model\cache::get_bans()); + $this->feather->cache->store('bans', \App\Model\Cache::get_bans()); redirect($this->feather->url->get('admin/bans/'), __('Ban edited redirect')); } @@ -289,7 +289,7 @@ public function remove_ban($ban_id) $result = $result->delete(); // Regenerate the bans cache - $this->feather->cache->store('bans', \model\cache::get_bans()); + $this->feather->cache->store('bans', \App\Model\Cache::get_bans()); redirect($this->feather->url->get('admin/bans/'), __('Ban removed redirect')); } diff --git a/app/Model/Admin/Censoring.php b/app/Model/Admin/Censoring.php index 74581ad4..93019394 100644 --- a/app/Model/Admin/Censoring.php +++ b/app/Model/Admin/Censoring.php @@ -43,8 +43,8 @@ public function add_word() ->save(); // Regenerate the censoring cache - $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); - $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); + $this->feather->cache->store('search_for', \App\Model\Cache::get_censoring('search_for')); + $this->feather->cache->store('replace_with', \App\Model\Cache::get_censoring('replace_with')); redirect($this->feather->url->get('admin/censoring/'), __('Word added redirect')); } @@ -71,8 +71,8 @@ public function update_word() ->save(); // Regenerate the censoring cache - $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); - $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); + $this->feather->cache->store('search_for', \App\Model\Cache::get_censoring('search_for')); + $this->feather->cache->store('replace_with', \App\Model\Cache::get_censoring('replace_with')); redirect($this->feather->url->get('admin/censoring/'), __('Word updated redirect')); } @@ -87,8 +87,8 @@ public function remove_word() $result = $result->delete(); // Regenerate the censoring cache - $this->feather->cache->store('search_for', \model\cache::get_censoring('search_for')); - $this->feather->cache->store('replace_with', \model\cache::get_censoring('replace_with')); + $this->feather->cache->store('search_for', \App\Model\Cache::get_censoring('search_for')); + $this->feather->cache->store('replace_with', \App\Model\Cache::get_censoring('replace_with')); redirect($this->feather->url->get('admin/censoring/'), __('Word removed redirect')); } diff --git a/app/Model/Admin/Groups.php b/app/Model/Admin/Groups.php index 04faffcb..7128b8de 100644 --- a/app/Model/Admin/Groups.php +++ b/app/Model/Admin/Groups.php @@ -255,7 +255,7 @@ public function add_edit_group($groups) $group_id = $this->hook->fire('add_edit_group.group_id', $group_id); // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \model\cache::get_quickjump()); + $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); if ($this->request->post('mode') == 'edit') { redirect($this->feather->url->get('admin/groups/'), __('Group edited redirect')); @@ -283,7 +283,7 @@ public function set_default_group($groups) ->update_many('conf_value', $group_id); // Regenerate the config cache - $this->feather->cache->store('config', \model\cache::get_config()); + $this->feather->cache->store('config', \App\Model\Cache::get_config()); redirect($this->feather->url->get('admin/groups/'), __('Default group redirect')); } diff --git a/app/Model/Admin/Options.php b/app/Model/Admin/Options.php index e6e780dd..4de0901a 100644 --- a/app/Model/Admin/Options.php +++ b/app/Model/Admin/Options.php @@ -227,7 +227,7 @@ public function update_options() } // Regenerate the config cache - $this->feather->cache->store('config', \model\cache::get_config()); + $this->feather->cache->store('config', \App\Model\Cache::get_config()); $this->clear_feed_cache(); redirect($this->feather->url->get('admin/options/'), __('Options updated redirect')); diff --git a/app/Model/Admin/Users.php b/app/Model/Admin/Users.php index b2ad7561..2f8e600a 100644 --- a/app/Model/Admin/Users.php +++ b/app/Model/Admin/Users.php @@ -401,7 +401,7 @@ public function delete_users() // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \model\cache::get_users_info()); + $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); @@ -523,7 +523,7 @@ public function ban_users() } // Regenerate the bans cache - $this->feather->cache->store('bans', \model\cache::get_bans()); + $this->feather->cache->store('bans', \App\Model\Cache::get_bans()); redirect($this->feather->url->get('admin/users/'), __('Users banned redirect')); } diff --git a/app/Model/Index.php b/app/Model/Index.php index 1fed1f45..158491e6 100644 --- a/app/Model/Index.php +++ b/app/Model/Index.php @@ -239,7 +239,7 @@ public function collect_stats() // Collect some statistics from the database if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \model\cache::get_users_info()); + $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); diff --git a/app/Model/Login.php b/app/Model/Login.php index a8d8abbb..e5f2434c 100644 --- a/app/Model/Login.php +++ b/app/Model/Login.php @@ -62,7 +62,7 @@ public function login() // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \model\cache::get_users_info()); + $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); diff --git a/app/Model/Profile.php b/app/Model/Profile.php index 6ef4e073..526bceac 100644 --- a/app/Model/Profile.php +++ b/app/Model/Profile.php @@ -425,13 +425,13 @@ public function update_group_membership($id) // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \model\cache::get_users_info()); + $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); if ($old_group_id == FEATHER_ADMIN || $new_group_id == FEATHER_ADMIN) { - $this->feather->cache->store('admin_ids', \model\cache::get_admin_ids()); + $this->feather->cache->store('admin_ids', \App\Model\Cache::get_admin_ids()); } $new_group_mod = DB::for_table('groups') @@ -721,13 +721,13 @@ public function delete_user($id) // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \model\cache::get_users_info()); + $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); if ($group_id == FEATHER_ADMIN) { - $this->feather->cache->store('admin_ids', \model\cache::get_admin_ids()); + $this->feather->cache->store('admin_ids', \App\Model\Cache::get_admin_ids()); } $this->hook->fire('delete_user'); @@ -1073,14 +1073,14 @@ public function update_profile($id, $info, $section) // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \model\cache::get_users_info()); + $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); // Check if the bans table was updated and regenerate the bans cache when needed if ($bans_updated) { - $this->feather->cache->store('bans', \model\cache::get_bans()); + $this->feather->cache->store('bans', \App\Model\Cache::get_bans()); } } diff --git a/app/Model/Register.php b/app/Model/Register.php index 01e7a8ae..c920e592 100644 --- a/app/Model/Register.php +++ b/app/Model/Register.php @@ -168,7 +168,7 @@ public function insert_user($user) if ($this->config['o_regs_verify'] == '0') { // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \model\cache::get_users_info()); + $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); diff --git a/extern.php b/extern.php index dede103d..9e8ea810 100644 --- a/extern.php +++ b/extern.php @@ -728,7 +728,7 @@ function output_html($feed) elseif ($action == 'stats') { if (!$feather->cache->isCached('users_info')) { - $feather->cache->store('users_info', \model\cache::get_users_info()); + $feather->cache->store('users_info', \App\Model\Cache::get_users_info()); } $stats = $feather->cache->retrieve('users_info'); diff --git a/style/themes/FeatherBB/view/header.php b/style/themes/FeatherBB/view/header.php index b4dfdbdd..a2cee85b 100644 --- a/style/themes/FeatherBB/view/header.php +++ b/style/themes/FeatherBB/view/header.php @@ -15,7 +15,7 @@ <?php echo generate_page_title($page_title, $p) ?> - + <?php _e('FeatherBB Installation') ?> - + diff --git a/view/header.php b/view/header.php index 7d751f35..e5de922f 100644 --- a/view/header.php +++ b/view/header.php @@ -15,7 +15,7 @@ <?php echo generate_page_title($page_title, $p) ?> - + <?php _e('FeatherBB Installation') ?> - + From b18ec6677bab080a53b284b003e3cdd919369ac1 Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 16:33:58 +0200 Subject: [PATCH 288/353] Set a default empty cache dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So that users don’t have to create it themselves before installation --- .gitignore | 2 +- app/cache/.gitkeep | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 app/cache/.gitkeep diff --git a/.gitignore b/.gitignore index 4728b64b..3d9140a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -app/cache/ + app/config.php .idea/ nbproject/ diff --git a/app/cache/.gitkeep b/app/cache/.gitkeep new file mode 100644 index 00000000..e69de29b From 712976ddee50275decd1125331b340b55204350a Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 16:35:20 +0200 Subject: [PATCH 289/353] Restore gitignore for cache folder --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3d9140a6..4728b64b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ - +app/cache/ app/config.php .idea/ nbproject/ From 0926be0978cf6a6b088da6ebc659ba3ca44aeb59 Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 16:44:08 +0200 Subject: [PATCH 290/353] Uppercase model classes first letter --- app/Model/Admin/Bans.php | 2 +- app/Model/Admin/Categories.php | 2 +- app/Model/Admin/Censoring.php | 2 +- app/Model/Admin/Forums.php | 2 +- app/Model/Admin/Groups.php | 2 +- app/Model/Admin/Maintenance.php | 2 +- app/Model/Admin/Options.php | 2 +- app/Model/Admin/Parser.php | 2 +- app/Model/Admin/Permissions.php | 2 +- app/Model/Admin/Reports.php | 2 +- app/Model/Admin/Statistics.php | 2 +- app/Model/Admin/Users.php | 2 +- app/Model/Auth.php | 3 ++- app/Model/Cache.php | 3 ++- app/Model/Debug.php | 3 ++- app/Model/Delete.php | 2 +- app/Model/Edit.php | 2 +- app/Model/Header.php | 2 +- app/Model/Index.php | 2 +- app/Model/Install.php | 2 +- app/Model/Login.php | 2 +- app/Model/Misc.php | 2 +- app/Model/Moderate.php | 2 +- app/Model/Post.php | 4 ++-- app/Model/Profile.php | 2 +- app/Model/Register.php | 2 +- app/Model/Search.php | 2 +- app/Model/Userlist.php | 8 ++++---- app/Model/Viewforum.php | 2 +- app/Model/Viewtopic.php | 2 +- 30 files changed, 37 insertions(+), 34 deletions(-) diff --git a/app/Model/Admin/Bans.php b/app/Model/Admin/Bans.php index 4dcec087..569fffbe 100644 --- a/app/Model/Admin/Bans.php +++ b/app/Model/Admin/Bans.php @@ -11,7 +11,7 @@ use DB; -class bans +class Bans { public function __construct() { diff --git a/app/Model/Admin/Categories.php b/app/Model/Admin/Categories.php index 2eb4fde7..0d53fabb 100644 --- a/app/Model/Admin/Categories.php +++ b/app/Model/Admin/Categories.php @@ -11,7 +11,7 @@ use DB; -class categories +class Categories { public function __construct() { diff --git a/app/Model/Admin/Censoring.php b/app/Model/Admin/Censoring.php index 93019394..a6456c33 100644 --- a/app/Model/Admin/Censoring.php +++ b/app/Model/Admin/Censoring.php @@ -11,7 +11,7 @@ use DB; -class censoring +class Censoring { public function __construct() { diff --git a/app/Model/Admin/Forums.php b/app/Model/Admin/Forums.php index 823a0f73..c443cc1f 100644 --- a/app/Model/Admin/Forums.php +++ b/app/Model/Admin/Forums.php @@ -11,7 +11,7 @@ use DB; -class forums +class Forums { public function __construct() { diff --git a/app/Model/Admin/Groups.php b/app/Model/Admin/Groups.php index 7128b8de..c921a2c9 100644 --- a/app/Model/Admin/Groups.php +++ b/app/Model/Admin/Groups.php @@ -11,7 +11,7 @@ use DB; -class groups +class Groups { public function __construct() { diff --git a/app/Model/Admin/Maintenance.php b/app/Model/Admin/Maintenance.php index 2b283169..79db3e4c 100644 --- a/app/Model/Admin/Maintenance.php +++ b/app/Model/Admin/Maintenance.php @@ -11,7 +11,7 @@ use DB; -class maintenance +class Maintenance { public function __construct() { diff --git a/app/Model/Admin/Options.php b/app/Model/Admin/Options.php index 4de0901a..d255870b 100644 --- a/app/Model/Admin/Options.php +++ b/app/Model/Admin/Options.php @@ -11,7 +11,7 @@ use DB; -class options +class Options { public function __construct() { diff --git a/app/Model/Admin/Parser.php b/app/Model/Admin/Parser.php index 2472abfd..5c6f1bb4 100644 --- a/app/Model/Admin/Parser.php +++ b/app/Model/Admin/Parser.php @@ -12,7 +12,7 @@ use DB; -class parser +class Parser { public function __construct() { diff --git a/app/Model/Admin/Permissions.php b/app/Model/Admin/Permissions.php index 56584c81..79fb1769 100644 --- a/app/Model/Admin/Permissions.php +++ b/app/Model/Admin/Permissions.php @@ -11,7 +11,7 @@ use DB; -class permissions +class Permissions { public function __construct() { diff --git a/app/Model/Admin/Reports.php b/app/Model/Admin/Reports.php index faf582ba..45462560 100644 --- a/app/Model/Admin/Reports.php +++ b/app/Model/Admin/Reports.php @@ -11,7 +11,7 @@ use DB; -class reports +class Reports { public function __construct() { diff --git a/app/Model/Admin/Statistics.php b/app/Model/Admin/Statistics.php index e165b873..f2da2089 100644 --- a/app/Model/Admin/Statistics.php +++ b/app/Model/Admin/Statistics.php @@ -11,7 +11,7 @@ use DB; -class statistics +class Statistics { public function __construct() { diff --git a/app/Model/Admin/Users.php b/app/Model/Admin/Users.php index 2f8e600a..cd3255a0 100644 --- a/app/Model/Admin/Users.php +++ b/app/Model/Admin/Users.php @@ -11,7 +11,7 @@ use DB; -class users +class Users { public function __construct() { diff --git a/app/Model/Auth.php b/app/Model/Auth.php index 0b4068ea..a8e53a55 100644 --- a/app/Model/Auth.php +++ b/app/Model/Auth.php @@ -8,9 +8,10 @@ */ namespace App\Model; + use DB; -class auth +class Auth { public function __construct() { diff --git a/app/Model/Cache.php b/app/Model/Cache.php index c5c60849..7ec8d732 100644 --- a/app/Model/Cache.php +++ b/app/Model/Cache.php @@ -8,9 +8,10 @@ */ namespace App\Model; + use DB; -class cache +class Cache { public function __construct() { diff --git a/app/Model/Debug.php b/app/Model/Debug.php index 327dbbb5..5edc87e6 100644 --- a/app/Model/Debug.php +++ b/app/Model/Debug.php @@ -8,9 +8,10 @@ */ namespace App\Model; + use DB; -class debug +class Debug { protected static $feather; diff --git a/app/Model/Delete.php b/app/Model/Delete.php index 4723e754..2653a27a 100644 --- a/app/Model/Delete.php +++ b/app/Model/Delete.php @@ -11,7 +11,7 @@ use DB; -class delete +class Delete { public function __construct() { diff --git a/app/Model/Edit.php b/app/Model/Edit.php index 3923bba2..a5c1b7c0 100644 --- a/app/Model/Edit.php +++ b/app/Model/Edit.php @@ -11,7 +11,7 @@ use DB; -class edit +class Edit { public function __construct() { diff --git a/app/Model/Header.php b/app/Model/Header.php index 6601f41b..adb8b959 100644 --- a/app/Model/Header.php +++ b/app/Model/Header.php @@ -11,7 +11,7 @@ use DB; -class header +class Header { protected static $app; diff --git a/app/Model/Index.php b/app/Model/Index.php index 158491e6..921d8737 100644 --- a/app/Model/Index.php +++ b/app/Model/Index.php @@ -11,7 +11,7 @@ use DB; -class index +class Index { public function __construct() diff --git a/app/Model/Install.php b/app/Model/Install.php index 3c955d2c..8be79340 100644 --- a/app/Model/Install.php +++ b/app/Model/Install.php @@ -11,7 +11,7 @@ use DB; -class install +class Install { protected $database_scheme = array( 'bans' => "CREATE TABLE IF NOT EXISTS %t% ( diff --git a/app/Model/Login.php b/app/Model/Login.php index e5f2434c..473153c9 100644 --- a/app/Model/Login.php +++ b/app/Model/Login.php @@ -11,7 +11,7 @@ use DB; -class login +class Login { public function __construct() { diff --git a/app/Model/Misc.php b/app/Model/Misc.php index 7d13731c..7ca0829c 100644 --- a/app/Model/Misc.php +++ b/app/Model/Misc.php @@ -11,7 +11,7 @@ use DB; -class misc +class Misc { public function __construct() { diff --git a/app/Model/Moderate.php b/app/Model/Moderate.php index a12e49f6..c48126f1 100644 --- a/app/Model/Moderate.php +++ b/app/Model/Moderate.php @@ -11,7 +11,7 @@ use DB; -class moderate +class Moderate { public function __construct() { diff --git a/app/Model/Post.php b/app/Model/Post.php index ffa41188..933b93b0 100644 --- a/app/Model/Post.php +++ b/app/Model/Post.php @@ -11,7 +11,7 @@ use DB; -class post +class Post { public function __construct() { @@ -24,7 +24,7 @@ public function __construct() $this->email = $this->feather->email; $this->search = new \FeatherBB\Search(); } - + // Get some info about the post public function get_info_post($tid, $fid) { diff --git a/app/Model/Profile.php b/app/Model/Profile.php index 526bceac..c7ffa4e5 100644 --- a/app/Model/Profile.php +++ b/app/Model/Profile.php @@ -11,7 +11,7 @@ use DB; -class profile +class Profile { public function __construct() { diff --git a/app/Model/Register.php b/app/Model/Register.php index c920e592..d6e13142 100644 --- a/app/Model/Register.php +++ b/app/Model/Register.php @@ -11,7 +11,7 @@ use DB; -class register +class Register { public function __construct() { diff --git a/app/Model/Search.php b/app/Model/Search.php index 643002e9..372dc7ff 100644 --- a/app/Model/Search.php +++ b/app/Model/Search.php @@ -11,7 +11,7 @@ use DB; -class search +class Search { public function __construct() { diff --git a/app/Model/Userlist.php b/app/Model/Userlist.php index 0c21409e..062d525d 100644 --- a/app/Model/Userlist.php +++ b/app/Model/Userlist.php @@ -11,7 +11,7 @@ use DB; -class userlist +class Userlist { public function __construct() @@ -23,7 +23,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; } - + // Counts the numeber of user for a specific query public function fetch_user_count($username, $show_group) { @@ -71,7 +71,7 @@ public function generate_dropdown_menu($show_group) } $dropdown_menu = $this->hook->fire('generate_dropdown_menu', $dropdown_menu); - + return $dropdown_menu; } @@ -132,4 +132,4 @@ public function print_users($username, $start_from, $sort_by, $sort_dir, $show_g return $userlist_data; } -} \ No newline at end of file +} diff --git a/app/Model/Viewforum.php b/app/Model/Viewforum.php index f4c67fa7..2a53778d 100644 --- a/app/Model/Viewforum.php +++ b/app/Model/Viewforum.php @@ -11,7 +11,7 @@ use DB; -class viewforum +class Viewforum { public function __construct() { diff --git a/app/Model/Viewtopic.php b/app/Model/Viewtopic.php index b756b3bd..49a59945 100644 --- a/app/Model/Viewtopic.php +++ b/app/Model/Viewtopic.php @@ -11,7 +11,7 @@ use DB; -class viewtopic +class Viewtopic { public function __construct() { From 96f00d8c42d752c9af5ea2dad575000aa2064c6c Mon Sep 17 00:00:00 2001 From: beaver Date: Mon, 31 Aug 2015 19:53:55 +0200 Subject: [PATCH 291/353] Permissions cache fix --- app/Controller/Install.php | 2 +- app/Helpers/parser.php | 12 ++++++------ app/Model/Admin/Permissions.php | 7 ++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/Controller/Install.php b/app/Controller/Install.php index 177d57b2..2b747a51 100644 --- a/app/Controller/Install.php +++ b/app/Controller/Install.php @@ -196,7 +196,7 @@ public function create_db(array $data) // Install success flash message $flash = new \Slim\Middleware\Flash(); - $flash->set('message', __('Message')); + $flash->set('success', __('Message')); $flash->save(); // Redirect to homepage diff --git a/app/Helpers/parser.php b/app/Helpers/parser.php index a6fcb7da..3ae6ecfa 100644 --- a/app/Helpers/parser.php +++ b/app/Helpers/parser.php @@ -120,7 +120,7 @@ function matches one BBCode open/close pair. The BBCode tag components are function _preparse_bbcode_callback($matches) { global $errors, $pd; - + // Get Slim current session $feather = \Slim\Slim::getInstance(); @@ -971,7 +971,7 @@ function _parse_bbcode_callback($matches) function parse_bbcode(&$text, $hide_smilies = 0) { global $feather_config, $pd; - + // Get Slim current session $feather = \Slim\Slim::getInstance(); @@ -1031,10 +1031,10 @@ function _do_smilies_callback($matches) function parse_message($text, $hide_smilies) { global $pd, $feather_config; - + // Get Slim current session $feather = \Slim\Slim::getInstance(); - + $pd['in_signature'] = false; // Disable images via the $bbcd['in_post'] flag if globally disabled. if ($feather_config['p_message_img_tag'] !== '1' || $feather->user->show_img !== '1') { @@ -1050,10 +1050,10 @@ function parse_message($text, $hide_smilies) function parse_signature($text) { global $pd, $feather_config; - + // Get Slim current session $feather = \Slim\Slim::getInstance(); - + $pd['in_signature'] = true; // Disable images via the $bbcd['in_sig'] flag if globally disabled. if ($feather_config['p_sig_img_tag'] !== '1' || $feather->user->show_img_sig !== '1') { diff --git a/app/Model/Admin/Permissions.php b/app/Model/Admin/Permissions.php index 79fb1769..7da201e7 100644 --- a/app/Model/Admin/Permissions.php +++ b/app/Model/Admin/Permissions.php @@ -42,11 +42,8 @@ public function update_permissions() } // Regenerate the config cache - if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'app/Helpers/cache.php'; - } - - generate_config_cache(); + $this->feather->cache->store('config', \App\Model\Cache::get_config()); + // $this->clear_feed_cache(); redirect($this->feather->url->get('admin/permissions/'), __('Perms updated redirect')); } From 5e6d1df16095edcda1ae0087befd0336e282a371 Mon Sep 17 00:00:00 2001 From: adaur Date: Tue, 1 Sep 2015 18:28:07 +0200 Subject: [PATCH 292/353] namespace FeatherBB; --- .gitignore | 4 +- app/cache/.gitkeep | 0 app/routes.php | 205 - ...5bc57d6c4e8a3a00b5f5c72a639f5f734f32.cache | 1 + cache/cache_parser_data.php | 1433 ++++++ composer.json | 4 +- extern.php | 16 +- {app => featherbb}/Controller/Admin/Bans.php | 6 +- .../Controller/Admin/Categories.php | 8 +- .../Controller/Admin/Censoring.php | 6 +- .../Controller/Admin/Forums.php | 18 +- .../Controller/Admin/Groups.php | 6 +- {app => featherbb}/Controller/Admin/Index.php | 4 +- .../Controller/Admin/Maintenance.php | 6 +- .../Controller/Admin/Options.php | 6 +- .../Controller/Admin/Parser.php | 18 +- .../Controller/Admin/Permissions.php | 6 +- .../Controller/Admin/Plugins.php | 2 +- .../Controller/Admin/Reports.php | 6 +- .../Controller/Admin/Statistics.php | 6 +- {app => featherbb}/Controller/Admin/Users.php | 6 +- {app => featherbb}/Controller/Auth.php | 26 +- {app => featherbb}/Controller/Delete.php | 10 +- {app => featherbb}/Controller/Edit.php | 14 +- {app => featherbb}/Controller/Help.php | 4 +- {app => featherbb}/Controller/Index.php | 6 +- {app => featherbb}/Controller/Install.php | 8 +- {app => featherbb}/Controller/Login.php | 6 +- {app => featherbb}/Controller/Misc.php | 8 +- {app => featherbb}/Controller/Moderate.php | 12 +- {app => featherbb}/Controller/Post.php | 16 +- {app => featherbb}/Controller/Profile.php | 24 +- {app => featherbb}/Controller/Register.php | 12 +- {app => featherbb}/Controller/Search.php | 12 +- {app => featherbb}/Controller/Userlist.php | 8 +- {app => featherbb}/Controller/Viewforum.php | 6 +- {app => featherbb}/Controller/Viewtopic.php | 14 +- {app => featherbb}/Core/AdminUtils.php | 2 +- {app => featherbb}/Core/Auth.php | 10 +- {app => featherbb}/Core/Cache.php | 2 +- {app => featherbb}/Core/Core.php | 18 +- {app => featherbb}/Core/Csrf.php | 0 {app => featherbb}/Core/Database.php | 0 {app => featherbb}/Core/Email.php | 2 +- {app => featherbb}/Core/Error.php | 0 {app => featherbb}/Core/Hooks.php | 0 {app => featherbb}/Core/Lister.php | 2 +- {app => featherbb}/Core/Plugin.php | 0 {app => featherbb}/Core/Search.php | 2 +- {app => featherbb}/Core/Url.php | 0 {app => featherbb}/Core/Utils.php | 0 {app => featherbb}/Core/View.php | 8 +- {app => featherbb}/Core/pomo/.editorconfig | 0 {app => featherbb}/Core/pomo/MO.php | 0 {app => featherbb}/Core/pomo/PO.php | 0 .../Core/pomo/Streams/CachedFileReader.php | 0 .../Core/pomo/Streams/CachedIntFileReader.php | 0 .../Core/pomo/Streams/FileReader.php | 0 .../Core/pomo/Streams/Reader.php | 0 .../Core/pomo/Streams/StringReader.php | 0 .../pomo/Translations/EntryTranslations.php | 0 .../pomo/Translations/GettextTranslations.php | 0 .../pomo/Translations/NOOPTranslations.php | 0 .../Core/pomo/Translations/Translations.php | 0 .../Translations/TranslationsInterface.php | 0 {app => featherbb}/Helpers/bbcd_compile.php | 4 +- {app => featherbb}/Helpers/bbcd_source.php | 0 {app => featherbb}/Helpers/functions.php | 16 +- {app => featherbb}/Helpers/l10n.php | 0 {app => featherbb}/Helpers/parser.php | 8 +- {app => featherbb}/Helpers/srand.php | 0 .../Helpers/utf8/mbstring/core.php | 0 .../Helpers/utf8/native/core.php | 0 {app => featherbb}/Helpers/utf8/ord.php | 0 .../Helpers/utf8/str_ireplace.php | 0 {app => featherbb}/Helpers/utf8/str_pad.php | 0 {app => featherbb}/Helpers/utf8/str_split.php | 0 .../Helpers/utf8/strcasecmp.php | 0 {app => featherbb}/Helpers/utf8/strcspn.php | 0 {app => featherbb}/Helpers/utf8/stristr.php | 0 {app => featherbb}/Helpers/utf8/strrev.php | 0 {app => featherbb}/Helpers/utf8/strspn.php | 0 .../Helpers/utf8/substr_replace.php | 0 {app => featherbb}/Helpers/utf8/trim.php | 0 {app => featherbb}/Helpers/utf8/ucfirst.php | 0 {app => featherbb}/Helpers/utf8/ucwords.php | 0 {app => featherbb}/Helpers/utf8/utf8.php | 0 .../Helpers/utf8/utils/ascii.php | 0 {app => featherbb}/Helpers/utf8/utils/bad.php | 0 .../Helpers/utf8/utils/patterns.php | 0 .../Helpers/utf8/utils/position.php | 0 .../Helpers/utf8/utils/specials.php | 0 .../Helpers/utf8/utils/unicode.php | 0 .../Helpers/utf8/utils/validation.php | 0 {app => featherbb}/Model/Admin/Bans.php | 6 +- {app => featherbb}/Model/Admin/Categories.php | 4 +- {app => featherbb}/Model/Admin/Censoring.php | 14 +- {app => featherbb}/Model/Admin/Forums.php | 4 +- {app => featherbb}/Model/Admin/Groups.php | 6 +- .../Model/Admin/Maintenance.php | 2 +- {app => featherbb}/Model/Admin/Options.php | 4 +- {app => featherbb}/Model/Admin/Parser.php | 2 +- .../Model/Admin/Permissions.php | 4 +- {app => featherbb}/Model/Admin/Reports.php | 2 +- {app => featherbb}/Model/Admin/Statistics.php | 2 +- {app => featherbb}/Model/Admin/Users.php | 6 +- {app => featherbb}/Model/Auth.php | 2 +- {app => featherbb}/Model/Cache.php | 2 +- {app => featherbb}/Model/Debug.php | 2 +- {app => featherbb}/Model/Delete.php | 2 +- {app => featherbb}/Model/Edit.php | 6 +- {app => featherbb}/Model/Header.php | 2 +- {app => featherbb}/Model/Index.php | 4 +- {app => featherbb}/Model/Install.php | 2 +- {app => featherbb}/Model/Login.php | 8 +- {app => featherbb}/Model/Misc.php | 6 +- {app => featherbb}/Model/Moderate.php | 4 +- {app => featherbb}/Model/Post.php | 22 +- {app => featherbb}/Model/Profile.php | 24 +- {app => featherbb}/Model/Register.php | 18 +- {app => featherbb}/Model/Search.php | 2 +- {app => featherbb}/Model/Userlist.php | 2 +- {app => featherbb}/Model/Viewforum.php | 2 +- {app => featherbb}/Model/Viewtopic.php | 2 +- {app => featherbb}/lang/English/admin/bans.mo | Bin {app => featherbb}/lang/English/admin/bans.po | 0 .../lang/English/admin/categories.mo | Bin .../lang/English/admin/categories.po | 0 .../lang/English/admin/censoring.mo | Bin .../lang/English/admin/censoring.po | 0 .../lang/English/admin/common.mo | Bin .../lang/English/admin/common.po | 0 .../lang/English/admin/forums.mo | Bin .../lang/English/admin/forums.po | 0 .../lang/English/admin/groups.mo | Bin .../lang/English/admin/groups.po | 0 .../lang/English/admin/index.html | 0 .../lang/English/admin/index.mo | Bin .../lang/English/admin/index.po | 0 .../lang/English/admin/maintenance.mo | Bin .../lang/English/admin/maintenance.po | 0 .../lang/English/admin/options.mo | Bin .../lang/English/admin/options.po | 0 .../lang/English/admin/parser.mo | Bin .../lang/English/admin/parser.php | 0 .../lang/English/admin/parser.po | 0 .../lang/English/admin/permissions.mo | Bin .../lang/English/admin/permissions.po | 0 .../lang/English/admin/plugin_example.mo | Bin .../lang/English/admin/plugin_example.po | 0 .../lang/English/admin/reports.mo | Bin .../lang/English/admin/reports.po | 0 .../lang/English/admin/users.mo | Bin .../lang/English/admin/users.po | 0 {app => featherbb}/lang/English/antispam.mo | Bin {app => featherbb}/lang/English/antispam.php | 0 {app => featherbb}/lang/English/antispam.po | 0 .../lang/English/antispam_questions.mo | Bin .../lang/English/antispam_questions.po | 0 {app => featherbb}/lang/English/bbeditor.mo | Bin {app => featherbb}/lang/English/bbeditor.po | 0 {app => featherbb}/lang/English/common.mo | Bin {app => featherbb}/lang/English/common.po | 0 {app => featherbb}/lang/English/delete.mo | Bin {app => featherbb}/lang/English/delete.po | 0 {app => featherbb}/lang/English/forum.mo | Bin {app => featherbb}/lang/English/forum.po | 0 {app => featherbb}/lang/English/help.mo | Bin {app => featherbb}/lang/English/help.po | 0 {app => featherbb}/lang/English/index.mo | Bin {app => featherbb}/lang/English/index.po | 0 {app => featherbb}/lang/English/install.mo | Bin {app => featherbb}/lang/English/install.po | 0 {app => featherbb}/lang/English/login.mo | Bin {app => featherbb}/lang/English/login.po | 0 .../English/mail_templates/activate_email.tpl | 0 .../mail_templates/activate_password.tpl | 0 .../mail_templates/banned_email_change.tpl | 0 .../mail_templates/banned_email_post.tpl | 0 .../mail_templates/banned_email_register.tpl | 0 .../mail_templates/dupe_email_change.tpl | 0 .../mail_templates/dupe_email_register.tpl | 0 .../English/mail_templates/form_email.tpl | 0 .../lang/English/mail_templates/new_reply.tpl | 0 .../English/mail_templates/new_reply_full.tpl | 0 .../English/mail_templates/new_report.tpl | 0 .../lang/English/mail_templates/new_topic.tpl | 0 .../English/mail_templates/new_topic_full.tpl | 0 .../lang/English/mail_templates/new_user.tpl | 0 .../lang/English/mail_templates/rename.tpl | 0 .../lang/English/mail_templates/welcome.tpl | 0 {app => featherbb}/lang/English/misc.mo | Bin {app => featherbb}/lang/English/misc.po | 0 {app => featherbb}/lang/English/post.mo | Bin {app => featherbb}/lang/English/post.po | 0 {app => featherbb}/lang/English/prof_reg.mo | Bin {app => featherbb}/lang/English/prof_reg.po | 0 {app => featherbb}/lang/English/profile.mo | Bin {app => featherbb}/lang/English/profile.po | 0 {app => featherbb}/lang/English/register.mo | Bin {app => featherbb}/lang/English/register.po | 0 {app => featherbb}/lang/English/search.mo | Bin {app => featherbb}/lang/English/search.po | 0 {app => featherbb}/lang/English/stopwords.txt | 0 {app => featherbb}/lang/English/topic.mo | Bin {app => featherbb}/lang/English/topic.po | 0 {app => featherbb}/lang/English/update.mo | Bin {app => featherbb}/lang/English/update.po | 0 {app => featherbb}/lang/English/userlist.mo | Bin {app => featherbb}/lang/English/userlist.po | 0 featherbb/routes.php | 205 + index.php | 6 +- style/themes/FeatherBB/view/help.php | 2 +- style/themes/FeatherBB/view/post.php | 2 +- style/themes/MyFeatherBB/view/help.php | 2 +- style/themes/MyFeatherBB/view/post.php | 2 +- vendor/bin/phpunit | 1 + vendor/composer/autoload_classmap.php | 12 +- vendor/composer/autoload_psr4.php | 2 +- vendor/composer/include_paths.php | 13 + .../phpunit/php-code-coverage/.gitattributes | 1 + vendor/phpunit/php-code-coverage/.gitignore | 11 + vendor/phpunit/php-code-coverage/.travis.yml | 20 + .../phpunit/php-code-coverage/CONTRIBUTING.md | 5 + .../php-code-coverage/ChangeLog-2.2.md | 39 + vendor/phpunit/php-code-coverage/LICENSE | 33 + vendor/phpunit/php-code-coverage/README.md | 40 + vendor/phpunit/php-code-coverage/build.xml | 41 + .../php-code-coverage/build/travis-ci.xml | 21 + .../phpunit/php-code-coverage/composer.json | 50 + .../php-code-coverage/phpunit.xml.dist | 23 + .../php-code-coverage/scripts/auto_append.php | 5 + .../scripts/auto_prepend.php | 10 + .../php-code-coverage/src/CodeCoverage.php | 919 ++++ .../src/CodeCoverage/Driver.php | 47 + .../src/CodeCoverage/Driver/HHVM.php | 26 + .../src/CodeCoverage/Driver/PHPDBG.php | 105 + .../src/CodeCoverage/Driver/Xdebug.php | 97 + .../src/CodeCoverage/Exception.php | 18 + .../Exception/UnintentionallyCoveredCode.php | 18 + .../src/CodeCoverage/Filter.php | 292 ++ .../src/CodeCoverage/Report/Clover.php | 284 ++ .../src/CodeCoverage/Report/Crap4j.php | 164 + .../src/CodeCoverage/Report/Factory.php | 242 + .../src/CodeCoverage/Report/HTML.php | 182 + .../src/CodeCoverage/Report/HTML/Renderer.php | 268 ++ .../Report/HTML/Renderer/Dashboard.php | 295 ++ .../Report/HTML/Renderer/Directory.php | 97 + .../Report/HTML/Renderer/File.php | 556 +++ .../Renderer/Template/coverage_bar.html.dist | 5 + .../Renderer/Template/css/bootstrap.min.css | 5 + .../HTML/Renderer/Template/css/nv.d3.min.css | 1 + .../HTML/Renderer/Template/css/style.css | 122 + .../Renderer/Template/dashboard.html.dist | 284 ++ .../Renderer/Template/directory.html.dist | 61 + .../Template/directory_item.html.dist | 13 + .../HTML/Renderer/Template/file.html.dist | 90 + .../Renderer/Template/file_item.html.dist | 14 + .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20127 bytes .../fonts/glyphicons-halflings-regular.svg | 288 ++ .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 45404 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes .../Renderer/Template/js/bootstrap.min.js | 7 + .../HTML/Renderer/Template/js/d3.min.js | 5 + .../HTML/Renderer/Template/js/holder.min.js | 12 + .../Renderer/Template/js/html5shiv.min.js | 4 + .../HTML/Renderer/Template/js/jquery.min.js | 5 + .../HTML/Renderer/Template/js/nv.d3.min.js | 8 + .../HTML/Renderer/Template/js/respond.min.js | 5 + .../Renderer/Template/method_item.html.dist | 11 + .../src/CodeCoverage/Report/Node.php | 339 ++ .../CodeCoverage/Report/Node/Directory.php | 478 ++ .../src/CodeCoverage/Report/Node/File.php | 656 +++ .../src/CodeCoverage/Report/Node/Iterator.php | 105 + .../src/CodeCoverage/Report/PHP.php | 50 + .../src/CodeCoverage/Report/Text.php | 246 + .../src/CodeCoverage/Report/XML.php | 234 + .../src/CodeCoverage/Report/XML/Directory.php | 16 + .../src/CodeCoverage/Report/XML/File.php | 73 + .../CodeCoverage/Report/XML/File/Coverage.php | 66 + .../CodeCoverage/Report/XML/File/Method.php | 58 + .../CodeCoverage/Report/XML/File/Report.php | 72 + .../src/CodeCoverage/Report/XML/File/Unit.php | 97 + .../src/CodeCoverage/Report/XML/Node.php | 89 + .../src/CodeCoverage/Report/XML/Project.php | 63 + .../src/CodeCoverage/Report/XML/Tests.php | 45 + .../src/CodeCoverage/Report/XML/Totals.php | 140 + .../src/CodeCoverage/Util.php | 45 + .../Util/InvalidArgumentHelper.php | 39 + .../tests/PHP/CodeCoverage/FilterTest.php | 281 ++ .../PHP/CodeCoverage/Report/CloverTest.php | 66 + .../PHP/CodeCoverage/Report/FactoryTest.php | 222 + .../tests/PHP/CodeCoverage/UtilTest.php | 30 + .../tests/PHP/CodeCoverageTest.php | 487 ++ .../php-code-coverage/tests/TestCase.php | 311 ++ .../tests/_files/BankAccount-clover.xml | 26 + .../tests/_files/BankAccount.php | 33 + .../tests/_files/BankAccountTest.php | 66 + .../_files/CoverageClassExtendedTest.php | 12 + .../tests/_files/CoverageClassTest.php | 12 + .../CoverageFunctionParenthesesTest.php | 11 + ...erageFunctionParenthesesWhitespaceTest.php | 11 + .../tests/_files/CoverageFunctionTest.php | 11 + .../CoverageMethodOneLineAnnotationTest.php | 11 + .../_files/CoverageMethodParenthesesTest.php | 12 + ...overageMethodParenthesesWhitespaceTest.php | 12 + .../tests/_files/CoverageMethodTest.php | 12 + .../tests/_files/CoverageNoneTest.php | 9 + .../tests/_files/CoverageNotPrivateTest.php | 12 + .../tests/_files/CoverageNotProtectedTest.php | 12 + .../tests/_files/CoverageNotPublicTest.php | 12 + .../tests/_files/CoverageNothingTest.php | 13 + .../tests/_files/CoveragePrivateTest.php | 12 + .../tests/_files/CoverageProtectedTest.php | 12 + .../tests/_files/CoveragePublicTest.php | 12 + .../CoverageTwoDefaultClassAnnotations.php | 19 + .../tests/_files/CoveredClass.php | 36 + .../tests/_files/CoveredFunction.php | 4 + .../NamespaceCoverageClassExtendedTest.php | 12 + .../_files/NamespaceCoverageClassTest.php | 12 + ...NamespaceCoverageCoversClassPublicTest.php | 15 + .../NamespaceCoverageCoversClassTest.php | 20 + .../_files/NamespaceCoverageMethodTest.php | 12 + .../NamespaceCoverageNotPrivateTest.php | 12 + .../NamespaceCoverageNotProtectedTest.php | 12 + .../_files/NamespaceCoverageNotPublicTest.php | 12 + .../_files/NamespaceCoveragePrivateTest.php | 12 + .../_files/NamespaceCoverageProtectedTest.php | 12 + .../_files/NamespaceCoveragePublicTest.php | 12 + .../tests/_files/NamespaceCoveredClass.php | 38 + .../_files/NotExistingCoveredElementTest.php | 24 + .../class-with-anonymous-function-clover.xml | 22 + .../tests/_files/ignored-lines-clover.xml | 17 + ...urce_with_class_and_anonymous_function.php | 19 + .../tests/_files/source_with_ignore.php | 37 + .../tests/_files/source_with_namespace.php | 20 + .../source_with_oneline_annotations.php | 36 + .../tests/_files/source_without_ignore.php | 4 + .../tests/_files/source_without_namespace.php | 18 + .../phpunit/php-file-iterator/.gitattributes | 1 + vendor/phpunit/php-file-iterator/.gitignore | 7 + .../php-file-iterator/ChangeLog.markdown | 31 + .../php-file-iterator/File/Iterator.php | 196 + .../File/Iterator/Autoload.php | 66 + .../File/Iterator/Autoload.php.in | 64 + .../File/Iterator/Facade.php | 161 + .../File/Iterator/Factory.php | 120 + vendor/phpunit/php-file-iterator/LICENSE | 33 + .../phpunit/php-file-iterator/README.markdown | 23 + vendor/phpunit/php-file-iterator/build.xml | 161 + .../ControlSignatureSniff.php | 22 + .../Whitespace/ConcatenationSpacingSniff.php | 22 + .../php-file-iterator/build/PHPCS/ruleset.xml | 35 + .../phpunit/php-file-iterator/build/phpmd.xml | 27 + .../phpunit/php-file-iterator/composer.json | 33 + vendor/phpunit/php-file-iterator/package.xml | 65 + .../phpunit/php-text-template/.gitattributes | 1 + vendor/phpunit/php-text-template/.gitignore | 5 + vendor/phpunit/php-text-template/LICENSE | 33 + vendor/phpunit/php-text-template/README.md | 14 + .../phpunit/php-text-template/composer.json | 29 + .../php-text-template/src/Template.php | 135 + vendor/phpunit/php-timer/.gitattributes | 1 + vendor/phpunit/php-timer/.gitignore | 7 + vendor/phpunit/php-timer/.travis.yml | 22 + vendor/phpunit/php-timer/LICENSE | 33 + vendor/phpunit/php-timer/README.md | 47 + vendor/phpunit/php-timer/composer.json | 29 + vendor/phpunit/php-timer/src/Timer.php | 107 + vendor/phpunit/php-timer/tests/TimerTest.php | 101 + .../phpunit/php-token-stream/.gitattributes | 1 + vendor/phpunit/php-token-stream/.gitignore | 4 + vendor/phpunit/php-token-stream/.travis.yml | 30 + vendor/phpunit/php-token-stream/LICENSE | 33 + vendor/phpunit/php-token-stream/README.md | 13 + vendor/phpunit/php-token-stream/build.xml | 33 + .../php-token-stream/build/phpunit.xml | 17 + vendor/phpunit/php-token-stream/composer.json | 34 + vendor/phpunit/php-token-stream/src/Token.php | 846 ++++ .../php-token-stream/src/Token/Stream.php | 606 +++ .../src/Token/Stream/CachingFactory.php | 51 + .../tests/Token/ClassTest.php | 96 + .../tests/Token/ClosureTest.php | 85 + .../tests/Token/FunctionTest.php | 146 + .../tests/Token/IncludeTest.php | 73 + .../tests/Token/InterfaceTest.php | 191 + .../tests/Token/NamespaceTest.php | 80 + .../php-token-stream/tests/TokenTest.php | 42 + .../_fixture/classExtendsNamespacedClass.php | 10 + .../tests/_fixture/classInNamespace.php | 6 + .../tests/_fixture/classInScopedNamespace.php | 9 + ...h_method_that_declares_anonymous_class.php | 15 + .../tests/_fixture/closure.php | 7 + .../tests/_fixture/issue19.php | 3 + .../tests/_fixture/issue30.php | 8 + ...tipleNamespacesWithOneClassUsingBraces.php | 12 + ...espacesWithOneClassUsingNonBraceSyntax.php | 14 + .../tests/_fixture/source.php | 36 + .../tests/_fixture/source2.php | 6 + .../tests/_fixture/source3.php | 14 + .../tests/_fixture/source4.php | 30 + .../tests/_fixture/source5.php | 5 + .../php-token-stream/tests/bootstrap.php | 7 + .../phpunit-mock-objects/.gitattributes | 1 + .../phpunit/phpunit-mock-objects/.gitignore | 8 + .../phpunit/phpunit-mock-objects/.travis.yml | 29 + .../phpunit-mock-objects/CONTRIBUTING.md | 5 + vendor/phpunit/phpunit-mock-objects/LICENSE | 33 + vendor/phpunit/phpunit-mock-objects/README.md | 21 + vendor/phpunit/phpunit-mock-objects/build.xml | 50 + .../phpunit-mock-objects/build/travis-ci.xml | 12 + .../phpunit-mock-objects/composer.json | 46 + .../phpunit-mock-objects/phpunit.xml.dist | 22 + .../Framework/MockObject/Builder/Identity.php | 70 + .../MockObject/Builder/InvocationMocker.php | 294 ++ .../Framework/MockObject/Builder/Match.php | 66 + .../MockObject/Builder/MethodNameMatch.php | 68 + .../MockObject/Builder/Namespace.php | 79 + .../MockObject/Builder/ParametersMatch.php | 89 + .../src/Framework/MockObject/Builder/Stub.php | 66 + .../Exception/BadMethodCallException.php | 55 + .../MockObject/Exception/Exception.php | 57 + .../MockObject/Exception/RuntimeException.php | 55 + .../src/Framework/MockObject/Generator.php | 1098 +++++ .../Generator/mocked_class.tpl.dist | 36 + .../Generator/mocked_class_method.tpl.dist | 7 + .../Generator/mocked_clone.tpl.dist | 4 + .../Generator/mocked_method.tpl.dist | 22 + .../Generator/mocked_static_method.tpl.dist | 5 + .../Generator/proxied_method.tpl.dist | 22 + .../MockObject/Generator/trait_class.tpl.dist | 4 + .../Generator/unmocked_clone.tpl.dist | 5 + .../MockObject/Generator/wsdl_class.tpl.dist | 7 + .../MockObject/Generator/wsdl_method.tpl.dist | 4 + .../src/Framework/MockObject/Invocation.php | 58 + .../MockObject/Invocation/Object.php | 75 + .../MockObject/Invocation/Static.php | 193 + .../Framework/MockObject/InvocationMocker.php | 195 + .../src/Framework/MockObject/Invokable.php | 79 + .../src/Framework/MockObject/Matcher.php | 316 ++ .../MockObject/Matcher/AnyInvokedCount.php | 72 + .../MockObject/Matcher/AnyParameters.php | 74 + .../Matcher/ConsecutiveParameters.php | 162 + .../MockObject/Matcher/Invocation.php | 88 + .../MockObject/Matcher/InvokedAtIndex.php | 127 + .../MockObject/Matcher/InvokedAtLeastOnce.php | 85 + .../MockObject/Matcher/InvokedCount.php | 151 + .../MockObject/Matcher/InvokedRecorder.php | 107 + .../MockObject/Matcher/MethodName.php | 102 + .../MockObject/Matcher/Parameters.php | 160 + .../Matcher/StatelessInvocation.php | 96 + .../src/Framework/MockObject/MockBuilder.php | 363 ++ .../src/Framework/MockObject/MockObject.php | 86 + .../src/Framework/MockObject/Stub.php | 71 + .../MockObject/Stub/ConsecutiveCalls.php | 87 + .../Framework/MockObject/Stub/Exception.php | 80 + .../MockObject/Stub/MatcherCollection.php | 66 + .../src/Framework/MockObject/Stub/Return.php | 78 + .../MockObject/Stub/ReturnArgument.php | 78 + .../MockObject/Stub/ReturnCallback.php | 94 + .../Framework/MockObject/Stub/ReturnSelf.php | 76 + .../MockObject/Stub/ReturnValueMap.php | 87 + .../src/Framework/MockObject/Verifiable.php | 65 + .../tests/GeneratorTest.php | 142 + .../tests/MockBuilderTest.php | 148 + .../MockObject/Invocation/ObjectTest.php | 81 + .../MockObject/Invocation/StaticTest.php | 52 + .../Matcher/ConsecutiveParametersTest.php | 32 + .../tests/MockObject/class.phpt | 121 + .../MockObject/class_call_parent_clone.phpt | 73 + .../class_call_parent_constructor.phpt | 72 + .../class_dont_call_parent_clone.phpt | 72 + .../class_dont_call_parent_constructor.phpt | 72 + ...ing_interface_call_parent_constructor.phpt | 77 + ...nterface_dont_call_parent_constructor.phpt | 77 + .../tests/MockObject/class_partial.phpt | 99 + .../class_with_method_named_method.phpt | 88 + .../tests/MockObject/interface.phpt | 93 + .../invocation_object_clone_object.phpt | 122 + .../tests/MockObject/namespaced_class.phpt | 123 + .../namespaced_class_call_parent_clone.phpt | 75 + ...espaced_class_call_parent_constructor.phpt | 74 + ...mespaced_class_dont_call_parent_clone.phpt | 74 + ...ed_class_dont_call_parent_constructor.phpt | 74 + ...ing_interface_call_parent_constructor.phpt | 79 + ...nterface_dont_call_parent_constructor.phpt | 79 + .../MockObject/namespaced_class_partial.phpt | 101 + .../MockObject/namespaced_interface.phpt | 95 + .../tests/MockObject/nonexistent_class.phpt | 70 + .../nonexistent_class_with_namespace.phpt | 78 + ...ith_namespace_starting_with_separator.phpt | 78 + .../tests/MockObject/proxy.phpt | 117 + .../tests/MockObject/wsdl_class.phpt | 37 + .../MockObject/wsdl_class_namespace.phpt | 39 + .../tests/MockObject/wsdl_class_partial.phpt | 30 + .../tests/MockObjectTest.php | 804 ++++ .../tests/ProxyObjectTest.php | 80 + .../ClassThatImplementsSerializable.php | 15 + .../tests/_files/ClassWithStaticMethod.php | 7 + .../tests/_fixture/AbstractMockTestClass.php | 10 + .../tests/_fixture/AbstractTrait.php | 15 + .../tests/_fixture/AnInterface.php | 5 + .../tests/_fixture/AnotherInterface.php | 5 + .../tests/_fixture/Bar.php | 8 + .../tests/_fixture/Foo.php | 8 + .../tests/_fixture/FunctionCallback.php | 9 + .../tests/_fixture/GoogleSearch.wsdl | 198 + .../_fixture/InterfaceWithStaticMethod.php | 6 + .../tests/_fixture/MethodCallback.php | 21 + .../_fixture/MethodCallbackByReference.php | 13 + .../tests/_fixture/Mockable.php | 28 + .../tests/_fixture/PartialMockTestClass.php | 18 + .../tests/_fixture/SomeClass.php | 13 + .../tests/_fixture/StaticMockTestClass.php | 12 + .../_fixture/TraversableMockTestInterface.php | 4 + .../phpunit-mock-objects/tests/autoload.php | 41 + .../phpunit-mock-objects/tests/bootstrap.php | 5 + vendor/phpunit/phpunit/.gitattributes | 3 + vendor/phpunit/phpunit/.gitignore | 22 + vendor/phpunit/phpunit/.travis.yml | 27 + vendor/phpunit/phpunit/CONTRIBUTING.md | 23 + vendor/phpunit/phpunit/LICENSE | 33 + vendor/phpunit/phpunit/README.md | 41 + vendor/phpunit/phpunit/build.xml | 358 ++ vendor/phpunit/phpunit/build/ca.pem | 44 + .../phpunit/build/phar-autoload.php.in | 43 + .../phpunit/phpunit/build/phar-manifest.php | 28 + vendor/phpunit/phpunit/build/phar-version.php | 22 + vendor/phpunit/phpunit/build/phpmd.xml | 27 + vendor/phpunit/phpunit/build/travis-ci.xml | 25 + vendor/phpunit/phpunit/composer.json | 74 + vendor/phpunit/phpunit/phpdox.xml.dist | 23 + vendor/phpunit/phpunit/phpunit | 55 + vendor/phpunit/phpunit/phpunit.xml.dist | 38 + vendor/phpunit/phpunit/phpunit.xsd | 254 + vendor/phpunit/phpunit/src/Exception.php | 59 + .../phpunit/src/Extensions/GroupTestSuite.php | 99 + .../phpunit/src/Extensions/PhptTestCase.php | 256 + .../phpunit/src/Extensions/PhptTestSuite.php | 82 + .../phpunit/src/Extensions/RepeatedTest.php | 145 + .../phpunit/src/Extensions/TestDecorator.php | 149 + .../phpunit/src/Extensions/TicketListener.php | 232 + .../phpunit/phpunit/src/Framework/Assert.php | 2993 ++++++++++++ .../src/Framework/Assert/Functions.php | 2461 ++++++++++ .../src/Framework/AssertionFailedError.php | 68 + .../src/Framework/BaseTestListener.php | 78 + .../src/Framework/CodeCoverageException.php | 57 + .../phpunit/src/Framework/Constraint.php | 189 + .../phpunit/src/Framework/Constraint/And.php | 164 + .../src/Framework/Constraint/ArrayHasKey.php | 123 + .../src/Framework/Constraint/Attribute.php | 129 + .../src/Framework/Constraint/Callback.php | 116 + .../Constraint/ClassHasAttribute.php | 125 + .../Constraint/ClassHasStaticAttribute.php | 98 + .../src/Framework/Constraint/Composite.php | 113 + .../src/Framework/Constraint/Count.php | 146 + .../src/Framework/Constraint/Exception.php | 132 + .../Framework/Constraint/ExceptionCode.php | 110 + .../Framework/Constraint/ExceptionMessage.php | 110 + .../src/Framework/Constraint/FileExists.php | 102 + .../src/Framework/Constraint/GreaterThan.php | 97 + .../src/Framework/Constraint/IsAnything.php | 102 + .../src/Framework/Constraint/IsEmpty.php | 108 + .../src/Framework/Constraint/IsEqual.php | 216 + .../src/Framework/Constraint/IsFalse.php | 82 + .../src/Framework/Constraint/IsIdentical.php | 172 + .../src/Framework/Constraint/IsInstanceOf.php | 135 + .../src/Framework/Constraint/IsJson.php | 109 + .../src/Framework/Constraint/IsNull.php | 82 + .../src/Framework/Constraint/IsTrue.php | 82 + .../src/Framework/Constraint/IsType.php | 192 + .../src/Framework/Constraint/JsonMatches.php | 111 + .../JsonMatches/ErrorMessageProvider.php | 107 + .../src/Framework/Constraint/LessThan.php | 97 + .../phpunit/src/Framework/Constraint/Not.php | 205 + .../Constraint/ObjectHasAttribute.php | 77 + .../phpunit/src/Framework/Constraint/Or.php | 157 + .../src/Framework/Constraint/PCREMatch.php | 106 + .../src/Framework/Constraint/SameSize.php | 73 + .../Framework/Constraint/StringContains.php | 124 + .../Framework/Constraint/StringEndsWith.php | 97 + .../Framework/Constraint/StringMatches.php | 145 + .../Framework/Constraint/StringStartsWith.php | 97 + .../Constraint/TraversableContains.php | 168 + .../Constraint/TraversableContainsOnly.php | 136 + .../phpunit/src/Framework/Constraint/Xor.php | 162 + .../phpunit/phpunit/src/Framework/Error.php | 75 + .../src/Framework/Error/Deprecated.php | 65 + .../phpunit/src/Framework/Error/Notice.php | 65 + .../phpunit/src/Framework/Error/Warning.php | 65 + .../phpunit/src/Framework/Exception.php | 57 + .../Framework/ExpectationFailedException.php | 82 + .../phpunit/src/Framework/IncompleteTest.php | 60 + .../src/Framework/IncompleteTestError.php | 60 + .../Framework/InvalidCoversTargetError.php | 60 + .../InvalidCoversTargetException.php | 57 + .../phpunit/src/Framework/OutputError.php | 60 + .../phpunit/src/Framework/RiskyTest.php | 60 + .../phpunit/src/Framework/RiskyTestError.php | 60 + .../phpunit/src/Framework/SelfDescribing.php | 65 + .../phpunit/src/Framework/SkippedTest.php | 59 + .../src/Framework/SkippedTestError.php | 60 + .../src/Framework/SkippedTestSuiteError.php | 60 + .../phpunit/src/Framework/SyntheticError.php | 121 + vendor/phpunit/phpunit/src/Framework/Test.php | 66 + .../phpunit/src/Framework/TestCase.php | 1925 ++++++++ .../phpunit/src/Framework/TestFailure.php | 175 + .../phpunit/src/Framework/TestListener.php | 136 + .../phpunit/src/Framework/TestResult.php | 1124 +++++ .../phpunit/src/Framework/TestSuite.php | 935 ++++ .../src/Framework/TestSuite/DataProvider.php | 70 + .../UnintentionallyCoveredCodeError.php | 60 + .../phpunit/phpunit/src/Framework/Warning.php | 120 + .../phpunit/src/Runner/BaseTestRunner.php | 183 + .../phpunit/phpunit/src/Runner/Exception.php | 57 + .../phpunit/src/Runner/Filter/Factory.php | 92 + .../phpunit/src/Runner/Filter/Group.php | 98 + .../src/Runner/Filter/Group/Exclude.php | 61 + .../src/Runner/Filter/Group/Include.php | 61 + .../phpunit/src/Runner/Filter/Test.php | 159 + .../src/Runner/StandardTestSuiteLoader.php | 157 + .../phpunit/src/Runner/TestSuiteLoader.php | 71 + vendor/phpunit/phpunit/src/Runner/Version.php | 105 + vendor/phpunit/phpunit/src/TextUI/Command.php | 977 ++++ .../phpunit/src/TextUI/ResultPrinter.php | 732 +++ .../phpunit/phpunit/src/TextUI/TestRunner.php | 983 ++++ vendor/phpunit/phpunit/src/Util/Blacklist.php | 150 + .../phpunit/src/Util/Configuration.php | 1102 +++++ .../phpunit/src/Util/DeprecatedFeature.php | 108 + .../src/Util/DeprecatedFeature/Logger.php | 212 + .../phpunit/phpunit/src/Util/ErrorHandler.php | 126 + .../phpunit/phpunit/src/Util/Fileloader.php | 108 + .../phpunit/phpunit/src/Util/Filesystem.php | 81 + vendor/phpunit/phpunit/src/Util/Filter.php | 142 + vendor/phpunit/phpunit/src/Util/Getopt.php | 199 + .../phpunit/phpunit/src/Util/GlobalState.php | 388 ++ .../src/Util/InvalidArgumentHelper.php | 81 + vendor/phpunit/phpunit/src/Util/Log/JSON.php | 282 ++ vendor/phpunit/phpunit/src/Util/Log/JUnit.php | 483 ++ vendor/phpunit/phpunit/src/Util/Log/TAP.php | 272 ++ vendor/phpunit/phpunit/src/Util/PHP.php | 243 + .../phpunit/phpunit/src/Util/PHP/Default.php | 121 + .../Util/PHP/Template/TestCaseMethod.tpl.dist | 64 + .../phpunit/phpunit/src/Util/PHP/Windows.php | 145 + vendor/phpunit/phpunit/src/Util/Printer.php | 208 + vendor/phpunit/phpunit/src/Util/String.php | 110 + vendor/phpunit/phpunit/src/Util/Test.php | 957 ++++ .../src/Util/TestDox/NamePrettifier.php | 181 + .../src/Util/TestDox/ResultPrinter.php | 368 ++ .../src/Util/TestDox/ResultPrinter/HTML.php | 123 + .../src/Util/TestDox/ResultPrinter/Text.php | 95 + .../phpunit/src/Util/TestSuiteIterator.php | 148 + vendor/phpunit/phpunit/src/Util/Type.php | 79 + vendor/phpunit/phpunit/src/Util/XML.php | 978 ++++ .../tests/Extensions/RepeatedTestTest.php | 107 + .../phpunit/tests/Framework/AssertTest.php | 4127 +++++++++++++++++ .../tests/Framework/BaseTestListenerTest.php | 75 + .../tests/Framework/Constraint/CountTest.php | 106 + .../JsonMatches/ErrorMessageProviderTest.php | 122 + .../Framework/Constraint/JsonMatchesTest.php | 89 + .../tests/Framework/ConstraintTest.php | 3664 +++++++++++++++ .../Framework/SelectorAssertionsTest.php | 998 ++++ .../phpunit/tests/Framework/SuiteTest.php | 232 + .../phpunit/tests/Framework/TestCaseTest.php | 463 ++ .../tests/Framework/TestFailureTest.php | 68 + .../tests/Framework/TestImplementorTest.php | 71 + .../tests/Framework/TestListenerTest.php | 149 + .../phpunit/tests/Regression/1021.phpt | 19 + .../tests/Regression/1021/Issue1021Test.php | 23 + .../phpunit/phpunit/tests/Regression/523.phpt | 19 + .../tests/Regression/523/Issue523Test.php | 13 + .../phpunit/phpunit/tests/Regression/578.phpt | 37 + .../tests/Regression/578/Issue578Test.php | 20 + .../phpunit/phpunit/tests/Regression/684.phpt | 25 + .../tests/Regression/684/Issue684Test.php | 4 + .../phpunit/phpunit/tests/Regression/783.phpt | 21 + .../tests/Regression/783/ChildSuite.php | 15 + .../phpunit/tests/Regression/783/OneTest.php | 10 + .../tests/Regression/783/ParentSuite.php | 13 + .../phpunit/tests/Regression/783/TwoTest.php | 10 + .../phpunit/tests/Regression/GitHub/1149.phpt | 20 + .../Regression/GitHub/1149/Issue1149Test.php | 18 + .../phpunit/tests/Regression/GitHub/1265.phpt | 23 + .../Regression/GitHub/1265/Issue1265Test.php | 8 + .../Regression/GitHub/1265/phpunit1265.xml | 2 + .../phpunit/tests/Regression/GitHub/1330.phpt | 26 + .../Regression/GitHub/1330/Issue1330Test.php | 8 + .../Regression/GitHub/1330/phpunit1330.xml | 5 + .../phpunit/tests/Regression/GitHub/1335.phpt | 21 + .../Regression/GitHub/1335/Issue1335Test.php | 67 + .../Regression/GitHub/1335/bootstrap1335.php | 13 + .../phpunit/tests/Regression/GitHub/1337.phpt | 21 + .../Regression/GitHub/1337/Issue1337Test.php | 19 + .../phpunit/tests/Regression/GitHub/1340.phpt | 34 + .../Regression/GitHub/1340/Issue1340Test.php | 69 + .../phpunit/tests/Regression/GitHub/1374.phpt | 21 + .../Regression/GitHub/1374/Issue1374Test.php | 21 + .../phpunit/tests/Regression/GitHub/244.phpt | 32 + .../Regression/GitHub/244/Issue244Test.php | 55 + .../phpunit/tests/Regression/GitHub/322.phpt | 28 + .../Regression/GitHub/322/Issue322Test.php | 17 + .../Regression/GitHub/322/phpunit322.xml | 11 + .../phpunit/tests/Regression/GitHub/433.phpt | 31 + .../Regression/GitHub/433/Issue433Test.php | 21 + .../phpunit/tests/Regression/GitHub/445.phpt | 32 + .../Regression/GitHub/445/Issue445Test.php | 21 + .../phpunit/tests/Regression/GitHub/498.phpt | 29 + .../Regression/GitHub/498/Issue498Test.php | 46 + .../phpunit/tests/Regression/GitHub/503.phpt | 33 + .../Regression/GitHub/503/Issue503Test.php | 11 + .../phpunit/tests/Regression/GitHub/581.phpt | 42 + .../Regression/GitHub/581/Issue581Test.php | 10 + .../phpunit/tests/Regression/GitHub/74.phpt | 28 + .../Regression/GitHub/74/Issue74Test.php | 9 + .../Regression/GitHub/74/NewException.php | 4 + .../phpunit/tests/Regression/GitHub/765.phpt | 26 + .../Regression/GitHub/765/Issue765Test.php | 22 + .../phpunit/tests/Regression/GitHub/863.phpt | 24 + .../phpunit/tests/Regression/GitHub/873.phpt | 16 + .../Regression/GitHub/873/Issue873Test.php | 9 + .../tests/Runner/BaseTestRunnerTest.php | 63 + .../tests/TextUI/abstract-test-class.phpt | 25 + .../tests/TextUI/concrete-test-class.phpt | 19 + .../tests/TextUI/custom-printer-debug.phpt | 29 + .../tests/TextUI/custom-printer-verbose.phpt | 31 + .../dataprovider-log-xml-isolation.phpt | 47 + .../tests/TextUI/dataprovider-log-xml.phpt | 46 + .../tests/TextUI/dataprovider-testdox.phpt | 17 + .../phpunit/phpunit/tests/TextUI/debug.phpt | 26 + .../tests/TextUI/default-isolation.phpt | 20 + .../phpunit/phpunit/tests/TextUI/default.phpt | 19 + .../tests/TextUI/dependencies-isolation.phpt | 38 + .../phpunit/tests/TextUI/dependencies.phpt | 37 + .../tests/TextUI/dependencies2-isolation.phpt | 20 + .../phpunit/tests/TextUI/dependencies2.phpt | 19 + .../tests/TextUI/dependencies3-isolation.phpt | 20 + .../phpunit/tests/TextUI/dependencies3.phpt | 19 + .../phpunit/tests/TextUI/empty-testcase.phpt | 25 + .../phpunit/tests/TextUI/exception-stack.phpt | 66 + .../tests/TextUI/exclude-group-isolation.phpt | 22 + .../phpunit/tests/TextUI/exclude-group.phpt | 21 + .../tests/TextUI/failure-isolation.phpt | 142 + .../phpunit/phpunit/tests/TextUI/failure.phpt | 141 + .../phpunit/tests/TextUI/fatal-isolation.phpt | 26 + .../phpunit/phpunit/tests/TextUI/fatal.phpt | 16 + .../tests/TextUI/filter-class-isolation.phpt | 22 + .../phpunit/tests/TextUI/filter-class.phpt | 21 + ...ider-by-classname-and-range-isolation.phpt | 22 + ...r-dataprovider-by-classname-and-range.phpt | 21 + ...lter-dataprovider-by-number-isolation.phpt | 22 + .../TextUI/filter-dataprovider-by-number.phpt | 21 + ...-dataprovider-by-only-range-isolation.phpt | 22 + .../filter-dataprovider-by-only-range.phpt | 21 + ...dataprovider-by-only-regexp-isolation.phpt | 22 + .../filter-dataprovider-by-only-regexp.phpt | 21 + ...dataprovider-by-only-string-isolation.phpt | 22 + .../filter-dataprovider-by-only-string.phpt | 21 + ...ilter-dataprovider-by-range-isolation.phpt | 22 + .../TextUI/filter-dataprovider-by-range.phpt | 21 + ...lter-dataprovider-by-regexp-isolation.phpt | 22 + .../TextUI/filter-dataprovider-by-regexp.phpt | 21 + ...lter-dataprovider-by-string-isolation.phpt | 22 + .../TextUI/filter-dataprovider-by-string.phpt | 21 + .../tests/TextUI/filter-method-isolation.phpt | 22 + .../phpunit/tests/TextUI/filter-method.phpt | 21 + .../tests/TextUI/filter-no-results.phpt | 21 + .../phpunit/tests/TextUI/group-isolation.phpt | 22 + .../phpunit/phpunit/tests/TextUI/group.phpt | 21 + vendor/phpunit/phpunit/tests/TextUI/help.phpt | 83 + .../phpunit/phpunit/tests/TextUI/help2.phpt | 84 + .../phpunit/tests/TextUI/ini-isolation.phpt | 22 + .../phpunit/tests/TextUI/list-groups.phpt | 20 + .../phpunit/tests/TextUI/log-json-5.3.phpt | 25 + .../tests/TextUI/log-json-post-66021.phpt | 72 + .../tests/TextUI/log-json-pre-66021.phpt | 78 + .../phpunit/phpunit/tests/TextUI/log-tap.phpt | 26 + .../phpunit/phpunit/tests/TextUI/log-xml.phpt | 29 + .../phpunit/phpunit/tests/TextUI/repeat.phpt | 21 + .../tests/TextUI/strict-incomplete.phpt | 21 + .../tests/TextUI/strict-isolation.phpt | 22 + .../phpunit/phpunit/tests/TextUI/strict.phpt | 21 + vendor/phpunit/phpunit/tests/TextUI/tap.phpt | 18 + .../tests/TextUI/test-suffix-multiple.phpt | 20 + .../tests/TextUI/test-suffix-single.phpt | 20 + .../phpunit/tests/TextUI/testdox-html.phpt | 21 + .../phpunit/tests/TextUI/testdox-text.phpt | 25 + .../phpunit/phpunit/tests/TextUI/testdox.phpt | 19 + .../phpunit/tests/Util/ConfigurationTest.php | 491 ++ .../tests/Util/TestDox/NamePrettifierTest.php | 122 + .../phpunit/phpunit/tests/Util/TestTest.php | 538 +++ vendor/phpunit/phpunit/tests/Util/XMLTest.php | 369 ++ .../phpunit/tests/_files/AbstractTest.php | 7 + .../phpunit/phpunit/tests/_files/Author.php | 66 + .../phpunit/tests/_files/BankAccount.php | 116 + .../phpunit/tests/_files/BankAccountTest.php | 130 + .../tests/_files/BankAccountTest.test.php | 130 + .../tests/_files/BaseTestListenerSample.php | 11 + .../tests/_files/BeforeAndAfterTest.php | 31 + .../_files/BeforeClassAndAfterClassTest.php | 31 + vendor/phpunit/phpunit/tests/_files/Book.php | 59 + .../phpunit/tests/_files/Calculator.php | 14 + .../ChangeCurrentWorkingDirectoryTest.php | 10 + .../_files/ClassWithNonPublicAttributes.php | 29 + .../tests/_files/ClassWithToString.php | 61 + .../phpunit/tests/_files/ConcreteTest.my.php | 7 + .../phpunit/tests/_files/ConcreteTest.php | 7 + .../_files/CoverageClassExtendedTest.php | 12 + .../tests/_files/CoverageClassTest.php | 12 + .../CoverageFunctionParenthesesTest.php | 11 + ...erageFunctionParenthesesWhitespaceTest.php | 11 + .../tests/_files/CoverageFunctionTest.php | 11 + .../CoverageMethodOneLineAnnotationTest.php | 12 + .../_files/CoverageMethodParenthesesTest.php | 12 + ...overageMethodParenthesesWhitespaceTest.php | 12 + .../tests/_files/CoverageMethodTest.php | 12 + .../phpunit/tests/_files/CoverageNoneTest.php | 9 + .../tests/_files/CoverageNotPrivateTest.php | 12 + .../tests/_files/CoverageNotProtectedTest.php | 12 + .../tests/_files/CoverageNotPublicTest.php | 12 + .../tests/_files/CoverageNothingTest.php | 13 + .../tests/_files/CoveragePrivateTest.php | 12 + .../tests/_files/CoverageProtectedTest.php | 12 + .../tests/_files/CoveragePublicTest.php | 12 + .../CoverageTwoDefaultClassAnnotations.php | 19 + .../phpunit/tests/_files/CoveredClass.php | 36 + .../phpunit/tests/_files/CoveredFunction.php | 4 + .../phpunit/tests/_files/CustomPrinter.php | 4 + .../tests/_files/DataProviderFilterTest.php | 39 + .../phpunit/tests/_files/DataProviderTest.php | 21 + .../tests/_files/DependencyFailureTest.php | 22 + .../tests/_files/DependencySuccessTest.php | 21 + .../tests/_files/DependencyTestSuite.php | 13 + .../phpunit/tests/_files/DoubleTestCase.php | 25 + .../phpunit/tests/_files/DummyException.php | 5 + .../tests/_files/EmptyTestCaseTest.php | 4 + vendor/phpunit/phpunit/tests/_files/Error.php | 8 + .../ExceptionInAssertPostConditionsTest.php | 35 + .../ExceptionInAssertPreConditionsTest.php | 35 + .../tests/_files/ExceptionInSetUpTest.php | 35 + .../tests/_files/ExceptionInTearDownTest.php | 35 + .../phpunit/tests/_files/ExceptionInTest.php | 35 + .../tests/_files/ExceptionNamespaceTest.php | 38 + .../tests/_files/ExceptionStackTest.php | 23 + .../phpunit/tests/_files/ExceptionTest.php | 102 + .../phpunit/phpunit/tests/_files/Failure.php | 8 + .../phpunit/tests/_files/FailureTest.php | 76 + .../phpunit/tests/_files/FatalTest.php | 14 + .../phpunit/tests/_files/IncompleteTest.php | 8 + .../tests/_files/Inheritance/InheritanceA.php | 8 + .../tests/_files/Inheritance/InheritanceB.php | 9 + .../tests/_files/InheritedTestCase.php | 7 + .../phpunit/phpunit/tests/_files/IniTest.php | 8 + .../tests/_files/JsonData/arrayObject.js | 1 + .../tests/_files/JsonData/simpleObject.js | 1 + .../tests/_files/JsonData/simpleObject2.js | 1 + .../phpunit/tests/_files/MockRunner.php | 7 + .../tests/_files/MultiDependencyTest.php | 23 + .../NamespaceCoverageClassExtendedTest.php | 12 + .../_files/NamespaceCoverageClassTest.php | 12 + ...NamespaceCoverageCoversClassPublicTest.php | 16 + .../NamespaceCoverageCoversClassTest.php | 21 + .../_files/NamespaceCoverageMethodTest.php | 12 + .../NamespaceCoverageNotPrivateTest.php | 12 + .../NamespaceCoverageNotProtectedTest.php | 12 + .../_files/NamespaceCoverageNotPublicTest.php | 12 + .../_files/NamespaceCoveragePrivateTest.php | 12 + .../_files/NamespaceCoverageProtectedTest.php | 12 + .../_files/NamespaceCoveragePublicTest.php | 12 + .../tests/_files/NamespaceCoveredClass.php | 38 + .../tests/_files/NoArgTestCaseTest.php | 7 + .../phpunit/tests/_files/NoTestCaseClass.php | 4 + .../phpunit/tests/_files/NoTestCases.php | 7 + .../phpunit/tests/_files/NonStatic.php | 8 + .../_files/NotExistingCoveredElementTest.php | 24 + .../tests/_files/NotPublicTestCase.php | 11 + .../phpunit/tests/_files/NotVoidTestCase.php | 4 + .../phpunit/tests/_files/NothingTest.php | 7 + .../phpunit/tests/_files/OneTestCase.php | 11 + .../phpunit/tests/_files/OutputTestCase.php | 27 + .../phpunit/tests/_files/OverrideTestCase.php | 7 + .../_files/RequirementsClassDocBlockTest.php | 25 + .../phpunit/tests/_files/RequirementsTest.php | 149 + .../tests/_files/SampleArrayAccess.php | 32 + .../phpunit/tests/_files/SampleClass.php | 14 + .../_files/SelectorAssertionsFixture.html | 44 + .../phpunit/tests/_files/Singleton.php | 22 + .../phpunit/tests/_files/StackTest.php | 24 + .../phpunit/phpunit/tests/_files/Struct.php | 10 + .../phpunit/phpunit/tests/_files/Success.php | 7 + .../tests/_files/TemplateMethodsTest.php | 51 + .../phpunit/tests/_files/TestIterator.php | 36 + .../phpunit/tests/_files/TestIterator2.php | 35 + .../tests/_files/ThrowExceptionTestCase.php | 8 + .../tests/_files/ThrowNoExceptionTestCase.php | 7 + .../phpunit/phpunit/tests/_files/WasRun.php | 10 + vendor/phpunit/phpunit/tests/_files/bar.xml | 1 + .../_files/configuration.custom-printer.xml | 2 + .../phpunit/tests/_files/configuration.xml | 117 + .../tests/_files/configuration_empty.xml | 57 + .../tests/_files/configuration_xinclude.xml | 69 + .../tests/_files/expectedFileFormat.txt | 1 + vendor/phpunit/phpunit/tests/_files/foo.xml | 1 + ...uctureAttributesAreSameButValuesAreNot.xml | 10 + .../tests/_files/structureExpected.xml | 10 + .../tests/_files/structureIgnoreTextNodes.xml | 13 + .../_files/structureIsSameButDataIsNot.xml | 10 + .../structureWrongNumberOfAttributes.xml | 10 + .../_files/structureWrongNumberOfNodes.xml | 9 + .../phpunit/tests/bootstrap-travis.php | 4 + vendor/phpunit/phpunit/tests/bootstrap.php | 10 + vendor/sebastian/comparator/.gitignore | 6 + vendor/sebastian/comparator/.travis.yml | 25 + vendor/sebastian/comparator/LICENSE | 33 + vendor/sebastian/comparator/README.md | 41 + vendor/sebastian/comparator/build.xml | 34 + .../sebastian/comparator/build/travis-ci.xml | 11 + vendor/sebastian/comparator/composer.json | 44 + vendor/sebastian/comparator/phpunit.xml.dist | 21 + .../comparator/src/ArrayComparator.php | 136 + .../sebastian/comparator/src/Comparator.php | 68 + .../comparator/src/ComparisonFailure.php | 129 + .../comparator/src/DOMNodeComparator.php | 110 + .../comparator/src/DateTimeComparator.php | 80 + .../comparator/src/DoubleComparator.php | 60 + .../comparator/src/ExceptionComparator.php | 51 + vendor/sebastian/comparator/src/Factory.php | 107 + .../comparator/src/MockObjectComparator.php | 45 + .../comparator/src/NumericComparator.php | 72 + .../comparator/src/ObjectComparator.php | 109 + .../comparator/src/ResourceComparator.php | 56 + .../comparator/src/ScalarComparator.php | 94 + .../src/SplObjectStorageComparator.php | 73 + .../comparator/src/TypeComparator.php | 63 + .../comparator/tests/ArrayComparatorTest.php | 163 + .../tests/DOMNodeComparatorTest.php | 162 + .../tests/DateTimeComparatorTest.php | 216 + .../comparator/tests/DoubleComparatorTest.php | 134 + .../tests/ExceptionComparatorTest.php | 136 + .../comparator/tests/FactoryTest.php | 115 + .../tests/MockObjectComparatorTest.php | 166 + .../tests/NumericComparatorTest.php | 122 + .../comparator/tests/ObjectComparatorTest.php | 150 + .../tests/ResourceComparatorTest.php | 120 + .../comparator/tests/ScalarComparatorTest.php | 158 + .../tests/SplObjectStorageComparatorTest.php | 137 + .../comparator/tests/TypeComparatorTest.php | 104 + .../comparator/tests/_files/Author.php | 28 + .../comparator/tests/_files/Book.php | 21 + .../tests/_files/ClassWithToString.php | 19 + .../comparator/tests/_files/SampleClass.php | 29 + .../comparator/tests/_files/Struct.php | 25 + .../comparator/tests/_files/TestClass.php | 14 + .../tests/_files/TestClassComparator.php | 14 + .../sebastian/comparator/tests/autoload.php | 38 + .../sebastian/comparator/tests/bootstrap.php | 7 + vendor/sebastian/diff/.gitignore | 10 + vendor/sebastian/diff/.travis.yml | 16 + vendor/sebastian/diff/LICENSE | 33 + vendor/sebastian/diff/README.md | 126 + vendor/sebastian/diff/build.xml | 26 + vendor/sebastian/diff/composer.json | 33 + vendor/sebastian/diff/phpunit.xml.dist | 17 + vendor/sebastian/diff/src/Chunk.php | 110 + vendor/sebastian/diff/src/Diff.php | 81 + vendor/sebastian/diff/src/Differ.php | 256 + .../diff/src/LCS/LongestCommonSubsequence.php | 33 + ...LongestCommonSubsequenceImplementation.php | 98 + ...LongestCommonSubsequenceImplementation.php | 79 + vendor/sebastian/diff/src/Line.php | 62 + vendor/sebastian/diff/src/Parser.php | 105 + vendor/sebastian/diff/tests/DifferTest.php | Bin 0 -> 11371 bytes .../LCS/TimeEfficientImplementationTest.php | 175 + vendor/sebastian/diff/tests/ParserTest.php | 62 + .../sebastian/diff/tests/fixtures/patch.txt | 9 + .../sebastian/diff/tests/fixtures/patch2.txt | 21 + vendor/sebastian/environment/.gitignore | 5 + vendor/sebastian/environment/.travis.yml | 16 + vendor/sebastian/environment/LICENSE | 33 + vendor/sebastian/environment/README.md | 72 + vendor/sebastian/environment/build.xml | 26 + vendor/sebastian/environment/composer.json | 29 + vendor/sebastian/environment/phpunit.xml.dist | 20 + vendor/sebastian/environment/src/Console.php | 81 + vendor/sebastian/environment/src/Runtime.php | 192 + .../environment/tests/ConsoleTest.php | 60 + .../environment/tests/RuntimeTest.php | 112 + vendor/sebastian/exporter/.gitignore | 9 + vendor/sebastian/exporter/.travis.yml | 23 + vendor/sebastian/exporter/LICENSE | 33 + vendor/sebastian/exporter/README.md | 171 + vendor/sebastian/exporter/build.xml | 27 + vendor/sebastian/exporter/composer.json | 47 + vendor/sebastian/exporter/phpunit.xml.dist | 21 + vendor/sebastian/exporter/src/Exporter.php | 296 ++ .../sebastian/exporter/tests/ExporterTest.php | 333 ++ vendor/sebastian/recursion-context/.gitignore | 9 + .../sebastian/recursion-context/.travis.yml | 21 + vendor/sebastian/recursion-context/LICENSE | 33 + vendor/sebastian/recursion-context/README.md | 13 + vendor/sebastian/recursion-context/build.xml | 27 + .../sebastian/recursion-context/composer.json | 36 + .../recursion-context/phpunit.xml.dist | 20 + .../recursion-context/src/Context.php | 153 + .../recursion-context/src/Exception.php | 17 + .../src/InvalidArgumentException.php | 17 + .../recursion-context/tests/ContextTest.php | 144 + vendor/sebastian/version/.gitattributes | 1 + vendor/sebastian/version/.gitignore | 1 + vendor/sebastian/version/LICENSE | 33 + vendor/sebastian/version/README.md | 37 + vendor/sebastian/version/composer.json | 21 + vendor/sebastian/version/src/Version.php | 82 + vendor/symfony/yaml/.gitignore | 3 + vendor/symfony/yaml/CHANGELOG.md | 8 + vendor/symfony/yaml/Dumper.php | 73 + vendor/symfony/yaml/Escaper.php | 97 + .../symfony/yaml/Exception/DumpException.php | 23 + .../yaml/Exception/ExceptionInterface.php | 23 + .../symfony/yaml/Exception/ParseException.php | 148 + .../yaml/Exception/RuntimeException.php | 23 + vendor/symfony/yaml/Inline.php | 546 +++ vendor/symfony/yaml/LICENSE | 19 + vendor/symfony/yaml/Parser.php | 697 +++ vendor/symfony/yaml/README.md | 21 + vendor/symfony/yaml/Tests/DumperTest.php | 236 + .../yaml/Tests/Fixtures/YtsAnchorAlias.yml | 31 + .../yaml/Tests/Fixtures/YtsBasicTests.yml | 202 + .../yaml/Tests/Fixtures/YtsBlockMapping.yml | 51 + .../Tests/Fixtures/YtsDocumentSeparator.yml | 85 + .../yaml/Tests/Fixtures/YtsErrorTests.yml | 25 + .../Tests/Fixtures/YtsFlowCollections.yml | 60 + .../yaml/Tests/Fixtures/YtsFoldedScalars.yml | 176 + .../Tests/Fixtures/YtsNullsAndEmpties.yml | 45 + .../Fixtures/YtsSpecificationExamples.yml | 1697 +++++++ .../yaml/Tests/Fixtures/YtsTypeTransfers.yml | 244 + .../yaml/Tests/Fixtures/embededPhp.yml | 1 + .../yaml/Tests/Fixtures/escapedCharacters.yml | 147 + vendor/symfony/yaml/Tests/Fixtures/index.yml | 18 + .../yaml/Tests/Fixtures/sfComments.yml | 73 + .../symfony/yaml/Tests/Fixtures/sfCompact.yml | 159 + .../yaml/Tests/Fixtures/sfMergeKey.yml | 45 + .../symfony/yaml/Tests/Fixtures/sfObjects.yml | 11 + .../symfony/yaml/Tests/Fixtures/sfQuotes.yml | 33 + .../symfony/yaml/Tests/Fixtures/sfTests.yml | 135 + .../Tests/Fixtures/unindentedCollections.yml | 82 + vendor/symfony/yaml/Tests/InlineTest.php | 384 ++ .../symfony/yaml/Tests/ParseExceptionTest.php | 41 + vendor/symfony/yaml/Tests/ParserTest.php | 755 +++ vendor/symfony/yaml/Tests/YamlTest.php | 37 + vendor/symfony/yaml/Unescaper.php | 146 + vendor/symfony/yaml/Yaml.php | 105 + vendor/symfony/yaml/composer.json | 33 + vendor/symfony/yaml/phpunit.xml.dist | 28 + view/admin/plugins.php | 57 + view/help.php | 2 +- view/post.php | 2 +- 1057 files changed, 87341 insertions(+), 499 deletions(-) delete mode 100644 app/cache/.gitkeep delete mode 100644 app/routes.php create mode 100644 cache/85f15bc57d6c4e8a3a00b5f5c72a639f5f734f32.cache create mode 100644 cache/cache_parser_data.php rename {app => featherbb}/Controller/Admin/Bans.php (95%) rename {app => featherbb}/Controller/Admin/Categories.php (92%) rename {app => featherbb}/Controller/Admin/Censoring.php (90%) rename {app => featherbb}/Controller/Admin/Forums.php (91%) rename {app => featherbb}/Controller/Admin/Groups.php (96%) rename {app => featherbb}/Controller/Admin/Index.php (96%) rename {app => featherbb}/Controller/Admin/Maintenance.php (93%) rename {app => featherbb}/Controller/Admin/Options.php (88%) rename {app => featherbb}/Controller/Admin/Parser.php (93%) rename {app => featherbb}/Controller/Admin/Permissions.php (87%) rename {app => featherbb}/Controller/Admin/Plugins.php (99%) rename {app => featherbb}/Controller/Admin/Reports.php (89%) rename {app => featherbb}/Controller/Admin/Statistics.php (91%) rename {app => featherbb}/Controller/Admin/Users.php (98%) rename {app => featherbb}/Controller/Auth.php (85%) rename {app => featherbb}/Controller/Delete.php (88%) rename {app => featherbb}/Controller/Edit.php (89%) rename {app => featherbb}/Controller/Help.php (88%) rename {app => featherbb}/Controller/Index.php (84%) rename {app => featherbb}/Controller/Install.php (98%) rename {app => featherbb}/Controller/Login.php (92%) rename {app => featherbb}/Controller/Misc.php (95%) rename {app => featherbb}/Controller/Moderate.php (96%) rename {app => featherbb}/Controller/Post.php (94%) rename {app => featherbb}/Controller/Profile.php (93%) rename {app => featherbb}/Controller/Register.php (89%) rename {app => featherbb}/Controller/Search.php (86%) rename {app => featherbb}/Controller/Userlist.php (93%) rename {app => featherbb}/Controller/Viewforum.php (95%) rename {app => featherbb}/Controller/Viewtopic.php (92%) rename {app => featherbb}/Core/AdminUtils.php (94%) rename {app => featherbb}/Core/Auth.php (97%) rename {app => featherbb}/Core/Cache.php (99%) rename {app => featherbb}/Core/Core.php (93%) rename {app => featherbb}/Core/Csrf.php (100%) rename {app => featherbb}/Core/Database.php (100%) rename {app => featherbb}/Core/Email.php (99%) rename {app => featherbb}/Core/Error.php (100%) rename {app => featherbb}/Core/Hooks.php (100%) rename {app => featherbb}/Core/Lister.php (98%) rename {app => featherbb}/Core/Plugin.php (100%) rename {app => featherbb}/Core/Search.php (99%) rename {app => featherbb}/Core/Url.php (100%) rename {app => featherbb}/Core/Utils.php (100%) rename {app => featherbb}/Core/View.php (97%) rename {app => featherbb}/Core/pomo/.editorconfig (100%) rename {app => featherbb}/Core/pomo/MO.php (100%) rename {app => featherbb}/Core/pomo/PO.php (100%) rename {app => featherbb}/Core/pomo/Streams/CachedFileReader.php (100%) rename {app => featherbb}/Core/pomo/Streams/CachedIntFileReader.php (100%) rename {app => featherbb}/Core/pomo/Streams/FileReader.php (100%) rename {app => featherbb}/Core/pomo/Streams/Reader.php (100%) rename {app => featherbb}/Core/pomo/Streams/StringReader.php (100%) rename {app => featherbb}/Core/pomo/Translations/EntryTranslations.php (100%) rename {app => featherbb}/Core/pomo/Translations/GettextTranslations.php (100%) rename {app => featherbb}/Core/pomo/Translations/NOOPTranslations.php (100%) rename {app => featherbb}/Core/pomo/Translations/Translations.php (100%) rename {app => featherbb}/Core/pomo/Translations/TranslationsInterface.php (100%) rename {app => featherbb}/Helpers/bbcd_compile.php (99%) rename {app => featherbb}/Helpers/bbcd_source.php (100%) rename {app => featherbb}/Helpers/functions.php (95%) rename {app => featherbb}/Helpers/l10n.php (100%) rename {app => featherbb}/Helpers/parser.php (99%) rename {app => featherbb}/Helpers/srand.php (100%) rename {app => featherbb}/Helpers/utf8/mbstring/core.php (100%) rename {app => featherbb}/Helpers/utf8/native/core.php (100%) rename {app => featherbb}/Helpers/utf8/ord.php (100%) rename {app => featherbb}/Helpers/utf8/str_ireplace.php (100%) rename {app => featherbb}/Helpers/utf8/str_pad.php (100%) rename {app => featherbb}/Helpers/utf8/str_split.php (100%) rename {app => featherbb}/Helpers/utf8/strcasecmp.php (100%) rename {app => featherbb}/Helpers/utf8/strcspn.php (100%) rename {app => featherbb}/Helpers/utf8/stristr.php (100%) rename {app => featherbb}/Helpers/utf8/strrev.php (100%) rename {app => featherbb}/Helpers/utf8/strspn.php (100%) rename {app => featherbb}/Helpers/utf8/substr_replace.php (100%) rename {app => featherbb}/Helpers/utf8/trim.php (100%) rename {app => featherbb}/Helpers/utf8/ucfirst.php (100%) rename {app => featherbb}/Helpers/utf8/ucwords.php (100%) rename {app => featherbb}/Helpers/utf8/utf8.php (100%) rename {app => featherbb}/Helpers/utf8/utils/ascii.php (100%) rename {app => featherbb}/Helpers/utf8/utils/bad.php (100%) rename {app => featherbb}/Helpers/utf8/utils/patterns.php (100%) rename {app => featherbb}/Helpers/utf8/utils/position.php (100%) rename {app => featherbb}/Helpers/utf8/utils/specials.php (100%) rename {app => featherbb}/Helpers/utf8/utils/unicode.php (100%) rename {app => featherbb}/Helpers/utf8/utils/validation.php (100%) rename {app => featherbb}/Model/Admin/Bans.php (98%) rename {app => featherbb}/Model/Admin/Categories.php (96%) rename {app => featherbb}/Model/Admin/Censoring.php (82%) rename {app => featherbb}/Model/Admin/Forums.php (98%) rename {app => featherbb}/Model/Admin/Groups.php (98%) rename {app => featherbb}/Model/Admin/Maintenance.php (99%) rename {app => featherbb}/Model/Admin/Options.php (99%) rename {app => featherbb}/Model/Admin/Parser.php (97%) rename {app => featherbb}/Model/Admin/Permissions.php (92%) rename {app => featherbb}/Model/Admin/Reports.php (99%) rename {app => featherbb}/Model/Admin/Statistics.php (99%) rename {app => featherbb}/Model/Admin/Users.php (99%) rename {app => featherbb}/Model/Auth.php (99%) rename {app => featherbb}/Model/Cache.php (99%) rename {app => featherbb}/Model/Debug.php (97%) rename {app => featherbb}/Model/Delete.php (99%) rename {app => featherbb}/Model/Edit.php (98%) rename {app => featherbb}/Model/Header.php (95%) rename {app => featherbb}/Model/Index.php (99%) rename {app => featherbb}/Model/Install.php (99%) rename {app => featherbb}/Model/Login.php (97%) rename {app => featherbb}/Model/Misc.php (98%) rename {app => featherbb}/Model/Moderate.php (99%) rename {app => featherbb}/Model/Post.php (97%) rename {app => featherbb}/Model/Profile.php (98%) rename {app => featherbb}/Model/Register.php (94%) rename {app => featherbb}/Model/Search.php (99%) rename {app => featherbb}/Model/Userlist.php (99%) rename {app => featherbb}/Model/Viewforum.php (99%) rename {app => featherbb}/Model/Viewtopic.php (99%) rename {app => featherbb}/lang/English/admin/bans.mo (100%) rename {app => featherbb}/lang/English/admin/bans.po (100%) rename {app => featherbb}/lang/English/admin/categories.mo (100%) rename {app => featherbb}/lang/English/admin/categories.po (100%) rename {app => featherbb}/lang/English/admin/censoring.mo (100%) rename {app => featherbb}/lang/English/admin/censoring.po (100%) rename {app => featherbb}/lang/English/admin/common.mo (100%) rename {app => featherbb}/lang/English/admin/common.po (100%) rename {app => featherbb}/lang/English/admin/forums.mo (100%) rename {app => featherbb}/lang/English/admin/forums.po (100%) rename {app => featherbb}/lang/English/admin/groups.mo (100%) rename {app => featherbb}/lang/English/admin/groups.po (100%) rename {app => featherbb}/lang/English/admin/index.html (100%) rename {app => featherbb}/lang/English/admin/index.mo (100%) rename {app => featherbb}/lang/English/admin/index.po (100%) rename {app => featherbb}/lang/English/admin/maintenance.mo (100%) rename {app => featherbb}/lang/English/admin/maintenance.po (100%) rename {app => featherbb}/lang/English/admin/options.mo (100%) rename {app => featherbb}/lang/English/admin/options.po (100%) rename {app => featherbb}/lang/English/admin/parser.mo (100%) rename {app => featherbb}/lang/English/admin/parser.php (100%) rename {app => featherbb}/lang/English/admin/parser.po (100%) rename {app => featherbb}/lang/English/admin/permissions.mo (100%) rename {app => featherbb}/lang/English/admin/permissions.po (100%) rename {app => featherbb}/lang/English/admin/plugin_example.mo (100%) rename {app => featherbb}/lang/English/admin/plugin_example.po (100%) rename {app => featherbb}/lang/English/admin/reports.mo (100%) rename {app => featherbb}/lang/English/admin/reports.po (100%) rename {app => featherbb}/lang/English/admin/users.mo (100%) rename {app => featherbb}/lang/English/admin/users.po (100%) rename {app => featherbb}/lang/English/antispam.mo (100%) rename {app => featherbb}/lang/English/antispam.php (100%) rename {app => featherbb}/lang/English/antispam.po (100%) rename {app => featherbb}/lang/English/antispam_questions.mo (100%) rename {app => featherbb}/lang/English/antispam_questions.po (100%) rename {app => featherbb}/lang/English/bbeditor.mo (100%) rename {app => featherbb}/lang/English/bbeditor.po (100%) rename {app => featherbb}/lang/English/common.mo (100%) rename {app => featherbb}/lang/English/common.po (100%) rename {app => featherbb}/lang/English/delete.mo (100%) rename {app => featherbb}/lang/English/delete.po (100%) rename {app => featherbb}/lang/English/forum.mo (100%) rename {app => featherbb}/lang/English/forum.po (100%) rename {app => featherbb}/lang/English/help.mo (100%) rename {app => featherbb}/lang/English/help.po (100%) rename {app => featherbb}/lang/English/index.mo (100%) rename {app => featherbb}/lang/English/index.po (100%) rename {app => featherbb}/lang/English/install.mo (100%) rename {app => featherbb}/lang/English/install.po (100%) rename {app => featherbb}/lang/English/login.mo (100%) rename {app => featherbb}/lang/English/login.po (100%) rename {app => featherbb}/lang/English/mail_templates/activate_email.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/activate_password.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/banned_email_change.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/banned_email_post.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/banned_email_register.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/dupe_email_change.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/dupe_email_register.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/form_email.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/new_reply.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/new_reply_full.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/new_report.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/new_topic.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/new_topic_full.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/new_user.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/rename.tpl (100%) rename {app => featherbb}/lang/English/mail_templates/welcome.tpl (100%) rename {app => featherbb}/lang/English/misc.mo (100%) rename {app => featherbb}/lang/English/misc.po (100%) rename {app => featherbb}/lang/English/post.mo (100%) rename {app => featherbb}/lang/English/post.po (100%) rename {app => featherbb}/lang/English/prof_reg.mo (100%) rename {app => featherbb}/lang/English/prof_reg.po (100%) rename {app => featherbb}/lang/English/profile.mo (100%) rename {app => featherbb}/lang/English/profile.po (100%) rename {app => featherbb}/lang/English/register.mo (100%) rename {app => featherbb}/lang/English/register.po (100%) rename {app => featherbb}/lang/English/search.mo (100%) rename {app => featherbb}/lang/English/search.po (100%) rename {app => featherbb}/lang/English/stopwords.txt (100%) rename {app => featherbb}/lang/English/topic.mo (100%) rename {app => featherbb}/lang/English/topic.po (100%) rename {app => featherbb}/lang/English/update.mo (100%) rename {app => featherbb}/lang/English/update.po (100%) rename {app => featherbb}/lang/English/userlist.mo (100%) rename {app => featherbb}/lang/English/userlist.po (100%) create mode 100644 featherbb/routes.php create mode 100644 vendor/bin/phpunit create mode 100644 vendor/composer/include_paths.php create mode 100644 vendor/phpunit/php-code-coverage/.gitattributes create mode 100644 vendor/phpunit/php-code-coverage/.gitignore create mode 100644 vendor/phpunit/php-code-coverage/.travis.yml create mode 100644 vendor/phpunit/php-code-coverage/CONTRIBUTING.md create mode 100644 vendor/phpunit/php-code-coverage/ChangeLog-2.2.md create mode 100644 vendor/phpunit/php-code-coverage/LICENSE create mode 100644 vendor/phpunit/php-code-coverage/README.md create mode 100644 vendor/phpunit/php-code-coverage/build.xml create mode 100644 vendor/phpunit/php-code-coverage/build/travis-ci.xml create mode 100644 vendor/phpunit/php-code-coverage/composer.json create mode 100644 vendor/phpunit/php-code-coverage/phpunit.xml.dist create mode 100644 vendor/phpunit/php-code-coverage/scripts/auto_append.php create mode 100644 vendor/phpunit/php-code-coverage/scripts/auto_prepend.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.svg create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/holder.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/html5shiv.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/nv.d3.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/respond.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/method_item.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php create mode 100644 vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/FilterTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/CloverTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/FactoryTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/TestCase.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageClassExtendedTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageClassTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesWhitespaceTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodOneLineAnnotationTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesWhitespaceTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNoneTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPrivateTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNotProtectedTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPublicTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNothingTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageProtectedTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoveragePublicTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageTwoDefaultClassAnnotations.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoveredClass.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoveredFunction.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassExtendedTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassPublicTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageMethodTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPrivateTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPublicTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePrivateTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageProtectedTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePublicTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveredClass.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NotExistingCoveredElementTest.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_with_ignore.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_with_namespace.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_with_oneline_annotations.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_without_ignore.php create mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_without_namespace.php create mode 100644 vendor/phpunit/php-file-iterator/.gitattributes create mode 100644 vendor/phpunit/php-file-iterator/.gitignore create mode 100644 vendor/phpunit/php-file-iterator/ChangeLog.markdown create mode 100644 vendor/phpunit/php-file-iterator/File/Iterator.php create mode 100644 vendor/phpunit/php-file-iterator/File/Iterator/Autoload.php create mode 100644 vendor/phpunit/php-file-iterator/File/Iterator/Autoload.php.in create mode 100644 vendor/phpunit/php-file-iterator/File/Iterator/Facade.php create mode 100644 vendor/phpunit/php-file-iterator/File/Iterator/Factory.php create mode 100644 vendor/phpunit/php-file-iterator/LICENSE create mode 100644 vendor/phpunit/php-file-iterator/README.markdown create mode 100644 vendor/phpunit/php-file-iterator/build.xml create mode 100644 vendor/phpunit/php-file-iterator/build/PHPCS/Sniffs/ControlStructures/ControlSignatureSniff.php create mode 100644 vendor/phpunit/php-file-iterator/build/PHPCS/Sniffs/Whitespace/ConcatenationSpacingSniff.php create mode 100644 vendor/phpunit/php-file-iterator/build/PHPCS/ruleset.xml create mode 100644 vendor/phpunit/php-file-iterator/build/phpmd.xml create mode 100644 vendor/phpunit/php-file-iterator/composer.json create mode 100644 vendor/phpunit/php-file-iterator/package.xml create mode 100644 vendor/phpunit/php-text-template/.gitattributes create mode 100644 vendor/phpunit/php-text-template/.gitignore create mode 100644 vendor/phpunit/php-text-template/LICENSE create mode 100644 vendor/phpunit/php-text-template/README.md create mode 100644 vendor/phpunit/php-text-template/composer.json create mode 100644 vendor/phpunit/php-text-template/src/Template.php create mode 100644 vendor/phpunit/php-timer/.gitattributes create mode 100644 vendor/phpunit/php-timer/.gitignore create mode 100644 vendor/phpunit/php-timer/.travis.yml create mode 100644 vendor/phpunit/php-timer/LICENSE create mode 100644 vendor/phpunit/php-timer/README.md create mode 100644 vendor/phpunit/php-timer/composer.json create mode 100644 vendor/phpunit/php-timer/src/Timer.php create mode 100644 vendor/phpunit/php-timer/tests/TimerTest.php create mode 100644 vendor/phpunit/php-token-stream/.gitattributes create mode 100644 vendor/phpunit/php-token-stream/.gitignore create mode 100644 vendor/phpunit/php-token-stream/.travis.yml create mode 100644 vendor/phpunit/php-token-stream/LICENSE create mode 100644 vendor/phpunit/php-token-stream/README.md create mode 100644 vendor/phpunit/php-token-stream/build.xml create mode 100644 vendor/phpunit/php-token-stream/build/phpunit.xml create mode 100644 vendor/phpunit/php-token-stream/composer.json create mode 100644 vendor/phpunit/php-token-stream/src/Token.php create mode 100644 vendor/phpunit/php-token-stream/src/Token/Stream.php create mode 100644 vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php create mode 100644 vendor/phpunit/php-token-stream/tests/Token/ClassTest.php create mode 100644 vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php create mode 100644 vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php create mode 100644 vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php create mode 100644 vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php create mode 100644 vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php create mode 100644 vendor/phpunit/php-token-stream/tests/TokenTest.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/classInNamespace.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/classInScopedNamespace.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_that_declares_anonymous_class.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/closure.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/issue19.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/issue30.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/multipleNamespacesWithOneClassUsingBraces.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/multipleNamespacesWithOneClassUsingNonBraceSyntax.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source2.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source3.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source4.php create mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source5.php create mode 100644 vendor/phpunit/php-token-stream/tests/bootstrap.php create mode 100644 vendor/phpunit/phpunit-mock-objects/.gitattributes create mode 100644 vendor/phpunit/phpunit-mock-objects/.gitignore create mode 100644 vendor/phpunit/phpunit-mock-objects/.travis.yml create mode 100644 vendor/phpunit/phpunit-mock-objects/CONTRIBUTING.md create mode 100644 vendor/phpunit/phpunit-mock-objects/LICENSE create mode 100644 vendor/phpunit/phpunit-mock-objects/README.md create mode 100644 vendor/phpunit/phpunit-mock-objects/build.xml create mode 100644 vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml create mode 100644 vendor/phpunit/phpunit-mock-objects/composer.json create mode 100644 vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class_method.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_clone.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_method.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_static_method.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/proxied_method.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/trait_class.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/unmocked_clone.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_class.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_method.tpl.dist create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php create mode 100644 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/class.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_clone.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_constructor.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_clone.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_constructor.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_call_parent_constructor.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_partial.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_named_method.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/interface.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/invocation_object_clone_object.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_clone.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_constructor.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_clone.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_partial.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_interface.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/proxy.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_files/ClassThatImplementsSerializable.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_files/ClassWithStaticMethod.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractMockTestClass.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractTrait.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/AnInterface.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/AnotherInterface.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/Bar.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/Foo.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/GoogleSearch.wsdl create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/InterfaceWithStaticMethod.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallback.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallbackByReference.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/Mockable.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/PartialMockTestClass.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/SomeClass.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/StaticMockTestClass.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/_fixture/TraversableMockTestInterface.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/autoload.php create mode 100644 vendor/phpunit/phpunit-mock-objects/tests/bootstrap.php create mode 100644 vendor/phpunit/phpunit/.gitattributes create mode 100644 vendor/phpunit/phpunit/.gitignore create mode 100644 vendor/phpunit/phpunit/.travis.yml create mode 100644 vendor/phpunit/phpunit/CONTRIBUTING.md create mode 100644 vendor/phpunit/phpunit/LICENSE create mode 100644 vendor/phpunit/phpunit/README.md create mode 100644 vendor/phpunit/phpunit/build.xml create mode 100644 vendor/phpunit/phpunit/build/ca.pem create mode 100644 vendor/phpunit/phpunit/build/phar-autoload.php.in create mode 100644 vendor/phpunit/phpunit/build/phar-manifest.php create mode 100644 vendor/phpunit/phpunit/build/phar-version.php create mode 100644 vendor/phpunit/phpunit/build/phpmd.xml create mode 100644 vendor/phpunit/phpunit/build/travis-ci.xml create mode 100644 vendor/phpunit/phpunit/composer.json create mode 100644 vendor/phpunit/phpunit/phpdox.xml.dist create mode 100644 vendor/phpunit/phpunit/phpunit create mode 100644 vendor/phpunit/phpunit/phpunit.xml.dist create mode 100644 vendor/phpunit/phpunit/phpunit.xsd create mode 100644 vendor/phpunit/phpunit/src/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php create mode 100644 vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php create mode 100644 vendor/phpunit/phpunit/src/Extensions/PhptTestSuite.php create mode 100644 vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php create mode 100644 vendor/phpunit/phpunit/src/Extensions/TestDecorator.php create mode 100644 vendor/phpunit/phpunit/src/Extensions/TicketListener.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Assert.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Assert/Functions.php create mode 100644 vendor/phpunit/phpunit/src/Framework/AssertionFailedError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/BaseTestListener.php create mode 100644 vendor/phpunit/phpunit/src/Framework/CodeCoverageException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/And.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Count.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Not.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Or.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Error.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Notice.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Warning.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Framework/ExpectationFailedException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/IncompleteTest.php create mode 100644 vendor/phpunit/phpunit/src/Framework/IncompleteTestError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/OutputError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/RiskyTest.php create mode 100644 vendor/phpunit/phpunit/src/Framework/RiskyTestError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/SelfDescribing.php create mode 100644 vendor/phpunit/phpunit/src/Framework/SkippedTest.php create mode 100644 vendor/phpunit/phpunit/src/Framework/SkippedTestError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/SyntheticError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Test.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestCase.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestFailure.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestListener.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestResult.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestSuite.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php create mode 100644 vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Warning.php create mode 100644 vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/Factory.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/Group.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/Group/Include.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/Test.php create mode 100644 vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php create mode 100644 vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Version.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/Command.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/TestRunner.php create mode 100644 vendor/phpunit/phpunit/src/Util/Blacklist.php create mode 100644 vendor/phpunit/phpunit/src/Util/Configuration.php create mode 100644 vendor/phpunit/phpunit/src/Util/DeprecatedFeature.php create mode 100644 vendor/phpunit/phpunit/src/Util/DeprecatedFeature/Logger.php create mode 100644 vendor/phpunit/phpunit/src/Util/ErrorHandler.php create mode 100644 vendor/phpunit/phpunit/src/Util/Fileloader.php create mode 100644 vendor/phpunit/phpunit/src/Util/Filesystem.php create mode 100644 vendor/phpunit/phpunit/src/Util/Filter.php create mode 100644 vendor/phpunit/phpunit/src/Util/Getopt.php create mode 100644 vendor/phpunit/phpunit/src/Util/GlobalState.php create mode 100644 vendor/phpunit/phpunit/src/Util/InvalidArgumentHelper.php create mode 100644 vendor/phpunit/phpunit/src/Util/Log/JSON.php create mode 100644 vendor/phpunit/phpunit/src/Util/Log/JUnit.php create mode 100644 vendor/phpunit/phpunit/src/Util/Log/TAP.php create mode 100644 vendor/phpunit/phpunit/src/Util/PHP.php create mode 100644 vendor/phpunit/phpunit/src/Util/PHP/Default.php create mode 100644 vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist create mode 100644 vendor/phpunit/phpunit/src/Util/PHP/Windows.php create mode 100644 vendor/phpunit/phpunit/src/Util/Printer.php create mode 100644 vendor/phpunit/phpunit/src/Util/String.php create mode 100644 vendor/phpunit/phpunit/src/Util/Test.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestSuiteIterator.php create mode 100644 vendor/phpunit/phpunit/src/Util/Type.php create mode 100644 vendor/phpunit/phpunit/src/Util/XML.php create mode 100644 vendor/phpunit/phpunit/tests/Extensions/RepeatedTestTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/AssertTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/BaseTestListenerTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/SelectorAssertionsTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/SuiteTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/TestFailureTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/TestImplementorTest.php create mode 100644 vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/1021.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/1021/Issue1021Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/523.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/523/Issue523Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/578.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/578/Issue578Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/684.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/684/Issue684Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/783.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/783/ChildSuite.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/783/OneTest.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/783/ParentSuite.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/783/TwoTest.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1149/Issue1149Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1265/Issue1265Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1265/phpunit1265.xml create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1330/Issue1330Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1330/phpunit1330.xml create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1340.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1340/Issue1340Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1374/Issue1374Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/244/Issue244Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/322/Issue322Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/322/phpunit322.xml create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/433/Issue433Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/445/Issue445Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/503/Issue503Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/74/Issue74Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/74/NewException.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/765/Issue765Test.php create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/873.phpt create mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/873/Issue873Test.php create mode 100644 vendor/phpunit/phpunit/tests/Runner/BaseTestRunnerTest.php create mode 100644 vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/debug.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/default.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/failure.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/fatal.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/group.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/help.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/help2.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/log-json-5.3.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/repeat.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/strict-incomplete.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/strict-isolation.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/strict.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/tap.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt create mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox.phpt create mode 100644 vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php create mode 100644 vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.php create mode 100644 vendor/phpunit/phpunit/tests/Util/TestTest.php create mode 100644 vendor/phpunit/phpunit/tests/Util/XMLTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/AbstractTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/Author.php create mode 100644 vendor/phpunit/phpunit/tests/_files/BankAccount.php create mode 100644 vendor/phpunit/phpunit/tests/_files/BankAccountTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/BankAccountTest.test.php create mode 100644 vendor/phpunit/phpunit/tests/_files/BaseTestListenerSample.php create mode 100644 vendor/phpunit/phpunit/tests/_files/BeforeAndAfterTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/BeforeClassAndAfterClassTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/Book.php create mode 100644 vendor/phpunit/phpunit/tests/_files/Calculator.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ChangeCurrentWorkingDirectoryTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ClassWithToString.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ConcreteTest.my.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ConcreteTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageClassExtendedTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageClassTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageFunctionParenthesesTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageFunctionParenthesesWhitespaceTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageFunctionTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodOneLineAnnotationTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesWhitespaceTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNoneTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNotPrivateTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNotProtectedTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNotPublicTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNothingTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoveragePrivateTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageProtectedTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoveragePublicTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageTwoDefaultClassAnnotations.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoveredClass.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CoveredFunction.php create mode 100644 vendor/phpunit/phpunit/tests/_files/CustomPrinter.php create mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/DependencySuccessTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/DependencyTestSuite.php create mode 100644 vendor/phpunit/phpunit/tests/_files/DoubleTestCase.php create mode 100644 vendor/phpunit/phpunit/tests/_files/DummyException.php create mode 100644 vendor/phpunit/phpunit/tests/_files/EmptyTestCaseTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/Error.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPostConditionsTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPreConditionsTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInSetUpTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInTearDownTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionNamespaceTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/Failure.php create mode 100644 vendor/phpunit/phpunit/tests/_files/FailureTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/FatalTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/IncompleteTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php create mode 100644 vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceB.php create mode 100644 vendor/phpunit/phpunit/tests/_files/InheritedTestCase.php create mode 100644 vendor/phpunit/phpunit/tests/_files/IniTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/JsonData/arrayObject.js create mode 100644 vendor/phpunit/phpunit/tests/_files/JsonData/simpleObject.js create mode 100644 vendor/phpunit/phpunit/tests/_files/JsonData/simpleObject2.js create mode 100644 vendor/phpunit/phpunit/tests/_files/MockRunner.php create mode 100644 vendor/phpunit/phpunit/tests/_files/MultiDependencyTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassExtendedTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassPublicTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageMethodTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPrivateTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotProtectedTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPublicTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePrivateTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageProtectedTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePublicTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoveredClass.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NoArgTestCaseTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NoTestCaseClass.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NoTestCases.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NonStatic.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NotExistingCoveredElementTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NotPublicTestCase.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NotVoidTestCase.php create mode 100644 vendor/phpunit/phpunit/tests/_files/NothingTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/OneTestCase.php create mode 100644 vendor/phpunit/phpunit/tests/_files/OutputTestCase.php create mode 100644 vendor/phpunit/phpunit/tests/_files/OverrideTestCase.php create mode 100644 vendor/phpunit/phpunit/tests/_files/RequirementsClassDocBlockTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/RequirementsTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/SampleArrayAccess.php create mode 100644 vendor/phpunit/phpunit/tests/_files/SampleClass.php create mode 100644 vendor/phpunit/phpunit/tests/_files/SelectorAssertionsFixture.html create mode 100644 vendor/phpunit/phpunit/tests/_files/Singleton.php create mode 100644 vendor/phpunit/phpunit/tests/_files/StackTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/Struct.php create mode 100644 vendor/phpunit/phpunit/tests/_files/Success.php create mode 100644 vendor/phpunit/phpunit/tests/_files/TemplateMethodsTest.php create mode 100644 vendor/phpunit/phpunit/tests/_files/TestIterator.php create mode 100644 vendor/phpunit/phpunit/tests/_files/TestIterator2.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ThrowExceptionTestCase.php create mode 100644 vendor/phpunit/phpunit/tests/_files/ThrowNoExceptionTestCase.php create mode 100644 vendor/phpunit/phpunit/tests/_files/WasRun.php create mode 100644 vendor/phpunit/phpunit/tests/_files/bar.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.custom-printer.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_empty.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/expectedFileFormat.txt create mode 100644 vendor/phpunit/phpunit/tests/_files/foo.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/structureAttributesAreSameButValuesAreNot.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/structureExpected.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/structureIgnoreTextNodes.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/structureIsSameButDataIsNot.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfAttributes.xml create mode 100644 vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfNodes.xml create mode 100644 vendor/phpunit/phpunit/tests/bootstrap-travis.php create mode 100644 vendor/phpunit/phpunit/tests/bootstrap.php create mode 100644 vendor/sebastian/comparator/.gitignore create mode 100644 vendor/sebastian/comparator/.travis.yml create mode 100644 vendor/sebastian/comparator/LICENSE create mode 100644 vendor/sebastian/comparator/README.md create mode 100644 vendor/sebastian/comparator/build.xml create mode 100644 vendor/sebastian/comparator/build/travis-ci.xml create mode 100644 vendor/sebastian/comparator/composer.json create mode 100644 vendor/sebastian/comparator/phpunit.xml.dist create mode 100644 vendor/sebastian/comparator/src/ArrayComparator.php create mode 100644 vendor/sebastian/comparator/src/Comparator.php create mode 100644 vendor/sebastian/comparator/src/ComparisonFailure.php create mode 100644 vendor/sebastian/comparator/src/DOMNodeComparator.php create mode 100644 vendor/sebastian/comparator/src/DateTimeComparator.php create mode 100644 vendor/sebastian/comparator/src/DoubleComparator.php create mode 100644 vendor/sebastian/comparator/src/ExceptionComparator.php create mode 100644 vendor/sebastian/comparator/src/Factory.php create mode 100644 vendor/sebastian/comparator/src/MockObjectComparator.php create mode 100644 vendor/sebastian/comparator/src/NumericComparator.php create mode 100644 vendor/sebastian/comparator/src/ObjectComparator.php create mode 100644 vendor/sebastian/comparator/src/ResourceComparator.php create mode 100644 vendor/sebastian/comparator/src/ScalarComparator.php create mode 100644 vendor/sebastian/comparator/src/SplObjectStorageComparator.php create mode 100644 vendor/sebastian/comparator/src/TypeComparator.php create mode 100644 vendor/sebastian/comparator/tests/ArrayComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/DateTimeComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/DoubleComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/ExceptionComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/FactoryTest.php create mode 100644 vendor/sebastian/comparator/tests/MockObjectComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/NumericComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/ObjectComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/ResourceComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/ScalarComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/TypeComparatorTest.php create mode 100644 vendor/sebastian/comparator/tests/_files/Author.php create mode 100644 vendor/sebastian/comparator/tests/_files/Book.php create mode 100644 vendor/sebastian/comparator/tests/_files/ClassWithToString.php create mode 100644 vendor/sebastian/comparator/tests/_files/SampleClass.php create mode 100644 vendor/sebastian/comparator/tests/_files/Struct.php create mode 100644 vendor/sebastian/comparator/tests/_files/TestClass.php create mode 100644 vendor/sebastian/comparator/tests/_files/TestClassComparator.php create mode 100644 vendor/sebastian/comparator/tests/autoload.php create mode 100644 vendor/sebastian/comparator/tests/bootstrap.php create mode 100644 vendor/sebastian/diff/.gitignore create mode 100644 vendor/sebastian/diff/.travis.yml create mode 100644 vendor/sebastian/diff/LICENSE create mode 100644 vendor/sebastian/diff/README.md create mode 100644 vendor/sebastian/diff/build.xml create mode 100644 vendor/sebastian/diff/composer.json create mode 100644 vendor/sebastian/diff/phpunit.xml.dist create mode 100644 vendor/sebastian/diff/src/Chunk.php create mode 100644 vendor/sebastian/diff/src/Diff.php create mode 100644 vendor/sebastian/diff/src/Differ.php create mode 100644 vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php create mode 100644 vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php create mode 100644 vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php create mode 100644 vendor/sebastian/diff/src/Line.php create mode 100644 vendor/sebastian/diff/src/Parser.php create mode 100644 vendor/sebastian/diff/tests/DifferTest.php create mode 100644 vendor/sebastian/diff/tests/LCS/TimeEfficientImplementationTest.php create mode 100644 vendor/sebastian/diff/tests/ParserTest.php create mode 100644 vendor/sebastian/diff/tests/fixtures/patch.txt create mode 100644 vendor/sebastian/diff/tests/fixtures/patch2.txt create mode 100644 vendor/sebastian/environment/.gitignore create mode 100644 vendor/sebastian/environment/.travis.yml create mode 100644 vendor/sebastian/environment/LICENSE create mode 100644 vendor/sebastian/environment/README.md create mode 100644 vendor/sebastian/environment/build.xml create mode 100644 vendor/sebastian/environment/composer.json create mode 100644 vendor/sebastian/environment/phpunit.xml.dist create mode 100644 vendor/sebastian/environment/src/Console.php create mode 100644 vendor/sebastian/environment/src/Runtime.php create mode 100644 vendor/sebastian/environment/tests/ConsoleTest.php create mode 100644 vendor/sebastian/environment/tests/RuntimeTest.php create mode 100644 vendor/sebastian/exporter/.gitignore create mode 100644 vendor/sebastian/exporter/.travis.yml create mode 100644 vendor/sebastian/exporter/LICENSE create mode 100644 vendor/sebastian/exporter/README.md create mode 100644 vendor/sebastian/exporter/build.xml create mode 100644 vendor/sebastian/exporter/composer.json create mode 100644 vendor/sebastian/exporter/phpunit.xml.dist create mode 100644 vendor/sebastian/exporter/src/Exporter.php create mode 100644 vendor/sebastian/exporter/tests/ExporterTest.php create mode 100644 vendor/sebastian/recursion-context/.gitignore create mode 100644 vendor/sebastian/recursion-context/.travis.yml create mode 100644 vendor/sebastian/recursion-context/LICENSE create mode 100644 vendor/sebastian/recursion-context/README.md create mode 100644 vendor/sebastian/recursion-context/build.xml create mode 100644 vendor/sebastian/recursion-context/composer.json create mode 100644 vendor/sebastian/recursion-context/phpunit.xml.dist create mode 100644 vendor/sebastian/recursion-context/src/Context.php create mode 100644 vendor/sebastian/recursion-context/src/Exception.php create mode 100644 vendor/sebastian/recursion-context/src/InvalidArgumentException.php create mode 100644 vendor/sebastian/recursion-context/tests/ContextTest.php create mode 100644 vendor/sebastian/version/.gitattributes create mode 100644 vendor/sebastian/version/.gitignore create mode 100644 vendor/sebastian/version/LICENSE create mode 100644 vendor/sebastian/version/README.md create mode 100644 vendor/sebastian/version/composer.json create mode 100644 vendor/sebastian/version/src/Version.php create mode 100644 vendor/symfony/yaml/.gitignore create mode 100644 vendor/symfony/yaml/CHANGELOG.md create mode 100644 vendor/symfony/yaml/Dumper.php create mode 100644 vendor/symfony/yaml/Escaper.php create mode 100644 vendor/symfony/yaml/Exception/DumpException.php create mode 100644 vendor/symfony/yaml/Exception/ExceptionInterface.php create mode 100644 vendor/symfony/yaml/Exception/ParseException.php create mode 100644 vendor/symfony/yaml/Exception/RuntimeException.php create mode 100644 vendor/symfony/yaml/Inline.php create mode 100644 vendor/symfony/yaml/LICENSE create mode 100644 vendor/symfony/yaml/Parser.php create mode 100644 vendor/symfony/yaml/README.md create mode 100644 vendor/symfony/yaml/Tests/DumperTest.php create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsAnchorAlias.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsBasicTests.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsBlockMapping.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsDocumentSeparator.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsErrorTests.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsFlowCollections.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsFoldedScalars.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsNullsAndEmpties.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/embededPhp.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/escapedCharacters.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/index.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/sfComments.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/sfCompact.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/sfMergeKey.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/sfObjects.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/sfQuotes.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/sfTests.yml create mode 100644 vendor/symfony/yaml/Tests/Fixtures/unindentedCollections.yml create mode 100644 vendor/symfony/yaml/Tests/InlineTest.php create mode 100644 vendor/symfony/yaml/Tests/ParseExceptionTest.php create mode 100644 vendor/symfony/yaml/Tests/ParserTest.php create mode 100644 vendor/symfony/yaml/Tests/YamlTest.php create mode 100644 vendor/symfony/yaml/Unescaper.php create mode 100644 vendor/symfony/yaml/Yaml.php create mode 100644 vendor/symfony/yaml/composer.json create mode 100644 vendor/symfony/yaml/phpunit.xml.dist create mode 100644 view/admin/plugins.php diff --git a/.gitignore b/.gitignore index 4728b64b..81898019 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -app/cache/ -app/config.php +featherbb/cache/ +featherbb/config.php .idea/ nbproject/ lang/French diff --git a/app/cache/.gitkeep b/app/cache/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/app/routes.php b/app/routes.php deleted file mode 100644 index 617db5b9..00000000 --- a/app/routes.php +++ /dev/null @@ -1,205 +0,0 @@ -get('/', '\App\Controller\index:display'); - -// Viewforum -$feather->get('/forum/:id(/:name)(/page/:page)(/)', '\App\Controller\viewforum:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); - -// Viewtopic -$feather->group('/topic', function() use ($feather) { - $feather->get('/:id(/:name)(/page/:page)(/)', '\App\Controller\viewtopic:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); - $feather->get('/:id/action/:action(/)', '\App\Controller\viewtopic:action')->conditions(array('id' => '[0-9]+')); -}); -$feather->get('/post/:pid(/)', '\App\Controller\viewtopic:viewpost')->conditions(array('pid' => '[0-9]+')); - -// Userlist -$feather->get('/userlist(/)', '\App\Controller\userlist:display'); - -// Auth routes -$feather->group('/auth', function() use ($feather) { - $feather->get('(/)', function () use ($feather) { - if (!$feather->user->is_guest) { - $this->feather->url->redirect($this->feather->url->get('/')); - } else { - $this->feather->url->redirect($this->feather->url->get('/auth/login')); - } - }); - $feather->map('/login(/)', '\App\Controller\auth:login')->via('GET', 'POST'); - $feather->map('/forget(/)', '\App\Controller\auth:forget')->via('GET', 'POST'); - $feather->get('/logout/token/:token(/)', '\App\Controller\auth:logout'); -}); - -// Register routes -$feather->group('/register', function() use ($feather) { - $feather->get('(/)', '\App\Controller\register:rules'); - $feather->map('/agree(/)', '\App\Controller\register:display')->via('GET', 'POST'); - $feather->get('/cancel(/)', '\App\Controller\register:cancel'); -}); - -// Post routes -$feather->group('/post', function() use ($feather) { - $feather->map('/new-topic/:fid(/)', '\App\Controller\post:newpost')->conditions(array('fid' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/reply/:tid(/)(/quote/:qid)(/)', '\App\Controller\post:newreply')->conditions(array('tid' => '[0-9]+', 'qid' => '[0-9]+'))->via('GET', 'POST'); -}); - -// Edit -$feather->map('/edit/:id(/)', '\App\Controller\edit:editpost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - -// Delete -$feather->map('/delete/:id(/)', '\App\Controller\delete:deletepost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - -// Search routes -$feather->group('/search', function() use ($feather) { - $feather->get('(/)', '\App\Controller\search:display'); - $feather->get('/show/:show(/)', '\App\Controller\search:quicksearches'); -}); - -// Help -$feather->get('/help(/)', '\App\Controller\help:display'); - -// Misc -$feather->get('/rules(/)', '\App\Controller\misc:rules'); -$feather->get('/mark-read(/)', '\App\Controller\misc:markread'); -$feather->get('/mark-forum-read/:id(/)', '\App\Controller\misc:markforumread')->conditions(array('id' => '[0-9]+')); -$feather->map('/email/:id(/)', '\App\Controller\misc:email')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); -$feather->map('/report/:id(/)', '\App\Controller\misc:report')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); -$feather->get('/subscribe/forum/:id(/)', '\App\Controller\misc:subscribeforum')->conditions(array('id' => '[0-9]+')); -$feather->get('/unsubscribe/forum/:id(/)', '\App\Controller\misc:unsubscribeforum')->conditions(array('id' => '[0-9]+')); -$feather->get('/subscribe/topic/:id(/)', '\App\Controller\misc:subscribetopic')->conditions(array('id' => '[0-9]+')); -$feather->get('/unsubscribe/topic/:id(/)', '\App\Controller\misc:unsubscribetopic')->conditions(array('id' => '[0-9]+')); - -// Profile routes -$feather->group('/user', function() use ($feather) { - $feather->map('/:id(/section/:section)(/)', '\App\Controller\profile:display')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/:id(/action/:action)(/)', '\App\Controller\profile:action')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); -}); - -/** - * Middleware to check if user is allowed to moderate, if he's not redirect to homepage. - */ -$isAdmmod = function() use ($feather) { - if(!$feather->user->is_admmod) { - redirect($feather->url->base(), __('No permission')); - } -}; - -// Moderate routes -$feather->group('/moderate', $isAdmmod, function() use ($feather) { - $feather->get('/forum/:id(/:name)(/page/:page)(/)', '\App\Controller\moderate:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); - $feather->get('/get-host/post/:pid(/)', '\App\Controller\moderate:gethostpost')->conditions(array('pid' => '[0-9]+')); - $feather->get('/get-host/ip/:ip(/)', '\App\Controller\moderate:gethostip'); - $feather->map('/topic/:id/forum/:fid/action/:action(/param/:param)(/)', '\App\Controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/topic/:id/forum/:fid/action/:action(/page/:param)(/)', '\App\Controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); - $feather->post('/forum/:fid(/page/:page)(/)', '\App\Controller\moderate:dealposts')->conditions(array('fid' => '[0-9]+', 'page' => '[0-9]+')); -}); - -// Admin routes -$feather->group('/admin', $isAdmmod, function() use ($feather) { - - /** - * Middleware to check if user is admin. - */ - $isAdmin = function() use ($feather) { - if($feather->user->g_id != FEATHER_ADMIN) { - redirect($feather->url->base(), __('No permission')); - } - }; - - // Admin index - $feather->get('(/action/:action)(/)', '\App\Controller\Admin\index:display'); - $feather->get('/index(/)', '\App\Controller\Admin\index:display'); - - // Admin bans - $feather->group('/bans', function() use ($feather) { - $feather->get('(/)', '\App\Controller\Admin\Bans:display'); - $feather->get('/delete/:id(/)', '\App\Controller\Admin\Bans:delete')->conditions(array('id' => '[0-9]+')); - $feather->map('/edit/:id(/)', '\App\Controller\Admin\Bans:edit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/add(/:id)(/)', '\App\Controller\Admin\Bans:add')->via('GET', 'POST'); - }); - - // Admin options - $feather->map('/options(/)', $isAdmin, '\App\Controller\Admin\options:display')->via('GET', 'POST'); - - // Admin categories - $feather->group('/categories', $isAdmin, function() use ($feather) { - $feather->get('(/)', '\App\Controller\Admin\categories:display'); - $feather->post('/add(/)', '\App\Controller\Admin\categories:add_category'); - $feather->post('/edit(/)', '\App\Controller\Admin\categories:edit_categories'); - $feather->post('/delete(/)', '\App\Controller\Admin\categories:delete_category'); - }); - - // Admin censoring - $feather->map('/censoring(/)', $isAdmin, '\App\Controller\Admin\censoring:display')->via('GET', 'POST'); - - // Admin reports - $feather->map('/reports(/)', '\App\Controller\Admin\reports:display')->via('GET', 'POST'); - - // Admin permissions - $feather->map('/permissions(/)', $isAdmin, '\App\Controller\Admin\permissions:display')->via('GET', 'POST'); - - // Admin statistics - $feather->get('/statistics(/)', '\App\Controller\Admin\statistics:display'); - $feather->get('/phpinfo(/)', '\App\Controller\Admin\statistics:phpinfo'); - - // Admin forums - $feather->group('/forums', $isAdmin, function() use ($feather) { - $feather->map('(/)', '\App\Controller\Admin\forums:display')->via('GET', 'POST'); - $feather->post('/add(/)', '\App\Controller\Admin\forums:add_forum'); - $feather->map('/edit/:id(/)', '\App\Controller\Admin\forums:edit_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/delete/:id(/)', '\App\Controller\Admin\forums:delete_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - }); - - // Admin groups - $feather->group('/groups', $isAdmin, function() use ($feather) { - $feather->map('(/)', '\App\Controller\Admin\groups:display')->via('GET', 'POST'); - $feather->map('/add(/)', '\App\Controller\Admin\groups:addedit')->via('GET', 'POST'); - $feather->map('/edit/:id(/)', '\App\Controller\Admin\groups:addedit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - $feather->map('/delete/:id(/)', '\App\Controller\Admin\groups:delete')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); - }); - - // Admin plugins - $feather->group('/plugins', function() use ($feather) { - $feather->map('/(/)', '\App\Controller\Admin\plugins:index')->via('GET', 'POST'); - $feather->map('/activate(/)', '\App\Controller\Admin\plugins:activate')->via('GET'); - $feather->map('/deactivate(/)', '\App\Controller\Admin\plugins:deactivate')->via('GET'); - // $feather->map('/loader(/)', '\App\Controller\Admin\plugins:display')->via('GET', 'POST'); - }); - - // Admin maintenance - $feather->map('/maintenance(/)', $isAdmin, '\App\Controller\Admin\maintenance:display')->via('GET', 'POST'); - - // Admin parser - $feather->map('/parser(/)', $isAdmin, '\App\Controller\Admin\parser:display')->via('GET', 'POST'); - - // Admin users - $feather->group('/users', function() use ($feather) { - $feather->map('(/)', '\App\Controller\Admin\users:display')->via('GET', 'POST'); - $feather->get('/ip-stats/id/:id(/)', '\App\Controller\Admin\users:ipstats')->conditions(array('id' => '[0-9]+')); - $feather->get('/show-users/ip/:ip(/)', '\App\Controller\Admin\users:showusers'); - }); - -}); - -// 404 not found -$feather->notFound(function () use ($feather){ - throw new \FeatherBB\Error('Page not found', 404); -}); - -$feather->error(function (\Exception $e) use ($feather) { - $feather->response->setStatus($e->getCode()); - $feather->view2->setPageInfo(array( - 'title' => array($feather->utils->escape($feather->config['o_board_title']), __('Error')), - 'msg_title' => __('Error'), - 'msg' => $e->getMessage(), - 'no_back_link' => false, - ))->addTemplate('error.php')->display(); - $feather->stop(); -}); diff --git a/cache/85f15bc57d6c4e8a3a00b5f5c72a639f5f734f32.cache b/cache/85f15bc57d6c4e8a3a00b5f5c72a639f5f734f32.cache new file mode 100644 index 00000000..2f1d9ca6 --- /dev/null +++ b/cache/85f15bc57d6c4e8a3a00b5f5c72a639f5f734f32.cache @@ -0,0 +1 @@ +{"config":{"time":1440702596,"expire":0,"data":"a:77:{s:13:\"o_cur_version\";s:5:\"1.0.0\";s:19:\"o_database_revision\";s:2:\"21\";s:22:\"o_searchindex_revision\";s:1:\"2\";s:17:\"o_parser_revision\";s:1:\"2\";s:13:\"o_board_title\";s:18:\"My FeatherBB Forum\";s:12:\"o_board_desc\";s:43:\"

    Lighter than a feather.<\/span><\/p>\";s:18:\"o_default_timezone\";s:1:\"0\";s:13:\"o_time_format\";s:5:\"H:i:s\";s:13:\"o_date_format\";s:5:\"Y-m-d\";s:15:\"o_timeout_visit\";s:4:\"1800\";s:16:\"o_timeout_online\";s:3:\"300\";s:16:\"o_redirect_delay\";s:1:\"1\";s:14:\"o_show_version\";s:1:\"0\";s:16:\"o_show_user_info\";s:1:\"1\";s:17:\"o_show_post_count\";s:1:\"1\";s:12:\"o_signatures\";s:1:\"1\";s:9:\"o_smilies\";s:1:\"1\";s:13:\"o_smilies_sig\";s:1:\"1\";s:12:\"o_make_links\";s:1:\"1\";s:14:\"o_default_lang\";s:7:\"English\";s:15:\"o_default_style\";s:9:\"FeatherBB\";s:20:\"o_default_user_group\";s:1:\"4\";s:14:\"o_topic_review\";s:2:\"15\";s:21:\"o_disp_topics_default\";s:2:\"30\";s:20:\"o_disp_posts_default\";s:2:\"25\";s:19:\"o_indent_num_spaces\";s:1:\"4\";s:13:\"o_quote_depth\";s:1:\"3\";s:11:\"o_quickpost\";s:1:\"1\";s:14:\"o_users_online\";s:1:\"1\";s:11:\"o_censoring\";s:1:\"0\";s:10:\"o_show_dot\";s:1:\"0\";s:13:\"o_topic_views\";s:1:\"1\";s:11:\"o_quickjump\";s:1:\"1\";s:6:\"o_gzip\";s:1:\"0\";s:21:\"o_additional_navlinks\";s:0:\"\";s:15:\"o_report_method\";s:1:\"0\";s:13:\"o_regs_report\";s:1:\"0\";s:23:\"o_default_email_setting\";s:1:\"1\";s:14:\"o_mailing_list\";s:13:\"test@test.com\";s:9:\"o_avatars\";s:1:\"1\";s:13:\"o_avatars_dir\";s:11:\"img\/avatars\";s:15:\"o_avatars_width\";s:2:\"60\";s:16:\"o_avatars_height\";s:2:\"60\";s:14:\"o_avatars_size\";s:5:\"10240\";s:19:\"o_search_all_forums\";s:1:\"1\";s:10:\"o_base_url\";s:29:\"http:\/\/192.168.0.14\/featherbb\";s:13:\"o_admin_email\";s:13:\"test@test.com\";s:17:\"o_webmaster_email\";s:13:\"test@test.com\";s:21:\"o_forum_subscriptions\";s:1:\"1\";s:21:\"o_topic_subscriptions\";s:1:\"1\";s:11:\"o_smtp_host\";N;s:11:\"o_smtp_user\";N;s:11:\"o_smtp_pass\";N;s:10:\"o_smtp_ssl\";s:1:\"0\";s:12:\"o_regs_allow\";s:1:\"1\";s:13:\"o_regs_verify\";s:1:\"0\";s:14:\"o_announcement\";s:1:\"0\";s:22:\"o_announcement_message\";s:29:\"Enter your announcement here.\";s:7:\"o_rules\";s:1:\"0\";s:15:\"o_rules_message\";s:21:\"Enter your rules here\";s:13:\"o_maintenance\";s:1:\"0\";s:21:\"o_maintenance_message\";s:83:\"The forums are temporarily down for maintenance. Please try again in a few minutes.\";s:13:\"o_default_dst\";s:1:\"0\";s:11:\"o_feed_type\";s:1:\"2\";s:10:\"o_feed_ttl\";s:1:\"0\";s:16:\"p_message_bbcode\";s:1:\"1\";s:17:\"p_message_img_tag\";s:1:\"1\";s:18:\"p_message_all_caps\";s:1:\"1\";s:18:\"p_subject_all_caps\";s:1:\"1\";s:14:\"p_sig_all_caps\";s:1:\"1\";s:12:\"p_sig_bbcode\";s:1:\"1\";s:13:\"p_sig_img_tag\";s:1:\"0\";s:12:\"p_sig_length\";s:3:\"400\";s:11:\"p_sig_lines\";s:1:\"4\";s:20:\"p_allow_banned_email\";s:1:\"1\";s:18:\"p_allow_dupe_email\";s:1:\"0\";s:19:\"p_force_guest_email\";s:1:\"1\";}"},"bans":{"time":1440691168,"expire":0,"data":"a:1:{i:0;a:7:{s:2:\"id\";s:1:\"1\";s:8:\"username\";s:8:\"pr\u00e9fixe\";s:2:\"ip\";N;s:5:\"email\";N;s:7:\"message\";N;s:6:\"expire\";N;s:11:\"ban_creator\";s:1:\"2\";}}"},"users_info":{"time":1440602184,"expire":0,"data":"a:2:{s:11:\"total_users\";i:3;s:9:\"last_user\";a:2:{s:2:\"id\";s:1:\"4\";s:8:\"username\";s:8:\"pr\u00e9fixe\";}}"},"quickjump":{"time":1440702252,"expire":0,"data":"a:4:{i:1;a:2:{i:1;a:3:{s:8:\"cat_name\";s:13:\"Test category\";s:12:\"cat_position\";N;s:10:\"cat_forums\";a:2:{i:0;a:3:{s:8:\"forum_id\";s:1:\"3\";s:10:\"forum_name\";s:9:\"New forum\";s:8:\"position\";N;}i:1;a:3:{s:8:\"forum_id\";s:1:\"1\";s:10:\"forum_name\";s:10:\"Test forum\";s:8:\"position\";N;}}}i:2;a:3:{s:8:\"cat_name\";s:4:\"cat2\";s:12:\"cat_position\";N;s:10:\"cat_forums\";a:1:{i:0;a:3:{s:8:\"forum_id\";s:1:\"2\";s:10:\"forum_name\";s:9:\"New forum\";s:8:\"position\";N;}}}}i:2;a:2:{i:1;a:3:{s:8:\"cat_name\";s:13:\"Test category\";s:12:\"cat_position\";N;s:10:\"cat_forums\";a:2:{i:0;a:3:{s:8:\"forum_id\";s:1:\"3\";s:10:\"forum_name\";s:9:\"New forum\";s:8:\"position\";N;}i:1;a:3:{s:8:\"forum_id\";s:1:\"1\";s:10:\"forum_name\";s:10:\"Test forum\";s:8:\"position\";N;}}}i:2;a:3:{s:8:\"cat_name\";s:4:\"cat2\";s:12:\"cat_position\";N;s:10:\"cat_forums\";a:1:{i:0;a:3:{s:8:\"forum_id\";s:1:\"2\";s:10:\"forum_name\";s:9:\"New forum\";s:8:\"position\";N;}}}}i:3;a:2:{i:1;a:3:{s:8:\"cat_name\";s:13:\"Test category\";s:12:\"cat_position\";N;s:10:\"cat_forums\";a:2:{i:0;a:3:{s:8:\"forum_id\";s:1:\"3\";s:10:\"forum_name\";s:9:\"New forum\";s:8:\"position\";N;}i:1;a:3:{s:8:\"forum_id\";s:1:\"1\";s:10:\"forum_name\";s:10:\"Test forum\";s:8:\"position\";N;}}}i:2;a:3:{s:8:\"cat_name\";s:4:\"cat2\";s:12:\"cat_position\";N;s:10:\"cat_forums\";a:1:{i:0;a:3:{s:8:\"forum_id\";s:1:\"2\";s:10:\"forum_name\";s:9:\"New forum\";s:8:\"position\";N;}}}}i:4;a:2:{i:1;a:3:{s:8:\"cat_name\";s:13:\"Test category\";s:12:\"cat_position\";N;s:10:\"cat_forums\";a:2:{i:0;a:3:{s:8:\"forum_id\";s:1:\"3\";s:10:\"forum_name\";s:9:\"New forum\";s:8:\"position\";N;}i:1;a:3:{s:8:\"forum_id\";s:1:\"1\";s:10:\"forum_name\";s:10:\"Test forum\";s:8:\"position\";N;}}}i:2;a:3:{s:8:\"cat_name\";s:4:\"cat2\";s:12:\"cat_position\";N;s:10:\"cat_forums\";a:1:{i:0;a:3:{s:8:\"forum_id\";s:1:\"2\";s:10:\"forum_name\";s:9:\"New forum\";s:8:\"position\";N;}}}}}"},"stopwords":{"time":1440867139,"expire":1,"data":"a:77:{s:13:\"o_cur_version\";s:5:\"1.0.0\";s:19:\"o_database_revision\";s:2:\"21\";s:22:\"o_searchindex_revision\";s:1:\"2\";s:17:\"o_parser_revision\";s:1:\"2\";s:13:\"o_board_title\";s:18:\"My FeatherBB Forum\";s:12:\"o_board_desc\";s:43:\"

    Lighter than a feather.<\/span><\/p>\";s:18:\"o_default_timezone\";s:1:\"0\";s:13:\"o_time_format\";s:5:\"H:i:s\";s:13:\"o_date_format\";s:5:\"Y-m-d\";s:15:\"o_timeout_visit\";s:4:\"1800\";s:16:\"o_timeout_online\";s:3:\"300\";s:16:\"o_redirect_delay\";s:1:\"1\";s:14:\"o_show_version\";s:1:\"0\";s:16:\"o_show_user_info\";s:1:\"1\";s:17:\"o_show_post_count\";s:1:\"1\";s:12:\"o_signatures\";s:1:\"1\";s:9:\"o_smilies\";s:1:\"1\";s:13:\"o_smilies_sig\";s:1:\"1\";s:12:\"o_make_links\";s:1:\"1\";s:14:\"o_default_lang\";s:7:\"English\";s:15:\"o_default_style\";s:9:\"FeatherBB\";s:20:\"o_default_user_group\";s:1:\"4\";s:14:\"o_topic_review\";s:2:\"15\";s:21:\"o_disp_topics_default\";s:2:\"30\";s:20:\"o_disp_posts_default\";s:2:\"25\";s:19:\"o_indent_num_spaces\";s:1:\"4\";s:13:\"o_quote_depth\";s:1:\"3\";s:11:\"o_quickpost\";s:1:\"1\";s:14:\"o_users_online\";s:1:\"1\";s:11:\"o_censoring\";s:1:\"0\";s:10:\"o_show_dot\";s:1:\"0\";s:13:\"o_topic_views\";s:1:\"1\";s:11:\"o_quickjump\";s:1:\"1\";s:6:\"o_gzip\";s:1:\"0\";s:21:\"o_additional_navlinks\";s:0:\"\";s:15:\"o_report_method\";s:1:\"0\";s:13:\"o_regs_report\";s:1:\"0\";s:23:\"o_default_email_setting\";s:1:\"1\";s:14:\"o_mailing_list\";s:13:\"test@test.com\";s:9:\"o_avatars\";s:1:\"1\";s:13:\"o_avatars_dir\";s:11:\"img\/avatars\";s:15:\"o_avatars_width\";s:2:\"60\";s:16:\"o_avatars_height\";s:2:\"60\";s:14:\"o_avatars_size\";s:5:\"10240\";s:19:\"o_search_all_forums\";s:1:\"1\";s:10:\"o_base_url\";s:29:\"http:\/\/192.168.0.14\/featherbb\";s:13:\"o_admin_email\";s:13:\"test@test.com\";s:17:\"o_webmaster_email\";s:13:\"test@test.com\";s:21:\"o_forum_subscriptions\";s:1:\"1\";s:21:\"o_topic_subscriptions\";s:1:\"1\";s:11:\"o_smtp_host\";N;s:11:\"o_smtp_user\";N;s:11:\"o_smtp_pass\";N;s:10:\"o_smtp_ssl\";s:1:\"0\";s:12:\"o_regs_allow\";s:1:\"1\";s:13:\"o_regs_verify\";s:1:\"0\";s:14:\"o_announcement\";s:1:\"0\";s:22:\"o_announcement_message\";s:29:\"Enter your announcement here.\";s:7:\"o_rules\";s:1:\"0\";s:15:\"o_rules_message\";s:21:\"Enter your rules here\";s:13:\"o_maintenance\";s:1:\"0\";s:21:\"o_maintenance_message\";s:83:\"The forums are temporarily down for maintenance. Please try again in a few minutes.\";s:13:\"o_default_dst\";s:1:\"0\";s:11:\"o_feed_type\";s:1:\"2\";s:10:\"o_feed_ttl\";s:1:\"0\";s:16:\"p_message_bbcode\";s:1:\"1\";s:17:\"p_message_img_tag\";s:1:\"1\";s:18:\"p_message_all_caps\";s:1:\"1\";s:18:\"p_subject_all_caps\";s:1:\"1\";s:14:\"p_sig_all_caps\";s:1:\"1\";s:12:\"p_sig_bbcode\";s:1:\"1\";s:13:\"p_sig_img_tag\";s:1:\"0\";s:12:\"p_sig_length\";s:3:\"400\";s:11:\"p_sig_lines\";s:1:\"4\";s:20:\"p_allow_banned_email\";s:1:\"1\";s:18:\"p_allow_dupe_email\";s:1:\"0\";s:19:\"p_force_guest_email\";s:1:\"1\";}"},"admin_ids":{"time":1440622239,"expire":0,"data":"a:1:{i:0;a:1:{s:2:\"id\";s:1:\"2\";}}"},"active_plugins":{"time":1440768048,"expire":0,"data":"a:2:{s:4:\"Test\";b:1;s:5:\"Test2\";b:1;}"}} \ No newline at end of file diff --git a/cache/cache_parser_data.php b/cache/cache_parser_data.php new file mode 100644 index 00000000..a3ea0f5b --- /dev/null +++ b/cache/cache_parser_data.php @@ -0,0 +1,1433 @@ + true, + 'in_signature' => false, + 'ipass' => 0, + 'tag_stack' => + array ( + 0 => '_ROOT_', + ), + 'config' => + array ( + 'textile' => true, + 'quote_links' => true, + 'quote_imgs' => false, + 'valid_imgs' => true, + 'click_imgs' => true, + 'max_size' => 100000, + 'max_width' => 800, + 'max_height' => 600, + 'def_width' => 240, + 'def_height' => 180, + 'smiley_size' => 100, + ), + 're_smilies' => '/ # re_smilies Rev:20110220_1200 +# Match special smiley character sequences within BBCode content. +(?<=^|[>\\s]) # Only if preceeded by ">" or whitespace. +(?:\\:\\)|\\=\\)|\\:\\||\\=\\||\\:\\(|\\=\\(|\\:D|\\=D|\\:o|\\:O|;\\)|\\:\\/|\\:P|\\:p|\\:lol\\:|\\:mad\\:|\\:rolleyes\\:|\\:cool\\:) +(?=$|[\\[<\\s]) # Only if followed by "<", "[" or whitespace. + /Sx', + 're_color' => '% # re_color Rev:20110220_1200 +# Match a valid CSS color value. #123, #123456, or "red", "blue", etc. +^ # Anchor to start of string. +( # $1: Foreground color (required). + \\#(?:[0-9A-Fa-f]{3}){1,2} # Either a "#" and a 3 or 6 digit hex number, +| (?: maroon|red|orange|yellow| # or a recognized CSS color word. + olive|purple|fuchsia|white| + lime|green|navy|blue|aqua| + teal|black|silver|gray + ) # End group of recognized color words. +) # End $1. Foreground color. +# Match optional CSS background color value. ;#123, ;#123456, or ;"red", "blue", etc. +(?: # Begin group for optional background color + ;?+ # foreground;background delimiter: e.g. "#123;#456". + ((?1)) # $2: Background color. (Same regex as the first.) +)?+ # Background color spec is optional. +$ # Anchor to end of string. + %ix', + 're_textile' => '/ # re_textile Rev:20110220_1200 +# Match textile inline phrase: _em_ *strong* @tt@ ^super^ ~sub~ -del- +ins+ +([+\\-@*_\\^~]) # $1: literal exposed start of phrase char, but +(?<= # only if preceded by... + ^ [+\\-@*_] # start of string (for _em_ *strong* -del- +ins+ @code) +| \\s [+\\-@*_] # or whitespace (for _em_ *strong* -del- +ins+ @code) +| [A-Za-z0-9)}\\]>][\\^~] # or alphanum or bracket (for ^superscript^ ~subscript~). +) # only if preceded by whitespace or start of string. +( # $2: Textile phrase contents. + [A-Za-z0-9({\\[<] # First char following delim must be alphanum or bracket. + [^+\\-@*_\\^~\\n]*+ # "normal*" == Zero or more non-delim, non-newline. + (?> # Begin unrolling-the-loop. "(special normal*)*" + (?! # One of two conditions must be true for inside delim: + (?:(?<=[A-Za-z0-9)}\\]>][.,;:!?])(?=\\1(?:\\s|$))) + | (?:(?<=[A-Za-z0-9)}\\]>])(?=\\1(?:[\\s.,;:!?]|$))) + )[+\\-@*_\\^~] # If so then not yet at phrase end. Match delim and + [^+\\-@*_\\^~\\n]*+ # more "normal*" non-delim, non-linefeeds. + )*+ # Continue unrolling. "(special normal*)*" +) # End $2: Textile phrase contents. +(?> + (?:(?<=[A-Za-z0-9)}\\]>][.,;:!?])(?=\\1(?:\\s|$))) +| (?:(?<=[A-Za-z0-9)}\\]>])(?=\\1(?:[\\s.,;:!?]|$))) +) +\\1 # Match delim end of phrase, but only if + /Smx', + 're_bbcode' => '% # re_bbcode Rev:20110220_1200 +# First, match opening tag of syntax: "[TAGNAME (= ("\')ATTRIBUTE("\') )]"; +\\[ # Match opening bracket of outermost opening TAGNAME tag. +(?>(b|code|color|colour|del|email|em|h|img|ins|i|table|tr|th|td|list|\\*|quote|sub|sup|s|tt|url|u|center|right|left|justify|youtube|large|small|err|dbug)\\s*+) # $1: +(?> # Atomically group remainder of opening tag. + (?: # Optional attribute. + (=)\\s*+ # $2: = Optional attribute\'s equals sign delimiter, ws. + (?: # Group for 1-line attribute value alternatives. + \'([^\'\\r\\n\\\\]*+(?:\\\\.[^\'\\r\\n\\\\]*+)*+)\' # Either $3: == single quoted, + | "([^"\\r\\n\\\\]*+(?:\\\\.[^"\\r\\n\\\\]*+)*+)" # or $4: == double quoted, + | ( [^[\\]\\r\\n]*+ # or $5: == un-or-any-quoted. "normal*" == non-"[]" + (?: # Begin "(special normal*)*" "Unrolling-the-loop" construct. + \\[[^[\\]\\r\\n]*+\\] # Allow matching [square brackets] 1 level deep. "special". + [^[\\]\\r\\n]*+ # More "normal*" any non-"[]", non-newline characters. + )*+ # End "(special normal*)*" "Unrolling-the-loop" construct. + ) # End $5: Un-or-any-quoted attribute value. + ) # End group of attribute values alternatives. + \\s*+ # Optional whitespace following quoted values. + )? # End optional attribute group. + \\] # Match closing bracket of outermost opening TAGNAME tag. +) # End atomic group with opening tag remainder. +# Second, match the contents of the tag. +( # $6: Non-trimmed contents of TAGNAME tag. + (?> # Atomic group for contents alternatives. + [^\\[]++ # Option 1: Match non-tag chars (starting with non-"["). + (?: # Begin "(special normal*)*" "Unrolling-the-loop" construct. + (?!\\[/?+\\1[\\]=\\s])\\[ # "special" = "[" if not start of [TAGNAME*] or [/TAGNAME]. + [^\\[]*+ # More "normal*". + )*+ # Zero or more "special normal*"s allowed for option 1. + | (?: # or Option 2: Match non-tag chars (starting with "["). + (?!\\[/?+\\1[\\]=\\s])\\[ # "special" = "[" if not start of [TAGNAME*] or [/TAGNAME]. + [^\\[]*+ # More "normal*". + )++ # One or more "special normal*"s required for option 2. + | (?R) # Or option 3: recursively match nested [TAGNAME]..[/TAGNAME]. + )*+ # One of these three options as many times as necessary. +) # End $6: Non-trimmed contents of TAGNAME tag. +# Finally, match the closing tag. +\\[/\\1\\s*+\\] # Match outermost closing [/ TAGNAME ] + %ix', + 're_bbtag' => '%# re_bbtag Rev:20110220_1200 +# Match open or close BBtag. +\\[/?+ # Match opening bracket of outermost opening TAGNAME tag. +(?>(b|code|color|colour|del|email|em|h|img|ins|i|table|tr|th|td|list|\\*|quote|sub|sup|s|tt|url|u|center|right|left|justify|youtube|large|small|err|dbug)\\s*+) #$1: +(?: # Optional attribute. + (=)\\s*+ # $2: = Optional attribute\'s equals sign delimiter, ws. + (?: # Group for 1-line attribute value alternatives. + \'([^\'\\r\\n\\\\]*+(?:\\\\.[^\'\\r\\n\\\\]*+)*+)\' # Either $3: == single quoted, + | "([^"\\r\\n\\\\]*+(?:\\\\.[^"\\r\\n\\\\]*+)*+)" # or $4: == double quoted, + | ( [^[\\]\\r\\n]*+ # or $5: == un-or-any-quoted. "normal*" == non-"[]" + (?: # Begin "(special normal*)*" "Unrolling-the-loop" construct. + \\[[^[\\]\\r\\n]*+\\] # Allow matching [square brackets] 1 level deep. "special". + [^[\\]\\r\\n]*+ # More "normal*" any non-"[]", non-newline characters. + )*+ # End loop construct. See: "Mastering Regular Expressions". + ) # End $5: Un-or-any-quoted attribute value. + ) # End group of attribute values alternatives. + \\s*+ # Optional whitespace following quoted values. +)? # End optional attribute. +\\] # Match closing bracket of outermost opening TAGNAME tag. + %ix', + 're_fixlist_1' => '%# re_fixlist_1 Rev:20110220_1200 +# Match and repair invalid characters at start of LIST tag (before first [*]). +^ # Anchor to start of subject text. +( # $1: Substring with invalid chars to be enclosed. + \\s*+ # Optional whitespace before first invalid char. + (?!\\[(?:\\*|/list)\\]) # Assert invalid char(s). (i.e. valid if [*] or [/list]). + [^[]* # (Normal*) Zero or more non-[. + (?: # Begin (special normal*)* "Unroll-the-loop- construct. + (?!\\[(?:\\*|/list)\\]) # If this [ is not the start of [*] or [/list], then + \\[ # go ahead and match non-[*], non-[/list] left bracket. + [^[]* # More (normal*). + )* # End (special normal*)* "unroll-the-loop- construct. +) # End $1: non-whitespace before first [*] (or [/list]). +(? '%# re_fixlist_2 Rev:20110220_1200 +# Match and repair invalid characters between [/*] and next [*] (or [/list]]. +\\[/\\*\\] # Match [/*] close tag. +( # $1: Substring with invalid chars to be enclosed. + \\s*+ # Optional whitespace before first invalid char. + (?!\\[(?:\\*|/list)\\]) # Assert invalid char(s). (i.e. valid if [*] or [/list]). + [^[]* # (Normal*) Zero or more non-[. + (?: # Begin (special normal*)* "Unroll-the-loop- construct. + (?!\\[(?:\\*|/list)\\]) # If this [ is not the start of [*] or [/list], then + \\[ # go ahead and match non-[*], non-[/list] left bracket. + [^[]* # More (normal*). + )* # End (special normal*)* "unroll-the-loop- construct. +) # End $1: non-whitespace before first [*] (or [/list]). +(? + array ( + ':)' => + array ( + 'file' => 'smile.png', + 'html' => 'Smile', + ), + '=)' => + array ( + 'file' => 'smile.png', + 'html' => 'Smile', + ), + ':|' => + array ( + 'file' => 'neutral.png', + 'html' => 'Neutral', + ), + '=|' => + array ( + 'file' => 'neutral.png', + 'html' => 'Neutral', + ), + ':(' => + array ( + 'file' => 'sad.png', + 'html' => 'Sad', + ), + '=(' => + array ( + 'file' => 'sad.png', + 'html' => 'Sad', + ), + ':D' => + array ( + 'file' => 'big_smile.png', + 'html' => 'Big Smile', + ), + '=D' => + array ( + 'file' => 'big_smile.png', + 'html' => 'Big Smile', + ), + ':o' => + array ( + 'file' => 'yikes.png', + 'html' => 'Yikes', + ), + ':O' => + array ( + 'file' => 'yikes.png', + 'html' => 'Yikes', + ), + ';)' => + array ( + 'file' => 'wink.png', + 'html' => 'Wink', + ), + ':/' => + array ( + 'file' => 'hmm.png', + 'html' => 'Hmm', + ), + ':P' => + array ( + 'file' => 'tongue.png', + 'html' => 'Tongue', + ), + ':p' => + array ( + 'file' => 'tongue.png', + 'html' => 'Tongue', + ), + ':lol:' => + array ( + 'file' => 'lol.png', + 'html' => 'Lol', + ), + ':mad:' => + array ( + 'file' => 'mad.png', + 'html' => 'Mad', + ), + ':rolleyes:' => + array ( + 'file' => 'roll.png', + 'html' => 'Roll', + ), + ':cool:' => + array ( + 'file' => 'cool.png', + 'html' => 'Cool', + ), + ), + 'bbcd' => + array ( + 'b' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'code' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'text', + 'c_type' => 'text', + 'format' => '

    Code: "%a_str%"

    %c_str%

    ', + ), + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'block', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'tag_type' => 'hidden', + 'tags_excluded' => + array ( + ), + ), + 'color' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'color', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'colour' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'color', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'del' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'email' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'email', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'email', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'email' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'url' => true, + 'dbug' => true, + ), + ), + 'em' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'h' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'img' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'width_height', + 'c_type' => 'url', + 'format' => '%a_str%', + ), + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'url', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'atomic', + 'tags_excluded' => + array ( + 'b' => true, + 'code' => true, + 'color' => true, + 'colour' => true, + 'del' => true, + 'email' => true, + 'em' => true, + 'h' => true, + 'ins' => true, + 'i' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'sub' => true, + 'sup' => true, + 's' => true, + 'tt' => true, + 'url' => true, + 'u' => true, + 'center' => true, + 'right' => true, + 'left' => true, + 'justify' => true, + 'youtube' => true, + 'large' => true, + 'small' => true, + 'err' => true, + 'dbug' => true, + ), + ), + 'ins' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'i' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'table' => + array ( + 'depth' => 0, + 'depth_max' => 5, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'block', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'b' => true, + 'code' => true, + 'color' => true, + 'colour' => true, + 'del' => true, + 'email' => true, + 'em' => true, + 'h' => true, + 'img' => true, + 'ins' => true, + 'i' => true, + 'table' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'sub' => true, + 'sup' => true, + 's' => true, + 'tt' => true, + 'url' => true, + 'u' => true, + 'center' => true, + 'right' => true, + 'left' => true, + 'justify' => true, + 'youtube' => true, + 'large' => true, + 'small' => true, + 'dbug' => true, + ), + 'tags_only' => true, + ), + 'tr' => + array ( + 'depth' => 0, + 'depth_max' => 5, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'block', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'parents' => + array ( + 'table' => true, + ), + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'b' => true, + 'code' => true, + 'color' => true, + 'colour' => true, + 'del' => true, + 'email' => true, + 'em' => true, + 'h' => true, + 'img' => true, + 'ins' => true, + 'i' => true, + 'table' => true, + 'tr' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'sub' => true, + 'sup' => true, + 's' => true, + 'tt' => true, + 'url' => true, + 'u' => true, + 'center' => true, + 'right' => true, + 'left' => true, + 'justify' => true, + 'youtube' => true, + 'large' => true, + 'small' => true, + 'dbug' => true, + ), + 'tags_only' => true, + ), + 'th' => + array ( + 'depth' => 0, + 'depth_max' => 5, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'block', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'parents' => + array ( + 'tr' => true, + ), + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + ), + ), + 'td' => + array ( + 'depth' => 0, + 'depth_max' => 5, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'block', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'parents' => + array ( + 'tr' => true, + ), + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + ), + ), + 'list' => + array ( + 'depth' => 0, + 'depth_max' => 5, + 'handlers' => + array ( + 1 => + array ( + 'a_type' => 'text', + 'c_type' => 'text', + 'format' => '

      %c_str%

    ', + ), + 'a' => + array ( + 'a_type' => 'text', + 'c_type' => 'text', + 'format' => '

      %c_str%

    ', + ), + '*' => + array ( + 'a_type' => 'text', + 'c_type' => 'text', + 'format' => '

      %c_str%

    ', + ), + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

      %c_str%

    ', + ), + ), + 'html_type' => 'block', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'b' => true, + 'code' => true, + 'color' => true, + 'colour' => true, + 'del' => true, + 'email' => true, + 'em' => true, + 'h' => true, + 'img' => true, + 'ins' => true, + 'i' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'quote' => true, + 'sub' => true, + 'sup' => true, + 's' => true, + 'tt' => true, + 'url' => true, + 'u' => true, + 'center' => true, + 'right' => true, + 'left' => true, + 'justify' => true, + 'youtube' => true, + 'large' => true, + 'small' => true, + 'err' => true, + 'dbug' => true, + ), + 'tags_only' => true, + ), + '*' => + array ( + 'depth' => 0, + 'depth_max' => 5, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

  • %c_str%

  • ', + ), + ), + 'html_type' => 'block', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'parents' => + array ( + 'list' => true, + ), + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + ), + ), + 'quote' => + array ( + 'depth' => 0, + 'depth_max' => 5, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'text', + 'c_type' => 'text', + 'format' => '

    %a_str%

    %c_str%

    ', + ), + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'block', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'clip', + 'tag_type' => 'zombie', + 'tags_excluded' => + array ( + ), + ), + 'sub' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'sup' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 's' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'tt' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'hidden', + 'tags_excluded' => + array ( + ), + ), + 'url' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'url', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'url', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'email' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'url' => true, + 'dbug' => true, + ), + ), + 'u' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'center' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'right' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'left' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'justify' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'youtube' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'width_height', + 'c_regex' => '%(?:^|\\bv[=/])(\\w{10,12})\\b%S', + 'c_type' => 'text', + 'format' => '', + ), + 'NO_ATTRIB' => + array ( + 'a_type' => 'width_height', + 'c_regex' => '%(?:^|\\bv[=/])(\\w{10,12})\\b%S', + 'c_type' => 'width_height', + 'format' => '', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => false, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'b' => true, + 'code' => true, + 'color' => true, + 'colour' => true, + 'del' => true, + 'email' => true, + 'em' => true, + 'h' => true, + 'img' => true, + 'ins' => true, + 'i' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'sub' => true, + 'sup' => true, + 's' => true, + 'tt' => true, + 'url' => true, + 'u' => true, + 'center' => true, + 'right' => true, + 'left' => true, + 'justify' => true, + 'youtube' => true, + 'large' => true, + 'small' => true, + 'err' => true, + 'dbug' => true, + ), + 'x_padding' => 20, + 'y_padding' => 45, + ), + 'large' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'small' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + 'code' => true, + 'table' => true, + 'tr' => true, + 'th' => true, + 'td' => true, + 'list' => true, + '*' => true, + 'quote' => true, + 'dbug' => true, + ), + ), + 'err' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'text', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + 'NO_ATTRIB' => + array ( + 'a_type' => 'none', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'inline', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'fix', + 'tag_type' => 'hidden', + 'tags_excluded' => + array ( + ), + ), + 'dbug' => + array ( + 'depth' => 0, + 'depth_max' => 5, + 'handlers' => + array ( + 'ATTRIB' => + array ( + 'a_type' => 'text', + 'c_type' => 'text', + 'format' => '

    %c_str%

    ', + ), + ), + 'html_type' => 'block', + 'in_post' => true, + 'in_sig' => true, + 'nest_type' => 'err', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + ), + ), + '_ROOT_' => + array ( + 'depth' => 0, + 'depth_max' => 1, + 'handlers' => + array ( + 'NO_ATTRIB' => + array ( + 'a_type' => 'text', + 'c_type' => 'text', + 'format' => '%c_str%', + ), + ), + 'html_type' => 'block', + 'in_post' => false, + 'in_sig' => false, + 'nest_type' => 'err', + 'tag_type' => 'normal', + 'tags_excluded' => + array ( + ), + ), + ), +); +?> \ No newline at end of file diff --git a/composer.json b/composer.json index 74b29ce1..51c50373 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,10 @@ "role": "Contributor" }], "autoload": { - "classmap": ["app/Core/Database.php", "app/Core/pomo/MO.php"], + "classmap": ["featherbb/Core/Database.php", "featherbb/Core/pomo/MO.php"], "psr-4": { "Plugins\\": "/plugins", - "FeatherBB\\": "app/Core", + "FeatherBB\\": "featherbb/Core", "": "" } }, diff --git a/extern.php b/extern.php index 9e8ea810..22457700 100644 --- a/extern.php +++ b/extern.php @@ -62,21 +62,21 @@ \Slim\Slim::registerAutoloader(); // Load FeatherBB -require 'app/Helpers/classes/autoload.class.php'; +require 'featherbb/Helpers/classes/autoload.class.php'; \FeatherBB\Loader::registerAutoloader(); // Instantiate Slim and add CSRF $feather = new \Slim\Slim(); $feather->add(new \FeatherBB\Csrf()); -$feather_settings = array('config_file' => 'app/config.php', - 'cache_dir' => 'app/cache/', +$feather_settings = array('config_file' => 'featherbb/config.php', + 'cache_dir' => 'featherbb/cache/', 'debug' => 'all'); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) $feather->add(new \FeatherBB\Auth()); $feather->add(new \FeatherBB\Core($feather_settings)); -load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/common.mo'); -load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/index.mo'); +load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$feather->user->language.'/common.mo'); +load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$feather->user->language.'/index.mo'); // The length at which topic subjects will be truncated (for HTML output) if (!defined('FORUM_EXTERN_MAX_SUBJECT_LENGTH')) { @@ -439,7 +439,7 @@ function output_html($feed) // Show recent discussions if ($action == 'feed') { - require FEATHER_ROOT.'app/Helpers/parser.php'; + require FEATHER_ROOT.'featherbb/Helpers/parser.php'; // Determine what type of feed to output $type = isset($_GET['type']) ? strtolower($_GET['type']) : 'html'; @@ -650,7 +650,7 @@ function output_html($feed) // Output feed as PHP code if (isset($cache_id)) { if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) { - require FEATHER_ROOT.'app/Helpers/cache.php'; + require FEATHER_ROOT.'featherbb/Helpers/cache.php'; } $content = 'forum_settings['o_feed_ttl'] * 60)).';'."\n\n".'?>'; @@ -728,7 +728,7 @@ function output_html($feed) elseif ($action == 'stats') { if (!$feather->cache->isCached('users_info')) { - $feather->cache->store('users_info', \App\Model\Cache::get_users_info()); + $feather->cache->store('users_info', \FeatherBB\Model\Cache::get_users_info()); } $stats = $feather->cache->retrieve('users_info'); diff --git a/app/Controller/Admin/Bans.php b/featherbb/Controller/Admin/Bans.php similarity index 95% rename from app/Controller/Admin/Bans.php rename to featherbb/Controller/Admin/Bans.php index ed472f75..65ddb814 100644 --- a/app/Controller/Admin/Bans.php +++ b/featherbb/Controller/Admin/Bans.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Bans { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\Bans(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/bans.mo'); + $this->model = new \FeatherBB\Model\Admin\Bans(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/bans.mo'); if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) { throw new \FeatherBB\Error(__('No permission'), '403'); diff --git a/app/Controller/Admin/Categories.php b/featherbb/Controller/Admin/Categories.php similarity index 92% rename from app/Controller/Admin/Categories.php rename to featherbb/Controller/Admin/Categories.php index 610e5724..10869aae 100644 --- a/app/Controller/Admin/Categories.php +++ b/featherbb/Controller/Admin/Categories.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher. */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Categories { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\Categories(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/categories.mo'); + $this->model = new \FeatherBB\Model\Admin\Categories(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/categories.mo'); } public function __autoload($class_name) @@ -58,7 +58,7 @@ public function edit_categories() } // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); + $this->feather->cache->store('quickjump', \FeatherBB\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/categories/'), __('Categories updated redirect')); } diff --git a/app/Controller/Admin/Censoring.php b/featherbb/Controller/Admin/Censoring.php similarity index 90% rename from app/Controller/Admin/Censoring.php rename to featherbb/Controller/Admin/Censoring.php index 8e641352..45fc28c7 100644 --- a/app/Controller/Admin/Censoring.php +++ b/featherbb/Controller/Admin/Censoring.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Censoring { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\Censoring(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/censoring.mo'); + $this->model = new \FeatherBB\Model\Admin\Censoring(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/censoring.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Admin/Forums.php b/featherbb/Controller/Admin/Forums.php similarity index 91% rename from app/Controller/Admin/Forums.php rename to featherbb/Controller/Admin/Forums.php index 98a73bea..e9106cd0 100644 --- a/app/Controller/Admin/Forums.php +++ b/featherbb/Controller/Admin/Forums.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Forums { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\forums(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/forums.mo'); + $this->model = new \FeatherBB\Model\Admin\forums(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/forums.mo'); } public function __autoload($class_name) @@ -41,7 +41,7 @@ public function add_forum() if ($fid = $this->model->add_forum($cat_id, __('New forum'))) { // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); + $this->feather->cache->store('quickjump', \FeatherBB\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/edit/'.$fid.'/'), __('Forum added redirect')); } else { redirect($this->feather->url->get('admin/forums/'), __('Unable to add forum')); @@ -98,7 +98,7 @@ public function edit_forum($forum_id) } // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); + $this->feather->cache->store('quickjump', \FeatherBB\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Forum updated redirect')); @@ -106,7 +106,7 @@ public function edit_forum($forum_id) $this->model->delete_permissions($forum_id); // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); + $this->feather->cache->store('quickjump', \FeatherBB\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/edit/'.$forum_id.'/'), __('Perms reverted redirect')); } @@ -132,7 +132,7 @@ public function delete_forum($forum_id) if($this->request->isPost()) { $this->model->delete_forum($forum_id); // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); + $this->feather->cache->store('quickjump', \FeatherBB\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/'), __('Forum deleted redirect')); @@ -160,7 +160,7 @@ public function edit_positions() } // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); + $this->feather->cache->store('quickjump', \FeatherBB\Model\Cache::get_quickjump()); redirect($this->feather->url->get('admin/forums/'), __('Forums updated redirect')); } @@ -173,7 +173,7 @@ public function display() \FeatherBB\AdminUtils::generateAdminMenu('forums'); - $categories_model = new \App\Model\Admin\Categories(); + $categories_model = new \FeatherBB\Model\Admin\Categories(); $this->feather->view2->setPageInfo(array( 'title' => array($this->feather->utils->escape($this->config['o_board_title']), __('Admin'), __('Forums')), 'active_page' => 'admin', diff --git a/app/Controller/Admin/Groups.php b/featherbb/Controller/Admin/Groups.php similarity index 96% rename from app/Controller/Admin/Groups.php rename to featherbb/Controller/Admin/Groups.php index 0208c6d2..ee785212 100644 --- a/app/Controller/Admin/Groups.php +++ b/featherbb/Controller/Admin/Groups.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Groups { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\groups(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/groups.mo'); + $this->model = new \FeatherBB\Model\Admin\groups(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/groups.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Admin/Index.php b/featherbb/Controller/Admin/Index.php similarity index 96% rename from app/Controller/Admin/Index.php rename to featherbb/Controller/Admin/Index.php index 36b5ec88..e0420931 100644 --- a/app/Controller/Admin/Index.php +++ b/featherbb/Controller/Admin/Index.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Index { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/index.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/index.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Admin/Maintenance.php b/featherbb/Controller/Admin/Maintenance.php similarity index 93% rename from app/Controller/Admin/Maintenance.php rename to featherbb/Controller/Admin/Maintenance.php index 2fcb24dd..1d16356d 100644 --- a/app/Controller/Admin/Maintenance.php +++ b/featherbb/Controller/Admin/Maintenance.php @@ -7,15 +7,15 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Maintenance { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\Admin\maintenance(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/admin/maintenance.mo'); + $this->model = new \FeatherBB\Model\Admin\maintenance(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/admin/maintenance.mo'); } public function display() diff --git a/app/Controller/Admin/Options.php b/featherbb/Controller/Admin/Options.php similarity index 88% rename from app/Controller/Admin/Options.php rename to featherbb/Controller/Admin/Options.php index e7095fd2..c48ca619 100644 --- a/app/Controller/Admin/Options.php +++ b/featherbb/Controller/Admin/Options.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Options { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\options(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/options.mo'); + $this->model = new \FeatherBB\Model\Admin\options(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/options.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Admin/Parser.php b/featherbb/Controller/Admin/Parser.php similarity index 93% rename from app/Controller/Admin/Parser.php rename to featherbb/Controller/Admin/Parser.php index aafe88da..b550fe72 100644 --- a/app/Controller/Admin/Parser.php +++ b/featherbb/Controller/Admin/Parser.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Parser { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\parser(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/parser.mo'); + $this->model = new \FeatherBB\Model\Admin\parser(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/parser.mo'); } public function __autoload($class_name) @@ -32,19 +32,19 @@ public function display() global $lang_admin_parser; // Legacy - require FEATHER_ROOT . 'app/lang/' . $this->user->language . '/admin/parser.php'; + require FEATHER_ROOT . 'featherbb/lang/' . $this->user->language . '/admin/parser.php'; // This is where the parser data lives and breathes. - $cache_file = FEATHER_ROOT.'app/cache/cache_parser_data.php'; + $cache_file = FEATHER_ROOT.'featherbb/cache/cache_parser_data.php'; // If RESET button pushed, or no cache file, re-compile master bbcode source file. if ($this->request->post('reset') || !file_exists($cache_file)) { - require_once(FEATHER_ROOT.'app/Helpers/bbcd_source.php'); - require_once(FEATHER_ROOT.'app/Helpers/bbcd_compile.php'); + require_once(FEATHER_ROOT.'featherbb/Helpers/bbcd_source.php'); + require_once(FEATHER_ROOT.'featherbb/Helpers/bbcd_compile.php'); redirect($this->feather->url->get('admin/parser/'), $lang_admin_parser['reset_success']); } - // Load the current BBCode $pd array from app/Helpers/parser_data.inc.php. + // Load the current BBCode $pd array from featherbb/Helpers/parser_data.inc.php. require_once($cache_file); // Fetch $pd compiled global regex data. $bbcd = $pd['bbcd']; // Local scratch copy of $bbcd. $smilies = $pd['smilies']; // Local scratch copy of $smilies. @@ -198,7 +198,7 @@ public function display() } } - require_once('app/Helpers/bbcd_compile.php'); // Compile $bbcd and save into $pd['bbcd'] + require_once('featherbb/Helpers/bbcd_compile.php'); // Compile $bbcd and save into $pd['bbcd'] redirect($this->feather->url->get('admin/parser/'), $lang_admin_parser['save_success']); } diff --git a/app/Controller/Admin/Permissions.php b/featherbb/Controller/Admin/Permissions.php similarity index 87% rename from app/Controller/Admin/Permissions.php rename to featherbb/Controller/Admin/Permissions.php index 975aa386..1b4d236e 100644 --- a/app/Controller/Admin/Permissions.php +++ b/featherbb/Controller/Admin/Permissions.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Permissions { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\permissions(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/permissions.mo'); + $this->model = new \FeatherBB\Model\Admin\permissions(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/permissions.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Admin/Plugins.php b/featherbb/Controller/Admin/Plugins.php similarity index 99% rename from app/Controller/Admin/Plugins.php rename to featherbb/Controller/Admin/Plugins.php index 41446601..1765a9a0 100644 --- a/app/Controller/Admin/Plugins.php +++ b/featherbb/Controller/Admin/Plugins.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Plugins { diff --git a/app/Controller/Admin/Reports.php b/featherbb/Controller/Admin/Reports.php similarity index 89% rename from app/Controller/Admin/Reports.php rename to featherbb/Controller/Admin/Reports.php index 85b996cb..10e3e4df 100644 --- a/app/Controller/Admin/Reports.php +++ b/featherbb/Controller/Admin/Reports.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; use FeatherBB\AdminUtils; @@ -20,8 +20,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\reports(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/reports.mo'); + $this->model = new \FeatherBB\Model\Admin\reports(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/reports.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Admin/Statistics.php b/featherbb/Controller/Admin/Statistics.php similarity index 91% rename from app/Controller/Admin/Statistics.php rename to featherbb/Controller/Admin/Statistics.php index 4e00bf94..efff22c6 100644 --- a/app/Controller/Admin/Statistics.php +++ b/featherbb/Controller/Admin/Statistics.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Statistics { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\statistics(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/index.mo'); + $this->model = new \FeatherBB\Model\Admin\statistics(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/index.mo'); } public function display() diff --git a/app/Controller/Admin/Users.php b/featherbb/Controller/Admin/Users.php similarity index 98% rename from app/Controller/Admin/Users.php rename to featherbb/Controller/Admin/Users.php index 398ccb96..7350eb25 100644 --- a/app/Controller/Admin/Users.php +++ b/featherbb/Controller/Admin/Users.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller\Admin; +namespace FeatherBB\Controller\Admin; class Users { @@ -18,8 +18,8 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Admin\users(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->user->language.'/admin/users.mo'); + $this->model = new \FeatherBB\Model\Admin\users(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/users.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Auth.php b/featherbb/Controller/Auth.php similarity index 85% rename from app/Controller/Auth.php rename to featherbb/Controller/Auth.php index 72a0352c..4df72e8c 100644 --- a/app/Controller/Auth.php +++ b/featherbb/Controller/Auth.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; use DB; class Auth @@ -15,7 +15,7 @@ class Auth public function __construct() { $this->feather = \Slim\Slim::getInstance(); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/login.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->feather->user->language.'/login.mo'); } public function login() @@ -30,25 +30,25 @@ public function login() $form_password = $this->feather->utils->trim($this->feather->request->post('req_password')); $save_pass = (bool) $this->feather->request->post('save_pass'); - $user = \App\Model\Auth::get_user_from_name($form_username); + $user = \FeatherBB\Model\Auth::get_user_from_name($form_username); if (!empty($user->password)) { $form_password_hash = \FeatherBB\Utils::feather_hash($form_password); // Will result in a SHA-1 hash if ($user->password == $form_password_hash) { if ($user->group_id == FEATHER_UNVERIFIED) { - \App\Model\Auth::update_group($user->id, $this->feather->forum_settings['o_default_user_group']); + \FeatherBB\Model\Auth::update_group($user->id, $this->feather->forum_settings['o_default_user_group']); if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); + $this->feather->cache->store('users_info', \FeatherBB\Model\Cache::get_users_info()); } } - \App\Model\Auth::delete_online_by_ip($this->feather->request->getIp()); + \FeatherBB\Model\Auth::delete_online_by_ip($this->feather->request->getIp()); // Reset tracked topics set_tracked_topics(null); $expire = ($save_pass) ? $this->feather->now + 1209600 : $this->feather->now + $this->feather->forum_settings['o_timeout_visit']; $expire = $this->feather->hooks->fire('expire_login', $expire); - \App\Model\Auth::feather_setcookie($user->id, $form_password_hash, $expire); + \FeatherBB\Model\Auth::feather_setcookie($user->id, $form_password_hash, $expire); $this->feather->url->redirect($this->feather->url->base(), __('Login redirect')); } @@ -73,14 +73,14 @@ public function logout($token) $this->feather->url->redirect($this->feather->url->get('/'), 'Not logged in'); } - \App\Model\Auth::delete_online_by_id($this->feather->user->id); + \FeatherBB\Model\Auth::delete_online_by_id($this->feather->user->id); // Update last_visit (make sure there's something to update it with) if (isset($this->feather->user->logged)) { - \App\Model\Auth::set_last_visit($this->feather->user->id, $this->feather->user->logged); + \FeatherBB\Model\Auth::set_last_visit($this->feather->user->id, $this->feather->user->logged); } - \App\Model\Auth::feather_setcookie(1, \FeatherBB\Utils::feather_hash(uniqid(rand(), true)), time() + 31536000); + \FeatherBB\Model\Auth::feather_setcookie(1, \FeatherBB\Utils::feather_hash(uniqid(rand(), true)), time() + 31536000); $this->feather->hooks->fire('logout_end'); redirect($this->feather->url->base(), __('Logout redirect')); @@ -98,11 +98,11 @@ public function forget() if (!$this->feather->email->is_valid_email($email)) { throw new \FeatherBB\Error(__('Invalid email'), 400); } - $user = \App\Model\Auth::get_user_from_email($email); + $user = \FeatherBB\Model\Auth::get_user_from_email($email); if ($user) { // Load the "activate password" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/mail_templates/activate_password.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->feather->user->language.'/mail_templates/activate_password.tpl')); $mail_tpl = $this->feather->hooks->fire('mail_tpl_password_forgotten', $mail_tpl); // The first row contains the subject @@ -124,7 +124,7 @@ public function forget() $new_password = random_pass(12); $new_password_key = random_pass(8); - \App\Model\Auth::set_new_password($new_password, $new_password_key, $user->id); + \FeatherBB\Model\Auth::set_new_password($new_password, $new_password_key, $user->id); // Do the user specific replacements to the template $cur_mail_message = str_replace('', $user->username, $mail_message); diff --git a/app/Controller/Delete.php b/featherbb/Controller/Delete.php similarity index 88% rename from app/Controller/Delete.php rename to featherbb/Controller/Delete.php index 643dd871..c9e92bde 100644 --- a/app/Controller/Delete.php +++ b/featherbb/Controller/Delete.php @@ -7,16 +7,16 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Delete { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\Delete(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/delete.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); + $this->model = new \FeatherBB\Model\Delete(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/delete.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/post.mo'); } public function deletepost($id) @@ -57,7 +57,7 @@ public function deletepost($id) $this->model->handle_deletion($is_topic_post, $id, $cur_post['tid'], $cur_post['fid']); } - require $this->feather->forum_env['FEATHER_ROOT'].'app/Helpers/parser.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'featherbb/Helpers/parser.php'; $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); $this->feather->view2->setPageInfo(array( diff --git a/app/Controller/Edit.php b/featherbb/Controller/Edit.php similarity index 89% rename from app/Controller/Edit.php rename to featherbb/Controller/Edit.php index 59c38a50..2204191e 100644 --- a/app/Controller/Edit.php +++ b/featherbb/Controller/Edit.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Edit { @@ -18,11 +18,11 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\edit(); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/post.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/bbeditor.mo'); + $this->model = new \FeatherBB\Model\edit(); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/post.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/bbeditor.mo'); } public function __autoload($class_name) @@ -81,7 +81,7 @@ public function editpost($id) } if ($this->request->post('preview')) { - require_once FEATHER_ROOT.'app/Helpers/parser.php'; + require_once FEATHER_ROOT.'featherbb/Helpers/parser.php'; $preview_message = parse_message($post['message'], $post['hide_smilies']); } else { $preview_message = ''; diff --git a/app/Controller/Help.php b/featherbb/Controller/Help.php similarity index 88% rename from app/Controller/Help.php rename to featherbb/Controller/Help.php index 25b5ff4a..89e519b1 100644 --- a/app/Controller/Help.php +++ b/featherbb/Controller/Help.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Help { @@ -18,7 +18,7 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/help.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/help.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Index.php b/featherbb/Controller/Index.php similarity index 84% rename from app/Controller/Index.php rename to featherbb/Controller/Index.php index 219f6b72..df39c39e 100644 --- a/app/Controller/Index.php +++ b/featherbb/Controller/Index.php @@ -7,15 +7,15 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Index { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\Index(); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/index.mo'); + $this->model = new \FeatherBB\Model\Index(); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->feather->user->language.'/index.mo'); } public function display() diff --git a/app/Controller/Install.php b/featherbb/Controller/Install.php similarity index 98% rename from app/Controller/Install.php rename to featherbb/Controller/Install.php index 2b747a51..39275112 100644 --- a/app/Controller/Install.php +++ b/featherbb/Controller/Install.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Install { @@ -26,7 +26,7 @@ class Install public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\install(); + $this->model = new \FeatherBB\Model\install(); $this->available_langs = \FeatherBB\Lister::getLangs(); $this->feather->view2->setStyle('FeatherBB'); } @@ -38,7 +38,7 @@ public function run() $this->install_lang = $this->feather->request->post('install_lang'); } } - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->install_lang.'/install.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->install_lang.'/install.mo'); if ($this->feather->request->isPost() && empty($this->feather->request->post('choose_lang'))) { $missing_fields = array(); @@ -164,7 +164,7 @@ public function create_db(array $data) \FeatherBB\Core::init_db($data); // Load appropriate language - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$data['default_lang'].'/install.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$data['default_lang'].'/install.mo'); // Handle db prefix $data['db_prefix'] = (!empty($data['db_prefix'])) ? $data['db_prefix'] : ''; diff --git a/app/Controller/Login.php b/featherbb/Controller/Login.php similarity index 92% rename from app/Controller/Login.php rename to featherbb/Controller/Login.php index a409a330..e73cf0b4 100644 --- a/app/Controller/Login.php +++ b/featherbb/Controller/Login.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Login { @@ -20,8 +20,8 @@ public function __construct() $this->request = $this->feather->request; - $this->model = new \App\Model\Login(); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/login.mo'); + $this->model = new \FeatherBB\Model\Login(); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/login.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Misc.php b/featherbb/Controller/Misc.php similarity index 95% rename from app/Controller/Misc.php rename to featherbb/Controller/Misc.php index 1916080a..479d48e0 100644 --- a/app/Controller/Misc.php +++ b/featherbb/Controller/Misc.php @@ -7,16 +7,16 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Misc { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\Misc(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/register.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/misc.mo'); + $this->model = new \FeatherBB\Model\Misc(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/register.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/misc.mo'); } public function rules() diff --git a/app/Controller/Moderate.php b/featherbb/Controller/Moderate.php similarity index 96% rename from app/Controller/Moderate.php rename to featherbb/Controller/Moderate.php index 0993e8be..91d96636 100644 --- a/app/Controller/Moderate.php +++ b/featherbb/Controller/Moderate.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Moderate { @@ -18,11 +18,11 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Moderate(); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/topic.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/forum.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/misc.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/post.mo'); + $this->model = new \FeatherBB\Model\Moderate(); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/topic.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/forum.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/misc.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/post.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Post.php b/featherbb/Controller/Post.php similarity index 94% rename from app/Controller/Post.php rename to featherbb/Controller/Post.php index 88190020..75c70641 100644 --- a/app/Controller/Post.php +++ b/featherbb/Controller/Post.php @@ -7,19 +7,19 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Post { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\Post(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/prof_reg.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/register.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/antispam.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/bbeditor.mo'); + $this->model = new \FeatherBB\Model\Post(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/post.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/register.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/antispam.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/bbeditor.mo'); } public function newreply($fid = null, $tid = null, $qid = null) @@ -30,7 +30,7 @@ public function newreply($fid = null, $tid = null, $qid = null) public function newpost($fid = null, $tid = null, $qid = null) { // Antispam feature - require $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/antispam.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); // If $_POST['username'] is filled, we are facing a bot diff --git a/app/Controller/Profile.php b/featherbb/Controller/Profile.php similarity index 93% rename from app/Controller/Profile.php rename to featherbb/Controller/Profile.php index 11dca00d..52e22cbd 100644 --- a/app/Controller/Profile.php +++ b/featherbb/Controller/Profile.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Profile { @@ -18,10 +18,10 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Profile(); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/profile.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); + $this->model = new \FeatherBB\Model\Profile(); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/profile.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/prof_reg.mo'); } public function __autoload($class_name) @@ -34,9 +34,9 @@ public function display($id, $section = null) global $pd, $forum_time_formats, $forum_date_formats; // Include UTF-8 function - require FEATHER_ROOT.'app/Helpers/utf8/substr_replace.php'; - require FEATHER_ROOT.'app/Helpers/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace - require FEATHER_ROOT.'app/Helpers/utf8/strcasecmp.php'; + require FEATHER_ROOT.'featherbb/Helpers/utf8/substr_replace.php'; + require FEATHER_ROOT.'featherbb/Helpers/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace + require FEATHER_ROOT.'featherbb/Helpers/utf8/strcasecmp.php'; if ($this->request->post('update_group_membership')) { if ($this->user->g_id > FEATHER_ADMIN) { @@ -93,7 +93,7 @@ public function display($id, $section = null) $user = $this->model->get_user_info($id); if ($user['signature'] != '') { - require FEATHER_ROOT.'app/Helpers/parser.php'; + require FEATHER_ROOT.'featherbb/Helpers/parser.php'; $parsed_signature = parse_signature($user['signature']); } @@ -244,9 +244,9 @@ public function display($id, $section = null) public function action($id, $action) { // Include UTF-8 function - require FEATHER_ROOT.'app/Helpers/utf8/substr_replace.php'; - require FEATHER_ROOT.'app/Helpers/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace - require FEATHER_ROOT.'app/Helpers/utf8/strcasecmp.php'; + require FEATHER_ROOT.'featherbb/Helpers/utf8/substr_replace.php'; + require FEATHER_ROOT.'featherbb/Helpers/utf8/ucwords.php'; // utf8_ucwords needs utf8_substr_replace + require FEATHER_ROOT.'featherbb/Helpers/utf8/strcasecmp.php'; if ($action != 'change_pass' || !$this->request->get('key')) { if ($this->user->g_read_board == '0') { diff --git a/app/Controller/Register.php b/featherbb/Controller/Register.php similarity index 89% rename from app/Controller/Register.php rename to featherbb/Controller/Register.php index a1fc750c..810955e8 100644 --- a/app/Controller/Register.php +++ b/featherbb/Controller/Register.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Register { @@ -18,10 +18,10 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\Register(); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/prof_reg.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/antispam.mo'); + $this->model = new \FeatherBB\Model\Register(); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/antispam.mo'); } public function __autoload($class_name) @@ -37,7 +37,7 @@ public function display() } // Antispam feature - require FEATHER_ROOT.'app/lang/'.$this->user->language.'/antispam.php'; + require FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); // Display an error message if new registrations are disabled diff --git a/app/Controller/Search.php b/featherbb/Controller/Search.php similarity index 86% rename from app/Controller/Search.php rename to featherbb/Controller/Search.php index 64bf41fd..159c4741 100644 --- a/app/Controller/Search.php +++ b/featherbb/Controller/Search.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Search { @@ -18,10 +18,10 @@ public function __construct() $this->config = $this->feather->config; $this->user = $this->feather->user; $this->request = $this->feather->request; - $this->model = new \App\Model\search(); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/userlist.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/search.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->user->language.'/forum.mo'); + $this->model = new \FeatherBB\Model\search(); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/userlist.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/search.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/forum.mo'); } public function __autoload($class_name) @@ -47,7 +47,7 @@ public function display() if (isset($search['is_result'])) { if ($search['show_as'] == 'posts') { - require FEATHER_ROOT.'app/Helpers/parser.php'; + require FEATHER_ROOT.'featherbb/Helpers/parser.php'; } $this->feather->view2->setPageInfo(array( diff --git a/app/Controller/Userlist.php b/featherbb/Controller/Userlist.php similarity index 93% rename from app/Controller/Userlist.php rename to featherbb/Controller/Userlist.php index 3954c01c..417a47c4 100644 --- a/app/Controller/Userlist.php +++ b/featherbb/Controller/Userlist.php @@ -7,16 +7,16 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Userlist { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\Userlist(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/userlist.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/search.mo'); + $this->model = new \FeatherBB\Model\Userlist(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/userlist.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/search.mo'); } public function display() diff --git a/app/Controller/Viewforum.php b/featherbb/Controller/Viewforum.php similarity index 95% rename from app/Controller/Viewforum.php rename to featherbb/Controller/Viewforum.php index 523b4a83..e054924e 100644 --- a/app/Controller/Viewforum.php +++ b/featherbb/Controller/Viewforum.php @@ -7,15 +7,15 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Viewforum { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\Viewforum(); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$this->feather->user->language.'/forum.mo'); + $this->model = new \FeatherBB\Model\Viewforum(); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$this->feather->user->language.'/forum.mo'); } public function __autoload($class_name) diff --git a/app/Controller/Viewtopic.php b/featherbb/Controller/Viewtopic.php similarity index 92% rename from app/Controller/Viewtopic.php rename to featherbb/Controller/Viewtopic.php index dca95c9b..36263045 100644 --- a/app/Controller/Viewtopic.php +++ b/featherbb/Controller/Viewtopic.php @@ -7,17 +7,17 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Controller; +namespace FeatherBB\Controller; class Viewtopic { public function __construct() { $this->feather = \Slim\Slim::getInstance(); - $this->model = new \App\Model\Viewtopic(); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/topic.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/post.mo'); - load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/bbeditor.mo'); + $this->model = new \FeatherBB\Model\Viewtopic(); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/topic.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/post.mo'); + load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/bbeditor.mo'); } public function display($id = null, $name = null, $page = null, $pid = null) @@ -29,7 +29,7 @@ public function display($id = null, $name = null, $page = null, $pid = null) } // Antispam feature - require $this->feather->forum_env['FEATHER_ROOT'].'app/lang/'.$this->feather->user->language.'/antispam.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/antispam.php'; $index_questions = rand(0, count($lang_antispam_questions)-1); // Fetch some informations about the topic @@ -71,7 +71,7 @@ public function display($id = null, $name = null, $page = null, $pid = null) $quickpost = $this->model->is_quickpost($cur_topic['post_replies'], $cur_topic['closed'], $is_admmod); $subscraction = $this->model->get_subscraction($cur_topic['is_subscribed'], $id); - require $this->feather->forum_env['FEATHER_ROOT'].'app/Helpers/parser.php'; + require $this->feather->forum_env['FEATHER_ROOT'].'featherbb/Helpers/parser.php'; $lang_bbeditor = array( 'btnBold' => __('btnBold'), 'btnItalic' => __('btnItalic'), diff --git a/app/Core/AdminUtils.php b/featherbb/Core/AdminUtils.php similarity index 94% rename from app/Core/AdminUtils.php rename to featherbb/Core/AdminUtils.php index a27eaa58..06117f74 100644 --- a/app/Core/AdminUtils.php +++ b/featherbb/Core/AdminUtils.php @@ -53,7 +53,7 @@ public static function breadcrumbs_admin(array $links) public static function get_admin_ids() { if (!$this->feather->cache->isCached('admin_ids')) { - $this->feather->cache->store('admin_ids', \App\Model\Cache::get_admin_ids()); + $this->feather->cache->store('admin_ids', \FeatherBB\Model\Cache::get_admin_ids()); } return $this->feather->cache->retrieve('admin_ids'); diff --git a/app/Core/Auth.php b/featherbb/Core/Auth.php similarity index 97% rename from app/Core/Auth.php rename to featherbb/Core/Auth.php index 13b1a53a..a9723a8a 100644 --- a/app/Core/Auth.php +++ b/featherbb/Core/Auth.php @@ -21,7 +21,7 @@ class Auth extends \Slim\Middleware public function __construct() { - $this->model = new \App\Model\Auth(); + $this->model = new \FeatherBB\Model\Auth(); } public function get_cookie_data($cookie_name, $cookie_seed) @@ -184,7 +184,7 @@ public function check_bans() // If we removed any expired bans during our run-through, we need to regenerate the bans cache if ($bans_altered) { - $this->app->cache->store('bans', \App\Model\Cache::get_bans()); + $this->app->cache->store('bans', \FeatherBB\Model\Cache::get_bans()); } } @@ -221,7 +221,7 @@ public function call() if (!$this->app->user->disp_posts) { $this->app->user->disp_posts = $this->app->forum_settings['o_disp_posts_default']; } - if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'app/lang/'.$this->app->user->language)) { + if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->app->user->language)) { $this->app->user->language = $this->app->forum_settings['o_default_lang']; } if (!file_exists($this->app->forum_env['FEATHER_ROOT'].'style/themes/'.$this->app->user->style.'/style.css')) { @@ -268,11 +268,11 @@ public function call() $this->model->feather_setcookie(1, \FeatherBB\Utils::feather_hash(uniqid(rand(), true)), $this->app->now + 31536000); } - load_textdomain('featherbb', $this->app->forum_env['FEATHER_ROOT'].'app/lang/'.$this->app->user->language.'/common.mo'); + load_textdomain('featherbb', $this->app->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->app->user->language.'/common.mo'); // Load bans from cache if (!$this->app->cache->isCached('bans')) { - $this->app->cache->store('bans', \App\Model\Cache::get_bans()); + $this->app->cache->store('bans', \FeatherBB\Model\Cache::get_bans()); } $feather_bans = $this->app->cache->retrieve('bans'); diff --git a/app/Core/Cache.php b/featherbb/Core/Cache.php similarity index 99% rename from app/Core/Cache.php rename to featherbb/Core/Cache.php index 3843e430..0bcb0588 100644 --- a/app/Core/Cache.php +++ b/featherbb/Core/Cache.php @@ -54,7 +54,7 @@ public function __construct($config = array()) protected static function getDefaultSettings() { return array('name' => 'default', - 'path' => 'app/cache/', + 'path' => 'featherbb/cache/', 'extension' => '.cache'); } diff --git a/app/Core/Core.php b/featherbb/Core/Core.php similarity index 93% rename from app/Core/Core.php rename to featherbb/Core/Core.php index 7044ba22..4cdef204 100644 --- a/app/Core/Core.php +++ b/featherbb/Core/Core.php @@ -27,8 +27,8 @@ class Core extends \Slim\Middleware public function __construct(array $data) { // Handle empty values in data - $data = array_merge(array('config_file' => 'app/config.php', - 'cache_dir' => 'app/cache/', + $data = array_merge(array('config_file' => 'featherbb/config.php', + 'cache_dir' => 'featherbb/cache/', 'debug' => false), $data); // Define some core variables $this->forum_env['FEATHER_ROOT'] = realpath(dirname(__FILE__).'/../../').'/'; @@ -41,9 +41,9 @@ public function __construct(array $data) $this->env_to_globals($this->forum_env); // Legacy // Load files - require $this->forum_env['FEATHER_ROOT'].'app/Helpers/utf8/utf8.php'; - require $this->forum_env['FEATHER_ROOT'].'app/Helpers/functions.php'; - require $this->forum_env['FEATHER_ROOT'].'app/Helpers/l10n.php'; + require $this->forum_env['FEATHER_ROOT'].'featherbb/Helpers/utf8/utf8.php'; + require $this->forum_env['FEATHER_ROOT'].'featherbb/Helpers/functions.php'; + require $this->forum_env['FEATHER_ROOT'].'featherbb/Helpers/l10n.php'; // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); @@ -54,8 +54,8 @@ public static function load_default_forum_env() return array( 'FEATHER' => true, // Legacy 'FEATHER_ROOT' => '', - 'FORUM_CONFIG_FILE' => 'app/config.php', - 'FORUM_CACHE_DIR' => 'app/cache/', + 'FORUM_CONFIG_FILE' => 'featherbb/config.php', + 'FORUM_CACHE_DIR' => 'featherbb/cache/', 'FORUM_VERSION' => '1.0.0', 'FORUM_NAME' => 'FeatherBB', 'FORUM_DB_REVISION' => 21, @@ -214,7 +214,7 @@ public function call() $this->app->hooks->fire('core.start'); if (!is_file($this->forum_env['FORUM_CONFIG_FILE'])) { - $installer = new \App\Controller\Install; + $installer = new \FeatherBB\Controller\Install; $installer->run(); return; } @@ -235,7 +235,7 @@ public function call() 'cookies.secret_key' => $this->forum_settings['cookie_seed'])); if (!$this->app->cache->isCached('config')) { - $this->app->cache->store('config', \App\Model\Cache::get_config()); + $this->app->cache->store('config', \FeatherBB\Model\Cache::get_config()); } // Finalize forum_settings array diff --git a/app/Core/Csrf.php b/featherbb/Core/Csrf.php similarity index 100% rename from app/Core/Csrf.php rename to featherbb/Core/Csrf.php diff --git a/app/Core/Database.php b/featherbb/Core/Database.php similarity index 100% rename from app/Core/Database.php rename to featherbb/Core/Database.php diff --git a/app/Core/Email.php b/featherbb/Core/Email.php similarity index 99% rename from app/Core/Email.php rename to featherbb/Core/Email.php index 59a64c85..7b51f38e 100644 --- a/app/Core/Email.php +++ b/featherbb/Core/Email.php @@ -15,7 +15,7 @@ public function __construct() { $this->feather = \Slim\Slim::getInstance(); $this->config = $this->feather->config; - require FEATHER_ROOT . 'app/Helpers/utf8/utils/ascii.php'; + require FEATHER_ROOT . 'featherbb/Helpers/utf8/utils/ascii.php'; } // diff --git a/app/Core/Error.php b/featherbb/Core/Error.php similarity index 100% rename from app/Core/Error.php rename to featherbb/Core/Error.php diff --git a/app/Core/Hooks.php b/featherbb/Core/Hooks.php similarity index 100% rename from app/Core/Hooks.php rename to featherbb/Core/Hooks.php diff --git a/app/Core/Lister.php b/featherbb/Core/Lister.php similarity index 98% rename from app/Core/Lister.php rename to featherbb/Core/Lister.php index 8d572d9d..2e879a7b 100644 --- a/app/Core/Lister.php +++ b/featherbb/Core/Lister.php @@ -88,7 +88,7 @@ public static function getLangs($folder = '') $feather = \Slim\Slim::getInstance(); $langs = array(); - $iterator = new \DirectoryIterator($feather->forum_env['FEATHER_ROOT'].'app/lang/'); + $iterator = new \DirectoryIterator($feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'); foreach ($iterator as $child) { if(!$child->isDot() && $child->isDir() && file_exists($child->getPathname().DIRECTORY_SEPARATOR.'common.po')) { // If the lang pack is well formed, add it to the list diff --git a/app/Core/Plugin.php b/featherbb/Core/Plugin.php similarity index 100% rename from app/Core/Plugin.php rename to featherbb/Core/Plugin.php diff --git a/app/Core/Search.php b/featherbb/Core/Search.php similarity index 99% rename from app/Core/Search.php rename to featherbb/Core/Search.php index 9405b421..64c114e3 100644 --- a/app/Core/Search.php +++ b/featherbb/Core/Search.php @@ -93,7 +93,7 @@ public function validate_search_word($word, $idx) if (!isset($stopwords)) { if (!$this->feather->cache->isCached('stopwords')) { - $this->feather->cache->store('stopwords', \App\Model\Cache::get_config(), '+1 week'); + $this->feather->cache->store('stopwords', \FeatherBB\Model\Cache::get_config(), '+1 week'); } $stopwords = $this->feather->cache->retrieve('stopwords'); } diff --git a/app/Core/Url.php b/featherbb/Core/Url.php similarity index 100% rename from app/Core/Url.php rename to featherbb/Core/Url.php diff --git a/app/Core/Utils.php b/featherbb/Core/Utils.php similarity index 100% rename from app/Core/Utils.php rename to featherbb/Core/Utils.php diff --git a/app/Core/View.php b/featherbb/Core/View.php similarity index 97% rename from app/Core/View.php rename to featherbb/Core/View.php index dc44590c..0a0efc1e 100644 --- a/app/Core/View.php +++ b/featherbb/Core/View.php @@ -364,7 +364,7 @@ protected function getDefaultPageInfo() { // Check if config file exists to avoid error when installing forum if (!$this->app->cache->isCached('quickjump') && is_file($this->app->forum_env['FORUM_CONFIG_FILE'])) { - $this->app->cache->store('quickjump', \App\Model\Cache::get_quickjump()); + $this->app->cache->store('quickjump', \FeatherBB\Model\Cache::get_quickjump()); } $data = array( @@ -385,13 +385,13 @@ protected function getDefaultPageInfo() ); if (is_object($this->app->user) && $this->app->user->is_admmod) { - $data['has_reports'] = \App\Model\Header::get_reports(); + $data['has_reports'] = \FeatherBB\Model\Header::get_reports(); } if ($this->app->forum_env['FEATHER_SHOW_INFO']) { - $data['exec_info'] = \App\Model\Debug::get_info(); + $data['exec_info'] = \FeatherBB\Model\Debug::get_info(); if ($this->app->forum_env['FEATHER_SHOW_QUERIES']) { - $data['queries_info'] = \App\Model\Debug::get_queries(); + $data['queries_info'] = \FeatherBB\Model\Debug::get_queries(); } } diff --git a/app/Core/pomo/.editorconfig b/featherbb/Core/pomo/.editorconfig similarity index 100% rename from app/Core/pomo/.editorconfig rename to featherbb/Core/pomo/.editorconfig diff --git a/app/Core/pomo/MO.php b/featherbb/Core/pomo/MO.php similarity index 100% rename from app/Core/pomo/MO.php rename to featherbb/Core/pomo/MO.php diff --git a/app/Core/pomo/PO.php b/featherbb/Core/pomo/PO.php similarity index 100% rename from app/Core/pomo/PO.php rename to featherbb/Core/pomo/PO.php diff --git a/app/Core/pomo/Streams/CachedFileReader.php b/featherbb/Core/pomo/Streams/CachedFileReader.php similarity index 100% rename from app/Core/pomo/Streams/CachedFileReader.php rename to featherbb/Core/pomo/Streams/CachedFileReader.php diff --git a/app/Core/pomo/Streams/CachedIntFileReader.php b/featherbb/Core/pomo/Streams/CachedIntFileReader.php similarity index 100% rename from app/Core/pomo/Streams/CachedIntFileReader.php rename to featherbb/Core/pomo/Streams/CachedIntFileReader.php diff --git a/app/Core/pomo/Streams/FileReader.php b/featherbb/Core/pomo/Streams/FileReader.php similarity index 100% rename from app/Core/pomo/Streams/FileReader.php rename to featherbb/Core/pomo/Streams/FileReader.php diff --git a/app/Core/pomo/Streams/Reader.php b/featherbb/Core/pomo/Streams/Reader.php similarity index 100% rename from app/Core/pomo/Streams/Reader.php rename to featherbb/Core/pomo/Streams/Reader.php diff --git a/app/Core/pomo/Streams/StringReader.php b/featherbb/Core/pomo/Streams/StringReader.php similarity index 100% rename from app/Core/pomo/Streams/StringReader.php rename to featherbb/Core/pomo/Streams/StringReader.php diff --git a/app/Core/pomo/Translations/EntryTranslations.php b/featherbb/Core/pomo/Translations/EntryTranslations.php similarity index 100% rename from app/Core/pomo/Translations/EntryTranslations.php rename to featherbb/Core/pomo/Translations/EntryTranslations.php diff --git a/app/Core/pomo/Translations/GettextTranslations.php b/featherbb/Core/pomo/Translations/GettextTranslations.php similarity index 100% rename from app/Core/pomo/Translations/GettextTranslations.php rename to featherbb/Core/pomo/Translations/GettextTranslations.php diff --git a/app/Core/pomo/Translations/NOOPTranslations.php b/featherbb/Core/pomo/Translations/NOOPTranslations.php similarity index 100% rename from app/Core/pomo/Translations/NOOPTranslations.php rename to featherbb/Core/pomo/Translations/NOOPTranslations.php diff --git a/app/Core/pomo/Translations/Translations.php b/featherbb/Core/pomo/Translations/Translations.php similarity index 100% rename from app/Core/pomo/Translations/Translations.php rename to featherbb/Core/pomo/Translations/Translations.php diff --git a/app/Core/pomo/Translations/TranslationsInterface.php b/featherbb/Core/pomo/Translations/TranslationsInterface.php similarity index 100% rename from app/Core/pomo/Translations/TranslationsInterface.php rename to featherbb/Core/pomo/Translations/TranslationsInterface.php diff --git a/app/Helpers/bbcd_compile.php b/featherbb/Helpers/bbcd_compile.php similarity index 99% rename from app/Helpers/bbcd_compile.php rename to featherbb/Helpers/bbcd_compile.php index 4aadb11c..565fac62 100644 --- a/app/Helpers/bbcd_compile.php +++ b/featherbb/Helpers/bbcd_compile.php @@ -9,7 +9,7 @@ */ // This script compiles the $options, $smilies and $bbcd arrays (from bbcd_source.php script -// or from an admin page web form) into the app/cache/cache_parser_data.php. +// or from an admin page web form) into the featherbb/cache/cache_parser_data.php. // Initialize a new global parser data array $pd: $pd = array( @@ -419,7 +419,7 @@ function file2title($file) $s .= ";\n"; $s .= "?>"; -file_put_contents(FEATHER_ROOT.'app/cache/cache_parser_data.php', $s); +file_put_contents(FEATHER_ROOT.'featherbb/cache/cache_parser_data.php', $s); // Clean up our global variables. unset($all_tags); unset($all_block_tags); diff --git a/app/Helpers/bbcd_source.php b/featherbb/Helpers/bbcd_source.php similarity index 100% rename from app/Helpers/bbcd_source.php rename to featherbb/Helpers/bbcd_source.php diff --git a/app/Helpers/functions.php b/featherbb/Helpers/functions.php similarity index 95% rename from app/Helpers/functions.php rename to featherbb/Helpers/functions.php index 715dded2..45752f2b 100644 --- a/app/Helpers/functions.php +++ b/featherbb/Helpers/functions.php @@ -16,7 +16,7 @@ function get_admin_ids() // Get Slim current session $feather = \Slim\Slim::getInstance(); if (!$feather->cache->isCached('admin_ids')) { - $feather->cache->store('admin_ids', \App\Model\Cache::get_admin_ids()); + $feather->cache->store('admin_ids', \FeatherBB\Model\Cache::get_admin_ids()); } return $feather->cache->retrieve('admin_ids'); @@ -31,10 +31,10 @@ function check_username($username, $errors, $exclude_id = null) global $feather, $errors, $feather_bans; // Include UTF-8 function - require_once FEATHER_ROOT.'app/Helpers/utf8/strcasecmp.php'; + require_once FEATHER_ROOT.'featherbb/Helpers/utf8/strcasecmp.php'; - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/register.mo'); - load_textdomain('featherbb', FEATHER_ROOT.'app/lang/'.$feather->user->language.'/prof_reg.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$feather->user->language.'/register.mo'); + load_textdomain('featherbb', FEATHER_ROOT.'featherbb/lang/'.$feather->user->language.'/prof_reg.mo'); // Convert multiple whitespace characters into one (to prevent people from registering with indistinguishable usernames) $username = preg_replace('%\s+%s', ' ', $username); @@ -350,12 +350,12 @@ function censor_words($text) $feather = \Slim\Slim::getInstance(); if (!$feather->cache->isCached('search_for')) { - $feather->cache->store('search_for', \App\Model\Cache::get_censoring('search_for')); + $feather->cache->store('search_for', \FeatherBB\Model\Cache::get_censoring('search_for')); $search_for = $feather->cache->retrieve('search_for'); } if (!$feather->cache->isCached('replace_with')) { - $feather->cache->store('replace_with', \App\Model\Cache::get_censoring('replace_with')); + $feather->cache->store('replace_with', \FeatherBB\Model\Cache::get_censoring('replace_with')); $replace_with = $feather->cache->retrieve('replace_with'); } @@ -454,7 +454,7 @@ function message($msg, $http_status = null, $no_back_link = false) function random_key($len, $readable = false, $hash = false) { if (!function_exists('secure_random_bytes')) { - include FEATHER_ROOT.'app/Helpers/srand.php'; + include FEATHER_ROOT.'featherbb/Helpers/srand.php'; } $key = secure_random_bytes($len); @@ -518,7 +518,7 @@ function file_size($size) // function generate_stopwords_cache_id() { - $files = glob(FEATHER_ROOT.'app/lang/*/stopwords.txt'); + $files = glob(FEATHER_ROOT.'featherbb/lang/*/stopwords.txt'); if ($files === false) { return 'cache_id_error'; } diff --git a/app/Helpers/l10n.php b/featherbb/Helpers/l10n.php similarity index 100% rename from app/Helpers/l10n.php rename to featherbb/Helpers/l10n.php diff --git a/app/Helpers/parser.php b/featherbb/Helpers/parser.php similarity index 99% rename from app/Helpers/parser.php rename to featherbb/Helpers/parser.php index 3ae6ecfa..be8a9746 100644 --- a/app/Helpers/parser.php +++ b/featherbb/Helpers/parser.php @@ -16,11 +16,11 @@ define('FEATHER_PARSER', '11-Feb-2011 13:33'); // globals. we share one array: $pd -if (file_exists(FEATHER_ROOT.'app/cache/cache_parser_data.php')) { // If file already exists - require_once(FEATHER_ROOT.'app/cache/cache_parser_data.php'); +if (file_exists(FEATHER_ROOT.'featherbb/cache/cache_parser_data.php')) { // If file already exists + require_once(FEATHER_ROOT.'featherbb/cache/cache_parser_data.php'); } else { // It needs to be re-generated. - require_once(FEATHER_ROOT.'app/Helpers/bbcd_source.php'); - require_once(FEATHER_ROOT.'app/Helpers/bbcd_compile.php'); + require_once(FEATHER_ROOT.'featherbb/Helpers/bbcd_source.php'); + require_once(FEATHER_ROOT.'featherbb/Helpers/bbcd_compile.php'); } // !!!! AVOIDING PCRE STACK OVERFLOWS WHICH SEG-FAULT CRASH APACHE/PHP !!!! // By default, PHP sets up pcre.recursion_limit way too high (100000). According diff --git a/app/Helpers/srand.php b/featherbb/Helpers/srand.php similarity index 100% rename from app/Helpers/srand.php rename to featherbb/Helpers/srand.php diff --git a/app/Helpers/utf8/mbstring/core.php b/featherbb/Helpers/utf8/mbstring/core.php similarity index 100% rename from app/Helpers/utf8/mbstring/core.php rename to featherbb/Helpers/utf8/mbstring/core.php diff --git a/app/Helpers/utf8/native/core.php b/featherbb/Helpers/utf8/native/core.php similarity index 100% rename from app/Helpers/utf8/native/core.php rename to featherbb/Helpers/utf8/native/core.php diff --git a/app/Helpers/utf8/ord.php b/featherbb/Helpers/utf8/ord.php similarity index 100% rename from app/Helpers/utf8/ord.php rename to featherbb/Helpers/utf8/ord.php diff --git a/app/Helpers/utf8/str_ireplace.php b/featherbb/Helpers/utf8/str_ireplace.php similarity index 100% rename from app/Helpers/utf8/str_ireplace.php rename to featherbb/Helpers/utf8/str_ireplace.php diff --git a/app/Helpers/utf8/str_pad.php b/featherbb/Helpers/utf8/str_pad.php similarity index 100% rename from app/Helpers/utf8/str_pad.php rename to featherbb/Helpers/utf8/str_pad.php diff --git a/app/Helpers/utf8/str_split.php b/featherbb/Helpers/utf8/str_split.php similarity index 100% rename from app/Helpers/utf8/str_split.php rename to featherbb/Helpers/utf8/str_split.php diff --git a/app/Helpers/utf8/strcasecmp.php b/featherbb/Helpers/utf8/strcasecmp.php similarity index 100% rename from app/Helpers/utf8/strcasecmp.php rename to featherbb/Helpers/utf8/strcasecmp.php diff --git a/app/Helpers/utf8/strcspn.php b/featherbb/Helpers/utf8/strcspn.php similarity index 100% rename from app/Helpers/utf8/strcspn.php rename to featherbb/Helpers/utf8/strcspn.php diff --git a/app/Helpers/utf8/stristr.php b/featherbb/Helpers/utf8/stristr.php similarity index 100% rename from app/Helpers/utf8/stristr.php rename to featherbb/Helpers/utf8/stristr.php diff --git a/app/Helpers/utf8/strrev.php b/featherbb/Helpers/utf8/strrev.php similarity index 100% rename from app/Helpers/utf8/strrev.php rename to featherbb/Helpers/utf8/strrev.php diff --git a/app/Helpers/utf8/strspn.php b/featherbb/Helpers/utf8/strspn.php similarity index 100% rename from app/Helpers/utf8/strspn.php rename to featherbb/Helpers/utf8/strspn.php diff --git a/app/Helpers/utf8/substr_replace.php b/featherbb/Helpers/utf8/substr_replace.php similarity index 100% rename from app/Helpers/utf8/substr_replace.php rename to featherbb/Helpers/utf8/substr_replace.php diff --git a/app/Helpers/utf8/trim.php b/featherbb/Helpers/utf8/trim.php similarity index 100% rename from app/Helpers/utf8/trim.php rename to featherbb/Helpers/utf8/trim.php diff --git a/app/Helpers/utf8/ucfirst.php b/featherbb/Helpers/utf8/ucfirst.php similarity index 100% rename from app/Helpers/utf8/ucfirst.php rename to featherbb/Helpers/utf8/ucfirst.php diff --git a/app/Helpers/utf8/ucwords.php b/featherbb/Helpers/utf8/ucwords.php similarity index 100% rename from app/Helpers/utf8/ucwords.php rename to featherbb/Helpers/utf8/ucwords.php diff --git a/app/Helpers/utf8/utf8.php b/featherbb/Helpers/utf8/utf8.php similarity index 100% rename from app/Helpers/utf8/utf8.php rename to featherbb/Helpers/utf8/utf8.php diff --git a/app/Helpers/utf8/utils/ascii.php b/featherbb/Helpers/utf8/utils/ascii.php similarity index 100% rename from app/Helpers/utf8/utils/ascii.php rename to featherbb/Helpers/utf8/utils/ascii.php diff --git a/app/Helpers/utf8/utils/bad.php b/featherbb/Helpers/utf8/utils/bad.php similarity index 100% rename from app/Helpers/utf8/utils/bad.php rename to featherbb/Helpers/utf8/utils/bad.php diff --git a/app/Helpers/utf8/utils/patterns.php b/featherbb/Helpers/utf8/utils/patterns.php similarity index 100% rename from app/Helpers/utf8/utils/patterns.php rename to featherbb/Helpers/utf8/utils/patterns.php diff --git a/app/Helpers/utf8/utils/position.php b/featherbb/Helpers/utf8/utils/position.php similarity index 100% rename from app/Helpers/utf8/utils/position.php rename to featherbb/Helpers/utf8/utils/position.php diff --git a/app/Helpers/utf8/utils/specials.php b/featherbb/Helpers/utf8/utils/specials.php similarity index 100% rename from app/Helpers/utf8/utils/specials.php rename to featherbb/Helpers/utf8/utils/specials.php diff --git a/app/Helpers/utf8/utils/unicode.php b/featherbb/Helpers/utf8/utils/unicode.php similarity index 100% rename from app/Helpers/utf8/utils/unicode.php rename to featherbb/Helpers/utf8/utils/unicode.php diff --git a/app/Helpers/utf8/utils/validation.php b/featherbb/Helpers/utf8/utils/validation.php similarity index 100% rename from app/Helpers/utf8/utils/validation.php rename to featherbb/Helpers/utf8/utils/validation.php diff --git a/app/Model/Admin/Bans.php b/featherbb/Model/Admin/Bans.php similarity index 98% rename from app/Model/Admin/Bans.php rename to featherbb/Model/Admin/Bans.php index 569fffbe..f74d25ea 100644 --- a/app/Model/Admin/Bans.php +++ b/featherbb/Model/Admin/Bans.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; @@ -274,7 +274,7 @@ public function insert_ban() } // Regenerate the bans cache - $this->feather->cache->store('bans', \App\Model\Cache::get_bans()); + $this->feather->cache->store('bans', \FeatherBB\Model\Cache::get_bans()); redirect($this->feather->url->get('admin/bans/'), __('Ban edited redirect')); } @@ -289,7 +289,7 @@ public function remove_ban($ban_id) $result = $result->delete(); // Regenerate the bans cache - $this->feather->cache->store('bans', \App\Model\Cache::get_bans()); + $this->feather->cache->store('bans', \FeatherBB\Model\Cache::get_bans()); redirect($this->feather->url->get('admin/bans/'), __('Ban removed redirect')); } diff --git a/app/Model/Admin/Categories.php b/featherbb/Model/Admin/Categories.php similarity index 96% rename from app/Model/Admin/Categories.php rename to featherbb/Model/Admin/Categories.php index 0d53fabb..9d75b638 100644 --- a/app/Model/Admin/Categories.php +++ b/featherbb/Model/Admin/Categories.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher. */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; @@ -60,7 +60,7 @@ public function delete_category($cat_to_delete) foreach ($forums_in_cat as $forum) { // Prune all posts and topics - $this->maintenance = new \App\Model\Admin\maintenance(); + $this->maintenance = new \FeatherBB\Model\Admin\maintenance(); $this->maintenance->prune($forum->id, 1, -1); // Delete forum diff --git a/app/Model/Admin/Censoring.php b/featherbb/Model/Admin/Censoring.php similarity index 82% rename from app/Model/Admin/Censoring.php rename to featherbb/Model/Admin/Censoring.php index a6456c33..34aeced3 100644 --- a/app/Model/Admin/Censoring.php +++ b/featherbb/Model/Admin/Censoring.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; @@ -43,8 +43,8 @@ public function add_word() ->save(); // Regenerate the censoring cache - $this->feather->cache->store('search_for', \App\Model\Cache::get_censoring('search_for')); - $this->feather->cache->store('replace_with', \App\Model\Cache::get_censoring('replace_with')); + $this->feather->cache->store('search_for', \FeatherBB\Model\Cache::get_censoring('search_for')); + $this->feather->cache->store('replace_with', \FeatherBB\Model\Cache::get_censoring('replace_with')); redirect($this->feather->url->get('admin/censoring/'), __('Word added redirect')); } @@ -71,8 +71,8 @@ public function update_word() ->save(); // Regenerate the censoring cache - $this->feather->cache->store('search_for', \App\Model\Cache::get_censoring('search_for')); - $this->feather->cache->store('replace_with', \App\Model\Cache::get_censoring('replace_with')); + $this->feather->cache->store('search_for', \FeatherBB\Model\Cache::get_censoring('search_for')); + $this->feather->cache->store('replace_with', \FeatherBB\Model\Cache::get_censoring('replace_with')); redirect($this->feather->url->get('admin/censoring/'), __('Word updated redirect')); } @@ -87,8 +87,8 @@ public function remove_word() $result = $result->delete(); // Regenerate the censoring cache - $this->feather->cache->store('search_for', \App\Model\Cache::get_censoring('search_for')); - $this->feather->cache->store('replace_with', \App\Model\Cache::get_censoring('replace_with')); + $this->feather->cache->store('search_for', \FeatherBB\Model\Cache::get_censoring('search_for')); + $this->feather->cache->store('replace_with', \FeatherBB\Model\Cache::get_censoring('replace_with')); redirect($this->feather->url->get('admin/censoring/'), __('Word removed redirect')); } diff --git a/app/Model/Admin/Forums.php b/featherbb/Model/Admin/Forums.php similarity index 98% rename from app/Model/Admin/Forums.php rename to featherbb/Model/Admin/Forums.php index c443cc1f..006d1cb8 100644 --- a/app/Model/Admin/Forums.php +++ b/featherbb/Model/Admin/Forums.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; @@ -61,7 +61,7 @@ public function delete_forum($forum_id) $forum_id = $this->hook->fire('delete_forum_start', $forum_id); // Prune all posts and topics - $this->maintenance = new \App\Model\Admin\maintenance(); + $this->maintenance = new \FeatherBB\Model\Admin\maintenance(); $this->maintenance->prune($forum_id, 1, -1); // Delete the forum diff --git a/app/Model/Admin/Groups.php b/featherbb/Model/Admin/Groups.php similarity index 98% rename from app/Model/Admin/Groups.php rename to featherbb/Model/Admin/Groups.php index c921a2c9..d47f310e 100644 --- a/app/Model/Admin/Groups.php +++ b/featherbb/Model/Admin/Groups.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; @@ -255,7 +255,7 @@ public function add_edit_group($groups) $group_id = $this->hook->fire('add_edit_group.group_id', $group_id); // Regenerate the quick jump cache - $this->feather->cache->store('quickjump', \App\Model\Cache::get_quickjump()); + $this->feather->cache->store('quickjump', \FeatherBB\Model\Cache::get_quickjump()); if ($this->request->post('mode') == 'edit') { redirect($this->feather->url->get('admin/groups/'), __('Group edited redirect')); @@ -283,7 +283,7 @@ public function set_default_group($groups) ->update_many('conf_value', $group_id); // Regenerate the config cache - $this->feather->cache->store('config', \App\Model\Cache::get_config()); + $this->feather->cache->store('config', \FeatherBB\Model\Cache::get_config()); redirect($this->feather->url->get('admin/groups/'), __('Default group redirect')); } diff --git a/app/Model/Admin/Maintenance.php b/featherbb/Model/Admin/Maintenance.php similarity index 99% rename from app/Model/Admin/Maintenance.php rename to featherbb/Model/Admin/Maintenance.php index 79db3e4c..c4c51306 100644 --- a/app/Model/Admin/Maintenance.php +++ b/featherbb/Model/Admin/Maintenance.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; diff --git a/app/Model/Admin/Options.php b/featherbb/Model/Admin/Options.php similarity index 99% rename from app/Model/Admin/Options.php rename to featherbb/Model/Admin/Options.php index d255870b..6ef7f8ad 100644 --- a/app/Model/Admin/Options.php +++ b/featherbb/Model/Admin/Options.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; @@ -227,7 +227,7 @@ public function update_options() } // Regenerate the config cache - $this->feather->cache->store('config', \App\Model\Cache::get_config()); + $this->feather->cache->store('config', \FeatherBB\Model\Cache::get_config()); $this->clear_feed_cache(); redirect($this->feather->url->get('admin/options/'), __('Options updated redirect')); diff --git a/app/Model/Admin/Parser.php b/featherbb/Model/Admin/Parser.php similarity index 97% rename from app/Model/Admin/Parser.php rename to featherbb/Model/Admin/Parser.php index 5c6f1bb4..97e8d5a3 100644 --- a/app/Model/Admin/Parser.php +++ b/featherbb/Model/Admin/Parser.php @@ -8,7 +8,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; diff --git a/app/Model/Admin/Permissions.php b/featherbb/Model/Admin/Permissions.php similarity index 92% rename from app/Model/Admin/Permissions.php rename to featherbb/Model/Admin/Permissions.php index 7da201e7..4a635d4b 100644 --- a/app/Model/Admin/Permissions.php +++ b/featherbb/Model/Admin/Permissions.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; @@ -42,7 +42,7 @@ public function update_permissions() } // Regenerate the config cache - $this->feather->cache->store('config', \App\Model\Cache::get_config()); + $this->feather->cache->store('config', \FeatherBB\Model\Cache::get_config()); // $this->clear_feed_cache(); redirect($this->feather->url->get('admin/permissions/'), __('Perms updated redirect')); diff --git a/app/Model/Admin/Reports.php b/featherbb/Model/Admin/Reports.php similarity index 99% rename from app/Model/Admin/Reports.php rename to featherbb/Model/Admin/Reports.php index 45462560..34ef7a76 100644 --- a/app/Model/Admin/Reports.php +++ b/featherbb/Model/Admin/Reports.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; diff --git a/app/Model/Admin/Statistics.php b/featherbb/Model/Admin/Statistics.php similarity index 99% rename from app/Model/Admin/Statistics.php rename to featherbb/Model/Admin/Statistics.php index f2da2089..f869f1a8 100644 --- a/app/Model/Admin/Statistics.php +++ b/featherbb/Model/Admin/Statistics.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; diff --git a/app/Model/Admin/Users.php b/featherbb/Model/Admin/Users.php similarity index 99% rename from app/Model/Admin/Users.php rename to featherbb/Model/Admin/Users.php index cd3255a0..cce23d65 100644 --- a/app/Model/Admin/Users.php +++ b/featherbb/Model/Admin/Users.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model\Admin; +namespace FeatherBB\Model\Admin; use DB; @@ -401,7 +401,7 @@ public function delete_users() // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); + $this->feather->cache->store('users_info', \FeatherBB\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); @@ -523,7 +523,7 @@ public function ban_users() } // Regenerate the bans cache - $this->feather->cache->store('bans', \App\Model\Cache::get_bans()); + $this->feather->cache->store('bans', \FeatherBB\Model\Cache::get_bans()); redirect($this->feather->url->get('admin/users/'), __('Users banned redirect')); } diff --git a/app/Model/Auth.php b/featherbb/Model/Auth.php similarity index 99% rename from app/Model/Auth.php rename to featherbb/Model/Auth.php index a8e53a55..d2667858 100644 --- a/app/Model/Auth.php +++ b/featherbb/Model/Auth.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/Model/Cache.php b/featherbb/Model/Cache.php similarity index 99% rename from app/Model/Cache.php rename to featherbb/Model/Cache.php index 7ec8d732..0675030b 100644 --- a/app/Model/Cache.php +++ b/featherbb/Model/Cache.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/Model/Debug.php b/featherbb/Model/Debug.php similarity index 97% rename from app/Model/Debug.php rename to featherbb/Model/Debug.php index 5edc87e6..d7a041be 100644 --- a/app/Model/Debug.php +++ b/featherbb/Model/Debug.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/Model/Delete.php b/featherbb/Model/Delete.php similarity index 99% rename from app/Model/Delete.php rename to featherbb/Model/Delete.php index 2653a27a..eb1673db 100644 --- a/app/Model/Delete.php +++ b/featherbb/Model/Delete.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/Model/Edit.php b/featherbb/Model/Edit.php similarity index 98% rename from app/Model/Edit.php rename to featherbb/Model/Edit.php index a5c1b7c0..6513121c 100644 --- a/app/Model/Edit.php +++ b/featherbb/Model/Edit.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; @@ -93,7 +93,7 @@ public function check_errors_before_edit($can_edit_subject, $errors) // Validate BBCode syntax if ($this->config['p_message_bbcode'] == '1') { - require FEATHER_ROOT.'app/Helpers/parser.php'; + require FEATHER_ROOT.'featherbb/Helpers/parser.php'; $message = preparse_bbcode($message, $errors); } @@ -135,7 +135,7 @@ public function setup_variables($cur_post, $is_admmod, $can_edit_subject, $error // Validate BBCode syntax if ($this->config['p_message_bbcode'] == '1') { - require_once FEATHER_ROOT.'app/Helpers/parser.php'; + require_once FEATHER_ROOT.'featherbb/Helpers/parser.php'; $post['message'] = preparse_bbcode($post['message'], $errors); } diff --git a/app/Model/Header.php b/featherbb/Model/Header.php similarity index 95% rename from app/Model/Header.php rename to featherbb/Model/Header.php index adb8b959..835c46fb 100644 --- a/app/Model/Header.php +++ b/featherbb/Model/Header.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/Model/Index.php b/featherbb/Model/Index.php similarity index 99% rename from app/Model/Index.php rename to featherbb/Model/Index.php index 921d8737..0ed34f9f 100644 --- a/app/Model/Index.php +++ b/featherbb/Model/Index.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; @@ -239,7 +239,7 @@ public function collect_stats() // Collect some statistics from the database if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); + $this->feather->cache->store('users_info', \FeatherBB\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); diff --git a/app/Model/Install.php b/featherbb/Model/Install.php similarity index 99% rename from app/Model/Install.php rename to featherbb/Model/Install.php index 8be79340..c976050f 100644 --- a/app/Model/Install.php +++ b/featherbb/Model/Install.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/Model/Login.php b/featherbb/Model/Login.php similarity index 97% rename from app/Model/Login.php rename to featherbb/Model/Login.php index 473153c9..1964332f 100644 --- a/app/Model/Login.php +++ b/featherbb/Model/Login.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; $this->email = $this->feather->email; - $this->auth = new \App\Model\Auth(); + $this->auth = new \FeatherBB\Model\Auth(); } public function login() @@ -62,7 +62,7 @@ public function login() // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); + $this->feather->cache->store('users_info', \FeatherBB\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); @@ -147,7 +147,7 @@ public function password_forgotten() if ($result) { // Load the "activate password" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/activate_password.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/activate_password.tpl')); $mail_tpl = $this->hook->fire('mail_tpl_password_forgotten', $mail_tpl); // The first row contains the subject diff --git a/app/Model/Misc.php b/featherbb/Model/Misc.php similarity index 98% rename from app/Model/Misc.php rename to featherbb/Model/Misc.php index 7ca0829c..b6d35f7f 100644 --- a/app/Model/Misc.php +++ b/featherbb/Model/Misc.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; @@ -82,7 +82,7 @@ public function send_email($mail) } // Load the "form email" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/form_email.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/form_email.tpl')); $mail_tpl = $this->hook->fire('send_email_mail_tpl', $mail_tpl); // The first row contains the subject @@ -194,7 +194,7 @@ public function insert_report($post_id) // We send it to the complete mailing-list in one swoop if ($this->config['o_mailing_list'] != '') { // Load the "new report" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/new_report.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/new_report.tpl')); $mail_tpl = $this->hook->fire('insert_report_mail_tpl', $mail_tpl); // The first row contains the subject diff --git a/app/Model/Moderate.php b/featherbb/Model/Moderate.php similarity index 99% rename from app/Model/Moderate.php rename to featherbb/Model/Moderate.php index c48126f1..70a6506d 100644 --- a/app/Model/Moderate.php +++ b/featherbb/Model/Moderate.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; @@ -424,7 +424,7 @@ public function display_posts_view($tid, $start_from) $post_data = array(); - require FEATHER_ROOT.'app/Helpers/parser.php'; + require FEATHER_ROOT.'featherbb/Helpers/parser.php'; $post_count = 0; // Keep track of post numbers diff --git a/app/Model/Post.php b/featherbb/Model/Post.php similarity index 97% rename from app/Model/Post.php rename to featherbb/Model/Post.php index 933b93b0..a6ad59ff 100644 --- a/app/Model/Post.php +++ b/featherbb/Model/Post.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; @@ -164,7 +164,7 @@ public function check_errors_before_post($fid, $tid, $qid, $pid, $page, $errors) // Validate BBCode syntax if ($this->config['p_message_bbcode'] == '1') { - require FEATHER_ROOT.'app/Helpers/parser.php'; + require FEATHER_ROOT.'featherbb/Helpers/parser.php'; $message = preparse_bbcode($message, $errors); $message = $this->hook->fire('check_errors_before_post_bbcode', $message); } @@ -217,7 +217,7 @@ public function setup_variables($errors, $is_admmod) // Validate BBCode syntax if ($this->config['p_message_bbcode'] == '1') { - require_once FEATHER_ROOT.'app/Helpers/parser.php'; + require_once FEATHER_ROOT.'featherbb/Helpers/parser.php'; $post['message'] = preparse_bbcode($post['message'], $errors); } @@ -386,13 +386,13 @@ public function send_notifications_reply($tid, $cur_posting, $new_pid, $post) foreach($result as $cur_subscriber) { // Is the subscription email for $cur_subscriber['language'] cached or not? if (!isset($notification_emails[$cur_subscriber['language']])) { - if (file_exists(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')) { + if (file_exists(FEATHER_ROOT.'featherbb/lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')) { // Load the "new reply" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')); $mail_tpl = $this->hook->fire('send_notifications_reply_mail_tpl', $mail_tpl); // Load the "new reply full" template (with post included) - $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_reply_full.tpl')); + $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$cur_subscriber['language'].'/mail_templates/new_reply_full.tpl')); $mail_tpl_full = $this->hook->fire('send_notifications_reply_mail_tpl_full', $mail_tpl_full); // The first row contains the subject (it also starts with "Subject:") @@ -595,13 +595,13 @@ public function send_notifications_new_topic($post, $cur_posting, $new_tid) foreach($result as $cur_subscriber) { // Is the subscription email for $cur_subscriber['language'] cached or not? if (!isset($notification_emails[$cur_subscriber['language']])) { - if (file_exists(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')) { + if (file_exists(FEATHER_ROOT.'featherbb/lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')) { // Load the "new topic" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$cur_subscriber['language'].'/mail_templates/new_topic.tpl')); $mail_tpl = $this->hook->fire('send_notifications_new_topic_mail_tpl', $mail_tpl); // Load the "new topic full" template (with post included) - $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$cur_subscriber['language'].'/mail_templates/new_topic_full.tpl')); + $mail_tpl_full = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$cur_subscriber['language'].'/mail_templates/new_topic_full.tpl')); // The first row contains the subject (it also starts with "Subject:") $first_crlf = strpos($mail_tpl, "\n"); @@ -660,7 +660,7 @@ public function warn_banned_user($post, $new_pid) $this->hook->fire('warn_banned_user_start', $post, $new_pid); // Load the "banned email post" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/banned_email_post.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/banned_email_post.tpl')); $mail_tpl = $this->hook->fire('warn_banned_user_mail_tpl', $mail_tpl); // The first row contains the subject @@ -877,7 +877,7 @@ public function topic_review($tid) $post_data = $this->hook->fire('topic_review_start', $post_data, $tid); - require_once FEATHER_ROOT.'app/Helpers/parser.php'; + require_once FEATHER_ROOT.'featherbb/Helpers/parser.php'; $select_topic_review = array('poster', 'message', 'hide_smilies', 'posted'); diff --git a/app/Model/Profile.php b/featherbb/Model/Profile.php similarity index 98% rename from app/Model/Profile.php rename to featherbb/Model/Profile.php index c7ffa4e5..4b785929 100644 --- a/app/Model/Profile.php +++ b/featherbb/Model/Profile.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; $this->email = $this->feather->email; - $this->auth = new \App\Model\Auth(); + $this->auth = new \FeatherBB\Model\Auth(); } public function change_pass($id) @@ -215,7 +215,7 @@ public function change_email($id) throw new \FeatherBB\Error(__('Banned email'), 403); } elseif ($this->config['o_mailing_list'] != '') { // Load the "banned email change" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/banned_email_change.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/banned_email_change.tpl')); $mail_tpl = $this->hook->fire('change_email_mail_tpl', $mail_tpl); // The first row contains the subject @@ -252,7 +252,7 @@ public function change_email($id) } // Load the "dupe email change" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/dupe_email_change.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/dupe_email_change.tpl')); $mail_tpl = $this->hook->fire('change_email_mail_dupe_tpl', $mail_tpl); // The first row contains the subject @@ -289,7 +289,7 @@ public function change_email($id) $user = $user->save(); // Load the "activate email" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/activate_email.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/activate_email.tpl')); $mail_tpl = $this->hook->fire('change_email_mail_activate_tpl', $mail_tpl); // The first row contains the subject @@ -425,13 +425,13 @@ public function update_group_membership($id) // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); + $this->feather->cache->store('users_info', \FeatherBB\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); if ($old_group_id == FEATHER_ADMIN || $new_group_id == FEATHER_ADMIN) { - $this->feather->cache->store('admin_ids', \App\Model\Cache::get_admin_ids()); + $this->feather->cache->store('admin_ids', \FeatherBB\Model\Cache::get_admin_ids()); } $new_group_mod = DB::for_table('groups') @@ -721,13 +721,13 @@ public function delete_user($id) // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); + $this->feather->cache->store('users_info', \FeatherBB\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); if ($group_id == FEATHER_ADMIN) { - $this->feather->cache->store('admin_ids', \App\Model\Cache::get_admin_ids()); + $this->feather->cache->store('admin_ids', \FeatherBB\Model\Cache::get_admin_ids()); } $this->hook->fire('delete_user'); @@ -905,7 +905,7 @@ public function update_profile($id, $info, $section) // Validate BBCode syntax if ($this->config['p_sig_bbcode'] == '1') { - require FEATHER_ROOT.'app/Helpers/parser.php'; + require FEATHER_ROOT.'featherbb/Helpers/parser.php'; $errors = array(); @@ -1073,14 +1073,14 @@ public function update_profile($id, $info, $section) // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); + $this->feather->cache->store('users_info', \FeatherBB\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); // Check if the bans table was updated and regenerate the bans cache when needed if ($bans_updated) { - $this->feather->cache->store('bans', \App\Model\Cache::get_bans()); + $this->feather->cache->store('bans', \FeatherBB\Model\Cache::get_bans()); } } diff --git a/app/Model/Register.php b/featherbb/Model/Register.php similarity index 94% rename from app/Model/Register.php rename to featherbb/Model/Register.php index d6e13142..6444a7fc 100644 --- a/app/Model/Register.php +++ b/featherbb/Model/Register.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; @@ -22,7 +22,7 @@ public function __construct() $this->request = $this->feather->request; $this->hook = $this->feather->hooks; $this->email = $this->feather->email; - $this->auth = new \App\Model\Auth(); + $this->auth = new \FeatherBB\Model\Auth(); } public function check_for_errors() @@ -69,7 +69,7 @@ public function check_for_errors() } // Antispam feature - require FEATHER_ROOT.'app/lang/'.$this->user->language.'/antispam.php'; + require FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/antispam.php'; $question = $this->request->post('captcha_q') ? trim($this->request->post('captcha_q')) : ''; $answer = $this->request->post('captcha') ? strtoupper(trim($this->request->post('captcha'))) : ''; $lang_antispam_questions_array = array(); @@ -118,7 +118,7 @@ public function check_for_errors() // Make sure we got a valid language string if ($this->request->post('language')) { $user['language'] = preg_replace('%[\.\\\/]%', '', $this->request->post('language')); - if (!file_exists(FEATHER_ROOT.'app/lang/'.$user['language'].'/common.po')) { + if (!file_exists(FEATHER_ROOT.'featherbb/lang/'.$user['language'].'/common.po')) { throw new \FeatherBB\Error(__('Bad request'), 500); } } else { @@ -168,7 +168,7 @@ public function insert_user($user) if ($this->config['o_regs_verify'] == '0') { // Regenerate the users info cache if (!$this->feather->cache->isCached('users_info')) { - $this->feather->cache->store('users_info', \App\Model\Cache::get_users_info()); + $this->feather->cache->store('users_info', \FeatherBB\Model\Cache::get_users_info()); } $stats = $this->feather->cache->retrieve('users_info'); @@ -179,7 +179,7 @@ public function insert_user($user) // If we previously found out that the email was banned if (isset($user['banned_email'])) { // Load the "banned email register" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/banned_email_register.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/banned_email_register.tpl')); $mail_tpl = $this->hook->fire('insert_user_banned_mail_tpl', $mail_tpl); // The first row contains the subject @@ -200,7 +200,7 @@ public function insert_user($user) // If we previously found out that the email was a dupe if (!empty($dupe_list)) { // Load the "dupe email register" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/dupe_email_register.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/dupe_email_register.tpl')); $mail_tpl = $this->hook->fire('insert_user_dupe_mail_tpl', $mail_tpl); // The first row contains the subject @@ -221,7 +221,7 @@ public function insert_user($user) // Should we alert people on the admin mailing list that a new user has registered? if ($this->config['o_regs_report'] == '1') { // Load the "new user" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/new_user.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/new_user.tpl')); $mail_tpl = $this->hook->fire('insert_user_new_mail_tpl', $mail_tpl); // The first row contains the subject @@ -244,7 +244,7 @@ public function insert_user($user) // Must the user verify the registration or do we log him/her in right now? if ($this->config['o_regs_verify'] == '1') { // Load the "welcome" template - $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'app/lang/'.$this->user->language.'/mail_templates/welcome.tpl')); + $mail_tpl = trim(file_get_contents(FEATHER_ROOT.'featherbb/lang/'.$this->user->language.'/mail_templates/welcome.tpl')); $mail_tpl = $this->hook->fire('insert_user_welcome_mail_tpl', $mail_tpl); // The first row contains the subject diff --git a/app/Model/Search.php b/featherbb/Model/Search.php similarity index 99% rename from app/Model/Search.php rename to featherbb/Model/Search.php index 372dc7ff..3253ca00 100644 --- a/app/Model/Search.php +++ b/featherbb/Model/Search.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/Model/Userlist.php b/featherbb/Model/Userlist.php similarity index 99% rename from app/Model/Userlist.php rename to featherbb/Model/Userlist.php index 062d525d..0dfc32b1 100644 --- a/app/Model/Userlist.php +++ b/featherbb/Model/Userlist.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/Model/Viewforum.php b/featherbb/Model/Viewforum.php similarity index 99% rename from app/Model/Viewforum.php rename to featherbb/Model/Viewforum.php index 2a53778d..153eb58e 100644 --- a/app/Model/Viewforum.php +++ b/featherbb/Model/Viewforum.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/Model/Viewtopic.php b/featherbb/Model/Viewtopic.php similarity index 99% rename from app/Model/Viewtopic.php rename to featherbb/Model/Viewtopic.php index 49a59945..60649dfc 100644 --- a/app/Model/Viewtopic.php +++ b/featherbb/Model/Viewtopic.php @@ -7,7 +7,7 @@ * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ -namespace App\Model; +namespace FeatherBB\Model; use DB; diff --git a/app/lang/English/admin/bans.mo b/featherbb/lang/English/admin/bans.mo similarity index 100% rename from app/lang/English/admin/bans.mo rename to featherbb/lang/English/admin/bans.mo diff --git a/app/lang/English/admin/bans.po b/featherbb/lang/English/admin/bans.po similarity index 100% rename from app/lang/English/admin/bans.po rename to featherbb/lang/English/admin/bans.po diff --git a/app/lang/English/admin/categories.mo b/featherbb/lang/English/admin/categories.mo similarity index 100% rename from app/lang/English/admin/categories.mo rename to featherbb/lang/English/admin/categories.mo diff --git a/app/lang/English/admin/categories.po b/featherbb/lang/English/admin/categories.po similarity index 100% rename from app/lang/English/admin/categories.po rename to featherbb/lang/English/admin/categories.po diff --git a/app/lang/English/admin/censoring.mo b/featherbb/lang/English/admin/censoring.mo similarity index 100% rename from app/lang/English/admin/censoring.mo rename to featherbb/lang/English/admin/censoring.mo diff --git a/app/lang/English/admin/censoring.po b/featherbb/lang/English/admin/censoring.po similarity index 100% rename from app/lang/English/admin/censoring.po rename to featherbb/lang/English/admin/censoring.po diff --git a/app/lang/English/admin/common.mo b/featherbb/lang/English/admin/common.mo similarity index 100% rename from app/lang/English/admin/common.mo rename to featherbb/lang/English/admin/common.mo diff --git a/app/lang/English/admin/common.po b/featherbb/lang/English/admin/common.po similarity index 100% rename from app/lang/English/admin/common.po rename to featherbb/lang/English/admin/common.po diff --git a/app/lang/English/admin/forums.mo b/featherbb/lang/English/admin/forums.mo similarity index 100% rename from app/lang/English/admin/forums.mo rename to featherbb/lang/English/admin/forums.mo diff --git a/app/lang/English/admin/forums.po b/featherbb/lang/English/admin/forums.po similarity index 100% rename from app/lang/English/admin/forums.po rename to featherbb/lang/English/admin/forums.po diff --git a/app/lang/English/admin/groups.mo b/featherbb/lang/English/admin/groups.mo similarity index 100% rename from app/lang/English/admin/groups.mo rename to featherbb/lang/English/admin/groups.mo diff --git a/app/lang/English/admin/groups.po b/featherbb/lang/English/admin/groups.po similarity index 100% rename from app/lang/English/admin/groups.po rename to featherbb/lang/English/admin/groups.po diff --git a/app/lang/English/admin/index.html b/featherbb/lang/English/admin/index.html similarity index 100% rename from app/lang/English/admin/index.html rename to featherbb/lang/English/admin/index.html diff --git a/app/lang/English/admin/index.mo b/featherbb/lang/English/admin/index.mo similarity index 100% rename from app/lang/English/admin/index.mo rename to featherbb/lang/English/admin/index.mo diff --git a/app/lang/English/admin/index.po b/featherbb/lang/English/admin/index.po similarity index 100% rename from app/lang/English/admin/index.po rename to featherbb/lang/English/admin/index.po diff --git a/app/lang/English/admin/maintenance.mo b/featherbb/lang/English/admin/maintenance.mo similarity index 100% rename from app/lang/English/admin/maintenance.mo rename to featherbb/lang/English/admin/maintenance.mo diff --git a/app/lang/English/admin/maintenance.po b/featherbb/lang/English/admin/maintenance.po similarity index 100% rename from app/lang/English/admin/maintenance.po rename to featherbb/lang/English/admin/maintenance.po diff --git a/app/lang/English/admin/options.mo b/featherbb/lang/English/admin/options.mo similarity index 100% rename from app/lang/English/admin/options.mo rename to featherbb/lang/English/admin/options.mo diff --git a/app/lang/English/admin/options.po b/featherbb/lang/English/admin/options.po similarity index 100% rename from app/lang/English/admin/options.po rename to featherbb/lang/English/admin/options.po diff --git a/app/lang/English/admin/parser.mo b/featherbb/lang/English/admin/parser.mo similarity index 100% rename from app/lang/English/admin/parser.mo rename to featherbb/lang/English/admin/parser.mo diff --git a/app/lang/English/admin/parser.php b/featherbb/lang/English/admin/parser.php similarity index 100% rename from app/lang/English/admin/parser.php rename to featherbb/lang/English/admin/parser.php diff --git a/app/lang/English/admin/parser.po b/featherbb/lang/English/admin/parser.po similarity index 100% rename from app/lang/English/admin/parser.po rename to featherbb/lang/English/admin/parser.po diff --git a/app/lang/English/admin/permissions.mo b/featherbb/lang/English/admin/permissions.mo similarity index 100% rename from app/lang/English/admin/permissions.mo rename to featherbb/lang/English/admin/permissions.mo diff --git a/app/lang/English/admin/permissions.po b/featherbb/lang/English/admin/permissions.po similarity index 100% rename from app/lang/English/admin/permissions.po rename to featherbb/lang/English/admin/permissions.po diff --git a/app/lang/English/admin/plugin_example.mo b/featherbb/lang/English/admin/plugin_example.mo similarity index 100% rename from app/lang/English/admin/plugin_example.mo rename to featherbb/lang/English/admin/plugin_example.mo diff --git a/app/lang/English/admin/plugin_example.po b/featherbb/lang/English/admin/plugin_example.po similarity index 100% rename from app/lang/English/admin/plugin_example.po rename to featherbb/lang/English/admin/plugin_example.po diff --git a/app/lang/English/admin/reports.mo b/featherbb/lang/English/admin/reports.mo similarity index 100% rename from app/lang/English/admin/reports.mo rename to featherbb/lang/English/admin/reports.mo diff --git a/app/lang/English/admin/reports.po b/featherbb/lang/English/admin/reports.po similarity index 100% rename from app/lang/English/admin/reports.po rename to featherbb/lang/English/admin/reports.po diff --git a/app/lang/English/admin/users.mo b/featherbb/lang/English/admin/users.mo similarity index 100% rename from app/lang/English/admin/users.mo rename to featherbb/lang/English/admin/users.mo diff --git a/app/lang/English/admin/users.po b/featherbb/lang/English/admin/users.po similarity index 100% rename from app/lang/English/admin/users.po rename to featherbb/lang/English/admin/users.po diff --git a/app/lang/English/antispam.mo b/featherbb/lang/English/antispam.mo similarity index 100% rename from app/lang/English/antispam.mo rename to featherbb/lang/English/antispam.mo diff --git a/app/lang/English/antispam.php b/featherbb/lang/English/antispam.php similarity index 100% rename from app/lang/English/antispam.php rename to featherbb/lang/English/antispam.php diff --git a/app/lang/English/antispam.po b/featherbb/lang/English/antispam.po similarity index 100% rename from app/lang/English/antispam.po rename to featherbb/lang/English/antispam.po diff --git a/app/lang/English/antispam_questions.mo b/featherbb/lang/English/antispam_questions.mo similarity index 100% rename from app/lang/English/antispam_questions.mo rename to featherbb/lang/English/antispam_questions.mo diff --git a/app/lang/English/antispam_questions.po b/featherbb/lang/English/antispam_questions.po similarity index 100% rename from app/lang/English/antispam_questions.po rename to featherbb/lang/English/antispam_questions.po diff --git a/app/lang/English/bbeditor.mo b/featherbb/lang/English/bbeditor.mo similarity index 100% rename from app/lang/English/bbeditor.mo rename to featherbb/lang/English/bbeditor.mo diff --git a/app/lang/English/bbeditor.po b/featherbb/lang/English/bbeditor.po similarity index 100% rename from app/lang/English/bbeditor.po rename to featherbb/lang/English/bbeditor.po diff --git a/app/lang/English/common.mo b/featherbb/lang/English/common.mo similarity index 100% rename from app/lang/English/common.mo rename to featherbb/lang/English/common.mo diff --git a/app/lang/English/common.po b/featherbb/lang/English/common.po similarity index 100% rename from app/lang/English/common.po rename to featherbb/lang/English/common.po diff --git a/app/lang/English/delete.mo b/featherbb/lang/English/delete.mo similarity index 100% rename from app/lang/English/delete.mo rename to featherbb/lang/English/delete.mo diff --git a/app/lang/English/delete.po b/featherbb/lang/English/delete.po similarity index 100% rename from app/lang/English/delete.po rename to featherbb/lang/English/delete.po diff --git a/app/lang/English/forum.mo b/featherbb/lang/English/forum.mo similarity index 100% rename from app/lang/English/forum.mo rename to featherbb/lang/English/forum.mo diff --git a/app/lang/English/forum.po b/featherbb/lang/English/forum.po similarity index 100% rename from app/lang/English/forum.po rename to featherbb/lang/English/forum.po diff --git a/app/lang/English/help.mo b/featherbb/lang/English/help.mo similarity index 100% rename from app/lang/English/help.mo rename to featherbb/lang/English/help.mo diff --git a/app/lang/English/help.po b/featherbb/lang/English/help.po similarity index 100% rename from app/lang/English/help.po rename to featherbb/lang/English/help.po diff --git a/app/lang/English/index.mo b/featherbb/lang/English/index.mo similarity index 100% rename from app/lang/English/index.mo rename to featherbb/lang/English/index.mo diff --git a/app/lang/English/index.po b/featherbb/lang/English/index.po similarity index 100% rename from app/lang/English/index.po rename to featherbb/lang/English/index.po diff --git a/app/lang/English/install.mo b/featherbb/lang/English/install.mo similarity index 100% rename from app/lang/English/install.mo rename to featherbb/lang/English/install.mo diff --git a/app/lang/English/install.po b/featherbb/lang/English/install.po similarity index 100% rename from app/lang/English/install.po rename to featherbb/lang/English/install.po diff --git a/app/lang/English/login.mo b/featherbb/lang/English/login.mo similarity index 100% rename from app/lang/English/login.mo rename to featherbb/lang/English/login.mo diff --git a/app/lang/English/login.po b/featherbb/lang/English/login.po similarity index 100% rename from app/lang/English/login.po rename to featherbb/lang/English/login.po diff --git a/app/lang/English/mail_templates/activate_email.tpl b/featherbb/lang/English/mail_templates/activate_email.tpl similarity index 100% rename from app/lang/English/mail_templates/activate_email.tpl rename to featherbb/lang/English/mail_templates/activate_email.tpl diff --git a/app/lang/English/mail_templates/activate_password.tpl b/featherbb/lang/English/mail_templates/activate_password.tpl similarity index 100% rename from app/lang/English/mail_templates/activate_password.tpl rename to featherbb/lang/English/mail_templates/activate_password.tpl diff --git a/app/lang/English/mail_templates/banned_email_change.tpl b/featherbb/lang/English/mail_templates/banned_email_change.tpl similarity index 100% rename from app/lang/English/mail_templates/banned_email_change.tpl rename to featherbb/lang/English/mail_templates/banned_email_change.tpl diff --git a/app/lang/English/mail_templates/banned_email_post.tpl b/featherbb/lang/English/mail_templates/banned_email_post.tpl similarity index 100% rename from app/lang/English/mail_templates/banned_email_post.tpl rename to featherbb/lang/English/mail_templates/banned_email_post.tpl diff --git a/app/lang/English/mail_templates/banned_email_register.tpl b/featherbb/lang/English/mail_templates/banned_email_register.tpl similarity index 100% rename from app/lang/English/mail_templates/banned_email_register.tpl rename to featherbb/lang/English/mail_templates/banned_email_register.tpl diff --git a/app/lang/English/mail_templates/dupe_email_change.tpl b/featherbb/lang/English/mail_templates/dupe_email_change.tpl similarity index 100% rename from app/lang/English/mail_templates/dupe_email_change.tpl rename to featherbb/lang/English/mail_templates/dupe_email_change.tpl diff --git a/app/lang/English/mail_templates/dupe_email_register.tpl b/featherbb/lang/English/mail_templates/dupe_email_register.tpl similarity index 100% rename from app/lang/English/mail_templates/dupe_email_register.tpl rename to featherbb/lang/English/mail_templates/dupe_email_register.tpl diff --git a/app/lang/English/mail_templates/form_email.tpl b/featherbb/lang/English/mail_templates/form_email.tpl similarity index 100% rename from app/lang/English/mail_templates/form_email.tpl rename to featherbb/lang/English/mail_templates/form_email.tpl diff --git a/app/lang/English/mail_templates/new_reply.tpl b/featherbb/lang/English/mail_templates/new_reply.tpl similarity index 100% rename from app/lang/English/mail_templates/new_reply.tpl rename to featherbb/lang/English/mail_templates/new_reply.tpl diff --git a/app/lang/English/mail_templates/new_reply_full.tpl b/featherbb/lang/English/mail_templates/new_reply_full.tpl similarity index 100% rename from app/lang/English/mail_templates/new_reply_full.tpl rename to featherbb/lang/English/mail_templates/new_reply_full.tpl diff --git a/app/lang/English/mail_templates/new_report.tpl b/featherbb/lang/English/mail_templates/new_report.tpl similarity index 100% rename from app/lang/English/mail_templates/new_report.tpl rename to featherbb/lang/English/mail_templates/new_report.tpl diff --git a/app/lang/English/mail_templates/new_topic.tpl b/featherbb/lang/English/mail_templates/new_topic.tpl similarity index 100% rename from app/lang/English/mail_templates/new_topic.tpl rename to featherbb/lang/English/mail_templates/new_topic.tpl diff --git a/app/lang/English/mail_templates/new_topic_full.tpl b/featherbb/lang/English/mail_templates/new_topic_full.tpl similarity index 100% rename from app/lang/English/mail_templates/new_topic_full.tpl rename to featherbb/lang/English/mail_templates/new_topic_full.tpl diff --git a/app/lang/English/mail_templates/new_user.tpl b/featherbb/lang/English/mail_templates/new_user.tpl similarity index 100% rename from app/lang/English/mail_templates/new_user.tpl rename to featherbb/lang/English/mail_templates/new_user.tpl diff --git a/app/lang/English/mail_templates/rename.tpl b/featherbb/lang/English/mail_templates/rename.tpl similarity index 100% rename from app/lang/English/mail_templates/rename.tpl rename to featherbb/lang/English/mail_templates/rename.tpl diff --git a/app/lang/English/mail_templates/welcome.tpl b/featherbb/lang/English/mail_templates/welcome.tpl similarity index 100% rename from app/lang/English/mail_templates/welcome.tpl rename to featherbb/lang/English/mail_templates/welcome.tpl diff --git a/app/lang/English/misc.mo b/featherbb/lang/English/misc.mo similarity index 100% rename from app/lang/English/misc.mo rename to featherbb/lang/English/misc.mo diff --git a/app/lang/English/misc.po b/featherbb/lang/English/misc.po similarity index 100% rename from app/lang/English/misc.po rename to featherbb/lang/English/misc.po diff --git a/app/lang/English/post.mo b/featherbb/lang/English/post.mo similarity index 100% rename from app/lang/English/post.mo rename to featherbb/lang/English/post.mo diff --git a/app/lang/English/post.po b/featherbb/lang/English/post.po similarity index 100% rename from app/lang/English/post.po rename to featherbb/lang/English/post.po diff --git a/app/lang/English/prof_reg.mo b/featherbb/lang/English/prof_reg.mo similarity index 100% rename from app/lang/English/prof_reg.mo rename to featherbb/lang/English/prof_reg.mo diff --git a/app/lang/English/prof_reg.po b/featherbb/lang/English/prof_reg.po similarity index 100% rename from app/lang/English/prof_reg.po rename to featherbb/lang/English/prof_reg.po diff --git a/app/lang/English/profile.mo b/featherbb/lang/English/profile.mo similarity index 100% rename from app/lang/English/profile.mo rename to featherbb/lang/English/profile.mo diff --git a/app/lang/English/profile.po b/featherbb/lang/English/profile.po similarity index 100% rename from app/lang/English/profile.po rename to featherbb/lang/English/profile.po diff --git a/app/lang/English/register.mo b/featherbb/lang/English/register.mo similarity index 100% rename from app/lang/English/register.mo rename to featherbb/lang/English/register.mo diff --git a/app/lang/English/register.po b/featherbb/lang/English/register.po similarity index 100% rename from app/lang/English/register.po rename to featherbb/lang/English/register.po diff --git a/app/lang/English/search.mo b/featherbb/lang/English/search.mo similarity index 100% rename from app/lang/English/search.mo rename to featherbb/lang/English/search.mo diff --git a/app/lang/English/search.po b/featherbb/lang/English/search.po similarity index 100% rename from app/lang/English/search.po rename to featherbb/lang/English/search.po diff --git a/app/lang/English/stopwords.txt b/featherbb/lang/English/stopwords.txt similarity index 100% rename from app/lang/English/stopwords.txt rename to featherbb/lang/English/stopwords.txt diff --git a/app/lang/English/topic.mo b/featherbb/lang/English/topic.mo similarity index 100% rename from app/lang/English/topic.mo rename to featherbb/lang/English/topic.mo diff --git a/app/lang/English/topic.po b/featherbb/lang/English/topic.po similarity index 100% rename from app/lang/English/topic.po rename to featherbb/lang/English/topic.po diff --git a/app/lang/English/update.mo b/featherbb/lang/English/update.mo similarity index 100% rename from app/lang/English/update.mo rename to featherbb/lang/English/update.mo diff --git a/app/lang/English/update.po b/featherbb/lang/English/update.po similarity index 100% rename from app/lang/English/update.po rename to featherbb/lang/English/update.po diff --git a/app/lang/English/userlist.mo b/featherbb/lang/English/userlist.mo similarity index 100% rename from app/lang/English/userlist.mo rename to featherbb/lang/English/userlist.mo diff --git a/app/lang/English/userlist.po b/featherbb/lang/English/userlist.po similarity index 100% rename from app/lang/English/userlist.po rename to featherbb/lang/English/userlist.po diff --git a/featherbb/routes.php b/featherbb/routes.php new file mode 100644 index 00000000..975a5945 --- /dev/null +++ b/featherbb/routes.php @@ -0,0 +1,205 @@ +get('/', '\FeatherBB\Controller\index:display'); + +// Viewforum +$feather->get('/forum/:id(/:name)(/page/:page)(/)', '\FeatherBB\Controller\viewforum:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); + +// Viewtopic +$feather->group('/topic', function() use ($feather) { + $feather->get('/:id(/:name)(/page/:page)(/)', '\FeatherBB\Controller\viewtopic:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); + $feather->get('/:id/action/:action(/)', '\FeatherBB\Controller\viewtopic:action')->conditions(array('id' => '[0-9]+')); +}); +$feather->get('/post/:pid(/)', '\FeatherBB\Controller\viewtopic:viewpost')->conditions(array('pid' => '[0-9]+')); + +// Userlist +$feather->get('/userlist(/)', '\FeatherBB\Controller\userlist:display'); + +// Auth routes +$feather->group('/auth', function() use ($feather) { + $feather->get('(/)', function () use ($feather) { + if (!$feather->user->is_guest) { + $this->feather->url->redirect($this->feather->url->get('/')); + } else { + $this->feather->url->redirect($this->feather->url->get('/auth/login')); + } + }); + $feather->map('/login(/)', '\FeatherBB\Controller\auth:login')->via('GET', 'POST'); + $feather->map('/forget(/)', '\FeatherBB\Controller\auth:forget')->via('GET', 'POST'); + $feather->get('/logout/token/:token(/)', '\FeatherBB\Controller\auth:logout'); +}); + +// Register routes +$feather->group('/register', function() use ($feather) { + $feather->get('(/)', '\FeatherBB\Controller\register:rules'); + $feather->map('/agree(/)', '\FeatherBB\Controller\register:display')->via('GET', 'POST'); + $feather->get('/cancel(/)', '\FeatherBB\Controller\register:cancel'); +}); + +// Post routes +$feather->group('/post', function() use ($feather) { + $feather->map('/new-topic/:fid(/)', '\FeatherBB\Controller\post:newpost')->conditions(array('fid' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/reply/:tid(/)(/quote/:qid)(/)', '\FeatherBB\Controller\post:newreply')->conditions(array('tid' => '[0-9]+', 'qid' => '[0-9]+'))->via('GET', 'POST'); +}); + +// Edit +$feather->map('/edit/:id(/)', '\FeatherBB\Controller\edit:editpost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + +// Delete +$feather->map('/delete/:id(/)', '\FeatherBB\Controller\delete:deletepost')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + +// Search routes +$feather->group('/search', function() use ($feather) { + $feather->get('(/)', '\FeatherBB\Controller\search:display'); + $feather->get('/show/:show(/)', '\FeatherBB\Controller\search:quicksearches'); +}); + +// Help +$feather->get('/help(/)', '\FeatherBB\Controller\help:display'); + +// Misc +$feather->get('/rules(/)', '\FeatherBB\Controller\misc:rules'); +$feather->get('/mark-read(/)', '\FeatherBB\Controller\misc:markread'); +$feather->get('/mark-forum-read/:id(/)', '\FeatherBB\Controller\misc:markforumread')->conditions(array('id' => '[0-9]+')); +$feather->map('/email/:id(/)', '\FeatherBB\Controller\misc:email')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->map('/report/:id(/)', '\FeatherBB\Controller\misc:report')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +$feather->get('/subscribe/forum/:id(/)', '\FeatherBB\Controller\misc:subscribeforum')->conditions(array('id' => '[0-9]+')); +$feather->get('/unsubscribe/forum/:id(/)', '\FeatherBB\Controller\misc:unsubscribeforum')->conditions(array('id' => '[0-9]+')); +$feather->get('/subscribe/topic/:id(/)', '\FeatherBB\Controller\misc:subscribetopic')->conditions(array('id' => '[0-9]+')); +$feather->get('/unsubscribe/topic/:id(/)', '\FeatherBB\Controller\misc:unsubscribetopic')->conditions(array('id' => '[0-9]+')); + +// Profile routes +$feather->group('/user', function() use ($feather) { + $feather->map('/:id(/section/:section)(/)', '\FeatherBB\Controller\profile:display')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/:id(/action/:action)(/)', '\FeatherBB\Controller\profile:action')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); +}); + +/** + * Middleware to check if user is allowed to moderate, if he's not redirect to homepage. + */ +$isAdmmod = function() use ($feather) { + if(!$feather->user->is_admmod) { + redirect($feather->url->base(), __('No permission')); + } +}; + +// Moderate routes +$feather->group('/moderate', $isAdmmod, function() use ($feather) { + $feather->get('/forum/:id(/:name)(/page/:page)(/)', '\FeatherBB\Controller\moderate:display')->conditions(array('id' => '[0-9]+', 'page' => '[0-9]+')); + $feather->get('/get-host/post/:pid(/)', '\FeatherBB\Controller\moderate:gethostpost')->conditions(array('pid' => '[0-9]+')); + $feather->get('/get-host/ip/:ip(/)', '\FeatherBB\Controller\moderate:gethostip'); + $feather->map('/topic/:id/forum/:fid/action/:action(/param/:param)(/)', '\FeatherBB\Controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/topic/:id/forum/:fid/action/:action(/page/:param)(/)', '\FeatherBB\Controller\moderate:moderatetopic')->conditions(array('id' => '[0-9]+', 'fid' => '[0-9]+', 'param' => '[0-9]+'))->via('GET', 'POST'); + $feather->post('/forum/:fid(/page/:page)(/)', '\FeatherBB\Controller\moderate:dealposts')->conditions(array('fid' => '[0-9]+', 'page' => '[0-9]+')); +}); + +// Admin routes +$feather->group('/admin', $isAdmmod, function() use ($feather) { + + /** + * Middleware to check if user is admin. + */ + $isAdmin = function() use ($feather) { + if($feather->user->g_id != FEATHER_ADMIN) { + redirect($feather->url->base(), __('No permission')); + } + }; + + // Admin index + $feather->get('(/action/:action)(/)', '\FeatherBB\Controller\Admin\index:display'); + $feather->get('/index(/)', '\FeatherBB\Controller\Admin\index:display'); + + // Admin bans + $feather->group('/bans', function() use ($feather) { + $feather->get('(/)', '\FeatherBB\Controller\Admin\Bans:display'); + $feather->get('/delete/:id(/)', '\FeatherBB\Controller\Admin\Bans:delete')->conditions(array('id' => '[0-9]+')); + $feather->map('/edit/:id(/)', '\FeatherBB\Controller\Admin\Bans:edit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/add(/:id)(/)', '\FeatherBB\Controller\Admin\Bans:add')->via('GET', 'POST'); + }); + + // Admin options + $feather->map('/options(/)', $isAdmin, '\FeatherBB\Controller\Admin\options:display')->via('GET', 'POST'); + + // Admin categories + $feather->group('/categories', $isAdmin, function() use ($feather) { + $feather->get('(/)', '\FeatherBB\Controller\Admin\categories:display'); + $feather->post('/add(/)', '\FeatherBB\Controller\Admin\categories:add_category'); + $feather->post('/edit(/)', '\FeatherBB\Controller\Admin\categories:edit_categories'); + $feather->post('/delete(/)', '\FeatherBB\Controller\Admin\categories:delete_category'); + }); + + // Admin censoring + $feather->map('/censoring(/)', $isAdmin, '\FeatherBB\Controller\Admin\censoring:display')->via('GET', 'POST'); + + // Admin reports + $feather->map('/reports(/)', '\FeatherBB\Controller\Admin\reports:display')->via('GET', 'POST'); + + // Admin permissions + $feather->map('/permissions(/)', $isAdmin, '\FeatherBB\Controller\Admin\permissions:display')->via('GET', 'POST'); + + // Admin statistics + $feather->get('/statistics(/)', '\FeatherBB\Controller\Admin\statistics:display'); + $feather->get('/phpinfo(/)', '\FeatherBB\Controller\Admin\statistics:phpinfo'); + + // Admin forums + $feather->group('/forums', $isAdmin, function() use ($feather) { + $feather->map('(/)', '\FeatherBB\Controller\Admin\forums:display')->via('GET', 'POST'); + $feather->post('/add(/)', '\FeatherBB\Controller\Admin\forums:add_forum'); + $feather->map('/edit/:id(/)', '\FeatherBB\Controller\Admin\forums:edit_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/delete/:id(/)', '\FeatherBB\Controller\Admin\forums:delete_forum')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + }); + + // Admin groups + $feather->group('/groups', $isAdmin, function() use ($feather) { + $feather->map('(/)', '\FeatherBB\Controller\Admin\groups:display')->via('GET', 'POST'); + $feather->map('/add(/)', '\FeatherBB\Controller\Admin\groups:addedit')->via('GET', 'POST'); + $feather->map('/edit/:id(/)', '\FeatherBB\Controller\Admin\groups:addedit')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + $feather->map('/delete/:id(/)', '\FeatherBB\Controller\Admin\groups:delete')->conditions(array('id' => '[0-9]+'))->via('GET', 'POST'); + }); + + // Admin plugins + $feather->group('/plugins', function() use ($feather) { + $feather->map('/(/)', '\FeatherBB\Controller\Admin\plugins:index')->via('GET', 'POST'); + $feather->map('/activate(/)', '\FeatherBB\Controller\Admin\plugins:activate')->via('GET'); + $feather->map('/deactivate(/)', '\FeatherBB\Controller\Admin\plugins:deactivate')->via('GET'); + // $feather->map('/loader(/)', '\FeatherBB\Controller\Admin\plugins:display')->via('GET', 'POST'); + }); + + // Admin maintenance + $feather->map('/maintenance(/)', $isAdmin, '\FeatherBB\Controller\Admin\maintenance:display')->via('GET', 'POST'); + + // Admin parser + $feather->map('/parser(/)', $isAdmin, '\FeatherBB\Controller\Admin\parser:display')->via('GET', 'POST'); + + // Admin users + $feather->group('/users', function() use ($feather) { + $feather->map('(/)', '\FeatherBB\Controller\Admin\users:display')->via('GET', 'POST'); + $feather->get('/ip-stats/id/:id(/)', '\FeatherBB\Controller\Admin\users:ipstats')->conditions(array('id' => '[0-9]+')); + $feather->get('/show-users/ip/:ip(/)', '\FeatherBB\Controller\Admin\users:showusers'); + }); + +}); + +// 404 not found +$feather->notFound(function () use ($feather){ + throw new \FeatherBB\Error('Page not found', 404); +}); + +$feather->error(function (\Exception $e) use ($feather) { + $feather->response->setStatus($e->getCode()); + $feather->view2->setPageInfo(array( + 'title' => array($feather->utils->escape($feather->config['o_board_title']), __('Error')), + 'msg_title' => __('Error'), + 'msg' => $e->getMessage(), + 'no_back_link' => false, + ))->addTemplate('error.php')->display(); + $feather->stop(); +}); diff --git a/index.php b/index.php index e77f054d..955ec623 100644 --- a/index.php +++ b/index.php @@ -20,14 +20,14 @@ $feather = new \Slim\Slim(); $feather->add(new \FeatherBB\Csrf()); -$feather_settings = array('config_file' => 'app/config.php', - 'cache_dir' => 'app/cache/', +$feather_settings = array('config_file' => 'featherbb/config.php', + 'cache_dir' => 'featherbb/cache/', 'debug' => 'all'); // 3 levels : false, info (only execution time and number of queries), and all (display info + queries) $feather->add(new \FeatherBB\Auth()); $feather->add(new \FeatherBB\Core($feather_settings)); // Load the routes -require 'app/routes.php'; +require 'featherbb/routes.php'; // Run it, baby! $feather->run(); diff --git a/style/themes/FeatherBB/view/help.php b/style/themes/FeatherBB/view/help.php index 34632d06..51627b21 100644 --- a/style/themes/FeatherBB/view/help.php +++ b/style/themes/FeatherBB/view/help.php @@ -125,7 +125,7 @@ request->post('preview')) { - require_once FEATHER_ROOT.'app/Helpers/parser.php'; + require_once FEATHER_ROOT.'featherbb/Helpers/parser.php'; $preview_message = parse_message($post['message'], $post['hide_smilies']); ?> diff --git a/style/themes/MyFeatherBB/view/help.php b/style/themes/MyFeatherBB/view/help.php index dd449bc4..9644da0d 100644 --- a/style/themes/MyFeatherBB/view/help.php +++ b/style/themes/MyFeatherBB/view/help.php @@ -124,7 +124,7 @@ request->post('preview')) { - require_once FEATHER_ROOT.'app/Helpers/parser.php'; + require_once FEATHER_ROOT.'featherbb/Helpers/parser.php'; $preview_message = parse_message($post['message'], $post['hide_smilies']); ?> diff --git a/vendor/bin/phpunit b/vendor/bin/phpunit new file mode 100644 index 00000000..2c489303 --- /dev/null +++ b/vendor/bin/phpunit @@ -0,0 +1 @@ +../phpunit/phpunit/phpunit \ No newline at end of file diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 7b42861a..14c66014 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,10 +6,10 @@ $baseDir = dirname($vendorDir); return array( - 'DB' => $baseDir . '/app/Core/Database.php', - 'IdiormMethodMissingException' => $baseDir . '/app/Core/Database.php', - 'IdiormResultSet' => $baseDir . '/app/Core/Database.php', - 'IdiormString' => $baseDir . '/app/Core/Database.php', - 'IdiormStringException' => $baseDir . '/app/Core/Database.php', - 'MO' => $baseDir . '/app/Core/pomo/MO.php', + 'DB' => $baseDir . '/featherbb/Core/Database.php', + 'IdiormMethodMissingException' => $baseDir . '/featherbb/Core/Database.php', + 'IdiormResultSet' => $baseDir . '/featherbb/Core/Database.php', + 'IdiormString' => $baseDir . '/featherbb/Core/Database.php', + 'IdiormStringException' => $baseDir . '/featherbb/Core/Database.php', + 'MO' => $baseDir . '/featherbb/Core/pomo/MO.php', ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 5efbc9f2..16175d8d 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -7,6 +7,6 @@ return array( 'Plugins\\' => array('/plugins'), - 'FeatherBB\\' => array($baseDir . '/app/Core'), + 'FeatherBB\\' => array($baseDir . '/featherbb/Core'), '' => array($baseDir . '/'), ); diff --git a/vendor/composer/include_paths.php b/vendor/composer/include_paths.php new file mode 100644 index 00000000..4fd23321 --- /dev/null +++ b/vendor/composer/include_paths.php @@ -0,0 +1,13 @@ +. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Sebastian Bergmann nor the names of his + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-code-coverage/README.md b/vendor/phpunit/php-code-coverage/README.md new file mode 100644 index 00000000..6ca608a4 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/README.md @@ -0,0 +1,40 @@ +[![Latest Stable Version](https://poser.pugx.org/phpunit/php-code-coverage/v/stable.png)](https://packagist.org/packages/phpunit/php-code-coverage) +[![Build Status](https://travis-ci.org/sebastianbergmann/php-code-coverage.svg?branch=master)](https://travis-ci.org/sebastianbergmann/php-code-coverage) + +# PHP_CodeCoverage + +**PHP_CodeCoverage** is a library that provides collection, processing, and rendering functionality for PHP code coverage information. + +## Requirements + +* PHP 5.3.3 is required but using the latest version of PHP is highly recommended +* [Xdebug](http://xdebug.org/) 2.1.3 is required but using the latest version of Xdebug is highly recommended + +## Installation + +To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 2.0: + + { + "require": { + "phpunit/php-code-coverage": "~2.0" + } + } + +## Using the PHP_CodeCoverage API + +```php +start(''); + +// ... + +$coverage->stop(); + +$writer = new PHP_CodeCoverage_Report_Clover; +$writer->process($coverage, '/tmp/clover.xml'); + +$writer = new PHP_CodeCoverage_Report_HTML; +$writer->process($coverage, '/tmp/code-coverage-report'); +``` + diff --git a/vendor/phpunit/php-code-coverage/build.xml b/vendor/phpunit/php-code-coverage/build.xml new file mode 100644 index 00000000..c335d158 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/build.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/phpunit/php-code-coverage/build/travis-ci.xml b/vendor/phpunit/php-code-coverage/build/travis-ci.xml new file mode 100644 index 00000000..15e879fa --- /dev/null +++ b/vendor/phpunit/php-code-coverage/build/travis-ci.xml @@ -0,0 +1,21 @@ + + + + + + ../tests/PHP + + + + + + + + + + ../src + + + diff --git a/vendor/phpunit/php-code-coverage/composer.json b/vendor/phpunit/php-code-coverage/composer.json new file mode 100644 index 00000000..55f9fd07 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/composer.json @@ -0,0 +1,50 @@ +{ + "name": "phpunit/php-code-coverage", + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "type": "library", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "irc": "irc://irc.freenode.net/phpunit" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-token-stream": "~1.3", + "phpunit/php-text-template": "~1.2", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4", + "ext-xdebug": ">=2.1.4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + } +} diff --git a/vendor/phpunit/php-code-coverage/phpunit.xml.dist b/vendor/phpunit/php-code-coverage/phpunit.xml.dist new file mode 100644 index 00000000..f5fa606e --- /dev/null +++ b/vendor/phpunit/php-code-coverage/phpunit.xml.dist @@ -0,0 +1,23 @@ + + + + + tests/PHP + + + + + + + + + + + + src + + + + diff --git a/vendor/phpunit/php-code-coverage/scripts/auto_append.php b/vendor/phpunit/php-code-coverage/scripts/auto_append.php new file mode 100644 index 00000000..6cd768d3 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/scripts/auto_append.php @@ -0,0 +1,5 @@ +stop(); + +$writer = new PHP_CodeCoverage_Report_HTML; +$writer->process($coverage, '/tmp/coverage'); diff --git a/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php b/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php new file mode 100644 index 00000000..7a8887a5 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php @@ -0,0 +1,10 @@ +filter(); + +$filter->addFileToBlacklist(__FILE__); +$filter->addFileToBlacklist(dirname(__FILE__) . '/auto_append.php'); + +$coverage->start($_SERVER['SCRIPT_FILENAME']); diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php new file mode 100644 index 00000000..0bb582e5 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php @@ -0,0 +1,919 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use SebastianBergmann\Environment\Runtime; + +/** + * Provides collection functionality for PHP code coverage information. + * + * @since Class available since Release 1.0.0 + */ +class PHP_CodeCoverage +{ + /** + * @var PHP_CodeCoverage_Driver + */ + private $driver; + + /** + * @var PHP_CodeCoverage_Filter + */ + private $filter; + + /** + * @var bool + */ + private $cacheTokens = false; + + /** + * @var bool + */ + private $checkForUnintentionallyCoveredCode = false; + + /** + * @var bool + */ + private $forceCoversAnnotation = false; + + /** + * @var bool + */ + private $mapTestClassNameToCoveredClassName = false; + + /** + * @var bool + */ + private $addUncoveredFilesFromWhitelist = true; + + /** + * @var bool + */ + private $processUncoveredFilesFromWhitelist = false; + + /** + * @var mixed + */ + private $currentId; + + /** + * Code coverage data. + * + * @var array + */ + private $data = array(); + + /** + * @var array + */ + private $ignoredLines = array(); + + /** + * @var bool + */ + private $disableIgnoredLines = false; + + /** + * Test data. + * + * @var array + */ + private $tests = array(); + + /** + * Constructor. + * + * @param PHP_CodeCoverage_Driver $driver + * @param PHP_CodeCoverage_Filter $filter + * @throws PHP_CodeCoverage_Exception + */ + public function __construct(PHP_CodeCoverage_Driver $driver = null, PHP_CodeCoverage_Filter $filter = null) + { + if ($driver === null) { + $driver = $this->selectDriver(); + } + + if ($filter === null) { + $filter = new PHP_CodeCoverage_Filter; + } + + $this->driver = $driver; + $this->filter = $filter; + } + + /** + * Returns the PHP_CodeCoverage_Report_Node_* object graph + * for this PHP_CodeCoverage object. + * + * @return PHP_CodeCoverage_Report_Node_Directory + * @since Method available since Release 1.1.0 + */ + public function getReport() + { + $factory = new PHP_CodeCoverage_Report_Factory; + + return $factory->create($this); + } + + /** + * Clears collected code coverage data. + */ + public function clear() + { + $this->currentId = null; + $this->data = array(); + $this->tests = array(); + } + + /** + * Returns the PHP_CodeCoverage_Filter used. + * + * @return PHP_CodeCoverage_Filter + */ + public function filter() + { + return $this->filter; + } + + /** + * Returns the collected code coverage data. + * Set $raw = true to bypass all filters. + * + * @param bool $raw + * @return array + * @since Method available since Release 1.1.0 + */ + public function getData($raw = false) + { + if (!$raw && $this->addUncoveredFilesFromWhitelist) { + $this->addUncoveredFilesFromWhitelist(); + } + + // We need to apply the blacklist filter a second time + // when no whitelist is used. + if (!$raw && !$this->filter->hasWhitelist()) { + $this->applyListsFilter($this->data); + } + + return $this->data; + } + + /** + * Sets the coverage data. + * + * @param array $data + * @since Method available since Release 2.0.0 + */ + public function setData(array $data) + { + $this->data = $data; + } + + /** + * Returns the test data. + * + * @return array + * @since Method available since Release 1.1.0 + */ + public function getTests() + { + return $this->tests; + } + + /** + * Sets the test data. + * + * @param array $tests + * @since Method available since Release 2.0.0 + */ + public function setTests(array $tests) + { + $this->tests = $tests; + } + + /** + * Start collection of code coverage information. + * + * @param mixed $id + * @param bool $clear + * @throws PHP_CodeCoverage_Exception + */ + public function start($id, $clear = false) + { + if (!is_bool($clear)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'boolean' + ); + } + + if ($clear) { + $this->clear(); + } + + $this->currentId = $id; + + $this->driver->start(); + } + + /** + * Stop collection of code coverage information. + * + * @param bool $append + * @param mixed $linesToBeCovered + * @param array $linesToBeUsed + * @return array + * @throws PHP_CodeCoverage_Exception + */ + public function stop($append = true, $linesToBeCovered = array(), array $linesToBeUsed = array()) + { + if (!is_bool($append)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'boolean' + ); + } + + if (!is_array($linesToBeCovered) && $linesToBeCovered !== false) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 2, + 'array or false' + ); + } + + $data = $this->driver->stop(); + $this->append($data, null, $append, $linesToBeCovered, $linesToBeUsed); + + $this->currentId = null; + + return $data; + } + + /** + * Appends code coverage data. + * + * @param array $data + * @param mixed $id + * @param bool $append + * @param mixed $linesToBeCovered + * @param array $linesToBeUsed + * @throws PHP_CodeCoverage_Exception + */ + public function append(array $data, $id = null, $append = true, $linesToBeCovered = array(), array $linesToBeUsed = array()) + { + if ($id === null) { + $id = $this->currentId; + } + + if ($id === null) { + throw new PHP_CodeCoverage_Exception; + } + + $this->applyListsFilter($data); + $this->applyIgnoredLinesFilter($data); + $this->initializeFilesThatAreSeenTheFirstTime($data); + + if (!$append) { + return; + } + + if ($id != 'UNCOVERED_FILES_FROM_WHITELIST') { + $this->applyCoversAnnotationFilter( + $data, + $linesToBeCovered, + $linesToBeUsed + ); + } + + if (empty($data)) { + return; + } + + $size = 'unknown'; + $status = null; + + if ($id instanceof PHPUnit_Framework_TestCase) { + $_size = $id->getSize(); + + if ($_size == PHPUnit_Util_Test::SMALL) { + $size = 'small'; + } elseif ($_size == PHPUnit_Util_Test::MEDIUM) { + $size = 'medium'; + } elseif ($_size == PHPUnit_Util_Test::LARGE) { + $size = 'large'; + } + + $status = $id->getStatus(); + $id = get_class($id) . '::' . $id->getName(); + } elseif ($id instanceof PHPUnit_Extensions_PhptTestCase) { + $size = 'large'; + $id = $id->getName(); + } + + $this->tests[$id] = array('size' => $size, 'status' => $status); + + foreach ($data as $file => $lines) { + if (!$this->filter->isFile($file)) { + continue; + } + + foreach ($lines as $k => $v) { + if ($v == PHP_CodeCoverage_Driver::LINE_EXECUTED) { + if (empty($this->data[$file][$k]) || !in_array($id, $this->data[$file][$k])) { + $this->data[$file][$k][] = $id; + } + } + } + } + } + + /** + * Merges the data from another instance of PHP_CodeCoverage. + * + * @param PHP_CodeCoverage $that + */ + public function merge(PHP_CodeCoverage $that) + { + foreach ($that->data as $file => $lines) { + if (!isset($this->data[$file])) { + if (!$this->filter->isFiltered($file)) { + $this->data[$file] = $lines; + } + + continue; + } + + foreach ($lines as $line => $data) { + if ($data !== null) { + if (!isset($this->data[$file][$line])) { + $this->data[$file][$line] = $data; + } else { + $this->data[$file][$line] = array_unique( + array_merge($this->data[$file][$line], $data) + ); + } + } + } + } + + $this->tests = array_merge($this->tests, $that->getTests()); + + $this->filter->setBlacklistedFiles( + array_merge($this->filter->getBlacklistedFiles(), $that->filter()->getBlacklistedFiles()) + ); + + $this->filter->setWhitelistedFiles( + array_merge($this->filter->getWhitelistedFiles(), $that->filter()->getWhitelistedFiles()) + ); + } + + /** + * @param bool $flag + * @throws PHP_CodeCoverage_Exception + * @since Method available since Release 1.1.0 + */ + public function setCacheTokens($flag) + { + if (!is_bool($flag)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'boolean' + ); + } + + $this->cacheTokens = $flag; + } + + /** + * @since Method available since Release 1.1.0 + */ + public function getCacheTokens() + { + return $this->cacheTokens; + } + + /** + * @param bool $flag + * @throws PHP_CodeCoverage_Exception + * @since Method available since Release 2.0.0 + */ + public function setCheckForUnintentionallyCoveredCode($flag) + { + if (!is_bool($flag)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'boolean' + ); + } + + $this->checkForUnintentionallyCoveredCode = $flag; + } + + /** + * @param bool $flag + * @throws PHP_CodeCoverage_Exception + */ + public function setForceCoversAnnotation($flag) + { + if (!is_bool($flag)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'boolean' + ); + } + + $this->forceCoversAnnotation = $flag; + } + + /** + * @param bool $flag + * @throws PHP_CodeCoverage_Exception + */ + public function setMapTestClassNameToCoveredClassName($flag) + { + if (!is_bool($flag)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'boolean' + ); + } + + $this->mapTestClassNameToCoveredClassName = $flag; + } + + /** + * @param bool $flag + * @throws PHP_CodeCoverage_Exception + */ + public function setAddUncoveredFilesFromWhitelist($flag) + { + if (!is_bool($flag)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'boolean' + ); + } + + $this->addUncoveredFilesFromWhitelist = $flag; + } + + /** + * @param bool $flag + * @throws PHP_CodeCoverage_Exception + */ + public function setProcessUncoveredFilesFromWhitelist($flag) + { + if (!is_bool($flag)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'boolean' + ); + } + + $this->processUncoveredFilesFromWhitelist = $flag; + } + + /** + * @param bool $flag + * @throws PHP_CodeCoverage_Exception + */ + public function setDisableIgnoredLines($flag) + { + if (!is_bool($flag)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'boolean' + ); + } + + $this->disableIgnoredLines = $flag; + } + + /** + * Applies the @covers annotation filtering. + * + * @param array $data + * @param mixed $linesToBeCovered + * @param array $linesToBeUsed + * @throws PHP_CodeCoverage_Exception_UnintentionallyCoveredCode + */ + private function applyCoversAnnotationFilter(array &$data, $linesToBeCovered, array $linesToBeUsed) + { + if ($linesToBeCovered === false || + ($this->forceCoversAnnotation && empty($linesToBeCovered))) { + $data = array(); + + return; + } + + if (empty($linesToBeCovered)) { + return; + } + + if ($this->checkForUnintentionallyCoveredCode) { + $this->performUnintentionallyCoveredCodeCheck( + $data, + $linesToBeCovered, + $linesToBeUsed + ); + } + + $data = array_intersect_key($data, $linesToBeCovered); + + foreach (array_keys($data) as $filename) { + $_linesToBeCovered = array_flip($linesToBeCovered[$filename]); + + $data[$filename] = array_intersect_key( + $data[$filename], + $_linesToBeCovered + ); + } + } + + /** + * Applies the blacklist/whitelist filtering. + * + * @param array $data + */ + private function applyListsFilter(array &$data) + { + foreach (array_keys($data) as $filename) { + if ($this->filter->isFiltered($filename)) { + unset($data[$filename]); + } + } + } + + /** + * Applies the "ignored lines" filtering. + * + * @param array $data + */ + private function applyIgnoredLinesFilter(array &$data) + { + foreach (array_keys($data) as $filename) { + if (!$this->filter->isFile($filename)) { + continue; + } + + foreach ($this->getLinesToBeIgnored($filename) as $line) { + unset($data[$filename][$line]); + } + } + } + + /** + * @param array $data + * @since Method available since Release 1.1.0 + */ + private function initializeFilesThatAreSeenTheFirstTime(array $data) + { + foreach ($data as $file => $lines) { + if ($this->filter->isFile($file) && !isset($this->data[$file])) { + $this->data[$file] = array(); + + foreach ($lines as $k => $v) { + $this->data[$file][$k] = $v == -2 ? null : array(); + } + } + } + } + + /** + * Processes whitelisted files that are not covered. + */ + private function addUncoveredFilesFromWhitelist() + { + $data = array(); + $uncoveredFiles = array_diff( + $this->filter->getWhitelist(), + array_keys($this->data) + ); + + foreach ($uncoveredFiles as $uncoveredFile) { + if (!file_exists($uncoveredFile)) { + continue; + } + + if ($this->processUncoveredFilesFromWhitelist) { + $this->processUncoveredFileFromWhitelist( + $uncoveredFile, + $data, + $uncoveredFiles + ); + } else { + $data[$uncoveredFile] = array(); + + $lines = count(file($uncoveredFile)); + + for ($i = 1; $i <= $lines; $i++) { + $data[$uncoveredFile][$i] = PHP_CodeCoverage_Driver::LINE_NOT_EXECUTED; + } + } + } + + $this->append($data, 'UNCOVERED_FILES_FROM_WHITELIST'); + } + + /** + * @param string $uncoveredFile + * @param array $data + * @param array $uncoveredFiles + */ + private function processUncoveredFileFromWhitelist($uncoveredFile, array &$data, array $uncoveredFiles) + { + $this->driver->start(); + include_once $uncoveredFile; + $coverage = $this->driver->stop(); + + foreach ($coverage as $file => $fileCoverage) { + if (!isset($data[$file]) && + in_array($file, $uncoveredFiles)) { + foreach (array_keys($fileCoverage) as $key) { + if ($fileCoverage[$key] == PHP_CodeCoverage_Driver::LINE_EXECUTED) { + $fileCoverage[$key] = PHP_CodeCoverage_Driver::LINE_NOT_EXECUTED; + } + } + + $data[$file] = $fileCoverage; + } + } + } + + /** + * Returns the lines of a source file that should be ignored. + * + * @param string $filename + * @return array + * @throws PHP_CodeCoverage_Exception + * @since Method available since Release 2.0.0 + */ + private function getLinesToBeIgnored($filename) + { + if (!is_string($filename)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'string' + ); + } + + if (!isset($this->ignoredLines[$filename])) { + $this->ignoredLines[$filename] = array(); + + if ($this->disableIgnoredLines) { + return $this->ignoredLines[$filename]; + } + + $ignore = false; + $stop = false; + $lines = file($filename); + $numLines = count($lines); + + foreach ($lines as $index => $line) { + if (!trim($line)) { + $this->ignoredLines[$filename][] = $index + 1; + } + } + + if ($this->cacheTokens) { + $tokens = PHP_Token_Stream_CachingFactory::get($filename); + } else { + $tokens = new PHP_Token_Stream($filename); + } + + $classes = array_merge($tokens->getClasses(), $tokens->getTraits()); + $tokens = $tokens->tokens(); + + foreach ($tokens as $token) { + switch (get_class($token)) { + case 'PHP_Token_COMMENT': + case 'PHP_Token_DOC_COMMENT': + $_token = trim($token); + $_line = trim($lines[$token->getLine() - 1]); + + if ($_token == '// @codeCoverageIgnore' || + $_token == '//@codeCoverageIgnore') { + $ignore = true; + $stop = true; + } elseif ($_token == '// @codeCoverageIgnoreStart' || + $_token == '//@codeCoverageIgnoreStart') { + $ignore = true; + } elseif ($_token == '// @codeCoverageIgnoreEnd' || + $_token == '//@codeCoverageIgnoreEnd') { + $stop = true; + } + + if (!$ignore) { + $start = $token->getLine(); + $end = $start + substr_count($token, "\n"); + + // Do not ignore the first line when there is a token + // before the comment + if (0 !== strpos($_token, $_line)) { + $start++; + } + + for ($i = $start; $i < $end; $i++) { + $this->ignoredLines[$filename][] = $i; + } + + // A DOC_COMMENT token or a COMMENT token starting with "/*" + // does not contain the final \n character in its text + if (isset($lines[$i-1]) && 0 === strpos($_token, '/*') && '*/' === substr(trim($lines[$i-1]), -2)) { + $this->ignoredLines[$filename][] = $i; + } + } + break; + + case 'PHP_Token_INTERFACE': + case 'PHP_Token_TRAIT': + case 'PHP_Token_CLASS': + case 'PHP_Token_FUNCTION': + $docblock = $token->getDocblock(); + + $this->ignoredLines[$filename][] = $token->getLine(); + + if (strpos($docblock, '@codeCoverageIgnore') || strpos($docblock, '@deprecated')) { + $endLine = $token->getEndLine(); + + for ($i = $token->getLine(); $i <= $endLine; $i++) { + $this->ignoredLines[$filename][] = $i; + } + } elseif ($token instanceof PHP_Token_INTERFACE || + $token instanceof PHP_Token_TRAIT || + $token instanceof PHP_Token_CLASS) { + if (empty($classes[$token->getName()]['methods'])) { + for ($i = $token->getLine(); + $i <= $token->getEndLine(); + $i++) { + $this->ignoredLines[$filename][] = $i; + } + } else { + $firstMethod = array_shift( + $classes[$token->getName()]['methods'] + ); + + do { + $lastMethod = array_pop( + $classes[$token->getName()]['methods'] + ); + } while ($lastMethod !== null && + substr($lastMethod['signature'], 0, 18) == 'anonymous function'); + + if ($lastMethod === null) { + $lastMethod = $firstMethod; + } + + for ($i = $token->getLine(); + $i < $firstMethod['startLine']; + $i++) { + $this->ignoredLines[$filename][] = $i; + } + + for ($i = $token->getEndLine(); + $i > $lastMethod['endLine']; + $i--) { + $this->ignoredLines[$filename][] = $i; + } + } + } + break; + + case 'PHP_Token_NAMESPACE': + $this->ignoredLines[$filename][] = $token->getEndLine(); + + // Intentional fallthrough + case 'PHP_Token_OPEN_TAG': + case 'PHP_Token_CLOSE_TAG': + case 'PHP_Token_USE': + $this->ignoredLines[$filename][] = $token->getLine(); + break; + } + + if ($ignore) { + $this->ignoredLines[$filename][] = $token->getLine(); + + if ($stop) { + $ignore = false; + $stop = false; + } + } + } + + $this->ignoredLines[$filename][] = $numLines + 1; + + $this->ignoredLines[$filename] = array_unique( + $this->ignoredLines[$filename] + ); + + sort($this->ignoredLines[$filename]); + } + + return $this->ignoredLines[$filename]; + } + + /** + * @param array $data + * @param array $linesToBeCovered + * @param array $linesToBeUsed + * @throws PHP_CodeCoverage_Exception_UnintentionallyCoveredCode + * @since Method available since Release 2.0.0 + */ + private function performUnintentionallyCoveredCodeCheck(array &$data, array $linesToBeCovered, array $linesToBeUsed) + { + $allowedLines = $this->getAllowedLines( + $linesToBeCovered, + $linesToBeUsed + ); + + $message = ''; + + foreach ($data as $file => $_data) { + foreach ($_data as $line => $flag) { + if ($flag == 1 && + (!isset($allowedLines[$file]) || + !isset($allowedLines[$file][$line]))) { + $message .= sprintf( + '- %s:%d' . PHP_EOL, + $file, + $line + ); + } + } + } + + if (!empty($message)) { + throw new PHP_CodeCoverage_Exception_UnintentionallyCoveredCode( + $message + ); + } + } + + /** + * @param array $linesToBeCovered + * @param array $linesToBeUsed + * @return array + * @since Method available since Release 2.0.0 + */ + private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed) + { + $allowedLines = array(); + + foreach (array_keys($linesToBeCovered) as $file) { + if (!isset($allowedLines[$file])) { + $allowedLines[$file] = array(); + } + + $allowedLines[$file] = array_merge( + $allowedLines[$file], + $linesToBeCovered[$file] + ); + } + + foreach (array_keys($linesToBeUsed) as $file) { + if (!isset($allowedLines[$file])) { + $allowedLines[$file] = array(); + } + + $allowedLines[$file] = array_merge( + $allowedLines[$file], + $linesToBeUsed[$file] + ); + } + + foreach (array_keys($allowedLines) as $file) { + $allowedLines[$file] = array_flip( + array_unique($allowedLines[$file]) + ); + } + + return $allowedLines; + } + + /** + * @return PHP_CodeCoverage_Driver + * @throws PHP_CodeCoverage_Exception + */ + private function selectDriver() + { + $runtime = new Runtime; + + if (!$runtime->canCollectCodeCoverage()) { + throw new PHP_CodeCoverage_Exception('No code coverage driver available'); + } + + if ($runtime->isHHVM()) { + return new PHP_CodeCoverage_Driver_HHVM; + } elseif ($runtime->isPHPDBG()) { + return new PHP_CodeCoverage_Driver_PHPDBG; + } else { + return new PHP_CodeCoverage_Driver_Xdebug; + } + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php new file mode 100644 index 00000000..8635acef --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Interface for code coverage drivers. + * + * @since Class available since Release 1.0.0 + */ +interface PHP_CodeCoverage_Driver +{ + /** + * @var int + * @see http://xdebug.org/docs/code_coverage + */ + const LINE_EXECUTED = 1; + + /** + * @var int + * @see http://xdebug.org/docs/code_coverage + */ + const LINE_NOT_EXECUTED = -1; + + /** + * @var int + * @see http://xdebug.org/docs/code_coverage + */ + const LINE_NOT_EXECUTABLE = -2; + + /** + * Start collection of code coverage information. + */ + public function start(); + + /** + * Stop collection of code coverage information. + * + * @return array + */ + public function stop(); +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php new file mode 100644 index 00000000..a9d8f0ce --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Driver for HHVM's code coverage functionality. + * + * @since Class available since Release 2.2.2 + * @codeCoverageIgnore + */ +class PHP_CodeCoverage_Driver_HHVM extends PHP_CodeCoverage_Driver_Xdebug +{ + /** + * Start collection of code coverage information. + */ + public function start() + { + xdebug_start_code_coverage(); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php new file mode 100644 index 00000000..f3eb6214 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Driver for PHPDBG's code coverage functionality. + * + * @since Class available since Release 2.2.0 + * @codeCoverageIgnore + */ +class PHP_CodeCoverage_Driver_PHPDBG implements PHP_CodeCoverage_Driver +{ + /** + * Constructor. + */ + public function __construct() + { + if (PHP_SAPI !== 'phpdbg') { + throw new PHP_CodeCoverage_Exception( + 'This driver requires the PHPDBG SAPI' + ); + } + + if (!function_exists('phpdbg_start_oplog')) { + throw new PHP_CodeCoverage_Exception( + 'This build of PHPDBG does not support code coverage' + ); + } + } + + /** + * Start collection of code coverage information. + */ + public function start() + { + phpdbg_start_oplog(); + } + + /** + * Stop collection of code coverage information. + * + * @return array + */ + public function stop() + { + static $fetchedLines = array(); + + $dbgData = phpdbg_end_oplog(); + + if ($fetchedLines == array()) { + $sourceLines = phpdbg_get_executable(); + } else { + $newFiles = array_diff( + get_included_files(), + array_keys($fetchedLines) + ); + + if ($newFiles) { + $sourceLines = phpdbg_get_executable( + array('files' => $newFiles) + ); + } else { + $sourceLines = array(); + } + } + + foreach ($sourceLines as $file => $lines) { + foreach ($lines as $lineNo => $numExecuted) { + $sourceLines[$file][$lineNo] = self::LINE_NOT_EXECUTED; + } + } + + $fetchedLines = array_merge($fetchedLines, $sourceLines); + + return $this->detectExecutedLines($fetchedLines, $dbgData); + } + + /** + * Convert phpdbg based data into the format CodeCoverage expects + * + * @param array $sourceLines + * @param array $dbgData + * @return array + */ + private function detectExecutedLines(array $sourceLines, array $dbgData) + { + foreach ($dbgData as $file => $coveredLines) { + foreach ($coveredLines as $lineNo => $numExecuted) { + // phpdbg also reports $lineNo=0 when e.g. exceptions get thrown. + // make sure we only mark lines executed which are actually executable. + if (isset($sourceLines[$file][$lineNo])) { + $sourceLines[$file][$lineNo] = self::LINE_EXECUTED; + } + } + } + + return $sourceLines; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php new file mode 100644 index 00000000..0cd7b9ad --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Driver for Xdebug's code coverage functionality. + * + * @since Class available since Release 1.0.0 + * @codeCoverageIgnore + */ +class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver +{ + /** + * Constructor. + */ + public function __construct() + { + if (!extension_loaded('xdebug')) { + throw new PHP_CodeCoverage_Exception('This driver requires Xdebug'); + } + + if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') && + !ini_get('xdebug.coverage_enable')) { + throw new PHP_CodeCoverage_Exception( + 'xdebug.coverage_enable=On has to be set in php.ini' + ); + } + } + + /** + * Start collection of code coverage information. + */ + public function start() + { + xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); + } + + /** + * Stop collection of code coverage information. + * + * @return array + */ + public function stop() + { + $data = xdebug_get_code_coverage(); + xdebug_stop_code_coverage(); + + return $this->cleanup($data); + } + + /** + * @param array $data + * @return array + * @since Method available since Release 2.0.0 + */ + private function cleanup(array $data) + { + foreach (array_keys($data) as $file) { + unset($data[$file][0]); + + if ($file != 'xdebug://debug-eval' && file_exists($file)) { + $numLines = $this->getNumberOfLinesInFile($file); + + foreach (array_keys($data[$file]) as $line) { + if (isset($data[$file][$line]) && $line > $numLines) { + unset($data[$file][$line]); + } + } + } + } + + return $data; + } + + /** + * @param string $file + * @return int + * @since Method available since Release 2.0.0 + */ + private function getNumberOfLinesInFile($file) + { + $buffer = file_get_contents($file); + $lines = substr_count($buffer, "\n"); + + if (substr($buffer, -1) !== "\n") { + $lines++; + } + + return $lines; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php new file mode 100644 index 00000000..bded3c09 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Exception class for PHP_CodeCoverage component. + * + * @since Class available since Release 1.1.0 + */ +class PHP_CodeCoverage_Exception extends RuntimeException +{ +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php new file mode 100644 index 00000000..463785ef --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Exception that is raised when code is unintentionally covered. + * + * @since Class available since Release 2.0.0 + */ +class PHP_CodeCoverage_Exception_UnintentionallyCoveredCode extends PHP_CodeCoverage_Exception +{ +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php new file mode 100644 index 00000000..fd5b6aa2 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php @@ -0,0 +1,292 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Filter for blacklisting and whitelisting of code coverage information. + * + * @since Class available since Release 1.0.0 + */ +class PHP_CodeCoverage_Filter +{ + /** + * Source files that are blacklisted. + * + * @var array + */ + private $blacklistedFiles = array(); + + /** + * Source files that are whitelisted. + * + * @var array + */ + private $whitelistedFiles = array(); + + /** + * Adds a directory to the blacklist (recursively). + * + * @param string $directory + * @param string $suffix + * @param string $prefix + */ + public function addDirectoryToBlacklist($directory, $suffix = '.php', $prefix = '') + { + $facade = new File_Iterator_Facade; + $files = $facade->getFilesAsArray($directory, $suffix, $prefix); + + foreach ($files as $file) { + $this->addFileToBlacklist($file); + } + } + + /** + * Adds a file to the blacklist. + * + * @param string $filename + */ + public function addFileToBlacklist($filename) + { + $this->blacklistedFiles[realpath($filename)] = true; + } + + /** + * Adds files to the blacklist. + * + * @param array $files + */ + public function addFilesToBlacklist(array $files) + { + foreach ($files as $file) { + $this->addFileToBlacklist($file); + } + } + + /** + * Removes a directory from the blacklist (recursively). + * + * @param string $directory + * @param string $suffix + * @param string $prefix + */ + public function removeDirectoryFromBlacklist($directory, $suffix = '.php', $prefix = '') + { + $facade = new File_Iterator_Facade; + $files = $facade->getFilesAsArray($directory, $suffix, $prefix); + + foreach ($files as $file) { + $this->removeFileFromBlacklist($file); + } + } + + /** + * Removes a file from the blacklist. + * + * @param string $filename + */ + public function removeFileFromBlacklist($filename) + { + $filename = realpath($filename); + + if (isset($this->blacklistedFiles[$filename])) { + unset($this->blacklistedFiles[$filename]); + } + } + + /** + * Adds a directory to the whitelist (recursively). + * + * @param string $directory + * @param string $suffix + * @param string $prefix + */ + public function addDirectoryToWhitelist($directory, $suffix = '.php', $prefix = '') + { + $facade = new File_Iterator_Facade; + $files = $facade->getFilesAsArray($directory, $suffix, $prefix); + + foreach ($files as $file) { + $this->addFileToWhitelist($file); + } + } + + /** + * Adds a file to the whitelist. + * + * @param string $filename + */ + public function addFileToWhitelist($filename) + { + $this->whitelistedFiles[realpath($filename)] = true; + } + + /** + * Adds files to the whitelist. + * + * @param array $files + */ + public function addFilesToWhitelist(array $files) + { + foreach ($files as $file) { + $this->addFileToWhitelist($file); + } + } + + /** + * Removes a directory from the whitelist (recursively). + * + * @param string $directory + * @param string $suffix + * @param string $prefix + */ + public function removeDirectoryFromWhitelist($directory, $suffix = '.php', $prefix = '') + { + $facade = new File_Iterator_Facade; + $files = $facade->getFilesAsArray($directory, $suffix, $prefix); + + foreach ($files as $file) { + $this->removeFileFromWhitelist($file); + } + } + + /** + * Removes a file from the whitelist. + * + * @param string $filename + */ + public function removeFileFromWhitelist($filename) + { + $filename = realpath($filename); + + if (isset($this->whitelistedFiles[$filename])) { + unset($this->whitelistedFiles[$filename]); + } + } + + /** + * Checks whether a filename is a real filename. + * + * @param string $filename + */ + public function isFile($filename) + { + if ($filename == '-' || + strpos($filename, 'vfs://') === 0 || + strpos($filename, 'xdebug://debug-eval') !== false || + strpos($filename, 'eval()\'d code') !== false || + strpos($filename, 'runtime-created function') !== false || + strpos($filename, 'runkit created function') !== false || + strpos($filename, 'assert code') !== false || + strpos($filename, 'regexp code') !== false) { + return false; + } + + return file_exists($filename); + } + + /** + * Checks whether or not a file is filtered. + * + * When the whitelist is empty (default), blacklisting is used. + * When the whitelist is not empty, whitelisting is used. + * + * @param string $filename + * @return bool + * @throws PHP_CodeCoverage_Exception + */ + public function isFiltered($filename) + { + if (!$this->isFile($filename)) { + return true; + } + + $filename = realpath($filename); + + if (!empty($this->whitelistedFiles)) { + return !isset($this->whitelistedFiles[$filename]); + } + + return isset($this->blacklistedFiles[$filename]); + } + + /** + * Returns the list of blacklisted files. + * + * @return array + */ + public function getBlacklist() + { + return array_keys($this->blacklistedFiles); + } + + /** + * Returns the list of whitelisted files. + * + * @return array + */ + public function getWhitelist() + { + return array_keys($this->whitelistedFiles); + } + + /** + * Returns whether this filter has a whitelist. + * + * @return bool + * @since Method available since Release 1.1.0 + */ + public function hasWhitelist() + { + return !empty($this->whitelistedFiles); + } + + /** + * Returns the blacklisted files. + * + * @return array + * @since Method available since Release 2.0.0 + */ + public function getBlacklistedFiles() + { + return $this->blacklistedFiles; + } + + /** + * Sets the blacklisted files. + * + * @param array $blacklistedFiles + * @since Method available since Release 2.0.0 + */ + public function setBlacklistedFiles($blacklistedFiles) + { + $this->blacklistedFiles = $blacklistedFiles; + } + + /** + * Returns the whitelisted files. + * + * @return array + * @since Method available since Release 2.0.0 + */ + public function getWhitelistedFiles() + { + return $this->whitelistedFiles; + } + + /** + * Sets the whitelisted files. + * + * @param array $whitelistedFiles + * @since Method available since Release 2.0.0 + */ + public function setWhitelistedFiles($whitelistedFiles) + { + $this->whitelistedFiles = $whitelistedFiles; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php new file mode 100644 index 00000000..c0ea8d82 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php @@ -0,0 +1,284 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Generates a Clover XML logfile from an PHP_CodeCoverage object. + * + * @since Class available since Release 1.0.0 + */ +class PHP_CodeCoverage_Report_Clover +{ + /** + * @param PHP_CodeCoverage $coverage + * @param string $target + * @param string $name + * @return string + */ + public function process(PHP_CodeCoverage $coverage, $target = null, $name = null) + { + $xmlDocument = new DOMDocument('1.0', 'UTF-8'); + $xmlDocument->formatOutput = true; + + $xmlCoverage = $xmlDocument->createElement('coverage'); + $xmlCoverage->setAttribute('generated', (int) $_SERVER['REQUEST_TIME']); + $xmlDocument->appendChild($xmlCoverage); + + $xmlProject = $xmlDocument->createElement('project'); + $xmlProject->setAttribute('timestamp', (int) $_SERVER['REQUEST_TIME']); + + if (is_string($name)) { + $xmlProject->setAttribute('name', $name); + } + + $xmlCoverage->appendChild($xmlProject); + + $packages = array(); + $report = $coverage->getReport(); + unset($coverage); + + foreach ($report as $item) { + $namespace = 'global'; + + if (!$item instanceof PHP_CodeCoverage_Report_Node_File) { + continue; + } + + $xmlFile = $xmlDocument->createElement('file'); + $xmlFile->setAttribute('name', $item->getPath()); + + $classes = $item->getClassesAndTraits(); + $coverage = $item->getCoverageData(); + $lines = array(); + + foreach ($classes as $className => $class) { + $classStatements = 0; + $coveredClassStatements = 0; + $coveredMethods = 0; + $classMethods = 0; + + foreach ($class['methods'] as $methodName => $method) { + if ($method['executableLines'] == 0) { + continue; + } + + $classMethods++; + $classStatements += $method['executableLines']; + $coveredClassStatements += $method['executedLines']; + if ($method['coverage'] == 100) { + $coveredMethods++; + } + + $methodCount = 0; + for ($i = $method['startLine']; + $i <= $method['endLine']; + $i++) { + if (isset($coverage[$i]) && ($coverage[$i] !== null)) { + $methodCount = max($methodCount, count($coverage[$i])); + } + } + + $lines[$method['startLine']] = array( + 'count' => $methodCount, + 'crap' => $method['crap'], + 'type' => 'method', + 'name' => $methodName + ); + } + + if (!empty($class['package']['namespace'])) { + $namespace = $class['package']['namespace']; + } + + $xmlClass = $xmlDocument->createElement('class'); + $xmlClass->setAttribute('name', $className); + $xmlClass->setAttribute('namespace', $namespace); + + if (!empty($class['package']['fullPackage'])) { + $xmlClass->setAttribute( + 'fullPackage', + $class['package']['fullPackage'] + ); + } + + if (!empty($class['package']['category'])) { + $xmlClass->setAttribute( + 'category', + $class['package']['category'] + ); + } + + if (!empty($class['package']['package'])) { + $xmlClass->setAttribute( + 'package', + $class['package']['package'] + ); + } + + if (!empty($class['package']['subpackage'])) { + $xmlClass->setAttribute( + 'subpackage', + $class['package']['subpackage'] + ); + } + + $xmlFile->appendChild($xmlClass); + + $xmlMetrics = $xmlDocument->createElement('metrics'); + $xmlMetrics->setAttribute('methods', $classMethods); + $xmlMetrics->setAttribute('coveredmethods', $coveredMethods); + $xmlMetrics->setAttribute('conditionals', 0); + $xmlMetrics->setAttribute('coveredconditionals', 0); + $xmlMetrics->setAttribute('statements', $classStatements); + $xmlMetrics->setAttribute( + 'coveredstatements', + $coveredClassStatements + ); + $xmlMetrics->setAttribute( + 'elements', + $classMethods + + $classStatements + /* + conditionals */ + ); + $xmlMetrics->setAttribute( + 'coveredelements', + $coveredMethods + + $coveredClassStatements + /* + coveredconditionals */ + ); + $xmlClass->appendChild($xmlMetrics); + } + + foreach ($coverage as $line => $data) { + if ($data === null || isset($lines[$line])) { + continue; + } + + $lines[$line] = array( + 'count' => count($data), 'type' => 'stmt' + ); + } + + ksort($lines); + + foreach ($lines as $line => $data) { + $xmlLine = $xmlDocument->createElement('line'); + $xmlLine->setAttribute('num', $line); + $xmlLine->setAttribute('type', $data['type']); + + if (isset($data['name'])) { + $xmlLine->setAttribute('name', $data['name']); + } + + if (isset($data['crap'])) { + $xmlLine->setAttribute('crap', $data['crap']); + } + + $xmlLine->setAttribute('count', $data['count']); + $xmlFile->appendChild($xmlLine); + } + + $linesOfCode = $item->getLinesOfCode(); + + $xmlMetrics = $xmlDocument->createElement('metrics'); + $xmlMetrics->setAttribute('loc', $linesOfCode['loc']); + $xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']); + $xmlMetrics->setAttribute('classes', $item->getNumClassesAndTraits()); + $xmlMetrics->setAttribute('methods', $item->getNumMethods()); + $xmlMetrics->setAttribute( + 'coveredmethods', + $item->getNumTestedMethods() + ); + $xmlMetrics->setAttribute('conditionals', 0); + $xmlMetrics->setAttribute('coveredconditionals', 0); + $xmlMetrics->setAttribute( + 'statements', + $item->getNumExecutableLines() + ); + $xmlMetrics->setAttribute( + 'coveredstatements', + $item->getNumExecutedLines() + ); + $xmlMetrics->setAttribute( + 'elements', + $item->getNumMethods() + $item->getNumExecutableLines() + /* + conditionals */ + ); + $xmlMetrics->setAttribute( + 'coveredelements', + $item->getNumTestedMethods() + $item->getNumExecutedLines() + /* + coveredconditionals */ + ); + $xmlFile->appendChild($xmlMetrics); + + if ($namespace == 'global') { + $xmlProject->appendChild($xmlFile); + } else { + if (!isset($packages[$namespace])) { + $packages[$namespace] = $xmlDocument->createElement( + 'package' + ); + + $packages[$namespace]->setAttribute('name', $namespace); + $xmlProject->appendChild($packages[$namespace]); + } + + $packages[$namespace]->appendChild($xmlFile); + } + } + + $linesOfCode = $report->getLinesOfCode(); + + $xmlMetrics = $xmlDocument->createElement('metrics'); + $xmlMetrics->setAttribute('files', count($report)); + $xmlMetrics->setAttribute('loc', $linesOfCode['loc']); + $xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']); + $xmlMetrics->setAttribute( + 'classes', + $report->getNumClassesAndTraits() + ); + $xmlMetrics->setAttribute('methods', $report->getNumMethods()); + $xmlMetrics->setAttribute( + 'coveredmethods', + $report->getNumTestedMethods() + ); + $xmlMetrics->setAttribute('conditionals', 0); + $xmlMetrics->setAttribute('coveredconditionals', 0); + $xmlMetrics->setAttribute( + 'statements', + $report->getNumExecutableLines() + ); + $xmlMetrics->setAttribute( + 'coveredstatements', + $report->getNumExecutedLines() + ); + $xmlMetrics->setAttribute( + 'elements', + $report->getNumMethods() + $report->getNumExecutableLines() + /* + conditionals */ + ); + $xmlMetrics->setAttribute( + 'coveredelements', + $report->getNumTestedMethods() + $report->getNumExecutedLines() + /* + coveredconditionals */ + ); + + $xmlProject->appendChild($xmlMetrics); + + if ($target !== null) { + if (!is_dir(dirname($target))) { + mkdir(dirname($target), 0777, true); + } + + return $xmlDocument->save($target); + } else { + return $xmlDocument->saveXML(); + } + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php new file mode 100644 index 00000000..2deced2c --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * @since Class available since Release 2.0.0 + */ +class PHP_CodeCoverage_Report_Crap4j +{ + /** + * @var int + */ + private $threshold; + + /** + * @param int $threshold + */ + public function __construct($threshold = 30) + { + if (!is_int($threshold)) { + throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + 1, + 'integer' + ); + } + + $this->threshold = $threshold; + } + + /** + * @param PHP_CodeCoverage $coverage + * @param string $target + * @param string $name + * @return string + */ + public function process(PHP_CodeCoverage $coverage, $target = null, $name = null) + { + $document = new DOMDocument('1.0', 'UTF-8'); + $document->formatOutput = true; + + $root = $document->createElement('crap_result'); + $document->appendChild($root); + + $project = $document->createElement('project', is_string($name) ? $name : ''); + $root->appendChild($project); + $root->appendChild($document->createElement('timestamp', date('Y-m-d H:i:s', (int) $_SERVER['REQUEST_TIME']))); + + $stats = $document->createElement('stats'); + $methodsNode = $document->createElement('methods'); + + $report = $coverage->getReport(); + unset($coverage); + + $fullMethodCount = 0; + $fullCrapMethodCount = 0; + $fullCrapLoad = 0; + $fullCrap = 0; + + foreach ($report as $item) { + $namespace = 'global'; + + if (!$item instanceof PHP_CodeCoverage_Report_Node_File) { + continue; + } + + $file = $document->createElement('file'); + $file->setAttribute('name', $item->getPath()); + + $classes = $item->getClassesAndTraits(); + + foreach ($classes as $className => $class) { + foreach ($class['methods'] as $methodName => $method) { + $crapLoad = $this->getCrapLoad($method['crap'], $method['ccn'], $method['coverage']); + + $fullCrap += $method['crap']; + $fullCrapLoad += $crapLoad; + $fullMethodCount++; + + if ($method['crap'] >= $this->threshold) { + $fullCrapMethodCount++; + } + + $methodNode = $document->createElement('method'); + + if (!empty($class['package']['namespace'])) { + $namespace = $class['package']['namespace']; + } + + $methodNode->appendChild($document->createElement('package', $namespace)); + $methodNode->appendChild($document->createElement('className', $className)); + $methodNode->appendChild($document->createElement('methodName', $methodName)); + $methodNode->appendChild($document->createElement('methodSignature', htmlspecialchars($method['signature']))); + $methodNode->appendChild($document->createElement('fullMethod', htmlspecialchars($method['signature']))); + $methodNode->appendChild($document->createElement('crap', $this->roundValue($method['crap']))); + $methodNode->appendChild($document->createElement('complexity', $method['ccn'])); + $methodNode->appendChild($document->createElement('coverage', $this->roundValue($method['coverage']))); + $methodNode->appendChild($document->createElement('crapLoad', round($crapLoad))); + + $methodsNode->appendChild($methodNode); + } + } + } + + $stats->appendChild($document->createElement('name', 'Method Crap Stats')); + $stats->appendChild($document->createElement('methodCount', $fullMethodCount)); + $stats->appendChild($document->createElement('crapMethodCount', $fullCrapMethodCount)); + $stats->appendChild($document->createElement('crapLoad', round($fullCrapLoad))); + $stats->appendChild($document->createElement('totalCrap', $fullCrap)); + + if ($fullMethodCount > 0) { + $crapMethodPercent = $this->roundValue((100 * $fullCrapMethodCount) / $fullMethodCount); + } else { + $crapMethodPercent = ''; + } + + $stats->appendChild($document->createElement('crapMethodPercent', $crapMethodPercent)); + + $root->appendChild($stats); + $root->appendChild($methodsNode); + + if ($target !== null) { + if (!is_dir(dirname($target))) { + mkdir(dirname($target), 0777, true); + } + + return $document->save($target); + } else { + return $document->saveXML(); + } + } + + /** + * @param float $crapValue + * @param int $cyclomaticComplexity + * @param float $coveragePercent + * @return float + */ + private function getCrapLoad($crapValue, $cyclomaticComplexity, $coveragePercent) + { + $crapLoad = 0; + + if ($crapValue >= $this->threshold) { + $crapLoad += $cyclomaticComplexity * (1.0 - $coveragePercent / 100); + $crapLoad += $cyclomaticComplexity / $this->threshold; + } + + return $crapLoad; + } + + /** + * @param float $value + * @return float + */ + private function roundValue($value) + { + return round($value, 2); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php new file mode 100644 index 00000000..b28964e8 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php @@ -0,0 +1,242 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Factory for PHP_CodeCoverage_Report_Node_* object graphs. + * + * @since Class available since Release 1.1.0 + */ +class PHP_CodeCoverage_Report_Factory +{ + /** + * @param PHP_CodeCoverage $coverage + * @return PHP_CodeCoverage_Report_Node_Directory + */ + public function create(PHP_CodeCoverage $coverage) + { + $files = $coverage->getData(); + $commonPath = $this->reducePaths($files); + $root = new PHP_CodeCoverage_Report_Node_Directory( + $commonPath, + null + ); + + $this->addItems( + $root, + $this->buildDirectoryStructure($files), + $coverage->getTests(), + $coverage->getCacheTokens() + ); + + return $root; + } + + /** + * @param PHP_CodeCoverage_Report_Node_Directory $root + * @param array $items + * @param array $tests + * @param bool $cacheTokens + */ + private function addItems(PHP_CodeCoverage_Report_Node_Directory $root, array $items, array $tests, $cacheTokens) + { + foreach ($items as $key => $value) { + if (substr($key, -2) == '/f') { + $key = substr($key, 0, -2); + + if (file_exists($root->getPath() . DIRECTORY_SEPARATOR . $key)) { + $root->addFile($key, $value, $tests, $cacheTokens); + } + } else { + $child = $root->addDirectory($key); + $this->addItems($child, $value, $tests, $cacheTokens); + } + } + } + + /** + * Builds an array representation of the directory structure. + * + * For instance, + * + * + * Array + * ( + * [Money.php] => Array + * ( + * ... + * ) + * + * [MoneyBag.php] => Array + * ( + * ... + * ) + * ) + * + * + * is transformed into + * + * + * Array + * ( + * [.] => Array + * ( + * [Money.php] => Array + * ( + * ... + * ) + * + * [MoneyBag.php] => Array + * ( + * ... + * ) + * ) + * ) + * + * + * @param array $files + * @return array + */ + private function buildDirectoryStructure($files) + { + $result = array(); + + foreach ($files as $path => $file) { + $path = explode('/', $path); + $pointer = &$result; + $max = count($path); + + for ($i = 0; $i < $max; $i++) { + if ($i == ($max - 1)) { + $type = '/f'; + } else { + $type = ''; + } + + $pointer = &$pointer[$path[$i] . $type]; + } + + $pointer = $file; + } + + return $result; + } + + /** + * Reduces the paths by cutting the longest common start path. + * + * For instance, + * + * + * Array + * ( + * [/home/sb/Money/Money.php] => Array + * ( + * ... + * ) + * + * [/home/sb/Money/MoneyBag.php] => Array + * ( + * ... + * ) + * ) + * + * + * is reduced to + * + * + * Array + * ( + * [Money.php] => Array + * ( + * ... + * ) + * + * [MoneyBag.php] => Array + * ( + * ... + * ) + * ) + * + * + * @param array $files + * @return string + */ + private function reducePaths(&$files) + { + if (empty($files)) { + return '.'; + } + + $commonPath = ''; + $paths = array_keys($files); + + if (count($files) == 1) { + $commonPath = dirname($paths[0]) . '/'; + $files[basename($paths[0])] = $files[$paths[0]]; + + unset($files[$paths[0]]); + + return $commonPath; + } + + $max = count($paths); + + for ($i = 0; $i < $max; $i++) { + // strip phar:// prefixes + if (strpos($paths[$i], 'phar://') === 0) { + $paths[$i] = substr($paths[$i], 7); + $paths[$i] = strtr($paths[$i], '/', DIRECTORY_SEPARATOR); + } + $paths[$i] = explode(DIRECTORY_SEPARATOR, $paths[$i]); + + if (empty($paths[$i][0])) { + $paths[$i][0] = DIRECTORY_SEPARATOR; + } + } + + $done = false; + $max = count($paths); + + while (!$done) { + for ($i = 0; $i < $max - 1; $i++) { + if (!isset($paths[$i][0]) || + !isset($paths[$i+1][0]) || + $paths[$i][0] != $paths[$i+1][0]) { + $done = true; + break; + } + } + + if (!$done) { + $commonPath .= $paths[0][0]; + + if ($paths[0][0] != DIRECTORY_SEPARATOR) { + $commonPath .= DIRECTORY_SEPARATOR; + } + + for ($i = 0; $i < $max; $i++) { + array_shift($paths[$i]); + } + } + } + + $original = array_keys($files); + $max = count($original); + + for ($i = 0; $i < $max; $i++) { + $files[implode('/', $paths[$i])] = $files[$original[$i]]; + unset($files[$original[$i]]); + } + + ksort($files); + + return substr($commonPath, 0, -1); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php new file mode 100644 index 00000000..80916ef3 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php @@ -0,0 +1,182 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Generates an HTML report from an PHP_CodeCoverage object. + * + * @since Class available since Release 1.0.0 + */ +class PHP_CodeCoverage_Report_HTML +{ + /** + * @var string + */ + private $templatePath; + + /** + * @var string + */ + private $generator; + + /** + * @var int + */ + private $lowUpperBound; + + /** + * @var int + */ + private $highLowerBound; + + /** + * Constructor. + * + * @param int $lowUpperBound + * @param int $highLowerBound + * @param string $generator + */ + public function __construct($lowUpperBound = 50, $highLowerBound = 90, $generator = '') + { + $this->generator = $generator; + $this->highLowerBound = $highLowerBound; + $this->lowUpperBound = $lowUpperBound; + + $this->templatePath = sprintf( + '%s%sHTML%sRenderer%sTemplate%s', + dirname(__FILE__), + DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR + ); + } + + /** + * @param PHP_CodeCoverage $coverage + * @param string $target + */ + public function process(PHP_CodeCoverage $coverage, $target) + { + $target = $this->getDirectory($target); + $report = $coverage->getReport(); + unset($coverage); + + if (!isset($_SERVER['REQUEST_TIME'])) { + $_SERVER['REQUEST_TIME'] = time(); + } + + $date = date('D M j G:i:s T Y', $_SERVER['REQUEST_TIME']); + + $dashboard = new PHP_CodeCoverage_Report_HTML_Renderer_Dashboard( + $this->templatePath, + $this->generator, + $date, + $this->lowUpperBound, + $this->highLowerBound + ); + + $directory = new PHP_CodeCoverage_Report_HTML_Renderer_Directory( + $this->templatePath, + $this->generator, + $date, + $this->lowUpperBound, + $this->highLowerBound + ); + + $file = new PHP_CodeCoverage_Report_HTML_Renderer_File( + $this->templatePath, + $this->generator, + $date, + $this->lowUpperBound, + $this->highLowerBound + ); + + $directory->render($report, $target . 'index.html'); + $dashboard->render($report, $target . 'dashboard.html'); + + foreach ($report as $node) { + $id = $node->getId(); + + if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) { + if (!file_exists($target . $id)) { + mkdir($target . $id, 0777, true); + } + + $directory->render($node, $target . $id . '/index.html'); + $dashboard->render($node, $target . $id . '/dashboard.html'); + } else { + $dir = dirname($target . $id); + + if (!file_exists($dir)) { + mkdir($dir, 0777, true); + } + + $file->render($node, $target . $id . '.html'); + } + } + + $this->copyFiles($target); + } + + /** + * @param string $target + */ + private function copyFiles($target) + { + $dir = $this->getDirectory($target . 'css'); + copy($this->templatePath . 'css/bootstrap.min.css', $dir . 'bootstrap.min.css'); + copy($this->templatePath . 'css/nv.d3.min.css', $dir . 'nv.d3.min.css'); + copy($this->templatePath . 'css/style.css', $dir . 'style.css'); + + $dir = $this->getDirectory($target . 'fonts'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.eot', $dir . 'glyphicons-halflings-regular.eot'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.svg', $dir . 'glyphicons-halflings-regular.svg'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.ttf', $dir . 'glyphicons-halflings-regular.ttf'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff', $dir . 'glyphicons-halflings-regular.woff'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff2', $dir . 'glyphicons-halflings-regular.woff2'); + + $dir = $this->getDirectory($target . 'js'); + copy($this->templatePath . 'js/bootstrap.min.js', $dir . 'bootstrap.min.js'); + copy($this->templatePath . 'js/d3.min.js', $dir . 'd3.min.js'); + copy($this->templatePath . 'js/holder.min.js', $dir . 'holder.min.js'); + copy($this->templatePath . 'js/html5shiv.min.js', $dir . 'html5shiv.min.js'); + copy($this->templatePath . 'js/jquery.min.js', $dir . 'jquery.min.js'); + copy($this->templatePath . 'js/nv.d3.min.js', $dir . 'nv.d3.min.js'); + copy($this->templatePath . 'js/respond.min.js', $dir . 'respond.min.js'); + } + + /** + * @param string $directory + * @return string + * @throws PHP_CodeCoverage_Exception + * @since Method available since Release 1.2.0 + */ + private function getDirectory($directory) + { + if (substr($directory, -1, 1) != DIRECTORY_SEPARATOR) { + $directory .= DIRECTORY_SEPARATOR; + } + + if (is_dir($directory)) { + return $directory; + } + + if (@mkdir($directory, 0777, true)) { + return $directory; + } + + throw new PHP_CodeCoverage_Exception( + sprintf( + 'Directory "%s" does not exist.', + $directory + ) + ); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php new file mode 100644 index 00000000..f5cabffc --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php @@ -0,0 +1,268 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use SebastianBergmann\Environment\Runtime; + +/** + * Base class for PHP_CodeCoverage_Report_Node renderers. + * + * @since Class available since Release 1.1.0 + */ +abstract class PHP_CodeCoverage_Report_HTML_Renderer +{ + /** + * @var string + */ + protected $templatePath; + + /** + * @var string + */ + protected $generator; + + /** + * @var string + */ + protected $date; + + /** + * @var int + */ + protected $lowUpperBound; + + /** + * @var int + */ + protected $highLowerBound; + + /** + * @var string + */ + protected $version; + + /** + * Constructor. + * + * @param string $templatePath + * @param string $generator + * @param string $date + * @param int $lowUpperBound + * @param int $highLowerBound + */ + public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound) + { + $version = new SebastianBergmann\Version('2.2.2', dirname(dirname(dirname(dirname(__DIR__))))); + + $this->templatePath = $templatePath; + $this->generator = $generator; + $this->date = $date; + $this->lowUpperBound = $lowUpperBound; + $this->highLowerBound = $highLowerBound; + $this->version = $version->getVersion(); + } + + /** + * @param Text_Template $template + * @param array $data + * @return string + */ + protected function renderItemTemplate(Text_Template $template, array $data) + { + $numSeparator = ' / '; + $classesBar = ' '; + $classesLevel = 'None'; + $classesNumber = ' '; + + if (isset($data['numClasses']) && $data['numClasses'] > 0) { + $classesLevel = $this->getColorLevel($data['testedClassesPercent']); + + $classesNumber = $data['numTestedClasses'] . $numSeparator . + $data['numClasses']; + + $classesBar = $this->getCoverageBar( + $data['testedClassesPercent'] + ); + } + + $methodsBar = ' '; + $methodsLevel = 'None'; + $methodsNumber = ' '; + + if ($data['numMethods'] > 0) { + $methodsLevel = $this->getColorLevel($data['testedMethodsPercent']); + + $methodsNumber = $data['numTestedMethods'] . $numSeparator . + $data['numMethods']; + + $methodsBar = $this->getCoverageBar( + $data['testedMethodsPercent'] + ); + } + + $linesBar = ' '; + $linesLevel = 'None'; + $linesNumber = ' '; + + if ($data['numExecutableLines'] > 0) { + $linesLevel = $this->getColorLevel($data['linesExecutedPercent']); + + $linesNumber = $data['numExecutedLines'] . $numSeparator . + $data['numExecutableLines']; + + $linesBar = $this->getCoverageBar( + $data['linesExecutedPercent'] + ); + } + + $template->setVar( + array( + 'icon' => isset($data['icon']) ? $data['icon'] : '', + 'crap' => isset($data['crap']) ? $data['crap'] : '', + 'name' => $data['name'], + 'lines_bar' => $linesBar, + 'lines_executed_percent' => $data['linesExecutedPercentAsString'], + 'lines_level' => $linesLevel, + 'lines_number' => $linesNumber, + 'methods_bar' => $methodsBar, + 'methods_tested_percent' => $data['testedMethodsPercentAsString'], + 'methods_level' => $methodsLevel, + 'methods_number' => $methodsNumber, + 'classes_bar' => $classesBar, + 'classes_tested_percent' => isset($data['testedClassesPercentAsString']) ? $data['testedClassesPercentAsString'] : '', + 'classes_level' => $classesLevel, + 'classes_number' => $classesNumber + ) + ); + + return $template->render(); + } + + /** + * @param Text_Template $template + * @param PHP_CodeCoverage_Report_Node $node + */ + protected function setCommonTemplateVariables(Text_Template $template, PHP_CodeCoverage_Report_Node $node) + { + $runtime = new Runtime; + + $template->setVar( + array( + 'id' => $node->getId(), + 'full_path' => $node->getPath(), + 'path_to_root' => $this->getPathToRoot($node), + 'breadcrumbs' => $this->getBreadcrumbs($node), + 'date' => $this->date, + 'version' => $this->version, + 'runtime_name' => $runtime->getName(), + 'runtime_version' => $runtime->getVersion(), + 'runtime_link' => $runtime->getVendorUrl(), + 'generator' => $this->generator, + 'low_upper_bound' => $this->lowUpperBound, + 'high_lower_bound' => $this->highLowerBound + ) + ); + } + + protected function getBreadcrumbs(PHP_CodeCoverage_Report_Node $node) + { + $breadcrumbs = ''; + $path = $node->getPathAsArray(); + $pathToRoot = array(); + $max = count($path); + + if ($node instanceof PHP_CodeCoverage_Report_Node_File) { + $max--; + } + + for ($i = 0; $i < $max; $i++) { + $pathToRoot[] = str_repeat('../', $i); + } + + foreach ($path as $step) { + if ($step !== $node) { + $breadcrumbs .= $this->getInactiveBreadcrumb( + $step, + array_pop($pathToRoot) + ); + } else { + $breadcrumbs .= $this->getActiveBreadcrumb($step); + } + } + + return $breadcrumbs; + } + + protected function getActiveBreadcrumb(PHP_CodeCoverage_Report_Node $node) + { + $buffer = sprintf( + '

  • %s
  • ' . "\n", + $node->getName() + ); + + if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) { + $buffer .= '
  • (Dashboard)
  • ' . "\n"; + } + + return $buffer; + } + + protected function getInactiveBreadcrumb(PHP_CodeCoverage_Report_Node $node, $pathToRoot) + { + return sprintf( + '
  • %s
  • ' . "\n", + $pathToRoot, + $node->getName() + ); + } + + protected function getPathToRoot(PHP_CodeCoverage_Report_Node $node) + { + $id = $node->getId(); + $depth = substr_count($id, '/'); + + if ($id != 'index' && + $node instanceof PHP_CodeCoverage_Report_Node_Directory) { + $depth++; + } + + return str_repeat('../', $depth); + } + + protected function getCoverageBar($percent) + { + $level = $this->getColorLevel($percent); + + $template = new Text_Template( + $this->templatePath . 'coverage_bar.html', + '{{', + '}}' + ); + + $template->setVar(array('level' => $level, 'percent' => sprintf('%.2F', $percent))); + + return $template->render(); + } + + /** + * @param int $percent + * @return string + */ + protected function getColorLevel($percent) + { + if ($percent <= $this->lowUpperBound) { + return 'danger'; + } elseif ($percent > $this->lowUpperBound && + $percent < $this->highLowerBound) { + return 'warning'; + } else { + return 'success'; + } + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php new file mode 100644 index 00000000..a29b7f3d --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php @@ -0,0 +1,295 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Renders the dashboard for a PHP_CodeCoverage_Report_Node_Directory node. + * + * @since Class available since Release 1.1.0 + */ +class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_Report_HTML_Renderer +{ + /** + * @param PHP_CodeCoverage_Report_Node_Directory $node + * @param string $file + */ + public function render(PHP_CodeCoverage_Report_Node_Directory $node, $file) + { + $classes = $node->getClassesAndTraits(); + $template = new Text_Template( + $this->templatePath . 'dashboard.html', + '{{', + '}}' + ); + + $this->setCommonTemplateVariables($template, $node); + + $baseLink = $node->getId() . '/'; + $complexity = $this->complexity($classes, $baseLink); + $coverageDistribution = $this->coverageDistribution($classes); + $insufficientCoverage = $this->insufficientCoverage($classes, $baseLink); + $projectRisks = $this->projectRisks($classes, $baseLink); + + $template->setVar( + array( + 'insufficient_coverage_classes' => $insufficientCoverage['class'], + 'insufficient_coverage_methods' => $insufficientCoverage['method'], + 'project_risks_classes' => $projectRisks['class'], + 'project_risks_methods' => $projectRisks['method'], + 'complexity_class' => $complexity['class'], + 'complexity_method' => $complexity['method'], + 'class_coverage_distribution' => $coverageDistribution['class'], + 'method_coverage_distribution' => $coverageDistribution['method'] + ) + ); + + $template->renderTo($file); + } + + /** + * Returns the data for the Class/Method Complexity charts. + * + * @param array $classes + * @param string $baseLink + * @return array + */ + protected function complexity(array $classes, $baseLink) + { + $result = array('class' => array(), 'method' => array()); + + foreach ($classes as $className => $class) { + foreach ($class['methods'] as $methodName => $method) { + if ($className != '*') { + $methodName = $className . '::' . $methodName; + } + + $result['method'][] = array( + $method['coverage'], + $method['ccn'], + sprintf( + '%s', + str_replace($baseLink, '', $method['link']), + $methodName + ) + ); + } + + $result['class'][] = array( + $class['coverage'], + $class['ccn'], + sprintf( + '%s', + str_replace($baseLink, '', $class['link']), + $className + ) + ); + } + + return array( + 'class' => json_encode($result['class']), + 'method' => json_encode($result['method']) + ); + } + + /** + * Returns the data for the Class / Method Coverage Distribution chart. + * + * @param array $classes + * @return array + */ + protected function coverageDistribution(array $classes) + { + $result = array( + 'class' => array( + '0%' => 0, + '0-10%' => 0, + '10-20%' => 0, + '20-30%' => 0, + '30-40%' => 0, + '40-50%' => 0, + '50-60%' => 0, + '60-70%' => 0, + '70-80%' => 0, + '80-90%' => 0, + '90-100%' => 0, + '100%' => 0 + ), + 'method' => array( + '0%' => 0, + '0-10%' => 0, + '10-20%' => 0, + '20-30%' => 0, + '30-40%' => 0, + '40-50%' => 0, + '50-60%' => 0, + '60-70%' => 0, + '70-80%' => 0, + '80-90%' => 0, + '90-100%' => 0, + '100%' => 0 + ) + ); + + foreach ($classes as $class) { + foreach ($class['methods'] as $methodName => $method) { + if ($method['coverage'] == 0) { + $result['method']['0%']++; + } elseif ($method['coverage'] == 100) { + $result['method']['100%']++; + } else { + $key = floor($method['coverage'] / 10) * 10; + $key = $key . '-' . ($key + 10) . '%'; + $result['method'][$key]++; + } + } + + if ($class['coverage'] == 0) { + $result['class']['0%']++; + } elseif ($class['coverage'] == 100) { + $result['class']['100%']++; + } else { + $key = floor($class['coverage'] / 10) * 10; + $key = $key . '-' . ($key + 10) . '%'; + $result['class'][$key]++; + } + } + + return array( + 'class' => json_encode(array_values($result['class'])), + 'method' => json_encode(array_values($result['method'])) + ); + } + + /** + * Returns the classes / methods with insufficient coverage. + * + * @param array $classes + * @param string $baseLink + * @return array + */ + protected function insufficientCoverage(array $classes, $baseLink) + { + $leastTestedClasses = array(); + $leastTestedMethods = array(); + $result = array('class' => '', 'method' => ''); + + foreach ($classes as $className => $class) { + foreach ($class['methods'] as $methodName => $method) { + if ($method['coverage'] < $this->highLowerBound) { + if ($className != '*') { + $key = $className . '::' . $methodName; + } else { + $key = $methodName; + } + + $leastTestedMethods[$key] = $method['coverage']; + } + } + + if ($class['coverage'] < $this->highLowerBound) { + $leastTestedClasses[$className] = $class['coverage']; + } + } + + asort($leastTestedClasses); + asort($leastTestedMethods); + + foreach ($leastTestedClasses as $className => $coverage) { + $result['class'] .= sprintf( + ' %s%d%%' . "\n", + str_replace($baseLink, '', $classes[$className]['link']), + $className, + $coverage + ); + } + + foreach ($leastTestedMethods as $methodName => $coverage) { + list($class, $method) = explode('::', $methodName); + + $result['method'] .= sprintf( + ' %s%d%%' . "\n", + str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), + $methodName, + $method, + $coverage + ); + } + + return $result; + } + + /** + * Returns the project risks according to the CRAP index. + * + * @param array $classes + * @param string $baseLink + * @return array + */ + protected function projectRisks(array $classes, $baseLink) + { + $classRisks = array(); + $methodRisks = array(); + $result = array('class' => '', 'method' => ''); + + foreach ($classes as $className => $class) { + foreach ($class['methods'] as $methodName => $method) { + if ($method['coverage'] < $this->highLowerBound && + $method['ccn'] > 1) { + if ($className != '*') { + $key = $className . '::' . $methodName; + } else { + $key = $methodName; + } + + $methodRisks[$key] = $method['crap']; + } + } + + if ($class['coverage'] < $this->highLowerBound && + $class['ccn'] > count($class['methods'])) { + $classRisks[$className] = $class['crap']; + } + } + + arsort($classRisks); + arsort($methodRisks); + + foreach ($classRisks as $className => $crap) { + $result['class'] .= sprintf( + ' %s%d' . "\n", + str_replace($baseLink, '', $classes[$className]['link']), + $className, + $crap + ); + } + + foreach ($methodRisks as $methodName => $crap) { + list($class, $method) = explode('::', $methodName); + + $result['method'] .= sprintf( + ' %s%d' . "\n", + str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), + $methodName, + $method, + $crap + ); + } + + return $result; + } + + protected function getActiveBreadcrumb(PHP_CodeCoverage_Report_Node $node) + { + return sprintf( + '
  • %s
  • ' . "\n" . + '
  • (Dashboard)
  • ' . "\n", + $node->getName() + ); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php new file mode 100644 index 00000000..4415c520 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Renders a PHP_CodeCoverage_Report_Node_Directory node. + * + * @since Class available since Release 1.1.0 + */ +class PHP_CodeCoverage_Report_HTML_Renderer_Directory extends PHP_CodeCoverage_Report_HTML_Renderer +{ + /** + * @param PHP_CodeCoverage_Report_Node_Directory $node + * @param string $file + */ + public function render(PHP_CodeCoverage_Report_Node_Directory $node, $file) + { + $template = new Text_Template($this->templatePath . 'directory.html', '{{', '}}'); + + $this->setCommonTemplateVariables($template, $node); + + $items = $this->renderItem($node, true); + + foreach ($node->getDirectories() as $item) { + $items .= $this->renderItem($item); + } + + foreach ($node->getFiles() as $item) { + $items .= $this->renderItem($item); + } + + $template->setVar( + array( + 'id' => $node->getId(), + 'items' => $items + ) + ); + + $template->renderTo($file); + } + + /** + * @param PHP_CodeCoverage_Report_Node $item + * @param bool $total + * @return string + */ + protected function renderItem(PHP_CodeCoverage_Report_Node $item, $total = false) + { + $data = array( + 'numClasses' => $item->getNumClassesAndTraits(), + 'numTestedClasses' => $item->getNumTestedClassesAndTraits(), + 'numMethods' => $item->getNumMethods(), + 'numTestedMethods' => $item->getNumTestedMethods(), + 'linesExecutedPercent' => $item->getLineExecutedPercent(false), + 'linesExecutedPercentAsString' => $item->getLineExecutedPercent(), + 'numExecutedLines' => $item->getNumExecutedLines(), + 'numExecutableLines' => $item->getNumExecutableLines(), + 'testedMethodsPercent' => $item->getTestedMethodsPercent(false), + 'testedMethodsPercentAsString' => $item->getTestedMethodsPercent(), + 'testedClassesPercent' => $item->getTestedClassesAndTraitsPercent(false), + 'testedClassesPercentAsString' => $item->getTestedClassesAndTraitsPercent() + ); + + if ($total) { + $data['name'] = 'Total'; + } else { + if ($item instanceof PHP_CodeCoverage_Report_Node_Directory) { + $data['name'] = sprintf( + '%s', + $item->getName(), + $item->getName() + ); + + $data['icon'] = ' '; + } else { + $data['name'] = sprintf( + '%s', + $item->getName(), + $item->getName() + ); + + $data['icon'] = ' '; + } + } + + return $this->renderItemTemplate( + new Text_Template($this->templatePath . 'directory_item.html', '{{', '}}'), + $data + ); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php new file mode 100644 index 00000000..d52345d5 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php @@ -0,0 +1,556 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +// @codeCoverageIgnoreStart +if (!defined('T_TRAIT')) { + define('T_TRAIT', 1001); +} + +if (!defined('T_INSTEADOF')) { + define('T_INSTEADOF', 1002); +} + +if (!defined('T_CALLABLE')) { + define('T_CALLABLE', 1003); +} + +if (!defined('T_FINALLY')) { + define('T_FINALLY', 1004); +} + +if (!defined('T_YIELD')) { + define('T_YIELD', 1005); +} +// @codeCoverageIgnoreEnd + +/** + * Renders a PHP_CodeCoverage_Report_Node_File node. + * + * @since Class available since Release 1.1.0 + */ +class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report_HTML_Renderer +{ + /** + * @var int + */ + private $htmlspecialcharsFlags; + + /** + * Constructor. + * + * @param string $templatePath + * @param string $generator + * @param string $date + * @param int $lowUpperBound + * @param int $highLowerBound + */ + public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound) + { + parent::__construct( + $templatePath, + $generator, + $date, + $lowUpperBound, + $highLowerBound + ); + + $this->htmlspecialcharsFlags = ENT_COMPAT; + + if (PHP_VERSION_ID >= 50400 && defined('ENT_SUBSTITUTE')) { + $this->htmlspecialcharsFlags = $this->htmlspecialcharsFlags | ENT_HTML401 | ENT_SUBSTITUTE; + } + } + + /** + * @param PHP_CodeCoverage_Report_Node_File $node + * @param string $file + */ + public function render(PHP_CodeCoverage_Report_Node_File $node, $file) + { + $template = new Text_Template($this->templatePath . 'file.html', '{{', '}}'); + + $template->setVar( + array( + 'items' => $this->renderItems($node), + 'lines' => $this->renderSource($node) + ) + ); + + $this->setCommonTemplateVariables($template, $node); + + $template->renderTo($file); + } + + /** + * @param PHP_CodeCoverage_Report_Node_File $node + * @return string + */ + protected function renderItems(PHP_CodeCoverage_Report_Node_File $node) + { + $template = new Text_Template($this->templatePath . 'file_item.html', '{{', '}}'); + + $methodItemTemplate = new Text_Template( + $this->templatePath . 'method_item.html', + '{{', + '}}' + ); + + $items = $this->renderItemTemplate( + $template, + array( + 'name' => 'Total', + 'numClasses' => $node->getNumClassesAndTraits(), + 'numTestedClasses' => $node->getNumTestedClassesAndTraits(), + 'numMethods' => $node->getNumMethods(), + 'numTestedMethods' => $node->getNumTestedMethods(), + 'linesExecutedPercent' => $node->getLineExecutedPercent(false), + 'linesExecutedPercentAsString' => $node->getLineExecutedPercent(), + 'numExecutedLines' => $node->getNumExecutedLines(), + 'numExecutableLines' => $node->getNumExecutableLines(), + 'testedMethodsPercent' => $node->getTestedMethodsPercent(false), + 'testedMethodsPercentAsString' => $node->getTestedMethodsPercent(), + 'testedClassesPercent' => $node->getTestedClassesAndTraitsPercent(false), + 'testedClassesPercentAsString' => $node->getTestedClassesAndTraitsPercent(), + 'crap' => 'CRAP' + ) + ); + + $items .= $this->renderFunctionItems( + $node->getFunctions(), + $methodItemTemplate + ); + + $items .= $this->renderTraitOrClassItems( + $node->getTraits(), + $template, + $methodItemTemplate + ); + + $items .= $this->renderTraitOrClassItems( + $node->getClasses(), + $template, + $methodItemTemplate + ); + + return $items; + } + + /** + * @param array $items + * @param Text_Template $template + * @param Text_Template $methodItemTemplate + * @return string + */ + protected function renderTraitOrClassItems(array $items, Text_Template $template, Text_Template $methodItemTemplate) + { + if (empty($items)) { + return ''; + } + + $buffer = ''; + + foreach ($items as $name => $item) { + $numMethods = count($item['methods']); + $numTestedMethods = 0; + + foreach ($item['methods'] as $method) { + if ($method['executedLines'] == $method['executableLines']) { + $numTestedMethods++; + } + } + + $buffer .= $this->renderItemTemplate( + $template, + array( + 'name' => $name, + 'numClasses' => 1, + 'numTestedClasses' => $numTestedMethods == $numMethods ? 1 : 0, + 'numMethods' => $numMethods, + 'numTestedMethods' => $numTestedMethods, + 'linesExecutedPercent' => PHP_CodeCoverage_Util::percent( + $item['executedLines'], + $item['executableLines'], + false + ), + 'linesExecutedPercentAsString' => PHP_CodeCoverage_Util::percent( + $item['executedLines'], + $item['executableLines'], + true + ), + 'numExecutedLines' => $item['executedLines'], + 'numExecutableLines' => $item['executableLines'], + 'testedMethodsPercent' => PHP_CodeCoverage_Util::percent( + $numTestedMethods, + $numMethods, + false + ), + 'testedMethodsPercentAsString' => PHP_CodeCoverage_Util::percent( + $numTestedMethods, + $numMethods, + true + ), + 'testedClassesPercent' => PHP_CodeCoverage_Util::percent( + $numTestedMethods == $numMethods ? 1 : 0, + 1, + false + ), + 'testedClassesPercentAsString' => PHP_CodeCoverage_Util::percent( + $numTestedMethods == $numMethods ? 1 : 0, + 1, + true + ), + 'crap' => $item['crap'] + ) + ); + + foreach ($item['methods'] as $method) { + $buffer .= $this->renderFunctionOrMethodItem( + $methodItemTemplate, + $method, + ' ' + ); + } + } + + return $buffer; + } + + /** + * @param array $functions + * @param Text_Template $template + * @return string + */ + protected function renderFunctionItems(array $functions, Text_Template $template) + { + if (empty($functions)) { + return ''; + } + + $buffer = ''; + + foreach ($functions as $function) { + $buffer .= $this->renderFunctionOrMethodItem( + $template, + $function + ); + } + + return $buffer; + } + + /** + * @param Text_Template $template + * @return string + */ + protected function renderFunctionOrMethodItem(Text_Template $template, array $item, $indent = '') + { + $numTestedItems = $item['executedLines'] == $item['executableLines'] ? 1 : 0; + + return $this->renderItemTemplate( + $template, + array( + 'name' => sprintf( + '%s%s', + $indent, + $item['startLine'], + htmlspecialchars($item['signature']), + isset($item['functionName']) ? $item['functionName'] : $item['methodName'] + ), + 'numMethods' => 1, + 'numTestedMethods' => $numTestedItems, + 'linesExecutedPercent' => PHP_CodeCoverage_Util::percent( + $item['executedLines'], + $item['executableLines'], + false + ), + 'linesExecutedPercentAsString' => PHP_CodeCoverage_Util::percent( + $item['executedLines'], + $item['executableLines'], + true + ), + 'numExecutedLines' => $item['executedLines'], + 'numExecutableLines' => $item['executableLines'], + 'testedMethodsPercent' => PHP_CodeCoverage_Util::percent( + $numTestedItems, + 1, + false + ), + 'testedMethodsPercentAsString' => PHP_CodeCoverage_Util::percent( + $numTestedItems, + 1, + true + ), + 'crap' => $item['crap'] + ) + ); + } + + /** + * @param PHP_CodeCoverage_Report_Node_File $node + * @return string + */ + protected function renderSource(PHP_CodeCoverage_Report_Node_File $node) + { + $coverageData = $node->getCoverageData(); + $testData = $node->getTestData(); + $codeLines = $this->loadFile($node->getPath()); + $lines = ''; + $i = 1; + + foreach ($codeLines as $line) { + $trClass = ''; + $popoverContent = ''; + $popoverTitle = ''; + + if (array_key_exists($i, $coverageData)) { + $numTests = count($coverageData[$i]); + + if ($coverageData[$i] === null) { + $trClass = ' class="warning"'; + } elseif ($numTests == 0) { + $trClass = ' class="danger"'; + } else { + $lineCss = 'covered-by-large-tests'; + $popoverContent = '
      '; + + if ($numTests > 1) { + $popoverTitle = $numTests . ' tests cover line ' . $i; + } else { + $popoverTitle = '1 test covers line ' . $i; + } + + foreach ($coverageData[$i] as $test) { + if ($lineCss == 'covered-by-large-tests' && $testData[$test]['size'] == 'medium') { + $lineCss = 'covered-by-medium-tests'; + } elseif ($testData[$test]['size'] == 'small') { + $lineCss = 'covered-by-small-tests'; + } + + switch ($testData[$test]['status']) { + case 0: + switch ($testData[$test]['size']) { + case 'small': + $testCSS = ' class="covered-by-small-tests"'; + break; + + case 'medium': + $testCSS = ' class="covered-by-medium-tests"'; + break; + + default: + $testCSS = ' class="covered-by-large-tests"'; + break; + } + break; + + case 1: + case 2: + $testCSS = ' class="warning"'; + break; + + case 3: + $testCSS = ' class="danger"'; + break; + + case 4: + $testCSS = ' class="danger"'; + break; + + default: + $testCSS = ''; + } + + $popoverContent .= sprintf( + '%s', + $testCSS, + htmlspecialchars($test) + ); + } + + $popoverContent .= '
    '; + $trClass = ' class="' . $lineCss . ' popin"'; + } + } + + if (!empty($popoverTitle)) { + $popover = sprintf( + ' data-title="%s" data-content="%s" data-placement="bottom" data-html="true"', + $popoverTitle, + htmlspecialchars($popoverContent) + ); + } else { + $popover = ''; + } + + $lines .= sprintf( + ' %s' . "\n", + $trClass, + $popover, + $i, + $i, + $i, + $line + ); + + $i++; + } + + return $lines; + } + + /** + * @param string $file + * @return array + */ + protected function loadFile($file) + { + $buffer = file_get_contents($file); + $tokens = token_get_all($buffer); + $result = array(''); + $i = 0; + $stringFlag = false; + $fileEndsWithNewLine = substr($buffer, -1) == "\n"; + + unset($buffer); + + foreach ($tokens as $j => $token) { + if (is_string($token)) { + if ($token === '"' && $tokens[$j - 1] !== '\\') { + $result[$i] .= sprintf( + '%s', + htmlspecialchars($token) + ); + + $stringFlag = !$stringFlag; + } else { + $result[$i] .= sprintf( + '%s', + htmlspecialchars($token) + ); + } + + continue; + } + + list($token, $value) = $token; + + $value = str_replace( + array("\t", ' '), + array('    ', ' '), + htmlspecialchars($value, $this->htmlspecialcharsFlags) + ); + + if ($value === "\n") { + $result[++$i] = ''; + } else { + $lines = explode("\n", $value); + + foreach ($lines as $jj => $line) { + $line = trim($line); + + if ($line !== '') { + if ($stringFlag) { + $colour = 'string'; + } else { + switch ($token) { + case T_INLINE_HTML: + $colour = 'html'; + break; + + case T_COMMENT: + case T_DOC_COMMENT: + $colour = 'comment'; + break; + + case T_ABSTRACT: + case T_ARRAY: + case T_AS: + case T_BREAK: + case T_CALLABLE: + case T_CASE: + case T_CATCH: + case T_CLASS: + case T_CLONE: + case T_CONTINUE: + case T_DEFAULT: + case T_ECHO: + case T_ELSE: + case T_ELSEIF: + case T_EMPTY: + case T_ENDDECLARE: + case T_ENDFOR: + case T_ENDFOREACH: + case T_ENDIF: + case T_ENDSWITCH: + case T_ENDWHILE: + case T_EXIT: + case T_EXTENDS: + case T_FINAL: + case T_FINALLY: + case T_FOREACH: + case T_FUNCTION: + case T_GLOBAL: + case T_IF: + case T_IMPLEMENTS: + case T_INCLUDE: + case T_INCLUDE_ONCE: + case T_INSTANCEOF: + case T_INSTEADOF: + case T_INTERFACE: + case T_ISSET: + case T_LOGICAL_AND: + case T_LOGICAL_OR: + case T_LOGICAL_XOR: + case T_NAMESPACE: + case T_NEW: + case T_PRIVATE: + case T_PROTECTED: + case T_PUBLIC: + case T_REQUIRE: + case T_REQUIRE_ONCE: + case T_RETURN: + case T_STATIC: + case T_THROW: + case T_TRAIT: + case T_TRY: + case T_UNSET: + case T_USE: + case T_VAR: + case T_WHILE: + case T_YIELD: + $colour = 'keyword'; + break; + + default: + $colour = 'default'; + } + } + + $result[$i] .= sprintf( + '%s', + $colour, + $line + ); + } + + if (isset($lines[$jj + 1])) { + $result[++$i] = ''; + } + } + } + } + + if ($fileEndsWithNewLine) { + unset($result[count($result)-1]); + } + + return $result; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist new file mode 100644 index 00000000..5a09c354 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist @@ -0,0 +1,5 @@ +
    +
    + {{percent}}% covered ({{level}}) +
    +
    diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css new file mode 100644 index 00000000..cd1c616a --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.4 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px \9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:5px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:46px;line-height:46px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:10px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.33px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px)and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px)and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px)and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css new file mode 100644 index 00000000..7a6f7fe9 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css @@ -0,0 +1 @@ +.nvd3 .nv-axis{pointer-events:none;opacity:1}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#e5e5e5;shape-rendering:crispEdges}.nvd3 .nv-axis .zero line,.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nvd3 .nv-axis.nv-disabled{opacity:0}.nvd3 .nv-bars rect{fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect.hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:#add8e6}.nvd3 .nv-bars text{fill:rgba(0,0,0,0)}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect,.nvd3 .nv-discretebar .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-candlestickBar .nv-ticks rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:rgba(0,0,0,0)}.nvd3 .nv-boxplot circle{fill-opacity:.5}.nvd3 .nv-boxplot circle:hover{fill-opacity:1}.nvd3 .nv-boxplot rect:hover{fill-opacity:1}.nvd3 line.nv-boxplot-median{stroke:#000}.nv-boxplot-tick:hover{stroke-width:2.5px}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#bababa;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-candlestickBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect{stroke:#d62728;fill:#d62728}.with-transitions .nv-candlestickBar .nv-ticks .nv-tick{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-candlestickBar .nv-ticks line{stroke:#333}.nvd3 .nv-legend .nv-disabled rect{}.nvd3 .nv-check-box .nv-box{fill-opacity:0;stroke-width:2}.nvd3 .nv-check-box .nv-check{fill-opacity:0;stroke-width:4}.nvd3 .nv-series.nv-disabled .nv-check-box .nv-check{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check{opacity:0}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3 .nv-groups path.nv-line{fill:none}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.with-transitions .nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-scatter .nv-groups .nv-point.hover,.nvd3 .nv-groups .nv-point.hover{stroke-width:7px;fill-opacity:.95!important;stroke-opacity:.95!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}svg.nvd3-svg{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;display:block;width:100%;height:100%}.nvtooltip.with-3d-shadow,.with-3d-shadow .nvtooltip{-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nvd3 text{font:400 12px Arial}.nvd3 .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:700}.nv-brush .extent{fill-opacity:.125;shape-rendering:crispEdges}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .nv-disabled circle{fill-opacity:0}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3 .background path{fill:none;stroke:#EEE;stroke-opacity:.4;shape-rendering:crispEdges}.nvd3 .foreground path{fill:none;stroke-opacity:.7}.nvd3 .nv-parallelCoordinates-brush .extent{fill:#fff;fill-opacity:.6;stroke:gray;shape-rendering:crispEdges}.nvd3 .nv-parallelCoordinates .hover{fill-opacity:1;stroke-width:3px}.nvd3 .missingValuesline line{fill:none;stroke:#000;stroke-width:1;stroke-opacity:1;stroke-dasharray:5,5}.nvd3.nv-pie path{stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-pie .nv-pie-title{font-size:24px;fill:rgba(19,196,249,.59)}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{stroke:#fff;stroke-width:1px;stroke-opacity:1}.nvd3.nv-pie .hover path{fill-opacity:.7}.nvd3.nv-pie .nv-label{pointer-events:none}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nv-noninteractive{pointer-events:none}.nv-distx,.nv-disty{pointer-events:none}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvtooltip{position:absolute;background-color:rgba(255,255,255,1);color:rgba(0,0,0,1);padding:1px;border:1px solid rgba(0,0,0,.2);z-index:10000;display:block;font-family:Arial;font-size:13px;text-align:left;pointer-events:none;white-space:nowrap;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nvtooltip{background:rgba(255,255,255,.8);border:1px solid rgba(0,0,0,.5);border-radius:4px}.nvtooltip.with-transitions,.with-transitions .nvtooltip{transition:opacity 50ms linear;-moz-transition:opacity 50ms linear;-webkit-transition:opacity 50ms linear;transition-delay:200ms;-moz-transition-delay:200ms;-webkit-transition-delay:200ms}.nvtooltip.x-nvtooltip,.nvtooltip.y-nvtooltip{padding:8px}.nvtooltip h3{margin:0;padding:4px 14px;line-height:18px;font-weight:400;background-color:rgba(247,247,247,.75);color:rgba(0,0,0,1);text-align:center;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.nvtooltip p{margin:0;padding:5px 14px;text-align:center}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip table{margin:6px;border-spacing:0}.nvtooltip table td{padding:2px 9px 2px 0;vertical-align:middle}.nvtooltip table td.key{font-weight:400}.nvtooltip table td.value{text-align:right;font-weight:700}.nvtooltip table tr.highlight td{padding:1px 9px 1px 0;border-bottom-style:solid;border-bottom-width:1px;border-top-style:solid;border-top-width:1px}.nvtooltip table td.legend-color-guide div{width:8px;height:8px;vertical-align:middle}.nvtooltip table td.legend-color-guide div{width:12px;height:12px;border:1px solid #999}.nvtooltip .footer{padding:3px;text-align:center}.nvtooltip-pending-removal{pointer-events:none;display:none}.nvd3 .nv-interactiveGuideLine{pointer-events:none}.nvd3 line.nv-guideline{stroke:#ccc} \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css new file mode 100644 index 00000000..824fb317 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css @@ -0,0 +1,122 @@ +body { + padding-top: 10px; +} + +.popover { + max-width: none; +} + +.glyphicon { + margin-right:.25em; +} + +.table-bordered>thead>tr>td { + border-bottom-width: 1px; +} + +.table tbody>tr>td, .table thead>tr>td { + padding-top: 3px; + padding-bottom: 3px; +} + +.table-condensed tbody>tr>td { + padding-top: 0; + padding-bottom: 0; +} + +.table .progress { + margin-bottom: inherit; +} + +.table-borderless th, .table-borderless td { + border: 0 !important; +} + +.table tbody tr.covered-by-large-tests, li.covered-by-large-tests, tr.success, td.success, li.success, span.success { + background-color: #dff0d8; +} + +.table tbody tr.covered-by-medium-tests, li.covered-by-medium-tests { + background-color: #c3e3b5; +} + +.table tbody tr.covered-by-small-tests, li.covered-by-small-tests { + background-color: #99cb84; +} + +.table tbody tr.danger, .table tbody td.danger, li.danger, span.danger { + background-color: #f2dede; +} + +.table tbody td.warning, li.warning, span.warning { + background-color: #fcf8e3; +} + +.table tbody td.info { + background-color: #d9edf7; +} + +td.big { + width: 117px; +} + +td.small { +} + +td.codeLine { + font-family: monospace; + white-space: pre; +} + +td span.comment { + color: #888a85; +} + +td span.default { + color: #2e3436; +} + +td span.html { + color: #888a85; +} + +td span.keyword { + color: #2e3436; + font-weight: bold; +} + +pre span.string { + color: #2e3436; +} + +span.success, span.warning, span.danger { + margin-right: 2px; + padding-left: 10px; + padding-right: 10px; + text-align: center; +} + +#classCoverageDistribution, #classComplexity { + height: 200px; + width: 475px; +} + +#toplink { + position: fixed; + left: 5px; + bottom: 5px; + outline: 0; +} + +svg text { + font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + color: #666; + fill: #666; +} + +.scrollbox { + height:245px; + overflow-x:hidden; + overflow-y:scroll; +} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist new file mode 100644 index 00000000..ed189886 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist @@ -0,0 +1,284 @@ + + + + + Dashboard for {{full_path}} + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +
    +
    +

    Coverage Distribution

    +
    + +
    +
    +
    +

    Complexity

    +
    + +
    +
    +
    +
    +
    +

    Insufficient Coverage

    +
    + + + + + + + + +{{insufficient_coverage_classes}} + +
    ClassCoverage
    +
    +
    +
    +

    Project Risks

    +
    + + + + + + + + +{{project_risks_classes}} + +
    ClassCRAP
    +
    +
    +
    +
    +
    +

    Methods

    +
    +
    +
    +
    +

    Coverage Distribution

    +
    + +
    +
    +
    +

    Complexity

    +
    + +
    +
    +
    +
    +
    +

    Insufficient Coverage

    +
    + + + + + + + + +{{insufficient_coverage_methods}} + +
    MethodCoverage
    +
    +
    +
    +

    Project Risks

    +
    + + + + + + + + +{{project_risks_methods}} + +
    MethodCRAP
    +
    +
    +
    + +
    + + + + + + + + diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist new file mode 100644 index 00000000..efe743f5 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist @@ -0,0 +1,61 @@ + + + + + Code Coverage for {{full_path}} + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + +{{items}} + +
     
    Code Coverage
     
    Lines
    Functions and Methods
    Classes and Traits
    + +
    + + + + + diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist new file mode 100644 index 00000000..78dbb356 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist @@ -0,0 +1,13 @@ + + {{icon}}{{name}} + {{lines_bar}} +
    {{lines_executed_percent}}
    +
    {{lines_number}}
    + {{methods_bar}} +
    {{methods_tested_percent}}
    +
    {{methods_number}}
    + {{classes_bar}} +
    {{classes_tested_percent}}
    +
    {{classes_number}}
    + + diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist new file mode 100644 index 00000000..59a06843 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist @@ -0,0 +1,90 @@ + + + + + Code Coverage for {{full_path}} + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + +{{items}} + +
     
    Code Coverage
     
    Classes and Traits
    Functions and Methods
    Lines
    + + +{{lines}} + +
    + +
    + + + + + + diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist new file mode 100644 index 00000000..756fdd69 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist @@ -0,0 +1,14 @@ + + {{name}} + {{classes_bar}} +
    {{classes_tested_percent}}
    +
    {{classes_number}}
    + {{methods_bar}} +
    {{methods_tested_percent}}
    +
    {{methods_number}}
    + {{crap}} + {{lines_bar}} +
    {{lines_executed_percent}}
    +
    {{lines_number}}
    + + diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..b93a4953fff68df523aa7656497ee339d6026d64 GIT binary patch literal 20127 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1413fc609ab6f21774de0cb7e01360095584f65b GIT binary patch literal 45404 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 G`u_lkUM?>H literal 0 HcmV?d00001 diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..64539b54c3751a6d9adb44c8e3a45ba5a73b77f0 GIT binary patch literal 18028 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 literal 0 HcmV?d00001 diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js new file mode 100644 index 00000000..c8f82e59 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.4 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-mp.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js new file mode 100644 index 00000000..34d5513e --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js @@ -0,0 +1,5 @@ +!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function r(n){return null===n?0/0:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function c(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function l(){this._=Object.create(null)}function s(n){return(n+="")===pa||n[0]===va?va+n:n}function f(n){return(n+="")[0]===va?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=da.length;r>e;++e){var u=da[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++ue;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function Z(n){return ya(n,Sa),n}function V(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var l=ka.get(n);return l&&(n=l,c=B),a?t?u:r:t?b:i}function $(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Aa,u="click"+r,i=ta.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ea&&(Ea="onselectstart"in e?!1:x(e.style,"userSelect")),Ea){var o=n(e).style,a=o[Ea];o[Ea]="none"}return function(n){if(i.on(r,null),Ea&&(o[Ea]=a),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Na){var i=t(n);if(i.scrollX||i.scrollY){r=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Na=!(o.f||o.e),r.remove()}}return Na?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ta.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?qa:Math.acos(n)}function tt(n){return n>1?Ra:-1>n?-Ra:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Da)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Xa,r=pt(r)*$a,i=pt(i)*Ba,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Pa,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,n>>8&255,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=Ga.get(n.toLowerCase()))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Xa),u=vt((.2126729*n+.7151522*t+.072175*e)/$a),i=vt((.0193339*n+.119192*t+.9503041*e)/Ba);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Nt(t,e,n,r)}}function Nt(n,t,e,r){function u(){var n,t=c.status;if(!t&&zt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return void o.error.call(i,r)}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(Ct(r))}function Ct(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function zt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qt(){var n=Lt(),t=Tt()-n;t>24?(isFinite(t)&&(clearTimeout(tc),tc=setTimeout(qt,t)),nc=0):(nc=1,rc(qt))}function Lt(){var n=Date.now();for(ec=Ka;ec;)n>=ec.t&&(ec.f=ec.c(n-ec.t)),ec=ec.n;return n}function Tt(){for(var n,t=Ka,e=1/0;t;)t.f?t=n?n.n=t.n:Ka=t.n:(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Pt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=ic.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=oc.get(g)||Ut;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Ut(n){return n+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ft(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new cc(e-1)),1),e}function i(n,e){return t(n=new cc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{cc=jt;var r=new jt;return r._=n,o(r,t,e)}finally{cc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ht(n);return c.floor=c,c.round=Ht(r),c.ceil=Ht(u),c.offset=Ht(i),c.range=a,n}function Ht(n){return function(t,e){try{cc=jt;var r=new jt;return r._=t,n(r,e)._}finally{cc=Date}}}function Ot(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++aa;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in sc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{cc=jt;var t=new cc;return t._=n,r(t)}finally{cc=Date}}var r=t(n);return e.parse=function(n){try{cc=jt;var t=r.parse(n);return t&&t._}finally{cc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ae;var M=ta.map(),x=Yt(v),b=Zt(v),_=Yt(d),w=Zt(d),S=Yt(m),k=Zt(m),E=Yt(y),A=Zt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+ac.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(ac.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(ac.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:ie,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:Qt,e:Qt,H:te,I:te,j:ne,L:ue,m:Kt,M:ee,p:s,S:re,U:Xt,w:Vt,W:$t,x:c,X:l,y:Wt,Y:Bt,Z:Jt,"%":oe};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Yt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Zt(n){for(var t=new l,e=-1,r=n.length;++e68?1900:2e3)}function Kt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Qt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function ne(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function te(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ee(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function re(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ue(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ie(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=ga(t)/60|0,u=ga(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function oe(n,t,e){hc.lastIndex=0;var r=hc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ae(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);yc.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;Mc.point=function(o,a){Mc.point=n,r=(t=o)*Da,u=Math.cos(a=(e=a)*Da/2+qa/4),i=Math.sin(a)},Mc.lineEnd=function(){n(t,e)}}function pe(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function ve(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function de(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function me(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ye(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Me(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function xe(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function be(n,t){return ga(n[0]-t[0])a;++a)u.point((e=n[a])[0],e[1]);return void u.lineEnd()}var c=new qe(e,n,null,!0),l=new qe(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new qe(r,n,null,!1),l=new qe(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),ze(i),ze(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function ze(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Te))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=Fe(m,p);g.length?(b||(i.polygonStart(),b=!0),Ce(g,De,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Re(),x=t(M),b=!1;return y}}function Te(n){return n.length>1}function Re(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function De(n,t){return((n=n.x)[0]<0?n[1]-Ra-Ca:Ra-n[1])-((t=t.x)[0]<0?t[1]-Ra-Ca:Ra-t[1])}function Pe(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?qa:-qa,c=ga(i-e);ga(c-qa)0?Ra:-Ra),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=qa&&(ga(e-u)Ca?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function je(n,t,e,r){var u;if(null==n)u=e*Ra,r.point(-qa,u),r.point(0,u),r.point(qa,u),r.point(qa,0),r.point(qa,-u),r.point(0,-u),r.point(-qa,-u),r.point(-qa,0),r.point(-qa,u);else if(ga(n[0]-t[0])>Ca){var i=n[0]a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+qa/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+qa/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>qa,k=p*M;if(yc.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*La:b,S^h>=e^m>=e){var E=de(pe(f),pe(n));Me(E);var A=de(u,E);Me(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ca>i||Ca>i&&0>yc)^1&o}function He(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?qa:-qa),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(be(e,g)||be(p,g))&&(p[0]+=Ca,p[1]+=Ca,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&be(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=pe(n),u=pe(t),o=[1,0,0],a=de(r,u),c=ve(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=de(o,a),p=ye(o,f),v=ye(a,h);me(p,v);var d=g,m=ve(p,d),y=ve(d,d),M=m*m-y*(ve(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=ye(d,(-m-x)/y);if(me(b,p),b=xe(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=ga(A-qa)A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(ga(b[0]-w)qa^(w<=b[0]&&b[0]<=S)){var z=ye(d,(-m+x)/y);return me(z,p),[b,xe(z)]}}}function u(t,e){var r=o?n:qa-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=ga(i)>Ca,c=gr(n,6*Da);return Le(t,e,c,o?[0,-n]:[-qa,n-qa])}function Oe(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return ga(r[0]-n)0?0:3:ga(r[0]-e)0?2:1:ga(r[1]-t)0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Tc,Math.min(Tc,n)),t=Math.max(-Tc,Math.min(Tc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=Re(),N=Oe(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&Ce(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ye(n){var t=0,e=qa/3,r=ir(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*qa/180,e=n[1]*qa/180):[t/qa*180,e/qa*180]},u}function Ze(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Ve(){function n(n,t){Dc+=u*n-r*t,r=n,u=t}var t,e,r,u;Hc.point=function(i,o){Hc.point=n,t=r=i,e=u=o},Hc.lineEnd=function(){n(t,e)}}function Xe(n,t){Pc>n&&(Pc=n),n>jc&&(jc=n),Uc>t&&(Uc=t),t>Fc&&(Fc=t)}function $e(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Be(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Be(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Be(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function We(n,t){_c+=n,wc+=t,++Sc}function Je(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);kc+=o*(t+n)/2,Ec+=o*(e+r)/2,Ac+=o,We(t=n,e=r)}var t,e;Ic.point=function(r,u){Ic.point=n,We(t=r,e=u)}}function Ge(){Ic.point=We}function Ke(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);kc+=o*(r+n)/2,Ec+=o*(u+t)/2,Ac+=o,o=u*n-r*t,Nc+=o*(r+n),Cc+=o*(u+t),zc+=3*o,We(r=n,u=t)}var t,e,r,u;Ic.point=function(i,o){Ic.point=n,We(t=r=i,e=u=o)},Ic.lineEnd=function(){n(t,e)}}function Qe(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,La)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function nr(n){function t(n){return(a?r:e)(n)}function e(t){return rr(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=pe([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c +},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=ga(ga(w)-1)i||ga((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Da),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function tr(n){var t=nr(function(t,e){return n([t*Pa,e*Pa])});return function(n){return or(t(n))}}function er(n){this.stream=n}function rr(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ur(n){return ir(function(){return n})()}function ir(n){function t(n){return n=a(n[0]*Da,n[1]*Da),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Pa,n[1]*Pa]}function r(){a=Ae(o=lr(m,M,x),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=nr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Lc,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=or(b(o,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Lc):He((w=+n)*Da),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Da,d=n[1]%360*Da,r()):[v*Pa,d*Pa]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Da,M=n[1]%360*Da,x=n.length>2?n[2]%360*Da:0,r()):[m*Pa,M*Pa,x*Pa]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function or(n){return rr(n,function(t,e){n.point(t*Da,e*Da)})}function ar(n,t){return[n,t]}function cr(n,t){return[n>qa?n-La:-qa>n?n+La:n,t]}function lr(n,t,e){return n?t||e?Ae(fr(n),hr(t,e)):fr(n):t||e?hr(t,e):cr}function sr(n){return function(t,e){return t+=n,[t>qa?t-La:-qa>t?t+La:t,e]}}function fr(n){var t=sr(n);return t.invert=sr(-n),t}function hr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function gr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=pr(e,u),i=pr(e,i),(o>0?i>u:u>i)&&(u+=o*La)):(u=n+o*La,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=xe([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function pr(n,t){var e=pe(t);e[0]-=n,Me(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ca)%(2*Math.PI)}function vr(n,t,e){var r=ta.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function dr(n,t,e){var r=ta.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function mr(n){return n.source}function yr(n){return n.target}function Mr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Pa,Math.atan2(o,Math.sqrt(r*r+u*u))*Pa]}:function(){return[n*Pa,t*Pa]};return p.distance=h,p}function xr(){function n(n,u){var i=Math.sin(u*=Da),o=Math.cos(u),a=ga((n*=Da)-t),c=Math.cos(a);Yc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Zc.point=function(u,i){t=u*Da,e=Math.sin(i*=Da),r=Math.cos(i),Zc.point=n},Zc.lineEnd=function(){Zc.point=Zc.lineEnd=b}}function br(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function _r(n,t){function e(n,t){o>0?-Ra+Ca>t&&(t=-Ra+Ca):t>Ra-Ca&&(t=Ra-Ca);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(qa/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Ra]},e):Sr}function wr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return ga(u)u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function zr(n,t){return n[0]-t[0]||n[1]-t[1]}function qr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Lr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Tr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Rr(){tu(this),this.edge=this.site=this.circle=null}function Dr(n){var t=el.pop()||new Rr;return t.site=n,t}function Pr(n){Xr(n),Qc.remove(n),el.push(n),tu(n)}function Ur(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Pr(n);for(var c=i;c.circle&&ga(e-c.circle.x)s;++s)l=a[s],c=a[s-1],Kr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Jr(c.site,l.site,null,u),Vr(c),Vr(l)}function jr(n){for(var t,e,r,u,i=n.x,o=n.y,a=Qc._;a;)if(r=Fr(a,o)-i,r>Ca)a=a.L;else{if(u=i-Hr(a,o),!(u>Ca)){r>-Ca?(t=a.P,e=a):u>-Ca?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Dr(n);if(Qc.insert(t,c),t||e){if(t===e)return Xr(t),e=Dr(t.site),Qc.insert(c,e),c.edge=e.edge=Jr(t.site,c.site),Vr(t),void Vr(e);if(!e)return void(c.edge=Jr(t.site,c.site));Xr(t),Xr(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Kr(e.edge,l,p,x),c.edge=Jr(l,n,null,x),e.edge=Jr(n,p,null,x),Vr(t),Vr(e)}}function Fr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Hr(n,t){var e=n.N;if(e)return Fr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Or(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Kc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(ga(r-t)>Ca||ga(u-e)>Ca)&&(a.splice(o,0,new Qr(Gr(i.site,s,ga(r-f)Ca?{x:f,y:ga(t-f)Ca?{x:ga(e-p)Ca?{x:h,y:ga(t-h)Ca?{x:ga(e-g)=-za)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=rl.pop()||new Zr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=tl._;M;)if(m.yd||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.yr||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.yg){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.xi||f>o||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function gu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function pu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=mu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function vu(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function du(n,t){var e,r,u,i=il.lastIndex=ol.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=il.exec(n))&&(r=ol.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:vu(e,r)})),i=ol.lastIndex;return ir;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function mu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function yu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(mu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function Mu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function xu(n){return function(t){return 1-n(1-t)}}function bu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function _u(n){return n*n}function wu(n){return n*n*n}function Su(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function ku(n){return function(t){return Math.pow(t,n)}}function Eu(n){return 1-Math.cos(n*Ra)}function Au(n){return Math.pow(2,10*(n-1))}function Nu(n){return 1-Math.sqrt(1-n*n)}function Cu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/La*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*La/t)}}function zu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function qu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Lu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Tu(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Pu(n){var t=[n.a,n.b],e=[n.c,n.d],r=ju(t),u=Uu(t,e),i=ju(Fu(e,t,-u))||0;t[0]*e[1]180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:vu(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:vu(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:vu(g[0],p[0])},{i:e-2,x:vu(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i=0;)e.push(u[r])}function Qu(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++oe;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function si(n){return n.reduce(fi,0)}function fi(n,t){return n+t[1]}function hi(n,t){return gi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function gi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function pi(n){return[ta.min(n),ta.max(n)]}function vi(n,t){return n.value-t.value}function di(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function mi(n,t){n._pack_next=t,t._pack_prev=n}function yi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Mi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(xi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],wi(r,u,i),t(i),di(r,i),r._pack_prev=i,di(i,u),u=r._pack_next,o=3;l>o;o++){wi(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(yi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!yi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.ro;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(bi)}}function xi(n){n._pack_next=n._pack_prev=n}function bi(n){delete n._pack_next,delete n._pack_prev}function _i(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Ci(n,t,e){return n.a.parent===t.parent?n.a:e}function zi(n){return 1+ta.max(n,function(n){return n.y})}function qi(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Li(n){var t=n.children;return t&&t.length?Li(t[0]):n}function Ti(n){var t,e=n.children;return e&&(t=e.length)?Ti(e[t-1]):n}function Ri(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Di(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Pi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Ui(n){return n.rangeExtent?n.rangeExtent():Pi(n.range())}function ji(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Fi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Hi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ml}function Oi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?Oi:ji,c=r?Iu:Ou;return o=u(n,t,c,e),a=u(t,n,c,mu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Du)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Xi(n,t)},i.tickFormat=function(t,e){return $i(n,t,e)},i.nice=function(t){return Zi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Yi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Zi(n,t){return Fi(n,Hi(Vi(n,t)[2]))}function Vi(n,t){null==t&&(t=10);var e=Pi(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Xi(n,t){return ta.range.apply(ta,Vi(n,t))}function $i(n,t,e){var r=Vi(n,t);if(e){var u=ic.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(ga(r[0]),ga(r[1])));return u[7]||(u[7]="."+Bi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Wi(u[8],r)),e=u.join("")}else e=",."+Bi(r[2])+"f";return ta.format(e)}function Bi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Wi(n,t){var e=Bi(t[2]);return n in yl?Math.abs(e-Bi(Math.max(ga(t[0]),ga(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Ji(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Fi(r.map(u),e?Math:xl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Pi(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++0;h--)o.push(i(l)*h);for(l=0;o[l]c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return Ml;arguments.length<2?t=Ml:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Ji(n.copy(),t,e,r)},Yi(o,n)}function Gi(n,t,e){function r(t){return n(u(t))}var u=Ki(t),i=Ki(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Xi(e,n)},r.tickFormat=function(n,t){return $i(e,n,t)},r.nice=function(n){return r.domain(Zi(e,n))},r.exponent=function(o){return arguments.length?(u=Ki(t=o),i=Ki(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Gi(n.copy(),t,e)},Yi(r,n)}function Ki(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Qi(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new l;for(var i,o=-1,a=r.length;++oe?[0/0,0/0]:[e>0?a[e-1]:n[0],et?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return to(n,t,e)},u()}function eo(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return eo(n,t)},e}function ro(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Xi(n,t)},t.tickFormat=function(t,e){return $i(n,t,e)},t.copy=function(){return ro(n)},t}function uo(){return 0}function io(n){return n.innerRadius}function oo(n){return n.outerRadius}function ao(n){return n.startAngle}function co(n){return n.endAngle}function lo(n){return n&&n.padAngle}function so(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function fo(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function ho(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f1&&u.push("H",r[0]),u.join("")}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function To(n){return n.length<3?go(n):n[0]+_o(n,Lo(n))}function Ro(n){for(var t,e,r,u=-1,i=n.length;++ur)return s();var u=i[i.active];u&&(--i.count,delete i[i.active],u.event&&u.event.interrupt.call(n,n.__data__,u.index)),i.active=r,o.event&&o.event.start.call(n,n.__data__,t),o.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&v.push(r)}),h=o.ease,f=o.duration,ta.timer(function(){return p.c=l(e||1)?Ne:l,1},0,a)}function l(e){if(i.active!==r)return 1;for(var u=e/f,a=h(u),c=v.length;c>0;)v[--c].call(n,a);return u>=1?(o.event&&o.event.end.call(n,n.__data__,t),s()):void 0}function s(){return--i.count?delete i[r]:delete n[e],1}var f,h,g=o.delay,p=ec,v=[];return p.t=g+a,u>=g?c(u-g):void(p.c=c)},0,a)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Vl,u);return i==Vl.length?[t.year,Vi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Vl[i-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Pi(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Yi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.5"},ea=[].slice,ra=function(n){return ea.call(n)},ua=this.document;if(ua)try{ra(ua.documentElement.childNodes)[0].nodeType}catch(ia){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),ua)try{ua.createElement("DIV").style.setProperty("opacity",0,"")}catch(oa){var aa=this.Element.prototype,ca=aa.setAttribute,la=aa.setAttributeNS,sa=this.CSSStyleDeclaration.prototype,fa=sa.setProperty;aa.setAttribute=function(n,t){ca.call(this,n,t+"")},aa.setAttributeNS=function(n,t,e){la.call(this,n,t,e+"")},sa.setProperty=function(n,t,e){fa.call(this,n,t+"",e)}}ta.ascending=e,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=r){e=r;break}for(;++ur&&(e=r)}else{for(;++u=r){e=r;break}for(;++ur&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=r){e=r;break}for(;++ue&&(e=r)}else{for(;++u=r){e=r;break}for(;++ue&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i=r){e=u=r;break}for(;++ir&&(e=r),r>u&&(u=r))}else{for(;++i=r){e=u=r;break}for(;++ir&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var e,r=0,i=n.length,o=-1;if(1===arguments.length)for(;++o1?c/(s-1):void 0},ta.deviation=function(){var n=ta.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ha=i(e);ta.bisectLeft=ha.left,ta.bisect=ta.bisectRight=ha.right,ta.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,o),e=new Array(t);++n=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var ga=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=a(ga(e)),o=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++o)>t;)u.push(r/i);else for(;(r=n+e*++o)=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var c,s,f,h,g=-1,p=o.length,v=i[a++],d=new l;++g=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},c(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(ma,"\\$&")};var ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ya={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},Ma=function(n,t){return t.querySelector(n)},xa=function(n,t){return t.querySelectorAll(n)},ba=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(ba=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(Ma=function(n,t){return Sizzle(n,t)[0]||null},xa=Sizzle,ba=Sizzle.matchesSelector),ta.selection=function(){return ta.select(ua.documentElement)};var _a=ta.selection.prototype=[];_a.select=function(n){var t,e,r,u,i=[];n=N(n);for(var o=-1,a=this.length;++o=0&&(e=n.slice(0,t),n=n.slice(t+1)),wa.hasOwnProperty(e)?{space:wa[e],local:n}:n}},_a.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},_a.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++uu){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},_a.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},_a.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},_a.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},_a.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},_a.insert=function(n,t){return n=j(n),t=N(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},_a.remove=function(){return this.each(F)},_a.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new l,y=new Array(o);for(r=-1;++rr;++r)p[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,a.push(p),c.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++ii;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return A(u)},_a.order=function(){for(var n=-1,t=this.length;++n=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},_a.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++tn;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},_a.size=function(){var n=0;return Y(this,function(){++n}),n};var Sa=[];ta.selection.enter=Z,ta.selection.enter.prototype=Sa,Sa.append=_a.append,Sa.empty=_a.empty,Sa.node=_a.node,Sa.call=_a.call,Sa.size=_a.size,Sa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++ar){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var ka=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});ua&&ka.forEach(function(n){"on"+n in ua&&ka.remove(n)});var Ea,Aa=0;ta.mouse=function(n){return J(n,k())};var Na=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function e(n,t,e,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(e(f)).on(i+d,a).on(o+d,c),y=W(f),M=t(h,v);u?(l=u.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var r=E(n,"drag","dragstart","dragend"),u=null,i=e(b,ta.mouse,t,"mousemove","mouseup"),o=e(G,ta.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},ta.rebind(n,r,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ra(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Ca=1e-6,za=Ca*Ca,qa=Math.PI,La=2*qa,Ta=La-Ca,Ra=qa/2,Da=qa/180,Pa=180/qa,Ua=Math.SQRT2,ja=2,Fa=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(ja*h)*(e*ut(Ua*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Ua*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Ua*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Fa*f)/(2*i*ja*h),p=(c*c-i*i-Fa*f)/(2*c*ja*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Ua;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(q,f).on(Oa+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(N[0],Math.min(N[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,o)),i(d=e,r),t=ta.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function c(n){z++||n({type:"zoomstart"})}function l(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||n({type:"zoomend"}),d=null}function f(){function n(){f=1,i(ta.mouse(u),g),l(a)}function r(){h.on(L,null).on(T,null),p(f&&ta.event.target===o),s(a)}var u=this,o=ta.event.target,a=D.of(u,arguments),f=0,h=ta.select(t(u)).on(L,n).on(T,r),g=e(ta.mouse(u)),p=W(u);Dl.call(u),c(a)}function h(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ta.event.target;ta.select(t).on(x,r).on(b,a),_.push(t);for(var e=ta.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var c=n(),l=Date.now();if(1===c.length){if(500>l-M){var s=c[0];o(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=l}else if(c.length>1){var s=c[0],f=c[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,o=ta.touches(p);Dl.call(p);for(var a=0,c=o.length;c>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),l(v)}function a(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(_).on(y,null),w.on(q,f).on(R,h),E(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=ta.select(p),E=W(p);t(),c(v),w.on(q,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(v=e(d=m||ta.mouse(this)),Dl.call(this),c(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*Ha())*k.k),i(d,v),l(n)}function p(){var n=ta.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),ta.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},A=[960,500],N=Ia,C=250,z=0,q="mousedown.zoom",L="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=E(n,"zoomstart","zoom","zoomend");return Oa||(Oa="onwheel"in ua?(Ha=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Ha=function(){return ta.event.wheelDelta},"mousewheel"):(Ha=function(){return-ta.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Tl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},c(n)}).tween("zoom:zoom",function(){var e=A[0],r=A[1],u=d?d[0]:e/2,i=d?d[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},l(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,c(n),l(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(N=null==t?Ia:[+t[0],+t[1]],n):N},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(A=t&&[+t[0],+t[1]],n):A},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},ta.rebind(n,D,"on")};var Ha,Oa,Ia=[0,1/0];ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var Ya=at.prototype=new ot;Ya.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},Ya.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},Ya.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Za=lt.prototype=new ot;Za.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Va*(arguments.length?n:1)))},Za.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Va*(arguments.length?n:1)))},Za.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Va=18,Xa=.95047,$a=1,Ba=1.08883,Wa=ft.prototype=new ot;Wa.brighter=function(n){return new ft(Math.min(100,this.l+Va*(arguments.length?n:1)),this.a,this.b)},Wa.darker=function(n){return new ft(Math.max(0,this.l-Va*(arguments.length?n:1)),this.a,this.b)},Wa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var Ja=mt.prototype=new ot;Ja.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},Ja.hsl=function(){return _t(this.r,this.g,this.b)},Ja.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var Ga=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ga.forEach(function(n,t){Ga.set(n,yt(t))}),ta.functor=Et,ta.xhr=At(y),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Nt(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var Ka,Qa,nc,tc,ec,rc=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};Qa?Qa.n=i:Ka=i,Qa=i,nc||(tc=clearTimeout(tc),nc=1,rc(qt))},ta.timer.flush=function(){Lt(),Tt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var uc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Dt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Rt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),uc[8+e/3]};var ic=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,oc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Rt(n,t))).toFixed(Math.max(0,Math.min(20,Rt(n*(1+1e-15),t))))}}),ac=ta.time={},cc=Date;jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){lc.setUTCDate.apply(this._,arguments)},setDay:function(){lc.setUTCDay.apply(this._,arguments)},setFullYear:function(){lc.setUTCFullYear.apply(this._,arguments)},setHours:function(){lc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){lc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){lc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){lc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){lc.setUTCSeconds.apply(this._,arguments)},setTime:function(){lc.setTime.apply(this._,arguments)}};var lc=Date.prototype;ac.year=Ft(function(n){return n=ac.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ac.years=ac.year.range,ac.years.utc=ac.year.utc.range,ac.day=Ft(function(n){var t=new cc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ac.days=ac.day.range,ac.days.utc=ac.day.utc.range,ac.dayOfYear=function(n){var t=ac.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ac[n]=Ft(function(n){return(n=ac.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ac.year(n).getDay();return Math.floor((ac.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ac[n+"s"]=e.range,ac[n+"s"].utc=e.utc.range,ac[n+"OfYear"]=function(n){var e=ac.year(n).getDay();return Math.floor((ac.dayOfYear(n)+(e+t)%7)/7)}}),ac.week=ac.sunday,ac.weeks=ac.sunday.range,ac.weeks.utc=ac.sunday.utc.range,ac.weekOfYear=ac.sundayOfYear;var sc={"-":"",_:" ",0:"0"},fc=/^\s*\d+/,hc=/^%/;ta.locale=function(n){return{numberFormat:Pt(n),timeFormat:Ot(n)}};var gc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=gc.numberFormat,ta.geo={},ce.prototype={s:0,t:0,add:function(n){le(n,this.t,pc),le(pc.s,this.s,this),this.s?this.t+=pc.t:this.s=pc.t +},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var pc=new ce;ta.geo.stream=function(n,t){n&&vc.hasOwnProperty(n.type)?vc[n.type](n,t):se(n,t)};var vc={Feature:function(n,t){se(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++rn?4*qa+n:n,Mc.lineStart=Mc.lineEnd=Mc.point=b}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=pe([t*Da,e*Da]);if(m){var u=de(m,r),i=[u[1],-u[0],0],o=de(i,u);Me(o),o=xe(o);var c=t-p,l=c>0?1:-1,v=o[0]*Pa*l,d=ga(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Pa;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Pa;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=ga(r)>180?r+(r>0?360:-360):r}else v=n,d=e;Mc.point(n,e),t(n,e)}function i(){Mc.lineStart()}function o(){u(v,d),Mc.lineEnd(),ga(y)>Ca&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nyc?(s=-(h=180),f=-(g=90)):y>Ca?g=90:-Ca>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){xc=bc=_c=wc=Sc=kc=Ec=Ac=Nc=Cc=zc=0,ta.geo.stream(n,qc);var t=Nc,e=Cc,r=zc,u=t*t+e*e+r*r;return za>u&&(t=kc,e=Ec,r=Ac,Ca>bc&&(t=_c,e=wc,r=Sc),u=t*t+e*e+r*r,za>u)?[0/0,0/0]:[Math.atan2(e,t)*Pa,tt(r/Math.sqrt(u))*Pa]};var xc,bc,_c,wc,Sc,kc,Ec,Ac,Nc,Cc,zc,qc={sphere:b,point:_e,lineStart:Se,lineEnd:ke,polygonStart:function(){qc.lineStart=Ee},polygonEnd:function(){qc.lineStart=Se}},Lc=Le(Ne,Pe,je,[-qa,-qa/2]),Tc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ye(Ze)}).raw=Ze,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ca,f+.12*l+Ca],[s-.214*l-Ca,f+.234*l-Ca]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ca,f+.166*l+Ca],[s-.115*l-Ca,f+.234*l-Ca]]).stream(c).point,n},n.scale(1070)};var Rc,Dc,Pc,Uc,jc,Fc,Hc={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Dc=0,Hc.lineStart=Ve},polygonEnd:function(){Hc.lineStart=Hc.lineEnd=Hc.point=b,Rc+=ga(Dc/2)}},Oc={point:Xe,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Ic={point:We,lineStart:Je,lineEnd:Ge,polygonStart:function(){Ic.lineStart=Ke},polygonEnd:function(){Ic.point=We,Ic.lineStart=Je,Ic.lineEnd=Ge}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return Rc=0,ta.geo.stream(n,u(Hc)),Rc},n.centroid=function(n){return _c=wc=Sc=kc=Ec=Ac=Nc=Cc=zc=0,ta.geo.stream(n,u(Ic)),zc?[Nc/zc,Cc/zc]:Ac?[kc/Ac,Ec/Ac]:Sc?[_c/Sc,wc/Sc]:[0/0,0/0]},n.bounds=function(n){return jc=Fc=-(Pc=Uc=1/0),ta.geo.stream(n,u(Oc)),[[Pc,Uc],[jc,Fc]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||tr(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new $e:new Qe(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new er(t);for(var r in n)e[r]=n[r];return e}}},er.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ur,ta.geo.projectionMutator=ir,(ta.geo.equirectangular=function(){return ur(ar)}).raw=ar.invert=ar,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Da,t[1]*Da),t[0]*=Pa,t[1]*=Pa,t}return n=lr(n[0]%360*Da,n[1]*Da,n.length>2?n[2]*Da:0),t.invert=function(t){return t=n.invert(t[0]*Da,t[1]*Da),t[0]*=Pa,t[1]*=Pa,t},t},cr.invert=ar,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=lr(-n[0]*Da,-n[1]*Da,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Pa,n[1]*=Pa}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=gr((t=+r)*Da,u*Da),n):t},n.precision=function(r){return arguments.length?(e=gr(t*Da,(u=+r)*Da),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Da,u=n[1]*Da,i=t[1]*Da,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return ga(n%d)>Ca}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return ga(n%m)>Ca}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=vr(a,o,90),f=dr(r,e,y),h=vr(l,c,90),g=dr(i,u,y),n):y},n.majorExtent([[-180,-90+Ca],[180,90-Ca]]).minorExtent([[-180,-80-Ca],[180,80+Ca]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=mr,u=yr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return Mr(n[0]*Da,n[1]*Da,t[0]*Da,t[1]*Da)},ta.geo.length=function(n){return Yc=0,ta.geo.stream(n,Zc),Yc};var Yc,Zc={sphere:b,point:b,lineStart:xr,lineEnd:b,polygonStart:b,polygonEnd:b},Vc=br(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ur(Vc)}).raw=Vc;var Xc=br(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(ta.geo.azimuthalEquidistant=function(){return ur(Xc)}).raw=Xc,(ta.geo.conicConformal=function(){return Ye(_r)}).raw=_r,(ta.geo.conicEquidistant=function(){return Ye(wr)}).raw=wr;var $c=br(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ur($c)}).raw=$c,Sr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ra]},(ta.geo.mercator=function(){return kr(Sr)}).raw=Sr;var Bc=br(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ur(Bc)}).raw=Bc;var Wc=br(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ur(Wc)}).raw=Wc,Er.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ra]},(ta.geo.transverseMercator=function(){var n=kr(Er),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Er,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(zr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=Cr(a),s=Cr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ca)*Ca,y:Math.round(o(n,t)/Ca)*Ca,i:t}})}var r=Ar,u=Nr,i=r,o=u,a=ul;return n?t(n):(t.links=function(n){return iu(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return iu(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Yr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=su()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.xm&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=su();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){fu(n,k,v,d,m,y)},k.find=function(n){return hu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=cl.get(e)||al,r=ll.get(r)||y,Mu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Lu,ta.interpolateHsl=Tu,ta.interpolateLab=Ru,ta.interpolateRound=Du,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Pu(e?e.matrix:sl)})(n)},Pu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var sl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Hu,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++ea*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=fl,h=hl,g=-30,p=gl,v=.1,d=.64,m=[],M=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,y,x,b=m.length,_=M.length;for(e=0;_>e;++e)a=M[e],f=a.source,h=a.target,y=h.x-f.x,x=h.y-f.y,(p=y*y+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,y*=p,x*=p,h.x-=y*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=y*(d=1-d),f.y+=x*d);if((d=r*v)&&(y=l[0]/2,x=l[1]/2,e=-1,d))for(;++e0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;s>a;++a){var u=M[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++at;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=M[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,M[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,M[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(y).on("dragstart.force",Xu).on("drag.force",t).on("dragend.force",$u)),arguments.length?void this.on("mouseover.force",Bu).on("mouseout.force",Wu).call(e):e},ta.rebind(a,c,"on")};var fl=20,hl=1,gl=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return Qu(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ei,e=ni,r=ti;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ku(t,function(n){n.children&&(n.value=0)}),Qu(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++lf?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===pl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=pl,r=0,u=La,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var pl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=y,e=ai,r=ci,u=oi,i=ui,o=ii;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:vl.get(t)||ai,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:dl.get(t)||ci,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var vl=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(li),i=n.map(si),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ai}),dl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:ci});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i0)for(i=-1;++i=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=pi,u=hi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return gi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Qu(a,function(n){n.r=+s(n.value)}),Qu(a,Mi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;Qu(a,function(n){n.r+=f}),Qu(a,Mi),Qu(a,function(n){n.r-=f})}return _i(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(vi),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Gu(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(Qu(h,e),h.parent.m=-h.z,Ku(h,r),l)Ku(f,i);else{var g=f,p=f,v=f;Ku(f,function(n){n.xp.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Ku(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ni(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ei(o),u=ki(u),o&&u;)c=ki(c),i=Ei(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ai(Ci(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ei(i)&&(i.t=o,i.m+=f-s),u&&!ki(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=Si,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Gu(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;Qu(c,function(n){var t=n.children;t&&t.length?(n.x=qi(t),n.y=zi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Li(c),f=Ti(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return Qu(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=Si,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Gu(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++ut?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++oe&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++ie.dx)&&(s=e.dx);++ie&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var ml={floor:y,ceil:y};ta.scale.linear=function(){return Ii([0,1],[0,1],mu,!1)};var yl={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Ji(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var Ml=ta.format(".0e"),xl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Gi(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return Qi([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(bl)},ta.scale.category20=function(){return ta.scale.ordinal().range(_l)},ta.scale.category20b=function(){return ta.scale.ordinal().range(wl)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Sl)};var bl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),_l=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),wl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Sl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return no([],[])},ta.scale.quantize=function(){return to(0,1,[0,1])},ta.scale.threshold=function(){return eo([.5],[0,1])},ta.scale.identity=function(){return ro([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-Ra,f=a.apply(this,arguments)-Ra,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ta)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===kl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=qa?0:1;if(A&&so(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=qa?0:1;if(E&&so(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Lr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=fo(null==S?[_,w]:[S,k],[y,M],l,H,g),I=fo([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^so(O[1][0],O[1][1],I[1][0],I[1][1]),",",g," ",I[1],"A",H,",",H," 0 0,",v," ",I[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",I[0])}else N.push("M",y,",",M);if(null!=S){var Y=Math.min(p,(n-F)/(j-1)),Z=fo([y,M],[S,k],n,-Y,g),V=fo([_,w],null==x?[y,M]:[x,b],n,-Y,g);p===Y?N.push("L",V[0],"A",Y,",",Y," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^so(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",Y,",",Y," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",Y,",",Y," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=io,r=oo,u=uo,i=kl,o=ao,a=co,c=lo;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==kl?kl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Ra;return[Math.cos(t)*n,Math.sin(t)*n]},n};var kl="auto";ta.svg.line=function(){return ho(y)};var El=ta.map({linear:go,"linear-closed":po,step:vo,"step-before":mo,"step-after":yo,basis:So,"basis-open":ko,"basis-closed":Eo,bundle:Ao,cardinal:bo,"cardinal-open":Mo,"cardinal-closed":xo,monotone:To});El.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Al=[0,2/3,1/3,0],Nl=[0,1/3,2/3,0],Cl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=ho(Ro);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},mo.reverse=yo,yo.reverse=mo,ta.svg.area=function(){return Do(y)},ta.svg.area.radial=function(){var n=Do(Ro);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-Ra,s=l.call(n,u,r)-Ra;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>qa)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=mr,o=yr,a=Po,c=ao,l=co;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=mr,e=yr,r=Uo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=Uo,e=n.projection;return n.projection=function(n){return arguments.length?e(jo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(zl.get(t.call(this,n,r))||Oo)(e.call(this,n,r))}var t=Ho,e=Fo;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var zl=ta.map({circle:Oo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Ll)),e=t*Ll;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/ql),e=t*ql/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/ql),e=t*ql/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=zl.keys();var ql=Math.sqrt(3),Ll=Math.tan(30*Da);_a.transition=function(n){for(var t,e,r=Tl||++Ul,u=Xo(n),i=[],o=Rl||{time:Date.now(),ease:Su,delay:0,duration:250},a=-1,c=this.length;++ai;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Yo(u,this.namespace,this.id)},Pl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Pl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Hu:mu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Pl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Pl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=mu(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof n){2>o&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Zo(this,"style."+n,e,i)},Pl.styleTween=function(n,e,r){function u(u,i){var o=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Pl.text=function(n){return Zo(this,"text",n,Vo)},Pl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Pl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),Y(this,function(r){r[e][t].ease=n}))},Pl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Pl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Pl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Rl,i=Tl;try{Tl=e,Y(this,function(t,u,i){Rl=t[r][e],n.call(t,t.__data__,u,i)})}finally{Rl=u,Tl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Pl.transition=function(){for(var n,t,e,r,u=this.id,i=++Ul,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Yo(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):y:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ca),d=ta.transition(p.exit()).style("opacity",Ca).remove(),m=ta.transition(p.order()).style("opacity",1),M=Math.max(u,0)+o,x=Ui(f),b=l.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),ta.transition(b));v.append("line"),v.append("text");var w,S,k,E,A=v.select("line"),N=m.select("line"),C=p.select("text").text(g),z=v.select("text"),q=m.select("text"),L="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,w="x",k="y",S="x2",E="y2",C.attr("dy",0>L?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+L*i+"V0H"+x[1]+"V"+L*i)):(n=Wo,w="y",k="x",S="y2",E="x2",C.attr("dy",".32em").style("text-anchor",0>L?"end":"start"),_.attr("d","M"+L*i+","+x[0]+"H0V"+x[1]+"H"+L*i)),A.attr(E,L*u),z.attr(k,L*M),N.attr(S,0).attr(E,L*u),q.attr(w,0).attr(k,L*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=jl,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Fl?t+"":jl,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var jl="bottom",Fl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(t){t.each(function(){var t=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=t.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=t.selectAll(".resize").data(v,y);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Hl[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var c,f=ta.transition(t),h=ta.transition(o);l&&(c=Ui(l),h.attr("x",c[0]).attr("width",c[1]-c[0]),r(f)),s&&(c=Ui(s),h.attr("y",c[0]).attr("height",c[1]-c[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==ta.event.keyCode&&(C||(M=null,q[0]-=f[1],q[1]-=h[1],C=2),S())}function v(){32==ta.event.keyCode&&2==C&&(q[0]+=f[1],q[1]+=h[1],C=0,S())}function d(){var n=ta.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ta.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),q[0]=f[+(n[0]s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?a=null:o=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=ta.select(ta.event.target),w=c.of(b,arguments),k=ta.select(b),E=_.datum(),A=!/^(n|s)$/.test(E)&&l,N=!/^(e|w)$/.test(E)&&s,C=_.classed("extent"),z=W(b),q=ta.mouse(b),L=ta.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(ta.event.changedTouches?L.on("touchmove.brush",d).on("touchend.brush",y):L.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)q[0]=f[0]-q[0],q[1]=h[0]-q[1];else if(E){var T=+/w$/.test(E),R=+/^n/.test(E);x=[f[1-T]-q[0],h[1-R]-q[1]],q[0]=f[T],q[1]=h[R]}else ta.event.altKey&&(M=q.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var o,a,c=E(n,"brushstart","brush","brushend"),l=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Ol[0];return n.event=function(n){n.each(function(){var n=c.of(this,arguments),t={x:f,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Tl?ta.select(this).transition().each("start.brush",function(){o=e.i,a=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=yu(f,t.x),r=yu(h,t.y);return o=a=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(l=t,v=Ol[!l<<1|!s],n):l},n.y=function(t){return arguments.length?(s=t,v=Ol[!l<<1|!s],n):s},n.clamp=function(t){return arguments.length?(l&&s?(g=!!t[0],p=!!t[1]):l?g=!!t:s&&(p=!!t),n):l&&s?[g,p]:l?g:s?p:null},n.extent=function(t){var e,r,u,i,c;return arguments.length?(l&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),o=[e,r],l.invert&&(e=l(e),r=l(r)),e>r&&(c=e,e=r,r=c),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],l&&(u=u[1],i=i[1]),a=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(c=u,u=i,i=c),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(l&&(o?(e=o[0],r=o[1]):(e=f[0],r=f[1],l.invert&&(e=l.invert(e),r=l.invert(r)),e>r&&(c=e,e=r,r=c))),s&&(a?(u=a[0],i=a[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(c=u,u=i,i=c))),l&&s?[[e,u],[r,i]]:l?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!l&&f[0]==f[1]||!!s&&h[0]==h[1]},ta.rebind(n,c,"on")};var Hl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ol=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Il=ac.format=gc.timeFormat,Yl=Il.utc,Zl=Yl("%Y-%m-%dT%H:%M:%S.%LZ");Il.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:Zl,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=Zl.toString,ac.second=Ft(function(n){return new cc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ac.seconds=ac.second.range,ac.seconds.utc=ac.second.utc.range,ac.minute=Ft(function(n){return new cc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ac.minutes=ac.minute.range,ac.minutes.utc=ac.minute.utc.range,ac.hour=Ft(function(n){var t=n.getTimezoneOffset()/60;return new cc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ac.hours=ac.hour.range,ac.hours.utc=ac.hour.utc.range,ac.month=Ft(function(n){return n=ac.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ac.months=ac.month.range,ac.months.utc=ac.month.utc.range;var Vl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Xl=[[ac.second,1],[ac.second,5],[ac.second,15],[ac.second,30],[ac.minute,1],[ac.minute,5],[ac.minute,15],[ac.minute,30],[ac.hour,1],[ac.hour,3],[ac.hour,6],[ac.hour,12],[ac.day,1],[ac.day,2],[ac.week,1],[ac.month,1],[ac.month,3],[ac.year,1]],$l=Il.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ne]]),Bl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:y,ceil:y};Xl.year=ac.year,ac.scale=function(){return Go(ta.scale.linear(),Xl,$l)};var Wl=Xl.map(function(n){return[n[0].utc,n[1]]}),Jl=Yl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ne]]);Wl.year=ac.year.utc,ac.scale.utc=function(){return Go(ta.scale.linear(),Wl,Jl)},ta.text=At(function(n){return n.responseText}),ta.json=function(n,t){return Nt(n,"application/json",Qo,t)},ta.html=function(n,t){return Nt(n,"text/html",na,t)},ta.xml=At(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}(); \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/holder.min.js b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/holder.min.js new file mode 100644 index 00000000..6bfc844b --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/holder.min.js @@ -0,0 +1,12 @@ +/*! + +Holder - client side image placeholders +Version 2.7.1+6hydf +© 2015 Ivan Malopinsky - http://imsky.co + +Site: http://holderjs.com +Issues: https://github.com/imsky/holder/issues +License: http://opensource.org/licenses/MIT + +*/ +!function(a){if(a.document){var b=a.document;b.querySelectorAll||(b.querySelectorAll=function(c){var d,e=b.createElement("style"),f=[];for(b.documentElement.firstChild.appendChild(e),b._qsa=[],e.styleSheet.cssText=c+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",a.scrollBy(0,0),e.parentNode.removeChild(e);b._qsa.length;)d=b._qsa.shift(),d.style.removeAttribute("x-qsa"),f.push(d);return b._qsa=null,f}),b.querySelector||(b.querySelector=function(a){var c=b.querySelectorAll(a);return c.length?c[0]:null}),b.getElementsByClassName||(b.getElementsByClassName=function(a){return a=String(a).replace(/^|\s+/g,"."),b.querySelectorAll(a)}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw TypeError("Object.keys called on non-object");var b,c=[];for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return c}),function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.atob=a.atob||function(a){a=String(a);var c,d=0,e=[],f=0,g=0;if(a=a.replace(/\s/g,""),a.length%4===0&&(a=a.replace(/=+$/,"")),a.length%4===1)throw Error("InvalidCharacterError");if(/[^+/0-9A-Za-z]/.test(a))throw Error("InvalidCharacterError");for(;d>16&255)),e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f)),g=0,f=0),d+=1;return 12===g?(f>>=4,e.push(String.fromCharCode(255&f))):18===g&&(f>>=2,e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f))),e.join("")},a.btoa=a.btoa||function(a){a=String(a);var c,d,e,f,g,h,i,j=0,k=[];if(/[^\x00-\xFF]/.test(a))throw Error("InvalidCharacterError");for(;j>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,j===a.length+2?(h=64,i=64):j===a.length+1&&(i=64),k.push(b.charAt(f),b.charAt(g),b.charAt(h),b.charAt(i));return k.join("")}}(a),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(a){var b=this.__proto__||this.constructor.prototype;return a in this&&(!(a in b)||b[a]!==this[a])}),function(){if("performance"in a==!1&&(a.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in a.performance==!1){var b=Date.now();performance.timing&&performance.timing.navigationStart&&(b=performance.timing.navigationStart),a.performance.now=function(){return Date.now()-b}}}(),a.requestAnimationFrame||(a.webkitRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return webkitRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=webkitCancelAnimationFrame}(a):a.mozRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return mozRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=mozCancelAnimationFrame}(a):!function(a){a.requestAnimationFrame=function(b){return a.setTimeout(b,1e3/60)},a.cancelAnimationFrame=a.clearTimeout}(a))}}(this),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):"object"==typeof exports?exports.Holder=b():a.Holder=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){function d(a,b,c,d){var f=e(c.substr(c.lastIndexOf(a.domain)),a);f&&h({mode:null,el:d,flags:f,engineSettings:b})}function e(a,b){var c={theme:B(J.settings.themes.gray,null),stylesheets:b.stylesheets,instanceOptions:b};return a.match(/([\d]+p?)x([\d]+p?)(?:\?|$)/)?f(a,c):g(a,c)}function f(a,b){var c=a.split("?"),d=c[0].split("/");b.holderURL=a;var e=d[1],f=e.match(/([\d]+p?)x([\d]+p?)/);if(!f)return!1;if(b.fluid=-1!==e.indexOf("p"),b.dimensions={width:f[1].replace("p","%"),height:f[2].replace("p","%")},2===c.length){var g=A.parse(c[1]);if(g.bg&&(b.theme.background=(-1===g.bg.indexOf("#")?"#":"")+g.bg),g.fg&&(b.theme.foreground=(-1===g.fg.indexOf("#")?"#":"")+g.fg),g.theme&&b.instanceOptions.themes.hasOwnProperty(g.theme)&&(b.theme=B(b.instanceOptions.themes[g.theme],null)),g.text&&(b.text=g.text),g.textmode&&(b.textmode=g.textmode),g.size&&(b.size=g.size),g.font&&(b.font=g.font),g.align&&(b.align=g.align),b.nowrap=z.truthy(g.nowrap),b.auto=z.truthy(g.auto),z.truthy(g.random)){J.vars.cache.themeKeys=J.vars.cache.themeKeys||Object.keys(b.instanceOptions.themes);var h=J.vars.cache.themeKeys[0|Math.random()*J.vars.cache.themeKeys.length];b.theme=B(b.instanceOptions.themes[h],null)}}return b}function g(a,b){var c=!1,d=String.fromCharCode(11),e=a.replace(/([^\\])\//g,"$1"+d).split(d),f=/%[0-9a-f]{2}/gi,g=b.instanceOptions;b.holderURL=[];for(var h=e.length,i=0;h>i;i++){var j=e[i];if(j.match(f))try{j=decodeURIComponent(j)}catch(k){j=e[i]}var l=!1;if(J.flags.dimensions.match(j))c=!0,b.dimensions=J.flags.dimensions.output(j),l=!0;else if(J.flags.fluid.match(j))c=!0,b.dimensions=J.flags.fluid.output(j),b.fluid=!0,l=!0;else if(J.flags.textmode.match(j))b.textmode=J.flags.textmode.output(j),l=!0;else if(J.flags.colors.match(j)){var m=J.flags.colors.output(j);b.theme=B(b.theme,m),l=!0}else if(g.themes[j])g.themes.hasOwnProperty(j)&&(b.theme=B(g.themes[j],null)),l=!0;else if(J.flags.font.match(j))b.font=J.flags.font.output(j),l=!0;else if(J.flags.auto.match(j))b.auto=!0,l=!0;else if(J.flags.text.match(j))b.text=J.flags.text.output(j),l=!0;else if(J.flags.size.match(j))b.size=J.flags.size.output(j),l=!0;else if(J.flags.random.match(j)){null==J.vars.cache.themeKeys&&(J.vars.cache.themeKeys=Object.keys(g.themes));var n=J.vars.cache.themeKeys[0|Math.random()*J.vars.cache.themeKeys.length];b.theme=B(g.themes[n],null),l=!0}l&&b.holderURL.push(j)}return b.holderURL.unshift(g.domain),b.holderURL=b.holderURL.join("/"),c?b:!1}function h(a){var b=a.mode,c=a.el,d=a.flags,e=a.engineSettings,f=d.dimensions,g=d.theme,h=f.width+"x"+f.height;if(b=null==b?d.fluid?"fluid":"image":b,null!=d.text&&(g.text=d.text,"object"===c.nodeName.toLowerCase())){for(var j=g.text.split("\\n"),k=0;k1){var n,o=0,p=0,q=0;j=new e.Group("line"+q),("left"===a.align||"right"===a.align)&&(m=a.width*(1-2*(1-J.setup.lineWrapRatio)));for(var r=0;r=m||t===!0)&&(b(g,j,o,g.properties.leading),g.add(j),o=0,p+=g.properties.leading,q+=1,j=new e.Group("line"+q),j.y=p),t!==!0&&(i.moveTo(o,0),o+=h.spaceWidth+s.width,j.add(i))}if(b(g,j,o,g.properties.leading),g.add(j),"left"===a.align)g.moveTo(a.width-l,null,null);else if("right"===a.align){for(n in g.children)j=g.children[n],j.moveTo(a.width-j.width,null,null);g.moveTo(0-(a.width-l),null,null)}else{for(n in g.children)j=g.children[n],j.moveTo((g.width-j.width)/2,null,null);g.moveTo((a.width-g.width)/2,null,null)}g.moveTo(null,(a.height-g.height)/2,null),(a.height-g.height)/2<0&&g.moveTo(null,0,null)}else i=new e.Text(a.text),j=new e.Group("line0"),j.add(i),g.add(j),"left"===a.align?g.moveTo(a.width-l,null,null):"right"===a.align?g.moveTo(0-(a.width-l),null,null):g.moveTo((a.width-h.boundingBox.width)/2,null,null),g.moveTo(null,(a.height-h.boundingBox.height)/2,null);return d}function k(a,b,c){var d=parseInt(a,10),e=parseInt(b,10),f=Math.max(d,e),g=Math.min(d,e),h=.8*Math.min(g,f*J.defaults.scale);return Math.round(Math.max(c,h))}function l(a){var b;b=null==a||null==a.nodeType?J.vars.resizableImages:[a];for(var c=0,d=b.length;d>c;c++){var e=b[c];if(e.holderData){var f=e.holderData.flags,g=D(e);if(g){if(!e.holderData.resizeUpdate)continue;if(f.fluid&&f.auto){var h=e.holderData.fluidConfig;switch(h.mode){case"width":g.height=g.width/h.ratio;break;case"height":g.width=g.height*h.ratio}}var j={mode:"image",holderSettings:{dimensions:g,theme:f.theme,flags:f},el:e,engineSettings:e.holderData.engineSettings};"exact"==f.textmode&&(f.exactDimensions=g,j.holderSettings.dimensions=f.dimensions),i(j)}else p(e)}}}function m(a){if(a.holderData){var b=D(a);if(b){var c=a.holderData.flags,d={fluidHeight:"%"==c.dimensions.height.slice(-1),fluidWidth:"%"==c.dimensions.width.slice(-1),mode:null,initialDimensions:b};d.fluidWidth&&!d.fluidHeight?(d.mode="width",d.ratio=d.initialDimensions.width/parseFloat(c.dimensions.height)):!d.fluidWidth&&d.fluidHeight&&(d.mode="height",d.ratio=parseFloat(c.dimensions.width)/d.initialDimensions.height),a.holderData.fluidConfig=d}else p(a)}}function n(){for(var a,c=[],d=Object.keys(J.vars.invisibleImages),e=0,f=d.length;f>e;e++)a=J.vars.invisibleImages[d[e]],D(a)&&"img"==a.nodeName.toLowerCase()&&(c.push(a),delete J.vars.invisibleImages[d[e]]);c.length&&I.run({images:c}),b.requestAnimationFrame(n)}function o(){J.vars.visibilityCheckStarted||(b.requestAnimationFrame(n),J.vars.visibilityCheckStarted=!0)}function p(a){a.holderData.invisibleId||(J.vars.invisibleId+=1,J.vars.invisibleImages["i"+J.vars.invisibleId]=a,a.holderData.invisibleId=J.vars.invisibleId)}function q(a,b){return null==b?document.createElement(a):document.createElementNS(b,a)}function r(a,b){for(var c in b)a.setAttribute(c,b[c])}function s(a,b,c){var d,e;null==a?(a=q("svg",E),d=q("defs",E),e=q("style",E),r(e,{type:"text/css"}),d.appendChild(e),a.appendChild(d)):e=a.querySelector("style"),a.webkitMatchesSelector&&a.setAttribute("xmlns",E);for(var f=0;f=0;h--){var i=g.createProcessingInstruction("xml-stylesheet",'href="'+f[h]+'" rel="stylesheet"');g.insertBefore(i,g.firstChild)}g.removeChild(g.documentElement),e=d.serializeToString(g)}var j=d.serializeToString(a);return j=j.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),e+j}}function u(){return b.DOMParser?(new DOMParser).parseFromString("","application/xml"):void 0}function v(a){J.vars.debounceTimer||a.call(this),J.vars.debounceTimer&&b.clearTimeout(J.vars.debounceTimer),J.vars.debounceTimer=b.setTimeout(function(){J.vars.debounceTimer=null,a.call(this)},J.setup.debounce)}function w(){v(function(){l(null)})}var x=c(1),y=c(2),z=c(3),A=c(4),B=z.extend,C=z.getNodeArray,D=z.dimensionCheck,E="http://www.w3.org/2000/svg",F=8,G="2.7.1",H="\nCreated with Holder.js "+G+".\nLearn more at http://holderjs.com\n(c) 2012-2015 Ivan Malopinsky - http://imsky.co\n",I={version:G,addTheme:function(a,b){return null!=a&&null!=b&&(J.settings.themes[a]=b),delete J.vars.cache.themeKeys,this},addImage:function(a,b){var c=document.querySelectorAll(b);if(c.length)for(var d=0,e=c.length;e>d;d++){var f=q("img"),g={};g[J.vars.dataAttr]=a,r(f,g),c[d].appendChild(f)}return this},setResizeUpdate:function(a,b){a.holderData&&(a.holderData.resizeUpdate=!!b,a.holderData.resizeUpdate&&l(a))},run:function(a){a=a||{};var c={},f=B(J.settings,a);J.vars.preempted=!0,J.vars.dataAttr=f.dataAttr||J.vars.dataAttr,c.renderer=f.renderer?f.renderer:J.setup.renderer,-1===J.setup.renderers.join(",").indexOf(c.renderer)&&(c.renderer=J.setup.supportsSVG?"svg":J.setup.supportsCanvas?"canvas":"html");var g=C(f.images),i=C(f.bgnodes),j=C(f.stylenodes),k=C(f.objects);c.stylesheets=[],c.svgXMLStylesheet=!0,c.noFontFallback=f.noFontFallback?f.noFontFallback:!1;for(var l=0;l1){c.nodeValue="";for(var u=0;u=0?b:1)}function f(a){v?e(a):w.push(a)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function y(){document.removeEventListener("DOMContentLoaded",y,!1),document.readyState="complete"},!1),document.readyState="loading");var g=a.document,h=g.documentElement,i="load",j=!1,k="on"+i,l="complete",m="readyState",n="attachEvent",o="detachEvent",p="addEventListener",q="DOMContentLoaded",r="onreadystatechange",s="removeEventListener",t=p in g,u=j,v=j,w=[];if(g[m]===l)e(b);else if(t)g[p](q,c,j),a[p](i,c,j);else{g[n](r,c),a[n](k,c);try{u=null==a.frameElement&&h}catch(x){}u&&u.doScroll&&!function z(){if(!v){try{u.doScroll("left")}catch(a){return e(z,50)}d(),b()}}()}return f.version="1.4.0",f.isReady=function(){return v},f}a.exports="undefined"!=typeof window&&b(window)},function(a,b,c){var d=c(5),e=function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}var c=1,e=d.defclass({constructor:function(a){c++,this.parent=null,this.children={},this.id=c,this.name="n"+c,null!=a&&(this.name=a),this.x=0,this.y=0,this.z=0,this.width=0,this.height=0},resize:function(a,b){null!=a&&(this.width=a),null!=b&&(this.height=b)},moveTo:function(a,b,c){this.x=null!=a?a:this.x,this.y=null!=b?b:this.y,this.z=null!=c?c:this.z},add:function(a){var b=a.name;if(null!=this.children[b])throw"SceneGraph: child with that name already exists: "+b;this.children[b]=a,a.parent=this}}),f=d(e,function(b){this.constructor=function(){b.constructor.call(this,"root"),this.properties=a}}),g=d(e,function(a){function c(c,d){if(a.constructor.call(this,c),this.properties={fill:"#000"},null!=d)b(this.properties,d);else if(null!=c&&"string"!=typeof c)throw"SceneGraph: invalid node name"}this.Group=d.extend(this,{constructor:c,type:"group"}),this.Rect=d.extend(this,{constructor:c,type:"rect"}),this.Text=d.extend(this,{constructor:function(a){c.call(this),this.properties.text=a},type:"text"})}),h=new f;return this.Shape=g,this.root=h,this};a.exports=e},function(a,b){(function(a){b.extend=function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);if(null!=b)for(var e in b)b.hasOwnProperty(e)&&(c[e]=b[e]);return c},b.cssProps=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c+":"+a[c]);return b.join(";")},b.encodeHtmlEntity=function(a){for(var b=[],c=0,d=a.length-1;d>=0;d--)c=a.charCodeAt(d),b.unshift(c>128?["&#",c,";"].join(""):a[d]);return b.join("")},b.getNodeArray=function(b){var c=null;return"string"==typeof b?c=document.querySelectorAll(b):a.NodeList&&b instanceof a.NodeList?c=b:a.Node&&b instanceof a.Node?c=[b]:a.HTMLCollection&&b instanceof a.HTMLCollection?c=b:b instanceof Array?c=b:null===b&&(c=[]),c},b.imageExists=function(a,b){var c=new Image;c.onerror=function(){b.call(this,!1)},c.onload=function(){b.call(this,!0)},c.src=a},b.decodeHtmlEntity=function(a){return a.replace(/&#(\d+);/g,function(a,b){return String.fromCharCode(b)})},b.dimensionCheck=function(a){var b={height:a.clientHeight,width:a.clientWidth};return b.height&&b.width?b:!1},b.truthy=function(a){return"string"==typeof a?"true"===a||"yes"===a||"1"===a||"on"===a||"✓"===a:!!a}}).call(b,function(){return this}())},function(a,b,c){var d=encodeURIComponent,e=decodeURIComponent,f=c(6),g=c(7),h=/(\w+)\[(\d+)\]/,i=/\w+\.\w+/;b.parse=function(a){if("string"!=typeof a)return{};if(a=f(a),""===a)return{};"?"===a.charAt(0)&&(a=a.slice(1));for(var b={},c=a.split("&"),d=0;d",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document); \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js new file mode 100644 index 00000000..0f60b7bd --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
    a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:k.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("