phpBB

Code Changes

File: includes/functions_module.php

  Unmodified   Added   Modified   Removed
Line 82Line 82
	*/
function list_modules($p_class)
{

	*/
function list_modules($p_class)
{

		global $auth, $db, $user, $cache;
global $config, $phpbb_root_path, $phpEx, $phpbb_dispatcher;

		global $db, $user, $cache;
global $phpbb_dispatcher;


// Sanitise for future path use, it's escaped as appropriate for queries
$this->p_class = str_replace(array('.', '/', '\\'), '', basename($p_class));


// Sanitise for future path use, it's escaped as appropriate for queries
$this->p_class = str_replace(array('.', '/', '\\'), '', basename($p_class));

Line 480Line 480
	*/
function set_active($id = false, $mode = false)
{

	*/
function set_active($id = false, $mode = false)
{

 
		global $request;


		$icat = false;
$this->active_module = false;


		$icat = false;
$this->active_module = false;


		if (request_var('icat', ''))

		if ($request->variable('icat', ''))

		{
$icat = $id;

		{
$icat = $id;

			$id = request_var('icat', '');

			$id = $request->variable('icat', '');

		}

// Restore the backslashes in class names

		}

// Restore the backslashes in class names

Line 553Line 555
	*/
function load_active($mode = false, $module_url = false, $execute_module = true)
{

	*/
function load_active($mode = false, $module_url = false, $execute_module = true)
{

		global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user, $template;

		global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user, $template, $request;


$module_path = $this->include_path . $this->p_class;


$module_path = $this->include_path . $this->p_class;

		$icat = request_var('icat', '');

		$icat = $request->variable('icat', '');


if ($this->active_module === false)
{


if ($this->active_module === false)
{

Line 727Line 729
	*/
function get_parents($parent_id, $left_id, $right_id, &$all_parents)
{

	*/
function get_parents($parent_id, $left_id, $right_id, &$all_parents)
{

		global $db;


 
		$parents = array();

if ($parent_id > 0)

		$parents = array();

if ($parent_id > 0)

Line 820Line 820
		// Make sure the module_url has a question mark set, effectively determining the delimiter to use
$delim = (strpos($module_url, '?') === false) ? '?' : '&';


		// Make sure the module_url has a question mark set, effectively determining the delimiter to use
$delim = (strpos($module_url, '?') === false) ? '?' : '&';


		$current_padding = $current_depth = 0;

		$current_depth = 0;

		$linear_offset 	= 'l_block1';
$tabular_offset = 't_block2';


		$linear_offset 	= 'l_block1';
$tabular_offset = 't_block2';


Line 1086Line 1086
			->core_path('language/' . $user->lang_name . '/mods/')
->find();


			->core_path('language/' . $user->lang_name . '/mods/')
->find();


		$lang_files = array_unique(array_merge($user_lang_files, $english_lang_files, $default_lang_files));

		$lang_files = array_merge($english_lang_files, $default_lang_files, $user_lang_files);

		foreach ($lang_files as $lang_file => $ext_name)
{
$user->add_lang_ext($ext_name, $lang_file);

		foreach ($lang_files as $lang_file => $ext_name)
{
$user->add_lang_ext($ext_name, $lang_file);