mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2010-01-08 11:45 pm

[dw-free] Crossposting footer truncates after unknown amount of time

[commit: http://hg.dwscoalition.org/dw-free/rev/63973df563bf]

http://bugs.dwscoalition.org/show_bug.cgi?id=1718

Fix update-db for new installations so it doesn't require a property we
haven't built yet.

Patch by [personal profile] sophie.

Files modified:
  • bin/upgrading/update-db-general.pl
--------------------------------------------------------------------------------
diff -r c9ab986c6c8d -r 63973df563bf bin/upgrading/update-db-general.pl
--- a/bin/upgrading/update-db-general.pl	Fri Jan 08 23:43:26 2010 +0000
+++ b/bin/upgrading/update-db-general.pl	Fri Jan 08 23:45:20 2010 +0000
@@ -3811,13 +3811,16 @@ EOF
 
     # convert xpost-footer-update from char to blobchar
     if ( table_relevant( 'userproplite2' ) ) {
-        my $upropid = LJ::get_prop( user => 'crosspost_footer_text' )->{upropid};
+        my $uprop = LJ::get_prop( user => 'crosspost_footer_text' );
+        if ( defined( $uprop ) ) {
+            my $upropid = $uprop->{upropid};
 
-        my $testresult = $dbh->selectrow_array( "SELECT upropid FROM userproplite2 WHERE upropid = $upropid LIMIT 1" );
-        if ( $testresult > 0 ) {
-            do_sql( "INSERT IGNORE INTO userpropblob (userid, upropid, value) " .
-                    "    SELECT userid, upropid, value FROM userproplite2 WHERE upropid = $upropid" );
-            do_sql( "DELETE FROM userproplite2 WHERE upropid = $upropid" );
+            my $testresult = $dbh->selectrow_array( "SELECT upropid FROM userproplite2 WHERE upropid = $upropid LIMIT 1" );
+            if ( $testresult > 0 ) {
+                do_sql( "INSERT IGNORE INTO userpropblob (userid, upropid, value) " .
+                        "    SELECT userid, upropid, value FROM userproplite2 WHERE upropid = $upropid" );
+                do_sql( "DELETE FROM userproplite2 WHERE upropid = $upropid" );
+            }
         }
     }
     if ( table_relevant( "userproplist" ) && ! check_dbnote("xpost_footer_update") ) {
--------------------------------------------------------------------------------
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2010-01-08 11:46 pm (UTC)(link)
p.s. This was sophie, not me!
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2010-01-09 12:54 am (UTC)(link)
The attack of the phantom bug-fixer! She lurks, waiting until just the right bug to strike... and when you least expect it, she'll submit a patch of DOOM.

...okay, maybe that last part doesn't really work. ;p