Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: plugins.php 5380 2011-02-21 12:04:43Z Tomm $
| * $Id$
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 90 | Zeile 90 |
---|
$parser = new XMLParser($contents); $tree = $parser->get_tree();
|
$parser = new XMLParser($contents); $tree = $parser->get_tree();
|
if(!array_key_exists("results", $tree))
| if(!is_array($tree) || !isset($tree['results']))
|
{ $page->output_inline_error($lang->error_communication_problem); $page->output_footer();
| { $page->output_inline_error($lang->error_communication_problem); $page->output_footer();
|
Zeile 225 | Zeile 225 |
---|
admin_redirect("index.php?module=config-plugins"); }
|
admin_redirect("index.php?module=config-plugins"); }
|
$url = "http://mods.mybboard.net/version_check.php?";
| $url = "http://mods.mybb.com/version_check.php?";
|
foreach($info as $guid) { $url .= "info[]=".urlencode($guid)."&";
| foreach($info as $guid) { $url .= "info[]=".urlencode($guid)."&";
|
Zeile 243 | Zeile 243 |
---|
$parser = new XMLParser($contents); $tree = $parser->get_tree();
|
$parser = new XMLParser($contents); $tree = $parser->get_tree();
|
| if(!is_array($tree) || !isset($tree['plugins'])) { $page->output_inline_error($lang->error_communication_problem); $page->output_footer(); exit; }
|
if(array_key_exists('error', $tree['plugins'])) { switch($tree['plugins'][0]['error'])
| if(array_key_exists('error', $tree['plugins'])) { switch($tree['plugins'][0]['error'])
|
Zeile 267 | Zeile 274 |
---|
$table->construct_header($lang->your_version, array("class" => "align_center", 'width' => 125)); $table->construct_header($lang->latest_version, array("class" => "align_center", 'width' => 125)); $table->construct_header($lang->controls, array("class" => "align_center", 'width' => 125));
|
$table->construct_header($lang->your_version, array("class" => "align_center", 'width' => 125)); $table->construct_header($lang->latest_version, array("class" => "align_center", 'width' => 125)); $table->construct_header($lang->controls, array("class" => "align_center", 'width' => 125));
|
|
|
if(!is_array($tree['plugins']['plugin'])) { flash_message($lang->success_plugins_up_to_date, 'success'); admin_redirect("index.php?module=config-plugins");
|
if(!is_array($tree['plugins']['plugin'])) { flash_message($lang->success_plugins_up_to_date, 'success'); admin_redirect("index.php?module=config-plugins");
|
}
| }
|
if(array_key_exists("tag", $tree['plugins']['plugin'])) {
| if(array_key_exists("tag", $tree['plugins']['plugin'])) {
|
Zeile 282 | Zeile 289 |
---|
} foreach($tree['plugins']['plugin'] as $plugin)
|
} foreach($tree['plugins']['plugin'] as $plugin)
|
{
| {
|
if(version_compare($names[$plugin['attributes']['guid']]['version'], $plugin['version']['value'], "<")) { $table->construct_cell("<strong>{$names[$plugin['attributes']['guid']]['name']}</strong>"); $table->construct_cell("{$names[$plugin['attributes']['guid']]['version']}", array("class" => "align_center")); $table->construct_cell("<strong><span style=\"color: #C00\">{$plugin['version']['value']}</span></strong>", array("class" => "align_center"));
|
if(version_compare($names[$plugin['attributes']['guid']]['version'], $plugin['version']['value'], "<")) { $table->construct_cell("<strong>{$names[$plugin['attributes']['guid']]['name']}</strong>"); $table->construct_cell("{$names[$plugin['attributes']['guid']]['version']}", array("class" => "align_center")); $table->construct_cell("<strong><span style=\"color: #C00\">{$plugin['version']['value']}</span></strong>", array("class" => "align_center"));
|
$table->construct_cell("<strong><a href=\"http://mods.mybboard.net/view/{$plugin['download_url']['value']}\" target=\"_blank\">{$lang->download}</a></strong>", array("class" => "align_center"));
| $table->construct_cell("<strong><a href=\"http://mods.mybb.com/view/{$plugin['download_url']['value']}\" target=\"_blank\">{$lang->download}</a></strong>", array("class" => "align_center"));
|
$table->construct_row(); } }
| $table->construct_row(); } }
|
Zeile 298 | Zeile 305 |
---|
flash_message($lang->success_plugins_up_to_date, 'success'); admin_redirect("index.php?module=config-plugins"); }
|
flash_message($lang->success_plugins_up_to_date, 'success'); admin_redirect("index.php?module=config-plugins"); }
|
|
|
$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);
|
Zeile 312 | Zeile 319 |
---|
'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 323 | Zeile 330 |
---|
$page->output_nav_tabs($sub_tabs, 'update_plugins'); $table->output($lang->plugin_updates);
|
$page->output_nav_tabs($sub_tabs, 'update_plugins'); $table->output($lang->plugin_updates);
|
|
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 402 | Zeile 409 |
---|
$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 555 | Zeile 562 |
---|
// Plugin is installed but not active else if($installed == true) {
|
// Plugin is installed but not active else if($installed == true) {
|
$table->construct_cell("<a href=\"index.php?module=config-plugins&action=activate&plugin={$codename}&my_post_key={$mybb->post_code}\">{$lang->activate}</a>", array("class" => "align_center", "width" => 150)); if($uninstall_button) { $table->construct_cell("<a href=\"index.php?module=config-plugins&action=deactivate&uninstall=1&plugin={$codename}&my_post_key={$mybb->post_code}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150));
| if($compatibility_warning && !$uninstall_button) { $table->construct_cell("{$compatibility_warning}", array("class" => "align_center", "colspan" => 2));
|
} else {
|
} else {
|
$table->construct_cell(" ", array("class" => "align_center", "width" => 150));
| $table->construct_cell("<a href=\"index.php?module=config-plugins&action=activate&plugin={$codename}&my_post_key={$mybb->post_code}\">{$lang->activate}</a>", array("class" => "align_center", "width" => 150)); if($uninstall_button) { $table->construct_cell("<a href=\"index.php?module=config-plugins&action=deactivate&uninstall=1&plugin={$codename}&my_post_key={$mybb->post_code}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150)); } else { $table->construct_cell(" ", array("class" => "align_center", "width" => 150)); }
|
} } $table->construct_row();
| } } $table->construct_row();
|