aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Share.php4
-rw-r--r--Zotlabs/Module/Network.php17
-rw-r--r--Zotlabs/Module/Viewsrc.php9
-rw-r--r--Zotlabs/Storage/Browser.php2
-rw-r--r--Zotlabs/Widget/Activity_filter.php82
-rw-r--r--Zotlabs/Widget/Activity_order.php4
6 files changed, 70 insertions, 48 deletions
diff --git a/Zotlabs/Lib/Share.php b/Zotlabs/Lib/Share.php
index e9e4d23c4..d3ecbf7fa 100644
--- a/Zotlabs/Lib/Share.php
+++ b/Zotlabs/Lib/Share.php
@@ -107,7 +107,7 @@ class Share {
}
public function bbcode() {
- $bb = NULL_STR;
+ $bb = EMPTY_STR;
if(! $this->item)
return $bb;
@@ -140,4 +140,4 @@ class Share {
}
-} \ No newline at end of file
+}
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 9837d35a3..2e9bcd2ce 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -140,7 +140,7 @@ class Network extends \Zotlabs\Web\Controller {
$deftag = '';
- if(x($_GET,'search') || x($_GET,'file'))
+ if(x($_GET,'search') || $file || (!$pf && $cid))
$nouveau = true;
if($cid) {
@@ -262,13 +262,18 @@ class Network extends \Zotlabs\Web\Controller {
$item_thread_top = '';
if($load || $update) {
- $ttype = (($pf) ? TERM_FORUM : TERM_MENTION);
+ if(!$pf && $nouveau) {
+ $sql_extra = " AND author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ";
+ }
+ else {
+ $ttype = (($pf) ? TERM_FORUM : TERM_MENTION);
- $p1 = q("SELECT DISTINCT parent FROM item WHERE uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' OR owner_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ) $item_normal ");
- $p2 = q("SELECT oid AS parent FROM term WHERE uid = " . intval(local_channel()) . " AND ttype = $ttype AND term = '" . dbesc($cid_r[0]['xchan_name']) . "'");
+ $p1 = q("SELECT DISTINCT parent FROM item WHERE uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' OR owner_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ) $item_normal ");
+ $p2 = q("SELECT oid AS parent FROM term WHERE uid = " . intval(local_channel()) . " AND ttype = $ttype AND term = '" . dbesc($cid_r[0]['xchan_name']) . "'");
- $p_str = ids_to_querystr(array_merge($p1,$p2),'parent');
- $sql_extra = " AND item.parent IN ( $p_str ) ";
+ $p_str = ids_to_querystr(array_merge($p1,$p2),'parent');
+ $sql_extra = " AND item.parent IN ( $p_str ) ";
+ }
}
$title = replace_macros(get_markup_template("section_title.tpl"),array(
diff --git a/Zotlabs/Module/Viewsrc.php b/Zotlabs/Module/Viewsrc.php
index 54ab89e81..5900e385a 100644
--- a/Zotlabs/Module/Viewsrc.php
+++ b/Zotlabs/Module/Viewsrc.php
@@ -28,7 +28,7 @@ class Viewsrc extends \Zotlabs\Web\Controller {
$item_normal = item_normal();
if(local_channel() && $item_id) {
- $r = q("select id, item_flags, mimetype, item_obscured, body from item where uid in (%d , %d) and id = %d $item_normal limit 1",
+ $r = q("select id, item_flags, mimetype, item_obscured, body, llink, plink from item where uid in (%d , %d) and id = %d $item_normal limit 1",
intval(local_channel()),
intval($sys['channel_id']),
intval($item_id)
@@ -52,8 +52,11 @@ class Viewsrc extends \Zotlabs\Web\Controller {
}
if(is_ajax()) {
- print '<div><i class="fa fa-pencil"> ' . t('Source of Item') . ' ' . $r[0]['id'] . '</i></div>';
- echo $o;
+ echo '<div class="p-1">';
+ echo '<div>id: ' . $r[0]['id'] . ' | <a href="' . $r[0]['plink'] . '" target="_blank">plink</a> | <a href="' . $r[0]['llink'] . '" target="_blank">llink</a></div>';
+ echo '<hr>';
+ echo '<pre class="p-1">' . $o . '</pre>';
+ echo '</div>';
killme();
}
diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php
index f4f906ad1..153016da6 100644
--- a/Zotlabs/Storage/Browser.php
+++ b/Zotlabs/Storage/Browser.php
@@ -12,7 +12,7 @@ use Sabre\DAV;
*
* @extends \\Sabre\\DAV\\Browser\\Plugin
*
- * @link http://github.com/redmatrix/hubzilla
+ * @link http://framagit.org/hubzilla/core/
* @license http://opensource.org/licenses/mit-license.php The MIT License (MIT)
*/
class Browser extends DAV\Browser\Plugin {
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index 32da20bf6..fadf39144 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -76,6 +76,38 @@ class Activity_filter {
}
}
+ if(feature_enabled(local_channel(),'forums_tab')) {
+ $forums = get_forum_channels(local_channel());
+
+ if($forums) {
+ foreach($forums as $f) {
+ if(x($_GET,'pf') && x($_GET,'cid')) {
+ $forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : '');
+ $filter_active = 'forums';
+ }
+ $fsub[] = [
+ 'label' => $f['xchan_name'],
+ 'img' => $f['xchan_photo_s'],
+ 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']),
+ 'sel' => $forum_active,
+ 'title' => t('Show posts to this forum'),
+ 'lock' => (($f['private_forum']) ? 'lock' : '')
+ ];
+ }
+
+ $tabs[] = [
+ 'id' => 'forums',
+ 'label' => t('Forums'),
+ 'icon' => 'comments-o',
+ 'url' => '#',
+ 'sel' => (($filter_active == 'forums') ? true : false),
+ 'title' => t('Show forums'),
+ 'sub' => $fsub
+
+ ];
+ }
+ }
+
if(feature_enabled(local_channel(),'filing')) {
$terms = q("select distinct term from term where uid = %d and ttype = %d order by term asc",
intval(local_channel()),
@@ -110,39 +142,6 @@ class Activity_filter {
}
}
- if(feature_enabled(local_channel(),'forums_tab')) {
- $forums = get_forum_channels(local_channel());
-
- if($forums) {
- foreach($forums as $f) {
- if(x($_GET,'pf') && x($_GET,'cid')) {
- $forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : '');
- $filter_active = 'forums';
- }
- $fsub[] = [
- 'label' => $f['xchan_name'],
- 'img' => $f['xchan_photo_s'],
- 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']),
- 'sel' => $forum_active,
- 'title' => t('Show posts to this forum'),
- 'lock' => (($f['private_forum']) ? 'lock' : '')
- ];
- }
-
- $tabs[] = [
- 'id' => 'forums',
- 'label' => t('Forums'),
- 'icon' => 'comments-o',
- 'url' => '#',
- 'sel' => (($filter_active == 'forums') ? true : false),
- 'title' => t('Show forums'),
- 'sub' => $fsub
-
- ];
- }
- }
-
-
if(x($_GET,'search')) {
$filter_active = 'search';
$tabs[] = [
@@ -154,6 +153,20 @@ class Activity_filter {
];
}
+ $name = [];
+ if(feature_enabled(local_channel(),'name_tab')) {
+ if(x($_GET,'cid') && ! x($_GET,'pf')) {
+ $filter_active = 'name';
+ }
+ $name = [
+ 'label' => x($_GET,'name') ? $_GET['name'] : t('Filter by name'),
+ 'icon' => 'filter',
+ 'url'=> z_root() . '/' . $cmd . '/',
+ 'sel'=> $filter_active == 'name' ? 'is-valid' : '',
+ 'title' => ''
+ ];
+ }
+
$reset = [];
if($filter_active) {
$reset = [
@@ -179,7 +192,8 @@ class Activity_filter {
$o .= replace_macros(get_markup_template('activity_filter_widget.tpl'), [
'$title' => t('Activity Filters'),
'$reset' => $reset,
- '$content' => $content
+ '$content' => $content,
+ '$name' => $name
]);
}
diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php
index 534d6caee..0e660afc3 100644
--- a/Zotlabs/Widget/Activity_order.php
+++ b/Zotlabs/Widget/Activity_order.php
@@ -53,8 +53,8 @@ class Activity_order {
}
}
- // override order for search results and filer results
- if(x($_GET,'search') || x($_GET,'file')) {
+ // override order for search, filer and cid results
+ if(x($_GET,'search') || x($_GET,'file') || (! x($_GET,'pf') && x($_GET,'cid'))) {
$unthreaded_active = 'active';
$commentord_active = $postord_active = 'disabled';
}