Merge remote-tracking branch 'mike/master' into dev
This commit is contained in:
commit
92b08f1f07
@ -191,7 +191,7 @@ class Articles extends \Zotlabs\Web\Controller {
|
|||||||
'$title' => t('Articles'),
|
'$title' => t('Articles'),
|
||||||
'$editor' => $editor,
|
'$editor' => $editor,
|
||||||
'$content' => $content,
|
'$content' => $content,
|
||||||
'$pager' => alt_pager($a,$pager_total)
|
'$pager' => alt_pager($pager_total)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
@ -194,7 +194,7 @@ class Cards extends \Zotlabs\Web\Controller {
|
|||||||
'$title' => t('Cards'),
|
'$title' => t('Cards'),
|
||||||
'$editor' => $editor,
|
'$editor' => $editor,
|
||||||
'$content' => $content,
|
'$content' => $content,
|
||||||
'$pager' => alt_pager($a, $pager_total)
|
'$pager' => alt_pager($pager_total)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
@ -380,7 +380,7 @@ class Channel extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((! $update) || ($checkjs->disabled())) {
|
if((! $update) || ($checkjs->disabled())) {
|
||||||
$o .= alt_pager($a,count($items));
|
$o .= alt_pager(count($items));
|
||||||
if ($mid && $items[0]['title'])
|
if ($mid && $items[0]['title'])
|
||||||
\App::$page['title'] = $items[0]['title'] . " - " . \App::$page['title'];
|
\App::$page['title'] = $items[0]['title'] . " - " . \App::$page['title'];
|
||||||
}
|
}
|
||||||
|
@ -404,7 +404,7 @@ class Directory extends \Zotlabs\Web\Controller {
|
|||||||
'$entries' => $entries,
|
'$entries' => $entries,
|
||||||
'$dirlbl' => $suggest ? t('Channel Suggestions') : $dirtitle,
|
'$dirlbl' => $suggest ? t('Channel Suggestions') : $dirtitle,
|
||||||
'$submit' => t('Find'),
|
'$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'),
|
'$sort' => t('Sort options'),
|
||||||
'$normal' => t('Alphabetic'),
|
'$normal' => t('Alphabetic'),
|
||||||
'$reverse' => t('Reverse Alphabetic'),
|
'$reverse' => t('Reverse Alphabetic'),
|
||||||
|
@ -93,7 +93,7 @@ class Message extends \Zotlabs\Web\Controller {
|
|||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
$o .= alt_pager($a,count($r));
|
$o .= alt_pager(count($r));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
@ -14,9 +14,12 @@ class Moderate extends \Zotlabs\Web\Controller {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\App::set_pager_itemspage(60);
|
||||||
|
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start']));
|
||||||
|
|
||||||
//show all items
|
//show all items
|
||||||
if(argc() == 1) {
|
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(local_channel()),
|
||||||
intval(ITEM_MODERATED)
|
intval(ITEM_MODERATED)
|
||||||
);
|
);
|
||||||
@ -26,7 +29,7 @@ class Moderate extends \Zotlabs\Web\Controller {
|
|||||||
if(argc() == 2) {
|
if(argc() == 2) {
|
||||||
$post_id = intval(argv(1));
|
$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($post_id),
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
intval(ITEM_MODERATED)
|
intval(ITEM_MODERATED)
|
||||||
@ -92,6 +95,7 @@ class Moderate extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$o = conversation($items,'moderate',false,'traditional');
|
$o = conversation($items,'moderate',false,'traditional');
|
||||||
|
$o .= alt_pager(count($items));
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -565,7 +565,7 @@ class Network extends \Zotlabs\Web\Controller {
|
|||||||
$o .= conversation($items,$mode,$update,$page_mode);
|
$o .= conversation($items,$mode,$update,$page_mode);
|
||||||
|
|
||||||
if(($items) && (! $update))
|
if(($items) && (! $update))
|
||||||
$o .= alt_pager($a,count($items));
|
$o .= alt_pager(count($items));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
|||||||
$o .= '<div id="content-complete"></div>';
|
$o .= '<div id="content-complete"></div>';
|
||||||
|
|
||||||
if(($items) && (! $update))
|
if(($items) && (! $update))
|
||||||
$o .= alt_pager($a,count($items));
|
$o .= alt_pager(count($items));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
@ -6,16 +6,9 @@ class Design_tools {
|
|||||||
|
|
||||||
function widget($arr) {
|
function widget($arr) {
|
||||||
|
|
||||||
// mod menu doesn't load a profile. For any modules which load a profile, check it.
|
if(perm_is_allowed(\App::$profile['profile_uid'],get_observer_hash(),'write_pages') || (\App::$is_sys && is_site_admin()))
|
||||||
// otherwise local_channel() is sufficient for permissions.
|
|
||||||
|
|
||||||
if(\App::$profile['profile_uid'])
|
|
||||||
if((\App::$profile['profile_uid'] != local_channel()) && (! \App::$is_sys))
|
|
||||||
return '';
|
|
||||||
|
|
||||||
if(! local_channel())
|
|
||||||
return '';
|
|
||||||
|
|
||||||
return design_tools();
|
return design_tools();
|
||||||
|
|
||||||
|
return EMPTY_STR;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -150,9 +150,9 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
|
|||||||
|
|
||||||
// attempt network auto-discovery
|
// attempt network auto-discovery
|
||||||
|
|
||||||
$d = discover_by_webbie($url,$protocol);
|
$wf = discover_by_webbie($url,$protocol);
|
||||||
|
|
||||||
if((! $d) && ($is_http)) {
|
if((! $wf) && ($is_http)) {
|
||||||
|
|
||||||
// try RSS discovery
|
// try RSS discovery
|
||||||
|
|
||||||
@ -167,9 +167,9 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($d) {
|
if($wf || $d) {
|
||||||
$r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s' limit 1",
|
$r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s' limit 1",
|
||||||
dbesc($url),
|
dbesc(($wf) ? $wf : $url),
|
||||||
dbesc($url)
|
dbesc($url)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1195,6 +1195,7 @@ function discover_by_webbie($webbie, $protocol = '') {
|
|||||||
'address' => $webbie,
|
'address' => $webbie,
|
||||||
'protocol' => $protocol,
|
'protocol' => $protocol,
|
||||||
'success' => false,
|
'success' => false,
|
||||||
|
'xchan' => '',
|
||||||
'webfinger' => $x
|
'webfinger' => $x
|
||||||
];
|
];
|
||||||
/**
|
/**
|
||||||
@ -1207,7 +1208,7 @@ function discover_by_webbie($webbie, $protocol = '') {
|
|||||||
*/
|
*/
|
||||||
call_hooks('discover_channel_webfinger', $arr);
|
call_hooks('discover_channel_webfinger', $arr);
|
||||||
if($arr['success'])
|
if($arr['success'])
|
||||||
return true;
|
return $arr['xchan'];
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,12 @@ function queue_set_delivered($id,$channel = 0) {
|
|||||||
|
|
||||||
function queue_insert($arr) {
|
function queue_insert($arr) {
|
||||||
|
|
||||||
|
// do not queue anything with no destination
|
||||||
|
|
||||||
|
if(! (array_key_exists('posturl',$arr) && trim($arr['posturl']))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$x = q("insert into outq ( outq_hash, outq_account, outq_channel, outq_driver, outq_posturl, outq_async, outq_priority,
|
$x = q("insert into outq ( outq_hash, outq_account, outq_channel, outq_driver, outq_posturl, outq_async, outq_priority,
|
||||||
outq_created, outq_updated, outq_scheduled, outq_notify, outq_msg )
|
outq_created, outq_updated, outq_scheduled, outq_notify, outq_msg )
|
||||||
values ( '%s', %d, %d, '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s' )",
|
values ( '%s', %d, %d, '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s' )",
|
||||||
|
@ -338,7 +338,7 @@ function pub_tagadelic($net,$site,$limit,$recent,$safemode,$type) {
|
|||||||
else {
|
else {
|
||||||
$sys = get_sys_channel();
|
$sys = get_sys_channel();
|
||||||
$uids = " and item.uid = " . intval($sys['channel_id']) . " ";
|
$uids = " and item.uid = " . intval($sys['channel_id']) . " ";
|
||||||
$sql_extra = item_permissions_sql($sys['channel_id']);
|
$sql_extra = " and item_private = 0 ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($recent)
|
if($recent)
|
||||||
|
@ -531,7 +531,7 @@ function paginate(&$a) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function alt_pager(&$a, $i, $more = '', $less = '') {
|
function alt_pager($i, $more = '', $less = '') {
|
||||||
|
|
||||||
if(! $more)
|
if(! $more)
|
||||||
$more = t('older');
|
$more = t('older');
|
||||||
@ -2404,7 +2404,7 @@ function jindent($json) {
|
|||||||
*/
|
*/
|
||||||
function design_tools() {
|
function design_tools() {
|
||||||
|
|
||||||
$channel = App::get_channel();
|
$channel = channelx_by_n(App::$profile['profile_uid']);
|
||||||
$sys = false;
|
$sys = false;
|
||||||
|
|
||||||
if(App::$is_sys && is_site_admin()) {
|
if(App::$is_sys && is_site_admin()) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
[region=aside]
|
[region=aside]
|
||||||
[widget=pubtagcloud][var=trending]8[/var][var=limit]20[/var][/widget]
|
[widget=pubtagcloud][var=trending]8[/var][var=limit]20[/var][/widget]
|
||||||
[widget=pubtagcloud][/widget]
|
|
||||||
[/region]
|
[/region]
|
||||||
[region=right_aside]
|
[region=right_aside]
|
||||||
[widget=notifications][/widget]
|
[widget=notifications][/widget]
|
||||||
|
Reference in New Issue
Block a user