Skip to content

Commit 28569d8

Browse files
kareilaalierak
authored andcommitted
new profile services don't have legacy userprops
1 parent 52ed843 commit 28569d8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

bin/upgrading/base-data.sql

+6-6
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,9 @@ INSERT IGNORE INTO profile_services (name, userprop, imgfile, title_ml, url_form
393393
UPDATE profile_services SET userprop='twitter', imgfile='twitter_bird.png', title_ml='profile.service.twitter', url_format='//www.twitter.com/%s', maxlen=40 WHERE name='twitter';
394394
INSERT IGNORE INTO profile_services (name, userprop, imgfile, title_ml, url_format, maxlen) VALUES ('wattpad', 'wattpad', 'wattpad.png', 'profile.service.wattpad', '//www.wattpad.com/user/%s', 20);
395395
UPDATE profile_services SET userprop='wattpad', imgfile='wattpad.png', title_ml='profile.service.wattpad', url_format='//www.wattpad.com/user/%s', maxlen=20 WHERE name='wattpad';
396-
INSERT IGNORE INTO profile_services (name, userprop, imgfile, title_ml, url_format, maxlen) VALUES ('steam', 'steam', 'steam.png', 'profile.service.steam', '//steamcommunity.com/id/%s/', 32);
397-
UPDATE profile_services SET userprop='steam', imgfile='steam.png', title_ml='profile.service.steam', url_format='//steamcommunity.com/id/%s/', maxlen=32 WHERE name='steam';
398-
INSERT IGNORE INTO profile_services (name, userprop, imgfile, title_ml, url_format, maxlen) VALUES ('spotify', 'spotify', 'spotify.png', 'profile.service.spotify', '//open.spotify.com/user/%s', 32);
399-
UPDATE profile_services SET userprop='spotify', imgfile='spotify.png', title_ml='profile.service.spotify', url_format='//open.spotify.com/user/%s', maxlen=32 WHERE name='spotify';
400-
INSERT IGNORE INTO profile_services (name, userprop, imgfile, title_ml, url_format, maxlen) VALUES ('squidgeworld', 'squidgeworld', 'squidgeworld.png', 'profile.service.squidgeworld', '//squidgeworld.org/users/%s', 40);
401-
UPDATE profile_services SET userprop='squidgeworld', imgfile='squidgeworld.png', title_ml='profile.service.squidgeworld', url_format='//squidgeworld.org/users/%s', maxlen=40 WHERE name='squidgeworld';
396+
INSERT IGNORE INTO profile_services (name, userprop, imgfile, title_ml, url_format, maxlen) VALUES ('steam', NULL, 'steam.png', 'profile.service.steam', '//steamcommunity.com/id/%s/', 32);
397+
UPDATE profile_services SET userprop=NULL, imgfile='steam.png', title_ml='profile.service.steam', url_format='//steamcommunity.com/id/%s/', maxlen=32 WHERE name='steam';
398+
INSERT IGNORE INTO profile_services (name, userprop, imgfile, title_ml, url_format, maxlen) VALUES ('spotify', NULL, 'spotify.png', 'profile.service.spotify', '//open.spotify.com/user/%s', 32);
399+
UPDATE profile_services SET userprop=NULL, imgfile='spotify.png', title_ml='profile.service.spotify', url_format='//open.spotify.com/user/%s', maxlen=32 WHERE name='spotify';
400+
INSERT IGNORE INTO profile_services (name, userprop, imgfile, title_ml, url_format, maxlen) VALUES ('squidgeworld', NULL, 'squidgeworld.png', 'profile.service.squidgeworld', '//squidgeworld.org/users/%s', 40);
401+
UPDATE profile_services SET userprop=NULL, imgfile='squidgeworld.png', title_ml='profile.service.squidgeworld', url_format='//squidgeworld.org/users/%s', maxlen=40 WHERE name='squidgeworld';

cgi-bin/DW/Logic/ProfilePage.pm

+1
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ sub external_services {
810810
$u->preload_props(@$userprops);
811811

812812
foreach my $site (@$services) {
813+
next unless defined $site->{userprop};
813814
if ( my $acct = $u->prop( $site->{userprop} ) ) {
814815
push @ret, $info->( $acct, $site );
815816
}

0 commit comments

Comments
 (0)