...And a conversion to ucwords. 0.1b3
authorDan Fuhry <dan@enanocms.org>
Sun, 01 Aug 2010 13:08:14 -0400
changeset 40 2607b83e986d
parent 39 e9a7e37bdadd
child 41 0944c9354e9c
...And a conversion to ucwords.
plugins/gallery/upload.php
--- a/plugins/gallery/upload.php	Sun Aug 01 12:42:21 2010 -0400
+++ b/plugins/gallery/upload.php	Sun Aug 01 13:08:14 2010 -0400
@@ -16,15 +16,7 @@
 ## UPLOAD INTERFACE
 ##
 
-$plugins->attachHook('base_classes_initted', '
-  global $paths;
-    $paths->add_page(Array(
-      \'name\'=>\'Image gallery upload\',
-      \'urlname\'=>\'GalleryUpload\',
-      \'namespace\'=>\'Special\',
-      \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
-      ));
-  ');
+$plugins->attachHook('session_started', 'register_special_page("GalleryUpload", "Image gallery upload");');
 
 function page_Special_GalleryUpload()
 {
@@ -806,7 +798,7 @@
               break 3;
             }
             
-            $autotitle = capitalize_first_letter(basename($file));
+            $autotitle = ucwords(basename($file));
             $autotitle = substr($autotitle, 0, ( strrpos($autotitle, '.') ));
             $autotitle = str_replace('_', ' ', $autotitle);
             
@@ -894,7 +886,7 @@
           break 2;
         }
         
-        $autotitle = capitalize_first_letter(basename($file['name']));
+        $autotitle = ucwords(basename($file['name']));
         $autotitle = substr($autotitle, 0, ( strrpos($autotitle, '.') ));
         $autotitle = str_replace('_', ' ', $autotitle);