mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:15:11 +00:00
white screen
This commit is contained in:
parent
be8a7e2de6
commit
3e0ac769aa
3 changed files with 12 additions and 11 deletions
|
@ -202,7 +202,7 @@ function group_get_members($gid) {
|
|||
return $ret;
|
||||
}
|
||||
|
||||
function mini_group_select($uid,$gid = 0) {
|
||||
function mini_group_select($uid,$group = '') {
|
||||
|
||||
$grps = array();
|
||||
$o = '';
|
||||
|
@ -210,10 +210,10 @@ function mini_group_select($uid,$gid = 0) {
|
|||
$r = q("SELECT * FROM `group` WHERE `deleted` = 0 AND `uid` = %d ORDER BY `name` ASC",
|
||||
intval($uid)
|
||||
);
|
||||
$grps[] = array('name' => '', 'id' => '0', 'selected' => '');
|
||||
$grps[] = array('name' => '', 'hash' => '0', 'selected' => '');
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
$grps[] = array('name' => $rr['name'], 'id' => $rr['id'], 'selected' => (($gid == $rr['id']) ? 'true' : ''));
|
||||
$grps[] = array('name' => $rr['name'], 'id' => $rr['hash'], 'selected' => (($group == $rr['hash']) ? 'true' : ''));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -626,7 +626,7 @@ function import_xchan($arr,$ud_flags = 1) {
|
|||
}
|
||||
|
||||
// Remove pure duplicates
|
||||
if($count($r) > 1) {
|
||||
if(count($r) > 1) {
|
||||
for($h = 1; $h < count($r); $h ++) {
|
||||
q("delete from hubloc where hubloc_id = %d limit 1",
|
||||
intval($r[$h]['hubloc_id'])
|
||||
|
|
|
@ -357,7 +357,7 @@ function settings_post(&$a) {
|
|||
$openid = ((x($_POST,'openid_url')) ? notags(trim($_POST['openid_url'])) : '');
|
||||
$maxreq = ((x($_POST,'maxreq')) ? intval($_POST['maxreq']) : 0);
|
||||
$expire = ((x($_POST,'expire')) ? intval($_POST['expire']) : 0);
|
||||
$def_gid = ((x($_POST,'group-selection')) ? intval($_POST['group-selection']) : 0);
|
||||
$def_group = ((x($_POST,'group-selection')) ? notags(trim($_POST['group-selection'])) : '');
|
||||
|
||||
|
||||
$expire_items = ((x($_POST,'expire_items')) ? intval($_POST['expire_items']) : 0);
|
||||
|
@ -506,9 +506,9 @@ function settings_post(&$a) {
|
|||
if($page_flags == PAGE_PRVGROUP) {
|
||||
$hidewall = 1;
|
||||
if((! $str_contact_allow) && (! $str_group_allow) && (! $str_contact_deny) && (! $str_group_deny)) {
|
||||
if($def_gid) {
|
||||
if($def_group) {
|
||||
info( t('Private forum has no privacy permissions. Using default privacy group.'). EOL);
|
||||
$str_group_allow = '<' . $def_gid . '>';
|
||||
$str_group_allow = '<' . $def_group . '>';
|
||||
}
|
||||
else {
|
||||
notice( t('Private forum has no privacy permissions and no default privacy group.') . EOL);
|
||||
|
@ -519,7 +519,7 @@ function settings_post(&$a) {
|
|||
*/
|
||||
|
||||
/*
|
||||
$r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `def_gid` = %d, `blockwall` = %d, `hidewall` = %d, `blocktags` = %d, `unkmail` = %d, `cntunkmail` = %d WHERE `uid` = %d LIMIT 1",
|
||||
$r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `def_group` = %d, `blockwall` = %d, `hidewall` = %d, `blocktags` = %d, `unkmail` = %d, `cntunkmail` = %d WHERE `uid` = %d LIMIT 1",
|
||||
dbesc($username),
|
||||
dbesc($email),
|
||||
dbesc($openid),
|
||||
|
@ -535,7 +535,7 @@ function settings_post(&$a) {
|
|||
intval($maxreq),
|
||||
intval($expire),
|
||||
dbesc($openidserver),
|
||||
intval($def_gid),
|
||||
intval($def_group),
|
||||
intval($blockwall),
|
||||
intval($hidewall),
|
||||
intval($blocktags),
|
||||
|
@ -545,7 +545,7 @@ function settings_post(&$a) {
|
|||
);
|
||||
*/
|
||||
|
||||
$r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d where channel_id = %d limit 1",
|
||||
$r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d where channel_id = %d limit 1",
|
||||
dbesc($username),
|
||||
intval($pageflags),
|
||||
dbesc($timezone),
|
||||
|
@ -554,6 +554,7 @@ function settings_post(&$a) {
|
|||
intval($unkmail),
|
||||
intval($maxreq),
|
||||
intval($expire),
|
||||
dbesc($def_group),
|
||||
intval($arr['channel_r_stream']),
|
||||
intval($arr['channel_r_profile']),
|
||||
intval($arr['channel_r_photos']),
|
||||
|
@ -1045,7 +1046,7 @@ function settings_content(&$a) {
|
|||
|
||||
|
||||
require_once('include/group.php');
|
||||
$group_select = mini_group_select(local_user(),$a->user['def_gid']);
|
||||
$group_select = mini_group_select(local_user(),$channel['channel_default_group']);
|
||||
|
||||
$o .= replace_macros($stpl,array(
|
||||
'$ptitle' => t('Channel Settings'),
|
||||
|
|
Loading…
Reference in a new issue