Permalink
Browse files

Revert "added option not to output replies"

This reverts commit b4a317a.
  • Loading branch information...
1 parent c7b5aad commit 55e1c1091052818d549f65cbcd7567acc0cc52c0 Mookie Kong committed May 3, 2012
Showing with 9 additions and 28 deletions.
  1. +1 −1 webui/archive.php
  2. +1 −1 webui/index.php
  3. +6 −25 webui/mootwit.php
  4. +1 −1 webui/rss.php
View
@@ -15,7 +15,7 @@
}
}
- showEntriesArchive($indexNum,$pagenum,$printReplies);
+ showEntriesArchive($indexNum,$pagenum);
$pagenum++;
View
@@ -3,7 +3,7 @@
?>
<?php
- showEntriesIndex($indexNum,$printReplies);
+ showEntriesIndex($indexNum);
echo "<a href=\"" . $siteUrl . "archive.php?pagenum=2\" class=\"box\">older &#187;</a>";
?>
View
@@ -13,39 +13,26 @@
$siteurl = "http://someotherplace.doesnotexist";
$indexNum = 20;
$numOfEntries = getNumEntries();
-# print replies in output? 1 for yes, 0 for no
-$printReplies = 1;
-$printRepliesRSS = 1;
-function showEntriesIndex($num,$printReplies) {
-
- if ($printReplies == 1) {
- $query = "select id from mootwit order by id desc limit $num";
- } else {
- $query = "select id from mootwit where text not like '@%' order by id desc limit $num";
- }
+function showEntriesIndex($num) {
+ $query = "select id from mootwit order by id desc limit $num";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
printEntry($row['id']);
}
}
-function showEntriesArchive($num,$pnum,$printReplies) {
+function showEntriesArchive($num,$pnum) {
if($pnum == 1) {
$offset = 1;
} else {
$offset = ($pnum-1) * $num;
}
- if ($printReplies == 1) {
- $query = "select id from mootwit order by id desc limit $offset,$num";
- } else {
- $query = "select id from mootwit where text not like '@%' order by id desc limit $offset,$num";
- }
-
+ $query = "select id from mootwit order by id desc limit $offset,$num";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
@@ -155,14 +142,8 @@ function getNumEntries() {
return($row['count(id)']);
}
-function printRSS($num,$printRepliesRSS) {
-
- if ($printRepliesRSS == 1) {
- $query = "select id,text,date_format(created_at, '%a, %d %b %Y %H:%i:%s') as date from mootwit order by id desc limit $num";
- } else {
- $query = "select id,text,date_format(created_at, '%a, %d %b %Y %H:%i:%s') as date from mootwit where text not like '@%' order by id desc limit $num";
- }
-
+function printRSS($num) {
+ $query = "select id,text,date_format(created_at, '%a, %d %b %Y %H:%i:%s') as date from mootwit order by id desc limit $num";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
View
@@ -22,7 +22,7 @@
<atom:link href="<?php echo $siteurl; ?>/rss.php" rel="self" type="application/rss+xml" />
<ttl>5</ttl>
<?php
- printRSS($numRss,$printRepliesRSS);
+ printRSS($numRss);
?>
</channel>

0 comments on commit 55e1c10

Please sign in to comment.