Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_templatedropdown
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3575/plugins/serendipity_plugin_templatedropdown
Modified Files:
serendipity_plugin_templatedropdown.php
Log Message:
* allow unlimited ammount of nested directories inside plugin directory(see mailinglist)
* unify "get current url" for plugins: karma, templatedropdown, shoutbox
Index: serendipity_plugin_templatedropdown.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- serendipity_plugin_templatedropdown.php 2 Dec 2004 10:55:10 -0000 1.5
+++ serendipity_plugin_templatedropdown.php 6 Dec 2004 12:45:49 -0000 1.6
@@ -65,17 +65,7 @@
$title = $this->get_config('title', $this->title);
- // All that URL getting humpty-dumpty is necessary to allow a user to change the template in the
- // articles view. POSTing data to that page only works with mod_rewrite and not the ErrorDocument
- // redirection, so we need to generate the ErrorDocument-URI here.
- $uri = parse_url($_SERVER['REQUEST_URI']);
- $qst = '';
- if (!empty($uri['query'])) {
- $qst = '&' . str_replace('&', '&', $uri['query']);
- }
- $uri['path'] = str_replace($serendipity['serendipityHTTPPath'], '', $uri['path']);
- $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?' . $uri['path'] . $qst;
- $url = str_replace($serendipity['indexFile'] . '&', '', $url); // Kill possible looped repitions which could occur
+ $url = serendipity_currentURL();
echo '<form id="theme_chooser" action="' . $url . '" method="post">';
echo '<select name="user_template" onchange="document.getElementById(\'theme_chooser\').submit();">';
|