Skip to content

Commit

Permalink
cleaned up redirects, removed debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
tablatronix committed Nov 19, 2014
1 parent b9df897 commit cca8de8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 deletions admin/components.php
Expand Up @@ -73,7 +73,6 @@
exec_action('component-save'); // @hook component-save before saving components data file
XMLsave($xml, GSDATAOTHERPATH.GSCOMPONENTSFILE);
$update = 'comp-success';
// redirect('components.php?upd=comp-success');
get_components_xml(true);
}

Expand All @@ -82,9 +81,9 @@

# perform the undo
restore_datafile(GSDATAOTHERPATH.GSCOMPONENTSFILE);
$update = 'comp-restored';
check_for_csrf("undo");
// redirect('components.php?upd=comp-restored');
if(!requestIsAjax()) redirect('components.php?upd=comp-restored'); // redirect to prevent refresh undos
$update = 'comp-restored';
get_components_xml(true);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/inc/common.php
Expand Up @@ -88,7 +88,7 @@
'GSEDITORTOOL' => 'basic', // (str) wysiwyg editor toobar
'GSEDITORCONFIGFILE' => 'config.js', // (str) wysiwyg editor toobar
'GSEMAILLINKBACK' => 'http://get-simple.info/', // (str) url used in email template
'GSAJAXSAVE' => false, // (bool) use ajax for saving themes, components, and pages
'GSAJAXSAVE' => true, // (bool) use ajax for saving themes, components, and pages
'GSCHMOD' => 0644, // (octal) chmod mode legacy
'GSCHMODFILE' => 0644, // (octal) chmod mode for files
'GSCHMODDIR' => 0755, // (octal) chmod mode for dirs
Expand Down
6 changes: 3 additions & 3 deletions admin/snippets.php
Expand Up @@ -72,8 +72,8 @@
}
exec_action('snippet-save'); // @hook component-save before saving components data file
XMLsave($xml, GSDATAOTHERPATH.GSSNIPPETSFILE);

$update = 'snippet-success';
// redirect('components.php?upd=comp-success');
get_snippets_xml(true);
}

Expand All @@ -82,9 +82,9 @@

# perform the undo
restore_datafile(GSDATAOTHERPATH.GSSNIPPETSFILE);
$update = 'snippet-restored';
check_for_csrf("undo");
// redirect('components.php?upd=comp-restored'); // @todo fix redirect is necessary so you cant refresh undo links
if(!requestIsAjax()) redirect('snippets.php?upd=comp-restored'); // redirect to prevent refresh undos
$update = 'snippet-restored';
get_snippets_xml(true);
}

Expand Down
3 changes: 2 additions & 1 deletion theme/Cardinal/template.php
Expand Up @@ -45,7 +45,8 @@

<div id="sidebar">
<div class="section">
<?php get_snippet('sidebar'); ?>
<?php get_component('sidebar'); ?>
<?php // get_snippet('sidebar'); ?>
</div>
<div class="section credits">
<p><?php echo date('Y'); ?> - <strong><?php get_site_name(); ?></strong></p>
Expand Down
3 changes: 2 additions & 1 deletion theme/Innovation/sidebar.inc.php
Expand Up @@ -33,7 +33,8 @@

<!-- wrap each sidebar section like this -->
<div class="section">
<?php get_snippet('sidebar'); ?>
<?php get_component('sidebar'); ?>
<?php // get_snippet('sidebar'); ?>
</div>


Expand Down

0 comments on commit cca8de8

Please sign in to comment.