]> git.mjollnir.org Git - s9y.git/commitdiff
fix bad substr() call
authorgarvinhicking <garvinhicking>
Mon, 10 Jul 2006 10:22:20 +0000 (10:22 +0000)
committergarvinhicking <garvinhicking>
Mon, 10 Jul 2006 10:22:20 +0000 (10:22 +0000)
plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php

index 216854491775d34b3fb128d1677069f5329d2cad..3e7be1ba30956f209177fc41cde263b84e190a4a 100644 (file)
@@ -19,7 +19,7 @@ class serendipity_plugin_templatedropdown extends serendipity_plugin {
         $propbag->add('description',   PLUGIN_TEMPLATEDROPDOWN_DESC);
         $propbag->add('stackable',     false);
         $propbag->add('author',        'Evan Nemerson');
-        $propbag->add('version',       '1.1');
+        $propbag->add('version',       '1.2');
         $propbag->add('requirements',  array(
             'serendipity' => '0.8',
             'smarty'      => '2.6.7',
@@ -68,7 +68,7 @@ class serendipity_plugin_templatedropdown extends serendipity_plugin {
         echo '<select name="user_template" onchange="document.getElementById(\'theme_chooser\').submit();">';
         foreach (serendipity_fetchTemplates() as $template) {
             $templateInfo = serendipity_fetchTemplateInfo($template);
-            echo '<option value="' . $template . '" ' . (serendipity_get_config_var('template', 'default') == $template ? 'selected="selected"' : '') . '>' . substr(0, 25, $templateInfo['name']) . '</option>';
+            echo '<option value="' . $template . '" ' . (serendipity_get_config_var('template', 'default') == $template ? 'selected="selected"' : '') . '>' . substr($templateInfo['name'], 0, 25) . '</option>';
         }
         echo '</select>';