slow progress on sys publishing, making sure all the data we need is in the places we need it but validate it anyway
This commit is contained in:
parent
37742be6af
commit
b5af667985
4
boot.php
4
boot.php
@ -677,8 +677,8 @@ class App {
|
|||||||
public $css_sources = array();
|
public $css_sources = array();
|
||||||
public $js_sources = array();
|
public $js_sources = array();
|
||||||
public $theme_info = array();
|
public $theme_info = array();
|
||||||
|
public $is_sys = false;
|
||||||
public $nav_sel;
|
public $nav_sel;
|
||||||
|
|
||||||
public $category;
|
public $category;
|
||||||
|
|
||||||
|
@ -2024,7 +2024,7 @@ function design_tools() {
|
|||||||
|
|
||||||
$channel = get_app()->get_channel();
|
$channel = get_app()->get_channel();
|
||||||
|
|
||||||
if(array_key_exists('sys',$_REQUEST) && $_REQUEST['sys'] == 1 && is_site_admin()) {
|
if(get_app()->is_sys && is_site_admin()) {
|
||||||
require_once('include/identity.php');
|
require_once('include/identity.php');
|
||||||
$channel = get_sys_channel();
|
$channel = get_sys_channel();
|
||||||
}
|
}
|
||||||
|
@ -585,7 +585,7 @@ function widget_design_tools($arr) {
|
|||||||
// otherwise local_user() is sufficient for permissions.
|
// otherwise local_user() is sufficient for permissions.
|
||||||
|
|
||||||
if($a->profile['profile_uid'])
|
if($a->profile['profile_uid'])
|
||||||
if($a->profile['profile_uid'] != local_user())
|
if(($a->profile['profile_uid'] != local_user()) && (! $a->is_sys))
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
if(! local_user())
|
if(! local_user())
|
||||||
|
@ -1,16 +1,33 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function webpages_content(&$a) {
|
function webpages_init(&$a) {
|
||||||
|
|
||||||
|
if(argc() > 1 && argv(1) === 'sys' && is_site_admin()) {
|
||||||
|
require_once('include/identity.php');
|
||||||
|
$sys = get_sys_channel();
|
||||||
|
if($sys && intval($sys['channel_id'])) {
|
||||||
|
$a->is_sys = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(argc() > 1)
|
if(argc() > 1)
|
||||||
$which = argv(1);
|
$which = argv(1);
|
||||||
else {
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
|
profile_load($a,$which,$profile);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function webpages_content(&$a) {
|
||||||
|
|
||||||
|
if(! $a->profile) {
|
||||||
notice( t('Requested profile is not available.') . EOL );
|
notice( t('Requested profile is not available.') . EOL );
|
||||||
$a->error = 404;
|
$a->error = 404;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$uid = 0;
|
$uid = 0;
|
||||||
$owner = 0;
|
$owner = 0;
|
||||||
$channel = null;
|
$channel = null;
|
||||||
@ -19,7 +36,7 @@ function webpages_content(&$a) {
|
|||||||
$profile = 0;
|
$profile = 0;
|
||||||
$channel = $a->get_channel();
|
$channel = $a->get_channel();
|
||||||
|
|
||||||
if($which === 'sys' && is_site_admin()) {
|
if($a->is_sys && is_site_admin()) {
|
||||||
require_once('include/identity.php');
|
require_once('include/identity.php');
|
||||||
$sys = get_sys_channel();
|
$sys = get_sys_channel();
|
||||||
if($sys && intval($sys['channel_id'])) {
|
if($sys && intval($sys['channel_id'])) {
|
||||||
@ -29,8 +46,6 @@ function webpages_content(&$a) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
profile_load($a,$which,$profile);
|
|
||||||
|
|
||||||
if(! $owner) {
|
if(! $owner) {
|
||||||
// Figure out who the page owner is.
|
// Figure out who the page owner is.
|
||||||
$r = q("select channel_id from channel where channel_address = '%s'",
|
$r = q("select channel_id from channel where channel_address = '%s'",
|
||||||
|
Reference in New Issue
Block a user