[ticket/208] Fix paths after moving includes files

B3P-208
This commit is contained in:
Marc Alexander
2014-02-04 00:14:59 +01:00
parent 81a83e6f9e
commit c873fd768c
6 changed files with 14 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ class portal_module
public $u_action;
public $new_config = array();
protected $c_class;
protected $db, $user, $cache, $template, $display_vars, $config, $phpbb_root_path, $portal_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
protected $db, $user, $cache, $template, $display_vars, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
protected $root_path, $mod_version_check, $request;
/** @var \phpbb\di\service_collection Portal modules */
@@ -31,14 +31,13 @@ class portal_module
public function __construct()
{
global $db, $user, $cache, $request, $template;
global $config, $phpbb_root_path, $portal_root_path, $phpbb_admin_path, $phpbb_container, $phpEx;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpbb_container, $phpEx;
$user->add_lang_ext('board3/portal', 'portal');
$this->root_path = $phpbb_root_path . 'ext/board3/portal/';
include($this->root_path . 'portal/includes/constants.' . $phpEx);
$portal_root_path = PORTAL_ROOT_PATH;
include($this->root_path . 'includes/constants.' . $phpEx);
$this->db = $db;
$this->user = $user;
@@ -48,7 +47,6 @@ class portal_module
$this->request = $request;
$this->phpbb_root_path = $phpbb_root_path;
$this->phpbb_admin_path = $phpbb_admin_path;
$this->portal_root_path = $this->root_path . 'portal/';
$this->php_ex = $phpEx;
$this->phpbb_container = $phpbb_container;
$this->mod_version_check = $this->phpbb_container->get('board3.version.check');
@@ -56,12 +54,12 @@ class portal_module
if (!function_exists('column_string_const'))
{
include($this->portal_root_path . 'includes/functions_modules.' . $this->php_ex);
include($this->root_path . 'includes/functions_modules.' . $this->php_ex);
}
if(!function_exists('obtain_portal_config'))
{
include($this->portal_root_path . 'includes/functions.' . $this->php_ex);
include($this->root_path . 'includes/functions.' . $this->php_ex);
}
}
@@ -722,7 +720,7 @@ class portal_module
{
trigger_error($this->user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
include($this->root_path . 'portal/includes/functions_upload.' . $this->php_ex);
include($this->root_path . 'includes/functions_upload.' . $this->php_ex);
// Default upload path is portal/upload/
$upload_path = $this->root_path . 'portal/upload/';

View File

@@ -98,15 +98,15 @@ class main
$this->php_ext = $php_ext;
$this->register_modules($modules);
$this->includes_path = $phpbb_root_path . 'ext/board3/portal/portal/';
$this->includes_path = $phpbb_root_path . 'ext/board3/portal/includes/';
$this->root_path = $phpbb_root_path . 'ext/board3/portal/';
$portal_root_path = $this->root_path;
if (!function_exists('obtain_portal_config'))
{
include($this->includes_path . 'includes/constants' . $this->php_ext);
include($this->includes_path . 'includes/functions_modules' . $this->php_ext);
include($this->includes_path . 'includes/functions' . $this->php_ext);
include($this->includes_path . 'constants' . $this->php_ext);
include($this->includes_path . 'functions_modules' . $this->php_ext);
include($this->includes_path . 'functions' . $this->php_ext);
}
}

View File

@@ -109,7 +109,7 @@ class announcements extends module_base
$start = $this->request->variable('ap', 0);
$start = ($start < 0) ? 0 : $start;
// Fetch announcements from portal/includes/functions.php with check if "read full" is requested.
// Fetch announcements from porta functions.php with check if "read full" is requested.
$portal_announcement_length = ($announcement < 0) ? $this->config['board3_announcements_length_' . $module_id] : 0;
$fetch_news = phpbb_fetch_posts($module_id, $this->config['board3_global_announcements_forum_' . $module_id], $this->config['board3_announcements_permissions_' . $module_id], $this->config['board3_number_of_announcements_' . $module_id], $portal_announcement_length, $this->config['board3_announcements_day_' . $module_id], 'announcements', $start, $this->config['board3_announcements_forum_exclude_' . $module_id]);

View File

@@ -110,7 +110,7 @@ class news extends module_base
$start = $this->request->variable('np', 0);
$start = ($start < 0) ? 0 : $start;
// Fetch news from portal/includes/functions.php with check if "read full" is requested.
// Fetch news from portal functions.php with check if "read full" is requested.
$portal_news_length = ($news < 0) ? $this->config['board3_news_length_' . $module_id] : 0;
$fetch_news = phpbb_fetch_posts($module_id, $this->config['board3_news_forum_' . $module_id], $this->config['board3_news_permissions_' . $module_id], $this->config['board3_number_of_news_' . $module_id], $portal_news_length, 0, ($this->config['board3_show_all_news_' . $module_id]) ? 'news_all' : 'news', $start, $this->config['board3_news_exclude_' . $module_id]);

View File

@@ -7,7 +7,7 @@
*
*/
require_once(dirname(__FILE__) . '/../../portal/includes/functions.php');
require_once(dirname(__FILE__) . '/../../includes/functions.php');
require_once(dirname(__FILE__) . '/../../../../../includes/functions_acp.php');
class phpbb_functions_check_file_src_test extends \board3\portal\tests\testframework\database_test_case

View File

@@ -7,7 +7,7 @@
*
*/
require_once(dirname(__FILE__) . '/../../portal/includes/functions.php');
require_once(dirname(__FILE__) . '/../../includes/functions.php');
class phpbb_functions_simple_test extends PHPUnit_Framework_TestCase
{