kizu (ki_zu) wrote in changelog,
kizu
ki_zu
changelog

[ljcom] r7594: LJSUP-4790: some fixes

Committer: rkomarov
LJSUP-4790: some fixes

U   trunk/bin/upgrading/s2layers/sup/layout.s2
U   trunk/bin/upgrading/s2layers/sup/themes.s2
Modified: trunk/bin/upgrading/s2layers/sup/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/layout.s2	2009-08-24 10:29:43 UTC (rev 7593)
+++ trunk/bin/upgrading/s2layers/sup/layout.s2	2009-08-25 06:13:12 UTC (rev 7594)
@@ -1204,8 +1204,10 @@
     var string _h1 = "<h1>" + _user_print($.journal, "microformatted") + "</h1>";
     var string _nav = """ <li class="item item-recent""" + (($.view == "recent")?" item-selected":"") + """"><a""" + (($*exact_view != "recent_first")?" rel=\"home\" href=\"$*base_url\"":"") + """>$*text_view_recent</a></li> <li class="item item-friends""" + (($.view == "friends")?" item-selected":"") + """"><a""" + (($*exact_view != "friends_first")?" href=\"$*base_url/friends\"":"") + """>$*text_view_friends</a></li> <li class="item item-archive""" + (($.view == "archive" or $.view == "month" or $.view == "day")?" item-selected":"") + """"><a""" + (($*exact_view != "archive_first")?" href=\"$*base_url/calendar\"":"") + """>$*text_view_archive</a></li> <li class="item item-profile"><a href="$*base_url/profile">$*text_view_userinfo</a></li> """;
     var string rsslink = ($.data_link{"rss"})?($.data_link{"rss"}.url):"$*base_url/data/rss";
-    var string _nav_sub = ((not viewer_is_owner() and not viewer_is_friend())?""" <li class="item item-addfriend"><a class="btn btn-add" href="$*SITEROOT/friends/add.bml?user=$.journal.username"><span><span><span>$*text_friend_add</span></span></span></a></li> """ : "") + """ <li class="item item-rss"><a class="btn btn-rss" href="$rsslink"><span><span><span>RSS</span></span></span></a></li> """;
-    if ($*active_theme == "x3") { $_nav_sub = ((not viewer_is_owner() and not viewer_is_friend())?""" <li class="item item-addfriend"><a href="$*SITEROOT/friends/add.bml?user=$.journal.username">$*text_friend_add</a></li> """ : "") + """ <li class="item item-rss"><a href="$rsslink">RSS</a></li> """; }
+	var Link addlink = $.journal -> get_link("add_friend");
+	var string addfriend = (not viewer_is_owner() and $addlink.url != "") ? $addlink.url : "";
+    var string _nav_sub = ($addfriend ? """ <li class="item item-addfriend"><a class="btn btn-add" href="$addfriend"><span><span><span>$*text_friend_add</span></span></span></a></li> """ : "") + """ <li class="item item-rss"><a class="btn btn-rss" href="$rsslink"><span><span><span>RSS</span></span></span></a></li> """;
+    if ($*active_theme == "x3") { $_nav_sub = ($addfriend ? """ <li class="item item-addfriend"><a href="$addfriend">$*text_friend_add</a></li> """ : "") + """ <li class="item item-rss"><a href="$rsslink">RSS</a></li> """; }
     var string _h2 = """<h2>$.global_title</h2>""";
     var string _h3 = ($.view == "friends")?"<h3>$*_FriendsPage.friends_title</h3>":"<h3>$.global_subtitle</h3>";
     var string _hfeed = ($.view=="recent" or $.view=="friends" or $.view=="day")?" hfeed":"";

Modified: trunk/bin/upgrading/s2layers/sup/themes.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/themes.s2	2009-08-24 10:29:43 UTC (rev 7593)
+++ trunk/bin/upgrading/s2layers/sup/themes.s2	2009-08-25 06:13:12 UTC (rev 7594)
@@ -236,7 +236,9 @@
     var string _h1 = "<h1>" + _user_print($.journal, "microformatted") + "</h1>";
     var string _nav = """ <li class="item item-recent""" + (($.view == "recent")?" item-selected":"") + """"><a""" + (($*exact_view != "recent_first")?" rel=\"home\" href=\"$*base_url\"":"") + """>$*text_view_recent</a></li> <li class="item item-friends""" + (($.view == "friends")?" item-selected":"") + """"><a""" + (($*exact_view != "friends_first")?" href=\"$*base_url/friends\"":"") + """>$*text_view_friends</a></li> <li class="item item-archive""" + (($.view == "archive" or $.view == "month" or $.view == "day")?" item-selected":"") + """"><a""" + (($*exact_view != "archive_first")?" href=\"$*base_url/calendar\"":"") + """>$*text_view_archive</a></li> <li class="item item-profile"><a href="$*base_url/profile">$*text_view_userinfo</a></li> """;
     var string rsslink = ($.data_link{"rss"})?($.data_link{"rss"}.url):"$*base_url/data/rss";
-    var string _nav_sub = ((not viewer_is_owner() and not viewer_is_friend())?""" <li class="item item-addfriend"><a href="$*SITEROOT/friends/add.bml?user=$.journal.username">$*text_friend_add</a></li> """ : "") + """ <li class="item item-rss"><a href="$rsslink">RSS</a></li> """;
+	var Link addlink = $.journal -> get_link("add_friend");
+	var string addfriend = (not viewer_is_owner() and $addlink.url != "") ? $addlink.url : "";
+    var string _nav_sub = ($addfriend ? """ <li class="item item-addfriend"><a href="$addfriend">$*text_friend_add</a></li> """ : "") + """ <li class="item item-rss"><a href="$rsslink">RSS</a></li> """;
     var string _h2 = """<h2>$.global_title</h2>""";
     var string _h3 = ($.view == "friends")?"<h3>$*_FriendsPage.friends_title</h3>":"<h3>$.global_subtitle</h3>";
     var string _hfeed = ($.view=="recent" or $.view=="friends" or $.view=="day")?" hfeed":"";

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