aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-04-19 08:28:42 +0200
committerMario Vavti <mario@mariovavti.com>2018-04-19 08:28:42 +0200
commit92b08f1f07a25976342dc885331ecb1531e256aa (patch)
tree4127afeee7d8a3b710863d9ad022fed2b82a8ebc /Zotlabs
parent16dcbc1e674cef1d51dc0e81f91d7055350f9990 (diff)
parenta81011333fc113006fbf49b561915532f6cd2509 (diff)
downloadvolse-hubzilla-92b08f1f07a25976342dc885331ecb1531e256aa.tar.gz
volse-hubzilla-92b08f1f07a25976342dc885331ecb1531e256aa.tar.bz2
volse-hubzilla-92b08f1f07a25976342dc885331ecb1531e256aa.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Articles.php2
-rw-r--r--Zotlabs/Module/Cards.php2
-rw-r--r--Zotlabs/Module/Channel.php2
-rw-r--r--Zotlabs/Module/Directory.php2
-rw-r--r--Zotlabs/Module/Message.php2
-rw-r--r--Zotlabs/Module/Moderate.php8
-rw-r--r--Zotlabs/Module/Network.php2
-rw-r--r--Zotlabs/Module/Pubstream.php2
-rw-r--r--Zotlabs/Widget/Design_tools.php13
9 files changed, 16 insertions, 19 deletions
diff --git a/Zotlabs/Module/Articles.php b/Zotlabs/Module/Articles.php
index 62ce1cb9c..284868241 100644
--- a/Zotlabs/Module/Articles.php
+++ b/Zotlabs/Module/Articles.php
@@ -191,7 +191,7 @@ class Articles extends \Zotlabs\Web\Controller {
'$title' => t('Articles'),
'$editor' => $editor,
'$content' => $content,
- '$pager' => alt_pager($a,$pager_total)
+ '$pager' => alt_pager($pager_total)
]);
return $o;
diff --git a/Zotlabs/Module/Cards.php b/Zotlabs/Module/Cards.php
index d3b16e82e..f196988a2 100644
--- a/Zotlabs/Module/Cards.php
+++ b/Zotlabs/Module/Cards.php
@@ -194,7 +194,7 @@ class Cards extends \Zotlabs\Web\Controller {
'$title' => t('Cards'),
'$editor' => $editor,
'$content' => $content,
- '$pager' => alt_pager($a, $pager_total)
+ '$pager' => alt_pager($pager_total)
]);
return $o;
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index 6a334b59a..953f87f11 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -380,7 +380,7 @@ class Channel extends \Zotlabs\Web\Controller {
}
if((! $update) || ($checkjs->disabled())) {
- $o .= alt_pager($a,count($items));
+ $o .= alt_pager(count($items));
if ($mid && $items[0]['title'])
\App::$page['title'] = $items[0]['title'] . " - " . \App::$page['title'];
}
diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php
index 87387ef56..f2673fa1a 100644
--- a/Zotlabs/Module/Directory.php
+++ b/Zotlabs/Module/Directory.php
@@ -404,7 +404,7 @@ class Directory extends \Zotlabs\Web\Controller {
'$entries' => $entries,
'$dirlbl' => $suggest ? t('Channel Suggestions') : $dirtitle,
'$submit' => t('Find'),
- '$next' => alt_pager($a,$j['records'], t('next page'), t('previous page')),
+ '$next' => alt_pager($j['records'], t('next page'), t('previous page')),
'$sort' => t('Sort options'),
'$normal' => t('Alphabetic'),
'$reverse' => t('Reverse Alphabetic'),
diff --git a/Zotlabs/Module/Message.php b/Zotlabs/Module/Message.php
index 7494f4bf4..5856bfbdf 100644
--- a/Zotlabs/Module/Message.php
+++ b/Zotlabs/Module/Message.php
@@ -93,7 +93,7 @@ class Message extends \Zotlabs\Web\Controller {
));
- $o .= alt_pager($a,count($r));
+ $o .= alt_pager(count($r));
return $o;
diff --git a/Zotlabs/Module/Moderate.php b/Zotlabs/Module/Moderate.php
index 10c8ab8f2..a7c98e05e 100644
--- a/Zotlabs/Module/Moderate.php
+++ b/Zotlabs/Module/Moderate.php
@@ -14,9 +14,12 @@ class Moderate extends \Zotlabs\Web\Controller {
return;
}
+ \App::set_pager_itemspage(60);
+ $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start']));
+
//show all items
if(argc() == 1) {
- $r = q("select item.id as item_id, item.* from item where item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc limit 60",
+ $r = q("select item.id as item_id, item.* from item where item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc $pager_sql",
intval(local_channel()),
intval(ITEM_MODERATED)
);
@@ -26,7 +29,7 @@ class Moderate extends \Zotlabs\Web\Controller {
if(argc() == 2) {
$post_id = intval(argv(1));
- $r = q("select item.id as item_id, item.* from item where item.id = %d and item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc limit 60",
+ $r = q("select item.id as item_id, item.* from item where item.id = %d and item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc $pager_sql",
intval($post_id),
intval(local_channel()),
intval(ITEM_MODERATED)
@@ -92,6 +95,7 @@ class Moderate extends \Zotlabs\Web\Controller {
}
$o = conversation($items,'moderate',false,'traditional');
+ $o .= alt_pager(count($items));
return $o;
}
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index b11b470f5..8d017207b 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -565,7 +565,7 @@ class Network extends \Zotlabs\Web\Controller {
$o .= conversation($items,$mode,$update,$page_mode);
if(($items) && (! $update))
- $o .= alt_pager($a,count($items));
+ $o .= alt_pager(count($items));
return $o;
}
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php
index e8a0146c4..571118201 100644
--- a/Zotlabs/Module/Pubstream.php
+++ b/Zotlabs/Module/Pubstream.php
@@ -279,7 +279,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
$o .= '<div id="content-complete"></div>';
if(($items) && (! $update))
- $o .= alt_pager($a,count($items));
+ $o .= alt_pager(count($items));
return $o;
diff --git a/Zotlabs/Widget/Design_tools.php b/Zotlabs/Widget/Design_tools.php
index 8ab6a235d..a15c0c98d 100644
--- a/Zotlabs/Widget/Design_tools.php
+++ b/Zotlabs/Widget/Design_tools.php
@@ -6,16 +6,9 @@ class Design_tools {
function widget($arr) {
- // mod menu doesn't load a profile. For any modules which load a profile, check it.
- // otherwise local_channel() is sufficient for permissions.
+ if(perm_is_allowed(\App::$profile['profile_uid'],get_observer_hash(),'write_pages') || (\App::$is_sys && is_site_admin()))
+ return design_tools();
- if(\App::$profile['profile_uid'])
- if((\App::$profile['profile_uid'] != local_channel()) && (! \App::$is_sys))
- return '';
-
- if(! local_channel())
- return '';
-
- return design_tools();
+ return EMPTY_STR;
}
} \ No newline at end of file