Kevin M. Brooks (lucretio) wrote in fotobilder,
Kevin M. Brooks

blank gallery name bugfix

I'm reposting my patch for the blank gallery name bug (assuming it is a bug), just in case it was missed last time. This patch is untested, so could someone test it, please?

Right now you can create a new gallery with no name, by using a space as a name. (It gives you an error, but it still makes the gallery.) You can also rename a gallery to blank.

the patch

main -> fb                htdocs/manage/gal
--- /home/lucretio/fb/cvs/fb/htdocs/manage/gal	2002-07-28 14:22:38.000000000 -0500
+++ /home/lucretio/fb/htdocs/manage/gal	2002-07-28 17:14:16.000000000 -0500
@@ -42,7 +42,7 @@
         # rename an existing gallery
-        if ($g && $FORM{'galname'} && $g->{'name'} ne $FORM{'galname'}) {
+        if ($g && $FORM{'galname'} && $g->{'name'} ne $FORM{'galname'} && $FORM{'galname'} =~ /\S/) {
             $dbu->do("UPDATE gallery SET name=? WHERE userid=? AND gallid=?",
                      undef, $FORM{'galname'}, $u->{'userid'}, $gallid);
             if ($dbu->err) {
@@ -63,7 +63,7 @@
         # create a new gallery
         my $just_created = 0;
-        if (! $g && $FORM{'galname'} ne "") {
+        if (! $g && $FORM{'galname'} =~ /\S/) {
             my $created;
             $g = FB::load_gallery($u, $FORM{'galname'}, { 
                 'createsec' => $FORM{'galsec'},

  • 302: lj_dev

    In the interests of consolidating all FotoBilder development-related discussion, we're going to be closing down this community. The same…

  • Development stalled?

    Is the development of Fotobilder held? Stalled? I am asking because there is no activity on the community and there is no link to the Fotobilder…

  • (no subject)

    Does FotoBilder works with Apache2? I installed all the required modules on my debian sarge, and when I restart my apache server, it dies horribly…

  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic
  • 1 comment