[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
sophie.
Files modified:
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
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") ) {
--------------------------------------------------------------------------------

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