summaryrefslogtreecommitdiff
path: root/lib/plugins
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2015-05-17 19:45:15 +0200
committerAndreas Gohr <andi@splitbrain.org>2015-05-17 19:45:15 +0200
commitb1a864fe66dcf7f538e4d304cc01ea9ec736b786 (patch)
tree4603faaf7ebe10c8feec6acdf9941cad51b63089 /lib/plugins
parent9fb9909916c8ce7fbca17d536942c0166afe487c (diff)
downloadrpg-b1a864fe66dcf7f538e4d304cc01ea9ec736b786.tar.gz
rpg-b1a864fe66dcf7f538e4d304cc01ea9ec736b786.tar.bz2
fix keeping the current page
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/styler/action.php3
-rw-r--r--lib/plugins/styler/admin.php1
-rw-r--r--lib/plugins/styler/script.js5
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/plugins/styler/action.php b/lib/plugins/styler/action.php
index b63cf3ec1..35e2f8f3c 100644
--- a/lib/plugins/styler/action.php
+++ b/lib/plugins/styler/action.php
@@ -90,6 +90,9 @@ class action_plugin_styler extends DokuWiki_Action_Plugin {
$event->preventDefault();
$event->stopPropagation();
+ global $ID;
+ $ID = getID();
+
/** @var admin_plugin_styler $hlp */
$hlp = plugin_load('admin', 'styler');
$hlp->form(true);
diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php
index 4269a0ee7..432b22279 100644
--- a/lib/plugins/styler/admin.php
+++ b/lib/plugins/styler/admin.php
@@ -61,7 +61,6 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin {
public function form($isajax) {
global $conf;
global $ID;
- $tpl = $conf['template'];
define('SIMPLE_TEST', 1); // hack, ideally certain functions should be moved out of css.php
require_once(DOKU_INC.'lib/exe/css.php');
$styleini = css_styleini($conf['template'], true);
diff --git a/lib/plugins/styler/script.js b/lib/plugins/styler/script.js
index b71e46802..1c53987a4 100644
--- a/lib/plugins/styler/script.js
+++ b/lib/plugins/styler/script.js
@@ -4,7 +4,7 @@ jQuery(function () {
// user openend the admin page, set cookie and redirect
if (jQuery('#plugin__styler').length) {
DokuCookie.setValue('styler_plugin', 1);
- document.location.href = DOKU_BASE;
+ document.location.href = document.location.href.replace(/do=admin/, '');
}
// The Styler Dialog is currently enabled, display it here and apply the preview styles
@@ -15,7 +15,8 @@ jQuery(function () {
$dialog.load(
DOKU_BASE + '/lib/exe/ajax.php',
{
- 'call': 'plugin_styler'
+ 'call': 'plugin_styler',
+ 'id': JSINFO.id
},
function () {
// load the preview template