Dreamer of the Day (iamo) wrote in fotobilder,
Dreamer of the Day
iamo
fotobilder

A few patches

I have a few patches here to fix some issues. Namely, one of the issues mentioned in the previous post (the user column of the user table being removed), but from the angle of removing references to it instead of removing it being deleted from the table. The fix for the other issue (the style one) identified there seems correct as well, but I did that one manually as I'm not sure of the right place for the fix on a code level though.

I've also fixed some problematic code in the group editing page which was doing some incorrect stuff to output
s by using a count variable that was being incremented (and thus never hit 0) by making it use a
tag to separate the users, which is just simpler.


main -> fb                bin/upgrading/update-db.pl
--- cvs/fb/bin/upgrading/update-db.pl	Tue Dec 10 02:00:28 2002
+++ bin/upgrading/update-db.pl	Fri Mar 26 21:39:18 2004
@@ -140,8 +140,8 @@
     my $su = FB::load_user("system", 0);
     my $sysid;
     unless ($su) {
-        $dbh->do("INSERT INTO user (domainid, user, usercs, clusterid) ".
-                 "VALUES (0,'system','system',1)");
+        $dbh->do("INSERT INTO user (domainid, usercs, clusterid) ".
+                 "VALUES (0,'system',1)");
         die $dbh->errstr if $dbh->err;
         $sysid = $dbh->{'mysql_insertid'};
         $su = FB::load_user("system", 0);
main -> fb                htdocs/manage/groups
--- cvs/fb/htdocs/manage/groups	Tue Mar 16 17:34:41 2004
+++ htdocs/manage/groups	Sat Mar 27 14:08:17 2004
@@ -267,7 +267,7 @@
       $ret .= "\n" .
               "\n";
-      my $ct = 0;
+
       foreach (sort
                   { $members->{$a}->{'usercs'} cmp $members->{$b}->{'usercs'} }
                   keys %$members) {
@@ -276,17 +276,15 @@
          if ($members->{$_}->{'domainid'} != $current_domainid)
             { $domainsuffix .= '@' . FB::get_domainid_name($members->{$_}->{'domainid'}); }
 
-         $ret .= "
" if $ct; - $ret .= FB::html_check( + $ret .= "
" . FB::html_check( { 'name' => "userid:$_", 'selected' => 1 }) . "
[Error: Irreparable invalid markup ('<a [...] "'>') in entry. Owner must fix manually. Raw contents below.]

I have a few patches here to fix some issues. Namely, one of the issues mentioned in the previous post (the user column of the user table being removed), but from the angle of removing references to it instead of removing it being deleted from the table. The fix for the other issue (the style one) identified there seems correct as well, but I did that one manually as I'm not sure of the right place for the fix on a code level though.

I've also fixed some problematic code in the group editing page which was doing some incorrect stuff to output <br>s by using a count variable that was being incremented (and thus never hit 0) by making it use a <div> tag to separate the users, which is just simpler.

<lj-cut text="Patches behind the cut tag">
<code><pre>
main -> fb bin/upgrading/update-db.pl
--- cvs/fb/bin/upgrading/update-db.pl Tue Dec 10 02:00:28 2002
+++ bin/upgrading/update-db.pl Fri Mar 26 21:39:18 2004
@@ -140,8 +140,8 @@
my $su = FB::load_user("system", 0);
my $sysid;
unless ($su) {
- $dbh->do("INSERT INTO user (domainid, user, usercs, clusterid) ".
- "VALUES (0,'system','system',1)");
+ $dbh->do("INSERT INTO user (domainid, usercs, clusterid) ".
+ "VALUES (0,'system',1)");
die $dbh->errstr if $dbh->err;
$sysid = $dbh->{'mysql_insertid'};
$su = FB::load_user("system", 0);
main -> fb htdocs/manage/groups
--- cvs/fb/htdocs/manage/groups Tue Mar 16 17:34:41 2004
+++ htdocs/manage/groups Sat Mar 27 14:08:17 2004
@@ -267,7 +267,7 @@
$ret .= "<?h1 Current Members h1?>\n" .
"<?p To delete a user from this group, uncheck the box next to " .
"their username. p?>\n";
- my $ct = 0;
+
foreach (sort
{ $members->{$a}->{'usercs'} cmp $members->{$b}->{'usercs'} }
keys %$members) {
@@ -276,17 +276,15 @@
if ($members->{$_}->{'domainid'} != $current_domainid)
{ $domainsuffix .= '@' . FB::get_domainid_name($members->{$_}->{'domainid'}); }

- $ret .= "<br />" if $ct;
- $ret .= FB::html_check(
+ $ret .= "<div>" . FB::html_check(
{ 'name' => "userid:$_",
'selected' => 1
}) .
" <a href='$root/manage/groups?user=" .
- FB::eurl($members->{$_}->{'user'} . $domainsuffix) . "'>" .
- FB::eall($members->{$_}->{'usercs'} . $domainsuffix) . "</a>\n";
- $ct++;
+ FB::eurl($members->{$_}->{'usercs'} . $domainsuffix) . "'>" .
+ FB::eall($members->{$_}->{'usercs'} . $domainsuffix) . "</a></div>\n";
}
- if ($ct == 0) {
+ if (!%$members) {
$ret .= "<i>no members</i>\n";
} else {
$ret .= "<?p " . FB::html_submit(
main -> fb lib/fotobilder.pl
--- cvs/fb/lib/fotobilder.pl Thu Mar 25 17:44:35 2004
+++ lib/fotobilder.pl Sat Mar 27 14:16:39 2004
@@ -2331,7 +2331,7 @@

my $ret = {};
# FIXME: use memcache like LJ::load_userids() after the secmembers load
- my $sth = $udbr->prepare("SELECT u.userid, u.domainid, u.user, u.usercs ".
+ my $sth = $udbr->prepare("SELECT u.userid, u.domainid, u.usercs ".
"FROM secmembers s, user u ".
"WHERE s.userid=? AND s.secid=? ".
"AND u.userid=s.otherid");
</pre></code>
</lj-cut>
Subscribe

  • 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

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic
  • 3 comments