Committer: anazarov
LJSUP-13934: Admin tool to set adfox pixels for LJ users and communitiesU trunk/bin/upgrading/base-data-local.sql U trunk/cgi-bin/LJ/Controller.pm
Modified: trunk/bin/upgrading/base-data-local.sql =================================================================== --- trunk/bin/upgrading/base-data-local.sql 2012-10-23 15:09:08 UTC (rev 12814) +++ trunk/bin/upgrading/base-data-local.sql 2012-10-24 08:17:16 UTC (rev 12815) @@ -23,6 +23,8 @@ UPDATE priv_list SET des='Allows user to access various parts of the shop admin panel',is_public='0',privname='Shop admin',scope='local' WHERE privcode='shopadmin'; INSERT IGNORE INTO priv_list (des, is_public, privcode, privname, scope) VALUES ('Allows user to moderate a sponsors domain. arg=Sponsors domain name', '0', 'sponsordomainadm', 'Sponsors Domain Moderator', 'local'); UPDATE priv_list SET des='Allows user to moderate a sponsors domain. arg=Sponsors domain name',is_public='0',privname='Sponsors Domain Moderator',scope='local' WHERE privcode='sponsordomainadm'; +INSERT IGNORE INTO priv_list (des, is_public, privcode, privname, scope) VALUES ('Allows a user to view/edit AdFox pixels for LJ users and communities', '0', 'adfox', 'Adfox admin', 'local'); +UPDATE priv_list SET des='Allows a user to view/edit AdFox pixels for LJ users and communities',is_public='0',privname='Adfox admin',scope='local' WHERE privcode='adfox'; REPLACE INTO secret_questions (end, id, ml_key, scope, start) VALUES ('1209474526', '2', 'secret.best_friends.first_meet', 'local', '1209474526'); REPLACE INTO secret_questions (end, id, ml_key, scope, start) VALUES ('2147483647', '1', 'secret.childhood.book', 'local', '1209474499'); REPLACE INTO secret_questions (end, id, ml_key, scope, start) VALUES ('2147483647', '10', 'secret.paternal_grandfather_first_name', 'local', '1209474554'); Modified: trunk/cgi-bin/LJ/Controller.pm =================================================================== --- trunk/cgi-bin/LJ/Controller.pm 2012-10-23 15:09:08 UTC (rev 12814) +++ trunk/cgi-bin/LJ/Controller.pm 2012-10-24 08:17:16 UTC (rev 12815) @@ -3,6 +3,7 @@ use warnings; use LJ::Response; +use LJ::Response::Template; sub new { my ($class) = @_; @@ -64,4 +65,26 @@ } } +# Responses + +sub redirect_response { + my ($self, $url) = @_; + + return LJ::Response::Redirect->new( + where => $url + ); +} + +sub template_response { + my ($self, $tmpl, $args) = @_; + + return LJ::Response::Template->new( + file => $tmpl, + title => $args->{'title'}, + params => $args || {}, + use_site_scheme => 1 + ); +} + 1; +