From: Andrew Dolgov Date: Mon, 1 Apr 2013 08:31:55 +0000 (+0400) Subject: move addInstance call to instances plugin X-Git-Tag: 1.7.6~77 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7a5103ae90370884c31746b778de0bf9b2664431;p=tt-rss.git move addInstance call to instances plugin --- 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();