Skip to content

Commit

Permalink
Fixed a bug in Mobile Style and added a switch. Improved some plugins…
Browse files Browse the repository at this point in the history
… functions. Ported UMIL to Icy Phoenix to be able to easily deal with permissions and modules.
  • Loading branch information
MightyGorgon committed Sep 5, 2011
1 parent 1e8d8ba commit 4320fb7
Show file tree
Hide file tree
Showing 20 changed files with 2,858 additions and 1,299 deletions.
13 changes: 13 additions & 0 deletions adm/admin_plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@

define('THIS_PAGE', 'admin_plugins.' . PHP_EXT);

// NEW AUTH - BEGIN
// To be removed when auth integration has been completed!
if (!class_exists('auth'))
{
@include(IP_ROOT_PATH . 'includes/class_auth.' . PHP_EXT);
}
if (empty($auth))
{
$auth = new auth();
$auth->acl($user->data);
}
// NEW AUTH - END

// FORM CLASS - BEGIN
include(IP_ROOT_PATH . 'includes/class_form.' . PHP_EXT);
$class_form = new class_form();
Expand Down
11 changes: 6 additions & 5 deletions includes/class_auth_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ function get_mask($mode, $user_id = false, $group_id = false, $forum_id = false,
$auth2 = &$auth;
}


$hold_ary[$userdata['user_id']] = array();
foreach ($forum_ids as $f_id)
{
Expand Down Expand Up @@ -266,7 +265,7 @@ function get_role_mask($role_id)
*/
function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user', $local = false, $group_display = true)
{
global $template, $user, $db;
global $db, $template, $user, $lang;

// Define names for template loops, might be able to be set
$tpl_pmask = 'p_mask';
Expand Down Expand Up @@ -458,7 +457,8 @@ function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user',
'S_VIEW' => ($mode == 'view') ? true : false,
'S_NUM_OBJECTS' => sizeof($content_array),
'S_USER_MODE' => ($user_mode == 'user') ? true : false,
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false
)
);

@reset($content_array);
Expand Down Expand Up @@ -544,7 +544,8 @@ function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user',
'S_VIEW' => ($mode == 'view') ? true : false,
'S_NUM_OBJECTS' => sizeof($content_array),
'S_USER_MODE' => ($user_mode == 'user') ? true : false,
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false
)
);

@reset($content_array);
Expand Down Expand Up @@ -610,7 +611,7 @@ function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user',
*/
function display_role_mask(&$hold_ary)
{
global $db, $template, $user, $phpbb_admin_path;
global $db, $template, $user, $lang, $phpbb_admin_path;

if (!sizeof($hold_ary))
{
Expand Down
38 changes: 38 additions & 0 deletions includes/class_plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ function install($plugin_data, $clear_cache = true)
{
global $db, $config, $table_prefix;

// Include install functions file... if any!
$plugin_functions_install_file = $this->plugins_path . $plugin_data['dir'] . '/includes/functions_install.' . PHP_EXT;
if (file_exists($plugin_functions_install_file))
{
@include($plugin_functions_install_file);
}

$sql_results = array();
$plugin_info = $this->get_plugin_info($plugin_data['dir']);
$plugin_install_data = $this->get_plugin_install_data($plugin_data['dir']);
Expand Down Expand Up @@ -113,6 +120,13 @@ function update($plugin_data, $clear_cache = true)
{
global $db, $config, $table_prefix;

// Include install functions file... if any!
$plugin_functions_install_file = $this->plugins_path . $plugin_data['dir'] . '/includes/functions_install.' . PHP_EXT;
if (file_exists($plugin_functions_install_file))
{
@include($plugin_functions_install_file);
}

$sql_results = array();
$plugin_info = $this->get_plugin_info($plugin_data['dir']);
$plugin_install_data = $this->get_plugin_install_data($plugin_data['dir']);
Expand Down Expand Up @@ -173,6 +187,13 @@ function uninstall($plugin_data, $clear_cache = true)
{
global $db, $config, $table_prefix;

// Include install functions file... if any!
$plugin_functions_install_file = $this->plugins_path . $plugin_data['dir'] . '/includes/functions_install.' . PHP_EXT;
if (file_exists($plugin_functions_install_file))
{
@include($plugin_functions_install_file);
}

$sql_results = array();
$plugin_info = $this->get_plugin_info($plugin_data['dir']);
$plugin_uninstall_data = $this->get_plugin_uninstall_data($plugin_data['dir']);
Expand Down Expand Up @@ -237,6 +258,23 @@ function get_plugin_info($plugin_dir)
return $plugin_info;
}

/*
* Get plugin auth data
*/
function get_plugin_auth_data($plugin_dir)
{
global $config, $table_prefix;

$auth_data = array();
$plugin_install_file = $this->plugins_path . $plugin_dir . '/install/install.' . PHP_EXT;
if (file_exists($plugin_install_file))
{
@include($plugin_install_file);
}

return $auth_data;
}

/*
* Get plugin install data
*/
Expand Down
Loading

0 comments on commit 4320fb7

Please sign in to comment.