Vergleich admin/modules/config/plugins.php - 1.6.14 - 1.6.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 105Zeile 105
			unset($tree['results']['result']);
$tree['results']['result'][0] = $only_plugin;
}

			unset($tree['results']['result']);
$tree['results']['result'][0] = $only_plugin;
}

	





require_once MYBB_ROOT . '/inc/class_parser.php';
$post_parser = new postParser();


		foreach($tree['results']['result'] as $result)
{

		foreach($tree['results']['result'] as $result)
{

 
			$result['name']['value'] = htmlspecialchars_uni($result['name']['value']);
$result['description']['value'] = htmlspecialchars_uni($result['description']['value']);
$result['author']['value'] = $post_parser->parse_message($result['author']['value'], array(
'allow_html' => true
)
);
$result['version']['value'] = htmlspecialchars_uni($result['version']['value']);
$result['download_url']['value'] = htmlspecialchars_uni(html_entity_decode($result['download_url']['value']));


			$table->construct_cell("<strong>{$result['name']['value']}</strong><br /><small>{$result['description']['value']}</small><br /><i><small>{$lang->created_by} {$result['author']['value']}</small></i>");
$table->construct_cell($result['version']['value'], array("class" => "align_center"));
$table->construct_cell("<strong><a href=\"http://mods.mybb.com/view/{$result['download_url']['value']}\" target=\"_blank\">{$lang->download}</a></strong>", array("class" => "align_center"));
$table->construct_row();

			$table->construct_cell("<strong>{$result['name']['value']}</strong><br /><small>{$result['description']['value']}</small><br /><i><small>{$lang->created_by} {$result['author']['value']}</small></i>");
$table->construct_cell($result['version']['value'], array("class" => "align_center"));
$table->construct_cell("<strong><a href=\"http://mods.mybb.com/view/{$result['download_url']['value']}\" target=\"_blank\">{$lang->download}</a></strong>", array("class" => "align_center"));
$table->construct_row();

		}

		}

	}

if($table->num_rows() == 0)
{
$table->construct_cell($lang->error_no_results_found, array("colspan" => 3));
$table->construct_row();

	}

if($table->num_rows() == 0)
{
$table->construct_cell($lang->error_no_results_found, array("colspan" => 3));
$table->construct_row();

	}

	}

	
$search = new Form("index.php?module=config-plugins&amp;action=browse", 'post', 'search_form');
echo "<div style=\"padding-bottom: 3px; margin-top: -9px; text-align: right;\">";

	
$search = new Form("index.php?module=config-plugins&amp;action=browse", 'post', 'search_form');
echo "<div style=\"padding-bottom: 3px; margin-top: -9px; text-align: right;\">";

Zeile 148Zeile 160

var search = document.getElementById('search_keywords');
search.onfocus = function()


var search = document.getElementById('search_keywords');
search.onfocus = function()

		{

		{

			if(this.value == '{$lang->search_for_plugins}')
{
$(this).removeClassName('search_default');

			if(this.value == '{$lang->search_for_plugins}')
{
$(this).removeClassName('search_default');

Zeile 161Zeile 173
			{
$(this).addClassName('search_default');
this.value = '{$lang->search_for_plugins}';

			{
$(this).addClassName('search_default');
this.value = '{$lang->search_for_plugins}';

			}
}

			}
}

		// fix the styling used if we have a different default value
if(search.value != '{$lang->search_for_plugins}')
{

		// fix the styling used if we have a different default value
if(search.value != '{$lang->search_for_plugins}')
{

Zeile 206Zeile 218
			if(!function_exists($infofunc))
{
continue;

			if(!function_exists($infofunc))
{
continue;

			}

			}

			$plugininfo = $infofunc();
$plugininfo['guid'] = trim($plugininfo['guid']);


			$plugininfo = $infofunc();
$plugininfo['guid'] = trim($plugininfo['guid']);


Zeile 220Zeile 232
	}

if(empty($info))

	}

if(empty($info))

	{

	{

		flash_message($lang->error_vcheck_no_supported_plugins, 'error');
admin_redirect("index.php?module=config-plugins");
}

		flash_message($lang->error_vcheck_no_supported_plugins, 'error');
admin_redirect("index.php?module=config-plugins");
}

Zeile 238Zeile 250
	if(!$contents)
{
flash_message($lang->error_vcheck_communications_problem, 'error');

	if(!$contents)
{
flash_message($lang->error_vcheck_communications_problem, 'error');

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


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


	$parser = new XMLParser($contents);
$tree = $parser->get_tree();


	$parser = new XMLParser($contents);
$tree = $parser->get_tree();


Zeile 268Zeile 280
		flash_message($lang->error_communication_problem.$error_msg, 'error');
admin_redirect("index.php?module=config-plugins");
}

		flash_message($lang->error_communication_problem.$error_msg, 'error');
admin_redirect("index.php?module=config-plugins");
}

	

	

	$table = new Table;
$table->construct_header($lang->plugin);
$table->construct_header($lang->your_version, array("class" => "align_center", 'width' => 125));

	$table = new Table;
$table->construct_header($lang->plugin);
$table->construct_header($lang->your_version, array("class" => "align_center", 'width' => 125));

Zeile 276Zeile 288
	$table->construct_header($lang->controls, array("class" => "align_center", 'width' => 125));

if(!is_array($tree['plugins']['plugin']))

	$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");

	{
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 286Zeile 298
		$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;

	}

	}

	
foreach($tree['plugins']['plugin'] as $plugin)
{
if(version_compare($names[$plugin['attributes']['guid']]['version'], $plugin['version']['value'], "<"))
{

	
foreach($tree['plugins']['plugin'] as $plugin)
{
if(version_compare($names[$plugin['attributes']['guid']]['version'], $plugin['version']['value'], "<"))
{

 
			$plugin['download_url']['value'] = htmlspecialchars_uni($plugin['download_url']['value']);
$plugin['version']['value'] = htmlspecialchars_uni($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>{$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"));

Zeile 307Zeile 322
	}

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

	}

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

	

	

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

$sub_tabs['plugins'] = array(

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

$sub_tabs['plugins'] = array(

Zeile 336Zeile 351

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


// 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');

	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")
{

		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_activate");
}
else
{
$plugins->run_hooks("admin_config_plugins_deactivate");

	}

	}

	
$codename = $mybb->input['plugin'];
$codename = str_replace(array(".", "/", "\\"), "", $codename);

	
$codename = $mybb->input['plugin'];
$codename = str_replace(array(".", "/", "\\"), "", $codename);

Zeile 371Zeile 386
	$installed_func = "{$codename}_is_installed";
$installed = true;
if(function_exists($installed_func) && $installed_func() != true)

	$installed_func = "{$codename}_is_installed";
$installed = true;
if(function_exists($installed_func) && $installed_func() != true)

	{

	{

		$installed = false;
}


		$installed = false;
}


Zeile 393Zeile 408
		{
call_user_func("{$codename}_install");
$message = $lang->success_plugin_installed;

		{
call_user_func("{$codename}_install");
$message = $lang->success_plugin_installed;

			$install_uninstall = true;
}

			$install_uninstall = true;
}


if(function_exists("{$codename}_activate"))
{


if(function_exists("{$codename}_activate"))
{

Zeile 562Zeile 577
			// 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}&amp;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&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));

				if($compatibility_warning && !$uninstall_button)
{
$table->construct_cell("{$compatibility_warning}", array("class" => "align_center", "colspan" => 2));


				}
else
{

				}
else
{

					$table->construct_cell("&nbsp;", 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)
{
$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
{
$table->construct_cell("&nbsp;", array("class" => "align_center", "width" => 150));
}

				}
}
$table->construct_row();

				}
}
$table->construct_row();