Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r12942: LJSUP-13980 (remove settings for friends...

Committer: ailyin
LJSUP-13980 (remove settings for friends page)
U   trunk/cgi-bin/LJ/Hooks/Customize.pm
Modified: trunk/cgi-bin/LJ/Hooks/Customize.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Customize.pm	2012-11-26 06:49:42 UTC (rev 12941)
+++ trunk/cgi-bin/LJ/Hooks/Customize.pm	2012-11-26 07:36:27 UTC (rev 12942)
@@ -378,4 +378,28 @@
 
 });
 
+# TODO: after friendsfeed is live, these props need to be added to core1.s2
+# as 'property hide $prop', along with the following hook removed
+my @friends_page_props = qw(
+    page_friends_items
+    friends_show_date
+    friends_show_upic
+    friends_show_meta
+);
+
+LJ::register_hook( 'augment_s2_layers', sub {
+    my @lids = @_;
+
+    return if LJ::is_enabled('friendsfeed_optout');
+
+    foreach my $lid (@lids) {
+        my $layertype = S2::get_layer_info( $lid, 'type' );
+        next unless $layertype && $layertype eq 'core';
+
+        foreach my $prop (@friends_page_props) {
+            S2::register_property_hide( $lid, $prop );
+        }
+    }
+} );
+
 1;

Tags: ailyin, andy, ljcom, pm
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments