Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[livejournal] r21452: LJSUP-11562: Disable 'trava.ru' project ...

Committer: amyshkin
LJSUP-11562: Disable 'trava.ru' project in production
U   trunk/htdocs/manage/profile/index.bml
U   trunk/htdocs/manage/settings/index.bml
Modified: trunk/htdocs/manage/profile/index.bml
===================================================================
--- trunk/htdocs/manage/profile/index.bml	2012-03-19 12:55:52 UTC (rev 21451)
+++ trunk/htdocs/manage/profile/index.bml	2012-03-19 13:00:10 UTC (rev 21452)
@@ -75,7 +75,9 @@
           opt_showmutualfriends opt_showschools
           opt_showbday opt_showlocation
           opt_sharebday
-          comm_theme opt_showljtalk opt_showonlinestatus/
+          comm_theme opt_showljtalk opt_showonlinestatus
+          playlist_id/,
+          $LJ::DISABLED{'trava'} ? 'last_fm_user' : 'trava_uid',
     );
 
     # to store values before they undergo normalisation
@@ -490,6 +492,14 @@
             $ret .= "</td></tr>\n";
         }
 
+        if ( $LJ::DISABLED{'trava'} ) {
+            # last_fm_user
+            $ret .= "<tr><td class='field_name'>$ML{'.fn.last_fm'}</td><td>";
+            $ret .= LJ::html_text({ 'name' => 'last_fm_user', 'value' => $u->{'last_fm_user'}, 'size' => '20', 'maxlength' => '255' });
+            $ret .= "<div class='helper'>$ML{'.fn.last_fm.desc'}</div></td></tr>";
+            $ret .= "</td></tr>\n";
+        }
+
         } # end is_person check
 
         $ret .= "</table>\n";
@@ -671,6 +681,33 @@
 
         $ret .= "</table>\n";
 
+        unless ( $LJ::DISABLED{'trava'} ) {
+
+        # Playlist
+# TODO: remove ||5 !!!!!!!
+        my $trava_uid = $u->prop('trava_uid') || 5;
+
+        if( $trava_uid && $trava_uid > 1 ) {
+            my $playlist_id = $u->prop('playlist_id');
+
+            # if not yet selected
+            $playlist_id = 0 unless defined $playlist_id;
+
+            $ret .= "<div class='section_head'>$ML{'.section.playlist'}</div>\n";
+
+            $ret .= "<table class='field_block'>\n";
+
+            $ret .= "<tr><td class='field_name'><label for='playlist_id'>$ML{'.fn.playlist_on_trava.ru'}</label></td><td>";
+            $ret .= qq~<input type="hidden" name="trava_uid" id="trava_uid" value="$trava_uid"><input type="hidden" name="playlist_id" id="playlist_id" value="$playlist_id" />~ . $ML{'.pl.selected'}. qq~<span id="playlist_name">Loading playlist...</span><br/>~;
+            $ret .= LJ::html_check({ 'type' => 'check', 'name' => 'opt_hidefriendofs', 'id' => 'opt_hidefriendofs',
+                                     'selected' => ! $u->{'opt_hidefriendofs'} });
+            $ret .= " <label for='opt_hidefriendofs'>$ML{'.friendof'}</label></td></tr>\n";
+
+            $ret .= "</table>\n";
+        }
+        }
+
+        # Extra
         $ret .= LJ::run_hook("profile_settings_extra", $u);
 
         # ending submit block
@@ -907,6 +944,10 @@
               opt_sharebday opt_showonlinestatus
             );
 
+            $LJ::DISABLED{'trava'}
+                ? push @uprops, 'last_fm_user'
+                : push @uprops, 'playlist_id';
+
             # reset the gizmo account for this user account
             $u->gizmo_account( $POST{'gizmo'} )
                 if $u->gizmo_account ne $POST{'gizmo'};

Modified: trunk/htdocs/manage/settings/index.bml
===================================================================
--- trunk/htdocs/manage/settings/index.bml	2012-03-19 12:55:52 UTC (rev 21451)
+++ trunk/htdocs/manage/settings/index.bml	2012-03-19 13:00:10 UTC (rev 21452)
@@ -152,9 +152,9 @@
                 LJ::Setting::WebmasterTools::Google
                 LJ::Setting::WebmasterTools::Yandex
                 LJ::Setting::GiveFeatures
-                LJ::Setting::LJTimes
-                LJ::Setting::Music
-            )],
+                LJ::Setting::LJTimes),
+                $LJ::DISABLED{'trava'} ? undef : 'LJ::Setting::Music',
+            ],
         },
     );
 
@@ -500,7 +500,7 @@
     $ret .= "</div>";
 
     $ret .= LJ::Widget::SettingWindow->render;
-    
+
     return $ret;
 }
 _code?>

Tags: amyshkin, bml, livejournal, zilogic
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