From 7a5103ae90370884c31746b778de0bf9b2664431 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 1 Apr 2013 12:31:55 +0400 Subject: [PATCH] move addInstance call to instances plugin --- classes/dlg.php | 49 ---------------------------------- plugins/instances/init.php | 49 ++++++++++++++++++++++++++++++++++ plugins/instances/instances.js | 2 +- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/classes/dlg.php b/classes/dlg.php index 36f3ee07..376f8d26 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -383,55 +383,6 @@ class Dlg extends Handler_Protected { } - function addInstance() { - print ""; - print ""; - - print "
".__("Instance")."
"; - - print "
"; - - /* URL */ - - print __("URL:") . " "; - - print ""; - - print "
"; - - $access_key = sha1(uniqid(rand(), true)); - - /* Access key */ - - print __("Access key:") . " "; - - print ""; - - print "

" . __("Use one access key for both linked instances."); - - print "

"; - - print "
-
- -
- -
"; - - return; - } function batchSubscribe() { print ""; diff --git a/plugins/instances/init.php b/plugins/instances/init.php index 6e8d43e9..6a7f7003 100644 --- a/plugins/instances/init.php +++ b/plugins/instances/init.php @@ -392,6 +392,55 @@ class Instances extends Plugin implements IHandler { } } + function addInstance() { + print ""; + print ""; + + print "
".__("Instance")."
"; + + print "
"; + + /* URL */ + + print __("URL:") . " "; + + print ""; + + print "
"; + + $access_key = sha1(uniqid(rand(), true)); + + /* Access key */ + + print __("Access key:") . " "; + + print ""; + + print "

" . __("Use one access key for both linked instances."); + + print "

"; + + print "
+
+ +
+ +
"; + + return; + } } ?> diff --git a/plugins/instances/instances.js b/plugins/instances/instances.js index 83213896..4a60692b 100644 --- a/plugins/instances/instances.js +++ b/plugins/instances/instances.js @@ -1,6 +1,6 @@ function addInstance() { try { - var query = "backend.php?op=dlg&method=addInstance"; + var query = "backend.php?op=pluginhandler&plugin=instances&method=addInstance"; if (dijit.byId("instanceAddDlg")) dijit.byId("instanceAddDlg").destroyRecursive(); -- 2.39.5