[feature/dic] Rename {phpEx => php_ext} for consistency

PHPBB3-10739
This commit is contained in:
Igor Wiedler 2012-07-26 16:15:56 +02:00
parent cec4c94f2e
commit 5cdcaaa531
8 changed files with 34 additions and 34 deletions

View file

@ -32,17 +32,17 @@ class phpbb_cron_manager
*/ */
protected $tasks = array(); protected $tasks = array();
protected $phpbb_root_path, $phpEx; protected $phpbb_root_path, $php_ext;
/** /**
* Constructor. Loads all available tasks. * Constructor. Loads all available tasks.
* *
* @param array|Traversable $tasks Provides an iterable set of task names * @param array|Traversable $tasks Provides an iterable set of task names
*/ */
public function __construct($tasks, $phpbb_root_path, $phpEx) public function __construct($tasks, $phpbb_root_path, $php_ext)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx; $this->php_ext = $php_ext;
$this->load_tasks($tasks); $this->load_tasks($tasks);
} }
@ -126,6 +126,6 @@ class phpbb_cron_manager
public function wrap_task(phpbb_cron_task $task) public function wrap_task(phpbb_cron_task $task)
{ {
return new phpbb_cron_task_wrapper($task, $this->phpbb_root_path, $this->phpEx); return new phpbb_cron_task_wrapper($task, $this->phpbb_root_path, $this->php_ext);
} }
} }

View file

@ -26,12 +26,12 @@ if (!defined('IN_PHPBB'))
*/ */
class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base
{ {
private $phpbb_root_path, $phpEx, $config, $db; private $phpbb_root_path, $php_ext, $config, $db;
public function __construct($phpbb_root_path, $phpEx, phpbb_config $config, dbal $db) public function __construct($phpbb_root_path, $php_ext, phpbb_config $config, dbal $db)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx; $this->php_ext = $php_ext;
$this->config = $config; $this->config = $config;
$this->db = $db; $this->db = $db;
} }
@ -45,7 +45,7 @@ class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base
{ {
if (!function_exists('auto_prune')) if (!function_exists('auto_prune'))
{ {
include($this->phpbb_root_path . 'includes/functions_admin.' . $this->phpEx); include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
} }
$sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq $sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq

View file

@ -26,13 +26,13 @@ if (!defined('IN_PHPBB'))
*/ */
class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements phpbb_cron_task_parametrized class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements phpbb_cron_task_parametrized
{ {
private $phpbb_root_path, $phpEx, $config, $db; private $phpbb_root_path, $php_ext, $config, $db;
private $forum_data; private $forum_data;
public function __construct($phpbb_root_path, $phpEx, phpbb_config $config, dbal $db) public function __construct($phpbb_root_path, $php_ext, phpbb_config $config, dbal $db)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx; $this->php_ext = $php_ext;
$this->config = $config; $this->config = $config;
$this->db = $db; $this->db = $db;
} }
@ -56,7 +56,7 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p
{ {
if (!function_exists('auto_prune')) if (!function_exists('auto_prune'))
{ {
include($this->phpbb_root_path . 'includes/functions_admin.' . $this->phpEx); include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
} }
if ($this->forum_data['prune_days']) if ($this->forum_data['prune_days'])

View file

@ -22,12 +22,12 @@ if (!defined('IN_PHPBB'))
*/ */
class phpbb_cron_task_core_queue extends phpbb_cron_task_base class phpbb_cron_task_core_queue extends phpbb_cron_task_base
{ {
private $phpbb_root_path, $phpEx, $config; private $phpbb_root_path, $php_ext, $config;
public function __construct($phpbb_root_path, $phpEx, phpbb_config $config) public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx; $this->php_ext = $php_ext;
$this->config = $config; $this->config = $config;
} }
@ -40,7 +40,7 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base
{ {
if (!class_exists('queue')) if (!class_exists('queue'))
{ {
include($this->phpbb_root_path . 'includes/functions_messenger.' . $this->phpEx); include($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext);
} }
$queue = new queue(); $queue = new queue();
$queue->process(); $queue->process();
@ -55,7 +55,7 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base
*/ */
public function is_runnable() public function is_runnable()
{ {
return file_exists($this->phpbb_root_path . 'cache/queue.' . $this->phpEx); return file_exists($this->phpbb_root_path . 'cache/queue.' . $this->php_ext);
} }
/** /**

View file

@ -22,12 +22,12 @@ if (!defined('IN_PHPBB'))
*/ */
class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base
{ {
private $phpbb_root_path, $phpEx, $config; private $phpbb_root_path, $php_ext, $config;
public function __construct($phpbb_root_path, $phpEx, phpbb_config $config) public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx; $this->php_ext = $php_ext;
$this->config = $config; $this->config = $config;
} }
@ -40,7 +40,7 @@ class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base
{ {
if (!function_exists('tidy_database')) if (!function_exists('tidy_database'))
{ {
include($this->phpbb_root_path . 'includes/functions_admin.' . $this->phpEx); include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
} }
tidy_database(); tidy_database();
} }

View file

@ -24,12 +24,12 @@ if (!defined('IN_PHPBB'))
*/ */
class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
{ {
private $phpbb_root_path, $phpEx, $config; private $phpbb_root_path, $php_ext, $config;
public function __construct($phpbb_root_path, $phpEx, phpbb_config $config) public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx; $this->php_ext = $php_ext;
$this->config = $config; $this->config = $config;
} }
@ -45,7 +45,7 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
if (!class_exists($search_type)) if (!class_exists($search_type))
{ {
include($this->phpbb_root_path . "includes/search/$search_type." . $this->phpEx); include($this->phpbb_root_path . "includes/search/$search_type." . $this->php_ext);
} }
// We do some additional checks in the module to ensure it can actually be utilised // We do some additional checks in the module to ensure it can actually be utilised
@ -72,7 +72,7 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
// Select the search method // Select the search method
$search_type = basename($this->config['search_type']); $search_type = basename($this->config['search_type']);
return file_exists($this->phpbb_root_path . 'includes/search/' . $search_type . '.' . $this->phpEx); return file_exists($this->phpbb_root_path . 'includes/search/' . $search_type . '.' . $this->php_ext);
} }
/** /**

View file

@ -24,12 +24,12 @@ if (!defined('IN_PHPBB'))
*/ */
class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base
{ {
private $phpbb_root_path, $phpEx, $config; private $phpbb_root_path, $php_ext, $config;
public function __construct($phpbb_root_path, $phpEx, phpbb_config $config) public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx; $this->php_ext = $php_ext;
$this->config = $config; $this->config = $config;
} }
@ -42,7 +42,7 @@ class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base
{ {
if (!function_exists('tidy_warnings')) if (!function_exists('tidy_warnings'))
{ {
include($this->phpbb_root_path . 'includes/functions_admin.' . $this->phpEx); include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
} }
tidy_warnings(); tidy_warnings();
} }

View file

@ -23,7 +23,7 @@ if (!defined('IN_PHPBB'))
*/ */
class phpbb_cron_task_wrapper class phpbb_cron_task_wrapper
{ {
private $task, $phpbb_root_path, $phpEx; private $task, $phpbb_root_path, $php_ext;
/** /**
* Constructor. * Constructor.
@ -32,11 +32,11 @@ class phpbb_cron_task_wrapper
* *
* @param phpbb_cron_task $task The cron task to wrap. * @param phpbb_cron_task $task The cron task to wrap.
*/ */
public function __construct(phpbb_cron_task $task, $phpbb_root_path, $phpEx) public function __construct(phpbb_cron_task $task, $phpbb_root_path, $php_ext)
{ {
$this->task = $task; $this->task = $task;
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx; $this->php_ext = $php_ext;
} }
/** /**
@ -90,7 +90,7 @@ class phpbb_cron_task_wrapper
{ {
$extra = ''; $extra = '';
} }
$url = append_sid($this->phpbb_root_path . 'cron.' . $this->phpEx, 'cron_type=' . $name . $extra); $url = append_sid($this->phpbb_root_path . 'cron.' . $this->php_ext, 'cron_type=' . $name . $extra);
return $url; return $url;
} }