123 |
123 |
// Setup admin groups
|
124 |
124 |
$aAdminGroups = (is_array($aAdminGroups) ? $aAdminGroups : array(1));
|
125 |
125 |
array_unshift($aAdminGroups, 1);
|
126 |
|
$sAdminGroups = implode(',', array_unique($aAdminGroups, SORT_REGULAR));
|
|
126 |
$sAdminGroups = implode(',', array_unique($aAdminGroups));
|
127 |
127 |
$sAdminGroups = (preg_match('/^,|[^0-9,]|,,|,$/', $sAdminGroups) ? '1' : $sAdminGroups);
|
128 |
128 |
|
129 |
129 |
$aAdminUsers = (is_array($aAdminUsers) ? $aAdminUsers : array());
|
... | ... | |
133 |
133 |
|
134 |
134 |
$aViewingGroups = (is_array($aViewingGroups) ? $aViewingGroups : array(1));
|
135 |
135 |
array_unshift($aViewingGroups, 1);
|
136 |
|
$sViewingGroups = implode(',', array_unique($aViewingGroups, SORT_REGULAR));
|
|
136 |
$sViewingGroups = implode(',', array_unique($aViewingGroups));
|
137 |
137 |
$sViewingGroups = (preg_match('/^,|[^0-9,]|,,|,$/', $sViewingGroups) ? '1' : $sViewingGroups);
|
138 |
138 |
|
139 |
139 |
$aViewingUsers = (is_array($aViewingUsers) ? $aViewingUsers : array());
|
... | ... | |
249 |
249 |
. '`admin_groups`=\''.$sAdminGroups.'\', '
|
250 |
250 |
. '`admin_users`=\''.$sAdminUsers.'\', ';
|
251 |
251 |
}
|
252 |
|
$sql .= ''
|
253 |
|
. '`viewing_groups`=\''.$sViewingGroups.'\', '
|
254 |
|
. '`viewing_users`=\''.$sViewingUsers.'\', '
|
255 |
|
. '`page_code`='.$page_code.' '
|
256 |
|
. 'WHERE `page_id`='.$page_id;
|
|
252 |
$sql .= ''
|
|
253 |
. '`viewing_groups`=\''.$sViewingGroups.'\', '
|
|
254 |
. '`viewing_users`=\''.$sViewingUsers.'\', '
|
|
255 |
. '`page_code`='.$page_code.' '
|
|
256 |
. 'WHERE `page_id`='.$page_id;
|
257 |
257 |
|
258 |
258 |
if(!$database->query($sql)) {
|
259 |
259 |
$target_url = ADMIN_URL.'/pages/settings.php?page_id='.$page_id;
|