Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
This commit is contained in:
commit
c2a189ab18
@ -173,7 +173,6 @@ class Webpages extends \Zotlabs\Web\Controller {
|
|||||||
if($_REQUEST['pagetitle'])
|
if($_REQUEST['pagetitle'])
|
||||||
$x['pagetitle'] = $_REQUEST['pagetitle'];
|
$x['pagetitle'] = $_REQUEST['pagetitle'];
|
||||||
|
|
||||||
$editor = status_editor($a,$x);
|
|
||||||
|
|
||||||
// Get a list of webpages. We can't display all them because endless scroll makes that unusable,
|
// Get a list of webpages. We can't display all them because endless scroll makes that unusable,
|
||||||
// so just list titles and an edit link.
|
// so just list titles and an edit link.
|
||||||
@ -197,6 +196,11 @@ class Webpages extends \Zotlabs\Web\Controller {
|
|||||||
// intval(ITEM_TYPE_WEBPAGE)
|
// intval(ITEM_TYPE_WEBPAGE)
|
||||||
// );
|
// );
|
||||||
|
|
||||||
|
if(! $r)
|
||||||
|
$x['pagetitle'] = 'home';
|
||||||
|
|
||||||
|
$editor = status_editor($a,$x);
|
||||||
|
|
||||||
$pages = null;
|
$pages = null;
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
|
@ -1786,6 +1786,20 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
$cal_link = '/cal/' . $nickname;
|
$cal_link = '/cal/' . $nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_once('include/security.php');
|
||||||
|
$sql_options = item_permissions_sql($uid);
|
||||||
|
|
||||||
|
$r = q("select item.* from item left join iconfig on item.id = iconfig.iid
|
||||||
|
where item.uid = %d and iconfig.cat = 'system' and iconfig.v = '%s'
|
||||||
|
and item.item_delayed = 0 and item.item_deleted = 0
|
||||||
|
and ( iconfig.k = 'WEBPAGE' and item_type = %d )
|
||||||
|
$sql_options limit 1",
|
||||||
|
intval($uid),
|
||||||
|
dbesc('home'),
|
||||||
|
intval(ITEM_TYPE_WEBPAGE)
|
||||||
|
);
|
||||||
|
|
||||||
|
$has_webpages = (($r) ? true : false);
|
||||||
|
|
||||||
if (get_pconfig($uid, 'system', 'noprofiletabs'))
|
if (get_pconfig($uid, 'system', 'noprofiletabs'))
|
||||||
return;
|
return;
|
||||||
@ -1870,16 +1884,17 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($p['write_pages'] && feature_enabled($uid,'webpages')) {
|
if($has_webpages && feature_enabled($uid,'webpages')) {
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Webpages'),
|
'label' => t('Webpages'),
|
||||||
'url' => z_root() . '/webpages/' . $nickname,
|
'url' => z_root() . '/page/' . $nickname . '/home',
|
||||||
'sel' => ((argv(0) == 'webpages') ? 'active' : ''),
|
'sel' => ((argv(0) == 'webpages') ? 'active' : ''),
|
||||||
'title' => t('Manage Webpages'),
|
'title' => t('View Webpages'),
|
||||||
'id' => 'webpages-tab',
|
'id' => 'webpages-tab',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(feature_enabled($uid,'wiki') && (get_account_techlevel($account_id) > 3)) {
|
if(feature_enabled($uid,'wiki') && (get_account_techlevel($account_id) > 3)) {
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Wikis'),
|
'label' => t('Wikis'),
|
||||||
|
Reference in New Issue
Block a user