afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-04-25 07:10 am

[dw-free] /mobile/friends.bml needs to be renamed /mobile/read.bml

[commit: http://hg.dwscoalition.org/dw-free/rev/bbe8245e97be]

http://bugs.dwscoalition.org/show_bug.cgi?id=960

Move mobile/friends.bml to mobile/read.bml

Patch by [personal profile] afuna.

Files modified:
  • cgi-bin/redirect.dat
  • htdocs/mobile/friends.bml
  • htdocs/mobile/read.bml
--------------------------------------------------------------------------------
diff -r 3e2a4f3113ea -r bbe8245e97be cgi-bin/redirect.dat
--- a/cgi-bin/redirect.dat	Sat Apr 25 06:06:49 2009 +0000
+++ b/cgi-bin/redirect.dat	Sat Apr 25 07:09:23 2009 +0000
@@ -42,3 +42,4 @@
 /manage/subscriptions               /manage/settings/?cat=notifications
 /manage/subscriptions/              /manage/settings/?cat=notifications
 /manage/subscriptions/index.bml     /manage/settings/?cat=notifications
+/mobile/friends.bml                 /mobile/read
diff -r 3e2a4f3113ea -r bbe8245e97be htdocs/mobile/friends.bml
--- a/htdocs/mobile/friends.bml	Sat Apr 25 06:06:49 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-<html>
-<head>
-<title>Friends Page</title>
-<meta name="viewport" content="width = 320" />
-</head>
-<body>
-<p><?_code
-{
-    use vars qw (%GET);
-
-    my $u = LJ::User->remote
-        or return "You must <a href='login.bml'>log in</a> to read your friends page.";
-
-    my $itemsperpage = 50;
-
-    my $ret;
-
-    my $skip = $GET{skip}+0 || 0;
-
-    my $prevcount = $skip + $itemsperpage;
-    my $nextcount = $skip ? $skip - $itemsperpage : -1;
-    my $nextlink  = $nextcount != -1 ? " | <a href='?skip=$nextcount'>Next $itemsperpage &gt;&gt;</a>" : '';
-    my $prevlink  = "<a href='?skip=$prevcount'>&lt;&lt; Previous $itemsperpage</a>";
-
-    # Filter first to a "Mobile View" friends group if they have one,
-    # then fall back to "Default View", and then just show them everything
-#    my $filter;
-    my $groupname = "All friends";
-
-#    foreach ("Mobile View", "Default View") {
-#        if (my $grp = LJ::get_friend_group($u, { 'name' => $_ })) {
-#            $groupname = $_;
-#            $filter = 1 << $grp->{'groupnum'};
-#            last;
-#        }
-#    }
-
-    $ret = qq {
-            <a href='./'>&lt;&lt; Back</a> to LiveJournal Mobile.
-            <div style="font-size: 16pt; font-weight: bold; margin: 0.8em;">Friends Page</div>
-            <div style="margin: 1em;">
-              <div style="font-weight: bold;">Viewing: $groupname</div>
-              <div>$prevlink$nextlink</div><br/>
-            </div>
-        };
-
-
-    my @entries = $u->watch_items(
-        'remote'            => $u->{'userid'},
-        'itemshow'          => $itemsperpage,
-        'skip'              => $skip,
-        'showtypes'         => 'PYC',
-        'u'                 => $u,
-        'userid'            => $u->{'userid'},
-#        'filter'            => $filter,
-    );
-
-    # how many characters to truncate entry at
-    my $max_entry_length = 400;
-
-    foreach my $ei (@entries) {
-        next unless $ei;
-        my $entry;
-        if ($ei->{'ditemid'}) {
-            $entry = LJ::Entry->new($ei->{'journalid'},
-                                    ditemid => $ei->{'ditemid'});
-        } elsif ($ei->{'jitemid'} && $ei->{'anum'}) {
-            $entry = LJ::Entry->new($ei->{'journalid'},
-                                    jitemid => $ei->{'jitemid'},
-                                    anum    => $ei->{'anum'});
-        }
-        next unless $entry;
-
-        my $pu    = $entry->poster;
-        my $ju    = $entry->journal;
-        my $url   = $entry->url;
-        $url .= "?format=light";
-
-        my $who = "<a href='" . $pu->journal_base . "/'><b>$pu->{user}</b></a>";
-        if ($pu->{userid} != $ju->{userid}) {
-            $who .= " in " . "<a href='" . $ju->journal_base . "/'><b>$ju->{user}</b></a>";
-        }
-
-        $ret .= "$who: " . "<a href='$url'>" . ($entry->subject_text || "(no subject)") . "</a><br />";
-    }
-
-    return $ret;
-}
-_code?>
-
-</body>
-</html>
diff -r 3e2a4f3113ea -r bbe8245e97be htdocs/mobile/read.bml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/mobile/read.bml	Sat Apr 25 07:09:23 2009 +0000
@@ -0,0 +1,92 @@
+<html>
+<head>
+<title>Friends Page</title>
+<meta name="viewport" content="width = 320" />
+</head>
+<body>
+<p><?_code
+{
+    use vars qw (%GET);
+
+    my $u = LJ::User->remote
+        or return "You must <a href='login.bml'>log in</a> to read your friends page.";
+
+    my $itemsperpage = 50;
+
+    my $ret;
+
+    my $skip = $GET{skip}+0 || 0;
+
+    my $prevcount = $skip + $itemsperpage;
+    my $nextcount = $skip ? $skip - $itemsperpage : -1;
+    my $nextlink  = $nextcount != -1 ? " | <a href='?skip=$nextcount'>Next $itemsperpage &gt;&gt;</a>" : '';
+    my $prevlink  = "<a href='?skip=$prevcount'>&lt;&lt; Previous $itemsperpage</a>";
+
+    # Filter first to a "Mobile View" friends group if they have one,
+    # then fall back to "Default View", and then just show them everything
+#    my $filter;
+    my $groupname = "All friends";
+
+#    foreach ("Mobile View", "Default View") {
+#        if (my $grp = LJ::get_friend_group($u, { 'name' => $_ })) {
+#            $groupname = $_;
+#            $filter = 1 << $grp->{'groupnum'};
+#            last;
+#        }
+#    }
+
+    $ret = qq {
+            <a href='./'>&lt;&lt; Back</a> to LiveJournal Mobile.
+            <div style="font-size: 16pt; font-weight: bold; margin: 0.8em;">Friends Page</div>
+            <div style="margin: 1em;">
+              <div style="font-weight: bold;">Viewing: $groupname</div>
+              <div>$prevlink$nextlink</div><br/>
+            </div>
+        };
+
+
+    my @entries = $u->watch_items(
+        'remote'            => $u->{'userid'},
+        'itemshow'          => $itemsperpage,
+        'skip'              => $skip,
+        'showtypes'         => 'PYC',
+        'u'                 => $u,
+        'userid'            => $u->{'userid'},
+#        'filter'            => $filter,
+    );
+
+    # how many characters to truncate entry at
+    my $max_entry_length = 400;
+
+    foreach my $ei (@entries) {
+        next unless $ei;
+        my $entry;
+        if ($ei->{'ditemid'}) {
+            $entry = LJ::Entry->new($ei->{'journalid'},
+                                    ditemid => $ei->{'ditemid'});
+        } elsif ($ei->{'jitemid'} && $ei->{'anum'}) {
+            $entry = LJ::Entry->new($ei->{'journalid'},
+                                    jitemid => $ei->{'jitemid'},
+                                    anum    => $ei->{'anum'});
+        }
+        next unless $entry;
+
+        my $pu    = $entry->poster;
+        my $ju    = $entry->journal;
+        my $url   = $entry->url;
+        $url .= "?format=light";
+
+        my $who = "<a href='" . $pu->journal_base . "/'><b>$pu->{user}</b></a>";
+        if ($pu->{userid} != $ju->{userid}) {
+            $who .= " in " . "<a href='" . $ju->journal_base . "/'><b>$ju->{user}</b></a>";
+        }
+
+        $ret .= "$who: " . "<a href='$url'>" . ($entry->subject_text || "(no subject)") . "</a><br />";
+    }
+
+    return $ret;
+}
+_code?>
+
+</body>
+</html>
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org