aboutsummaryrefslogtreecommitdiffstats
path: root/mod/admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/admin.php')
-rw-r--r--mod/admin.php74
1 files changed, 37 insertions, 37 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 7182bb9e5..fd2ba510b 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -73,7 +73,7 @@ function admin_post(&$a){
}
/**
- * @param App $$a
+ * @param App &$a
* @return string
*/
function admin_content(&$a) {
@@ -84,7 +84,7 @@ function admin_content(&$a) {
return login(false);
}
- /**
+ /*
* Side bar links
*/
@@ -125,7 +125,7 @@ function admin_content(&$a) {
));
- /**
+ /*
* Page content
*/
$o = '';
@@ -183,7 +183,7 @@ function admin_content(&$a) {
/**
* @brief Returns content for Admin Summary Page.
*
- * @param App $$a
+ * @param App &$a
* @return string HTML from parsed admin_summary.tpl
*/
function admin_page_summary(&$a) {
@@ -252,8 +252,9 @@ function admin_page_summary(&$a) {
/**
- * Admin Site Page
- * @param App $a
+ * @brief POST handler for Admin Site Page.
+ *
+ * @param App &$a
*/
function admin_page_site_post(&$a){
if (!x($_POST, 'page_site')){
@@ -277,15 +278,15 @@ function admin_page_site_post(&$a){
$register_text = ((x($_POST,'register_text')) ? notags(trim($_POST['register_text'])) : '');
- $allowed_sites = ((x($_POST,'allowed_sites')) ? notags(trim($_POST['allowed_sites'])) : '');
- $allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : '');
- $not_allowed_email = ((x($_POST,'not_allowed_email')) ? notags(trim($_POST['not_allowed_email'])) : '');
- $block_public = ((x($_POST,'block_public')) ? True : False);
- $force_publish = ((x($_POST,'publish_all')) ? True : False);
- $disable_discover_tab = ((x($_POST,'disable_discover_tab')) ? True : False);
- $no_login_on_homepage = ((x($_POST,'no_login_on_homepage')) ? True : False);
- $global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
- $no_community_page = !((x($_POST,'no_community_page')) ? True : False);
+ $allowed_sites = ((x($_POST,'allowed_sites')) ? notags(trim($_POST['allowed_sites'])) : '');
+ $allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : '');
+ $not_allowed_email = ((x($_POST,'not_allowed_email')) ? notags(trim($_POST['not_allowed_email'])) : '');
+ $block_public = ((x($_POST,'block_public')) ? True : False);
+ $force_publish = ((x($_POST,'publish_all')) ? True : False);
+ $disable_discover_tab = ((x($_POST,'disable_discover_tab')) ? True : False);
+ $no_login_on_homepage = ((x($_POST,'no_login_on_homepage')) ? True : False);
+ $global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
+ $no_community_page = !((x($_POST,'no_community_page')) ? True : False);
$default_expire_days = ((array_key_exists('default_expire_days',$_POST)) ? intval($_POST['default_expire_days']) : 0);
$verifyssl = ((x($_POST,'verifyssl')) ? True : False);
@@ -307,7 +308,7 @@ function admin_page_site_post(&$a){
set_config('system', 'sitename', $sitename);
set_config('system', 'no_login_on_homepage', $no_login_on_homepage);
set_config('system', 'verify_email', $verify_email);
- set_config('system','default_expire_days', $default_expire_days);
+ set_config('system', 'default_expire_days', $default_expire_days);
if ($banner == '') {
del_config('system', 'banner');
@@ -360,6 +361,8 @@ function admin_page_site_post(&$a){
}
/**
+ * @brief Admin page site.
+ *
* @param App $a
* @return string
*/
@@ -480,8 +483,8 @@ function admin_page_site(&$a) {
'$default_expire_days' => array('default_expire_days', t('Expiration period in days for imported (matrix/network) content'), intval(get_config('system','default_expire_days')), t('0 for no expiration of imported content')),
'$form_security_token' => get_form_security_token("admin_site"),
));
-
}
+
function admin_page_hubloc_post(&$a){
check_form_security_token_redirectOnErr('/admin/hubloc', 'admin_hubloc');
require_once('include/zot.php');
@@ -617,7 +620,6 @@ function admin_page_queue($a) {
);
}
-
$r = q("select count(outq_posturl) as total, max(outq_priority) as priority, outq_posturl from outq
where outq_delivered = 0 group by outq_posturl order by total desc");
@@ -626,7 +628,6 @@ function admin_page_queue($a) {
$r[$x]['connected'] = datetime_convert('UTC',date_default_timezone_get(),$r[$x]['connected'],'Y-m-d');
}
-
$o = replace_macros(get_markup_template('admin_queue.tpl'), array(
'$banner' => t('Queue Statistics'),
'$numentries' => t('Total Entries'),
@@ -763,13 +764,11 @@ function admin_page_users(&$a){
}
-// WEe'll still need to link email addresses to admin/users/channels or some such, but this bit doesn't exist yet.
+// We'll still need to link email addresses to admin/users/channels or some such, but this bit doesn't exist yet.
// That's where we need to be doing last post/channel flags/etc, not here.
-
$serviceclass = (($_REQUEST['class']) ? " and account_service_class = '" . dbesc($_REQUEST['class']) . "' " : '');
-
$order = " order by account_email asc ";
if($_REQUEST['order'] === 'expires')
$order = " order by account_expires desc ";
@@ -803,7 +802,6 @@ function admin_page_users(&$a){
// }
// $users = array_map("_setup_users", $users);
-
$t = get_markup_template('admin_users.tpl');
$o = replace_macros($t, array(
// strings //
@@ -841,9 +839,9 @@ function admin_page_users(&$a){
/**
- * Channels admin page
+ * @brief Channels admin page.
*
- * @param App $a
+ * @param App &$a
*/
function admin_page_channels_post(&$a) {
$channels = ( x($_POST, 'channel') ? $_POST['channel'] : Array() );
@@ -872,7 +870,9 @@ function admin_page_channels_post(&$a) {
}
/**
- * @param App $a
+ * @brief
+ *
+ * @param App &$a
* @return string
*/
function admin_page_channels(&$a){
@@ -975,7 +975,7 @@ function admin_page_channels(&$a){
*/
function admin_page_plugins(&$a){
- /**
+ /*
* Single plugin
*/
if ($a->argc == 3){
@@ -1055,7 +1055,7 @@ function admin_page_plugins(&$a){
}
- /**
+ /*
* List plugins
*/
$plugins = array();
@@ -1087,7 +1087,7 @@ function admin_page_plugins(&$a){
* @param string $th
* @param int $result
*/
-function toggle_theme(&$themes,$th,&$result) {
+function toggle_theme(&$themes, $th, &$result) {
for($x = 0; $x < count($themes); $x ++) {
if($themes[$x]['name'] === $th) {
if($themes[$x]['allowed']) {
@@ -1142,9 +1142,9 @@ function rebuild_theme_table($themes) {
/**
- * Themes admin page
+ * @brief Themes admin page.
*
- * @param App $a
+ * @param App &$a
* @return string
*/
function admin_page_themes(&$a){
@@ -1174,7 +1174,7 @@ function admin_page_themes(&$a){
return '';
}
- /**
+ /*
* Single theme
*/
@@ -1253,8 +1253,7 @@ function admin_page_themes(&$a){
));
}
-
- /**
+ /*
* List themes
*/
@@ -1281,9 +1280,9 @@ function admin_page_themes(&$a){
/**
- * Logs admin page
+ * @brief POST handler for logs admin page.
*
- * @param App $a
+ * @param App &$a
*/
function admin_page_logs_post(&$a) {
if (x($_POST, 'page_logs')) {
@@ -1303,6 +1302,8 @@ function admin_page_logs_post(&$a) {
}
/**
+ * @brief Logs admin page.
+ *
* @param App $a
* @return string
*/
@@ -1435,5 +1436,4 @@ function admin_page_profs(&$a) {
'$submit' => t('Save')
));
}
-
} \ No newline at end of file