aboutsummaryrefslogtreecommitdiffstats
path: root/mod/display.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-10 17:03:33 -0800
committerfriendica <info@friendica.com>2013-02-10 17:03:33 -0800
commit90c1ecca244875fa915a4e5dfba3278e7c28e8d6 (patch)
tree56bc1c0120694eb6847b54b7a158a52f73c95796 /mod/display.php
parent2cfd73c57da302a1171f22a5b1b73a5d2195d3ad (diff)
downloadvolse-hubzilla-90c1ecca244875fa915a4e5dfba3278e7c28e8d6.tar.gz
volse-hubzilla-90c1ecca244875fa915a4e5dfba3278e7c28e8d6.tar.bz2
volse-hubzilla-90c1ecca244875fa915a4e5dfba3278e7c28e8d6.zip
taming the wild mod_display
Diffstat (limited to 'mod/display.php')
-rw-r--r--mod/display.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/mod/display.php b/mod/display.php
index b4e22e9a1..f18587e1e 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -14,7 +14,6 @@ function display_content(&$a, $update = 0, $load = false) {
require_once('include/acl_selectors.php');
require_once('include/items.php');
-// $o = '<div id="live-display"></div>' . "\r\n";
$a->page['htmlhead'] .= replace_macros(get_markup_template('display-head.tpl'), array());
@@ -43,11 +42,11 @@ function display_content(&$a, $update = 0, $load = false) {
// find a copy of the item somewhere
$target_item = null;
-dbg(1);
+
$r = q("select uri, parent_uri from item where uri = '%s' limit 1",
dbesc($item_hash)
);
-dbg(0);
+
if($r) {
$target_item = $r[0];
}
@@ -94,7 +93,7 @@ dbg(0);
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
if($load) {
-dbg(1);
+
$r = q("SELECT * from item
WHERE item_restrict = 0
and uri = '%s'
@@ -105,7 +104,7 @@ dbg(1);
group by uri limit 1",
dbesc($target_item['parent_uri'])
);
-dbg(0);
+
}
else {
$r = array();
@@ -116,7 +115,6 @@ dbg(0);
$parents_str = ids_to_querystr($r,'id');
if($parents_str) {
- dbg(1);
$items = q("SELECT `item`.*, `item`.`id` AS `item_id`
FROM `item`
@@ -124,7 +122,6 @@ dbg(0);
dbesc($parents_str)
);
-dbg(0);
xchan_query($items);
$items = fetch_post_tags($items);
$items = conv_sort($items,'created');