Exemplo n.º 1
0
	// refresh the opening window (used for the revert updated default templates action)
	if (window.opener && String(window.opener.location).indexOf("template.php?do=findupdates") != -1)
	{
		window.opener.window.location = window.opener.window.location;
	}

	//-->
	</script>
	<?php


	if (defined('DEV_AUTOEXPORT') AND DEV_AUTOEXPORT AND $template['styleid'] == -1)
	{
		require_once(DIR . '/includes/functions_filesystemxml.php');
		autoexport_delete_template($template['title']);
	}

	print_cp_redirect("template.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify&amp;expandset=$template[styleid]&amp;group=" . $vbulletin->GPC['group'], 1);

}

// #############################################################################
// confirmation for template deletion
if ($_REQUEST['do'] == 'delete')
{
	$vbulletin->input->clean_array_gpc('r', array(
		'group' => TYPE_STR,
	));

	$hidden = array();
Exemplo n.º 2
0
 /**
  * Delete a template
  *
  * @param integer $templateid Template ID to be deleted.
  */
 public function delete($templateid)
 {
     //if this is a text-only template the customer only needs canadminstyles
     $templateid = intval($templateid);
     $template = $this->fetchByID($templateid);
     $extra = array();
     $this->checkCanSaveTemplate($templateid, $template, $extra);
     if ($template) {
         $this->deleteTemplateInternal($templateid, $template['styleid']);
     }
     if (defined('DEV_AUTOEXPORT') and DEV_AUTOEXPORT and $template['styleid'] == -1) {
         require_once DIR . '/includes/functions_filesystemxml.php';
         autoexport_delete_template($template['title']);
     }
     return true;
 }