Zeile 306 | Zeile 306 |
---|
if(version_compare($names[$plugin['attributes'][$compare_by]]['version'], $plugin['version']['value'], "<")) { $plugin['download_url']['value'] = htmlspecialchars_uni($plugin['download_url']['value']);
|
if(version_compare($names[$plugin['attributes'][$compare_by]]['version'], $plugin['version']['value'], "<")) { $plugin['download_url']['value'] = htmlspecialchars_uni($plugin['download_url']['value']);
|
$plugin['vulnerable']['value'] = htmlspecialchars_uni($plugin['vulnerable']['value']);
| |
$plugin['version']['value'] = htmlspecialchars_uni($plugin['version']['value']);
|
$plugin['version']['value'] = htmlspecialchars_uni($plugin['version']['value']);
|
| if(isset($plugin['vulnerable']['value'])) { $plugin['vulnerable']['value'] = htmlspecialchars_uni($plugin['vulnerable']['value']); }
|
if($is_vulnerable) {
| if($is_vulnerable) {
|
Zeile 332 | Zeile 336 |
---|
} $table->construct_row(); }
|
} $table->construct_row(); }
|
}
| }
|
if($table->num_rows() == 0) {
| if($table->num_rows() == 0) {
|
Zeile 343 | Zeile 347 |
---|
$page->add_breadcrumb_item($lang->plugin_updates);
$page->output_header($lang->plugin_updates);
|
$page->add_breadcrumb_item($lang->plugin_updates);
$page->output_header($lang->plugin_updates);
|
$sub_tabs['plugins'] = array( 'title' => $lang->plugins,
| $sub_tabs['plugins'] = array( 'title' => $lang->plugins,
|
'link' => "index.php?module=config-plugins", );
| 'link' => "index.php?module=config-plugins", );
|
Zeile 353 | Zeile 357 |
---|
'title' => $lang->plugin_updates, 'link' => "index.php?module=config-plugins&action=check", 'description' => $lang->plugin_updates_desc
|
'title' => $lang->plugin_updates, 'link' => "index.php?module=config-plugins&action=check", 'description' => $lang->plugin_updates_desc
|
);
| );
|
$sub_tabs['browse_plugins'] = array( 'title' => $lang->browse_plugins, 'link' => "index.php?module=config-plugins&action=browse",
| $sub_tabs['browse_plugins'] = array( 'title' => $lang->browse_plugins, 'link' => "index.php?module=config-plugins&action=browse",
|
Zeile 362 | Zeile 366 |
---|
);
$page->output_nav_tabs($sub_tabs, 'update_plugins');
|
);
$page->output_nav_tabs($sub_tabs, 'update_plugins');
|
|
|
$table->output($lang->plugin_updates);
$page->output_footer();
| $table->output($lang->plugin_updates);
$page->output_footer();
|
Zeile 374 | Zeile 378 |
---|
if(!verify_post_check($mybb->get_input('my_post_key'))) { flash_message($lang->invalid_post_verify_key2, 'error');
|
if(!verify_post_check($mybb->get_input('my_post_key'))) { flash_message($lang->invalid_post_verify_key2, 'error');
|
admin_redirect("index.php?module=config-plugins"); }
if($mybb->input['action'] == "activate") { $plugins->run_hooks("admin_config_plugins_activate"); } else
| admin_redirect("index.php?module=config-plugins"); }
if($mybb->input['action'] == "activate") { $plugins->run_hooks("admin_config_plugins_activate"); } else
|
{ $plugins->run_hooks("admin_config_plugins_deactivate"); }
| { $plugins->run_hooks("admin_config_plugins_deactivate"); }
|
Zeile 395 | Zeile 399 |
---|
{ flash_message($lang->error_invalid_plugin, 'error'); admin_redirect("index.php?module=config-plugins");
|
{ flash_message($lang->error_invalid_plugin, 'error'); admin_redirect("index.php?module=config-plugins");
|
}
| }
|
$plugins_cache = $cache->read("plugins"); $active_plugins = isset($plugins_cache['active']) ? $plugins_cache['active'] : array();
|
$plugins_cache = $cache->read("plugins"); $active_plugins = isset($plugins_cache['active']) ? $plugins_cache['active'] : array();
|
|
|
require_once MYBB_ROOT."inc/plugins/$file";
$installed_func = "{$codename}_is_installed";
| require_once MYBB_ROOT."inc/plugins/$file";
$installed_func = "{$codename}_is_installed";
|
Zeile 408 | Zeile 412 |
---|
{ $installed = false; }
|
{ $installed = false; }
|
|
|
$install_uninstall = false;
if($mybb->input['action'] == "activate")
| $install_uninstall = false;
if($mybb->input['action'] == "activate")
|
Zeile 417 | Zeile 421 |
---|
// Plugin is compatible with this version? if($plugins->is_compatible($codename) == false)
|
// Plugin is compatible with this version? if($plugins->is_compatible($codename) == false)
|
{
| {
|
flash_message($lang->sprintf($lang->plugin_incompatible, $mybb->version), 'error'); admin_redirect("index.php?module=config-plugins");
|
flash_message($lang->sprintf($lang->plugin_incompatible, $mybb->version), 'error'); admin_redirect("index.php?module=config-plugins");
|
}
| }
|
// If not installed and there is a custom installation function if($installed == false && function_exists("{$codename}_install")) {
| // If not installed and there is a custom installation function if($installed == false && function_exists("{$codename}_install")) {
|
Zeile 433 | Zeile 437 |
---|
if(function_exists("{$codename}_activate")) { call_user_func("{$codename}_activate");
|
if(function_exists("{$codename}_activate")) { call_user_func("{$codename}_activate");
|
}
| }
|
$active_plugins[$codename] = $codename; $executed[] = 'activate'; }
| $active_plugins[$codename] = $codename; $executed[] = 'activate'; }
|
Zeile 443 | Zeile 447 |
---|
$message = $lang->success_plugin_deactivated;
if(function_exists("{$codename}_deactivate"))
|
$message = $lang->success_plugin_deactivated;
if(function_exists("{$codename}_deactivate"))
|
{
| {
|
call_user_func("{$codename}_deactivate"); }
| call_user_func("{$codename}_deactivate"); }
|
Zeile 452 | Zeile 456 |
---|
call_user_func("{$codename}_uninstall"); $message = $lang->success_plugin_uninstalled; $install_uninstall = true;
|
call_user_func("{$codename}_uninstall"); $message = $lang->success_plugin_uninstalled; $install_uninstall = true;
|
}
| }
|
unset($active_plugins[$codename]); }
| unset($active_plugins[$codename]); }
|
Zeile 463 | Zeile 467 |
---|
// Log admin action log_admin_action($codename, $install_uninstall);
|
// Log admin action log_admin_action($codename, $install_uninstall);
|
|
|
if($mybb->input['action'] == "activate") { $plugins->run_hooks("admin_config_plugins_activate_commit");
|
if($mybb->input['action'] == "activate") { $plugins->run_hooks("admin_config_plugins_activate_commit");
|
}
| }
|
else { $plugins->run_hooks("admin_config_plugins_deactivate_commit"); }
|
else { $plugins->run_hooks("admin_config_plugins_deactivate_commit"); }
|
|
|
flash_message($message, 'success'); admin_redirect("index.php?module=config-plugins"); }
| flash_message($message, 'success'); admin_redirect("index.php?module=config-plugins"); }
|
Zeile 490 | Zeile 494 |
---|
'title' => $lang->plugin_updates, 'link' => "index.php?module=config-plugins&action=check", 'description' => $lang->plugin_updates_desc
|
'title' => $lang->plugin_updates, 'link' => "index.php?module=config-plugins&action=check", 'description' => $lang->plugin_updates_desc
|
);
| );
|
$sub_tabs['browse_plugins'] = array( 'title' => $lang->browse_plugins,
| $sub_tabs['browse_plugins'] = array( 'title' => $lang->browse_plugins,
|
Zeile 499 | Zeile 503 |
---|
);
$page->output_nav_tabs($sub_tabs, 'plugins');
|
);
$page->output_nav_tabs($sub_tabs, 'plugins');
|
|
|
// Let's make things easier for our user - show them active // and inactive plugins in different lists $plugins_cache = $cache->read("plugins");
| // Let's make things easier for our user - show them active // and inactive plugins in different lists $plugins_cache = $cache->read("plugins");
|
Zeile 508 | Zeile 512 |
---|
{ $active_plugins = $plugins_cache['active']; }
|
{ $active_plugins = $plugins_cache['active']; }
|
|
|
$plugins_list = get_plugins_list();
$plugins->run_hooks("admin_config_plugins_plugin_list");
| $plugins_list = get_plugins_list();
$plugins->run_hooks("admin_config_plugins_plugin_list");
|
Zeile 526 | Zeile 530 |
---|
if(!function_exists($infofunc)) { continue;
|
if(!function_exists($infofunc)) { continue;
|
}
| }
|
$plugininfo = $infofunc(); $plugininfo['codename'] = $codename;
| $plugininfo = $infofunc(); $plugininfo['codename'] = $codename;
|
Zeile 537 | Zeile 541 |
---|
$plugininfo['is_active'] = 1;
$a_plugins[] = $plugininfo;
|
$plugininfo['is_active'] = 1;
$a_plugins[] = $plugininfo;
|
}
| }
|
else { // Either installed and not active or completely inactive $plugininfo['is_active'] = 0; $i_plugins[] = $plugininfo; }
|
else { // Either installed and not active or completely inactive $plugininfo['is_active'] = 0; $i_plugins[] = $plugininfo; }
|
}
| }
|
$table = new Table; $table->construct_header($lang->plugin); $table->construct_header($lang->controls, array("colspan" => 2, "class" => "align_center", "width" => 300));
|
$table = new Table; $table->construct_header($lang->plugin); $table->construct_header($lang->controls, array("colspan" => 2, "class" => "align_center", "width" => 300));
|
|
|
if(empty($a_plugins)) { $table->construct_cell($lang->no_active_plugins, array('colspan' => 3));
| if(empty($a_plugins)) { $table->construct_cell($lang->no_active_plugins, array('colspan' => 3));
|
Zeile 558 | Zeile 562 |
---|
else { build_plugin_list($a_plugins);
|
else { build_plugin_list($a_plugins);
|
}
$table->output($lang->active_plugin);
$table = new Table;
| }
$table->output($lang->active_plugin);
$table = new Table;
|
$table->construct_header($lang->plugin); $table->construct_header($lang->controls, array("colspan" => 2, "class" => "align_center", "width" => 300));
if(empty($i_plugins))
|
$table->construct_header($lang->plugin); $table->construct_header($lang->controls, array("colspan" => 2, "class" => "align_center", "width" => 300));
if(empty($i_plugins))
|
{
| {
|
$table->construct_cell($lang->no_inactive_plugins, array('colspan' => 3)); $table->construct_row(); }
| $table->construct_cell($lang->no_inactive_plugins, array('colspan' => 3)); $table->construct_row(); }
|
Zeile 599 | Zeile 603 |
---|
*/ function get_plugins_list() {
|
*/ function get_plugins_list() {
|
| $plugins_list = array();
|
// Get a list of the plugin files which exist in the plugins directory $dir = @opendir(MYBB_ROOT."inc/plugins/"); if($dir)
| // Get a list of the plugin files which exist in the plugins directory $dir = @opendir(MYBB_ROOT."inc/plugins/"); if($dir)
|