Vergleich admin/modules/config/plugins.php - 1.4.2 - 1.4.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: plugins.php 4151 2008-08-26 04:39:31Z Tikitiki $

 * $Id: plugins.php 5154 2010-07-31 09:11:51Z RyanGordon $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 29Zeile 29
	
if($plugins_list)
{

	
if($plugins_list)
{

 
		$active_hooks = $plugins->hooks;

		foreach($plugins_list as $plugin_file)
{
require_once MYBB_ROOT."inc/plugins/".$plugin_file;

		foreach($plugins_list as $plugin_file)
{
require_once MYBB_ROOT."inc/plugins/".$plugin_file;

Zeile 47Zeile 48
				$names[$plugininfo['guid']] = array('name' => $plugininfo['name'], 'version' => $plugininfo['version']);
}
}

				$names[$plugininfo['guid']] = array('name' => $plugininfo['name'], 'version' => $plugininfo['version']);
}
}

 
		$plugins->hooks = $active_hooks;

	}

if(empty($info))

	}

if(empty($info))

Zeile 55Zeile 57
		admin_redirect("index.php?module=config/plugins");
}


		admin_redirect("index.php?module=config/plugins");
}


	require_once MYBB_ROOT."inc/class_xml.php";
$contents = fetch_remote_file("http://mods.mybboard.net/version_check.php?info=".serialize($info));








	$url = "http://mods.mybb.com/version_check.php?";
foreach($info as $guid)
{
$url .= "info[]=".urlencode($guid)."&";
}
$url = substr($url, 0, -1);

require_once MYBB_ROOT."inc/class_xml.php";
$contents = fetch_remote_file($url);

	
if(!$contents)
{

	
if(!$contents)
{

Zeile 65Zeile 74
	}

$parser = new XMLParser($contents);

	}

$parser = new XMLParser($contents);

	$tree = $parser->get_tree();


	$tree = $parser->get_tree();


	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 98Zeile 107
	}

if(array_key_exists("tag", $tree['plugins']['plugin']))

	}

if(array_key_exists("tag", $tree['plugins']['plugin']))

	{

	{

		$only_plugin = $tree['plugins']['plugin'];
unset($tree['plugins']['plugin']);
$tree['plugins']['plugin'][0] = $only_plugin;

		$only_plugin = $tree['plugins']['plugin'];
unset($tree['plugins']['plugin']);
$tree['plugins']['plugin'][0] = $only_plugin;

Zeile 119Zeile 128
	if($table->num_rows() == 0)
{
flash_message($lang->success_plugins_up_to_date, 'success');

	if($table->num_rows() == 0)
{
flash_message($lang->success_plugins_up_to_date, 'success');

		admin_redirect("index.php?module=config/plugins");

		admin_redirect("index.php?module=config/plugins");

	}

	}

	

	

	$page->add_breadcrumb_item($lang->plugin_updates);

$page->output_header($lang->plugin_updates);

$sub_tabs['update_plugins'] = array(
'title' => $lang->plugin_updates,

	$page->add_breadcrumb_item($lang->plugin_updates);

$page->output_header($lang->plugin_updates);

$sub_tabs['update_plugins'] = array(
'title' => $lang->plugin_updates,

		'link' => "index.php?module=config/plugin&action=check",

		'link' => "index.php?module=config/plugins&action=check",

		'description' => $lang->plugin_updates_desc
);


		'description' => $lang->plugin_updates_desc
);


	$page->output_nav_tabs($sub_tabs, 'update_plugins');


	$page->output_nav_tabs($sub_tabs, 'update_plugins');


	$table->output($lang->plugin_updates);

	$table->output($lang->plugin_updates);

	

	

	$page->output_footer();
}

// Activates or deactivates a specific plugin
if($mybb->input['action'] == "activate" || $mybb->input['action'] == "deactivate")
{

	$page->output_footer();
}

// Activates or deactivates a specific plugin
if($mybb->input['action'] == "activate" || $mybb->input['action'] == "deactivate")
{

 
	if(!verify_post_check($mybb->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");

	if($mybb->input['action'] == "activate")
{
$plugins->run_hooks("admin_config_plugins_activate");

Zeile 336Zeile 351
				}
else
{

				}
else
{

					$table->construct_cell("<a href=\"index.php?module=config/plugins&amp;action=activate&amp;plugin={$codename}\">{$lang->install_and_activate}</a>", array("class" => "align_center", "colspan" => 2));

					$table->construct_cell("<a href=\"index.php?module=config/plugins&amp;action=activate&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->install_and_activate}</a>", array("class" => "align_center", "colspan" => 2));

				}
}
// Plugin is activated and installed
else if($active_plugins[$codename])
{

				}
}
// Plugin is activated and installed
else if($active_plugins[$codename])
{

				$table->construct_cell("<a href=\"index.php?module=config/plugins&amp;action=deactivate&amp;plugin={$codename}\">{$lang->deactivate}</a>", array("class" => "align_center", "width" => 150));

				$table->construct_cell("<a href=\"index.php?module=config/plugins&amp;action=deactivate&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->deactivate}</a>", array("class" => "align_center", "width" => 150));

				if($uninstall_button)
{

				if($uninstall_button)
{

					$table->construct_cell("<a href=\"index.php?module=config/plugins&amp;action=deactivate&amp;uninstall=1&amp;plugin={$codename}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150));

					$table->construct_cell("<a href=\"index.php?module=config/plugins&amp;action=deactivate&amp;uninstall=1&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150));

				}
else
{

				}
else
{

Zeile 355Zeile 370
			// 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&amp;action=activate&amp;plugin={$codename}\">{$lang->activate}</a>", array("class" => "align_center", "width" => 150));

				$table->construct_cell("<a href=\"index.php?module=config/plugins&amp;action=activate&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->activate}</a>", array("class" => "align_center", "width" => 150));

				if($uninstall_button)
{

				if($uninstall_button)
{

					$table->construct_cell("<a href=\"index.php?module=config/plugins&amp;action=deactivate&amp;uninstall=1&amp;plugin={$codename}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150));

					$table->construct_cell("<a href=\"index.php?module=config/plugins&amp;action=deactivate&amp;uninstall=1&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150));

				}
else
{

				}
else
{