diff options
author | Vjacheslav Trushkin <arty@phpbb.com> | 2012-03-31 10:43:06 +0300 |
---|---|---|
committer | Vjacheslav Trushkin <arty@phpbb.com> | 2012-03-31 10:43:06 +0300 |
commit | 398a6c8045113f14900bdea8c70ba032f75b45f6 (patch) | |
tree | 1a9ff30f5eeca6faf0adbd314b60caf1869079c5 /phpBB/includes/extension/controller.php | |
parent | 506951e8aff98582ebc56fcda9ed0626497ade77 (diff) | |
parent | 013a8649a5164b90310e76d99fae2186b831a5f0 (diff) | |
download | forums-398a6c8045113f14900bdea8c70ba032f75b45f6.tar forums-398a6c8045113f14900bdea8c70ba032f75b45f6.tar.gz forums-398a6c8045113f14900bdea8c70ba032f75b45f6.tar.bz2 forums-398a6c8045113f14900bdea8c70ba032f75b45f6.tar.xz forums-398a6c8045113f14900bdea8c70ba032f75b45f6.zip |
Merge branch 'develop' into feature/merging-style-components
* develop: (175 commits)
[feature/ajax] Remove strange non-breaking spaces from approve button
[feature/ajax] Add entirely unrelated but nice newlines
[feature/ajax] Unify phpbb_json_response instantiation
[feature/ajax] Fix acp_styles activate_deactivate ajax callback name
[feature/ajax] Send correct activate/deactivate JSON response in acp_profile
[ticket/10270] Alter background colors for posts
[feature/ajax] Remove not working module enable/disable ajax code
[feature/ajax] Replace static call to phpbb_request with OO
[feature/ajax] Remove quick-reply AJAX handling until we have something good
[ticket/10270] Changing close button for ajax popups
[ticket/10270] Disabling links in disappearing content
[ticket/10291] Fixed an AJAX bug on quick reply form submit.
[ticket/10273] Fixed accepting / denying posts AJAX.
[ticket/10272] Removed code that was prevent event propogation in AJAX.
[ticket/10291] Fixed a bug in the quick reply AJAX.
[feature/ajax] Handle acp_modules error cases with JSON response
[feature/ajax] Fix filter check, quick mod tools data-attribute
[feature/ajax] Use the error handler
[feature/ajax] Generic error handling with a phpbb.alert box
[feature/ajax] Change filter semantics, some minor adjustments
...
Conflicts:
phpBB/adm/style/acp_styles.html
phpBB/includes/acp/acp_styles.php
Diffstat (limited to 'phpBB/includes/extension/controller.php')
-rw-r--r-- | phpBB/includes/extension/controller.php | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/phpBB/includes/extension/controller.php b/phpBB/includes/extension/controller.php new file mode 100644 index 0000000000..c7fd439a19 --- /dev/null +++ b/phpBB/includes/extension/controller.php @@ -0,0 +1,77 @@ +<?php +/** +* +* @package extension +* @copyright (c) 2011 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +/** +* Abstract class extended by extension front controller classes +* +* @package extension +*/ +abstract class phpbb_extension_controller implements phpbb_extension_controller_interface +{ + /** + * @var phpbb_request Request class object + */ + protected $request; + + /** + * @var dbal DBAL class object + */ + protected $db; + + /** + * @var user User class object + */ + protected $user; + + /** + * @var phpbb_template Template class object + */ + protected $template; + + /** + * @var array Config array + */ + protected $config; + + /** + * @var string PHP Extension + */ + protected $phpEx; + + /** + * @var string Relative path to board root + */ + protected $phpbb_root_path; + + /** + * Constructor method that provides the common phpBB objects as inherited class + * properties for automatic availability in extension controllers + */ + public function __construct() + { + global $request, $db, $user, $template, $config; + global $phpEx, $phpbb_root_path; + + $this->request = $request; + $this->db = $db; + $this->user = $user; + $this->template = $template; + $this->config = $config; + $this->phpEx = $phpEx; + $this->phpbb_root_path = $phpbb_root_path; + } +} |