Merge remote-tracking branch 'upstream/dev' into website-export. Added attach_move() to include/attach.php.
This commit is contained in:
@@ -268,6 +268,8 @@ class Admin extends \Zotlabs\Web\Controller {
|
||||
check_form_security_token_redirectOnErr('/admin/site', 'admin_site');
|
||||
|
||||
$sitename = ((x($_POST,'sitename')) ? notags(trim($_POST['sitename'])) : '');
|
||||
$server_role = ((x($_POST,'server_role')) ? notags(trim($_POST['server_role'])) : 'standard');
|
||||
|
||||
$banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false);
|
||||
$admininfo = ((x($_POST,'admininfo')) ? trim($_POST['admininfo']) : false);
|
||||
$language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : '');
|
||||
@@ -308,6 +310,8 @@ class Admin extends \Zotlabs\Web\Controller {
|
||||
$feed_contacts = ((x($_POST,'feed_contacts')) ? intval($_POST['feed_contacts']) : 0);
|
||||
$verify_email = ((x($_POST,'verify_email')) ? 1 : 0);
|
||||
|
||||
|
||||
set_config('system', 'server_role', $server_role);
|
||||
set_config('system', 'feed_contacts', $feed_contacts);
|
||||
set_config('system', 'delivery_interval', $delivery_interval);
|
||||
set_config('system', 'delivery_batch_count', $delivery_batch_count);
|
||||
@@ -481,6 +485,12 @@ class Admin extends \Zotlabs\Web\Controller {
|
||||
// now invert the logic for the setting.
|
||||
$discover_tab = (1 - $discover_tab);
|
||||
|
||||
$server_roles = [
|
||||
'basic' => t('Basic/Minimal Social Networking'),
|
||||
'standard' => t('Standard Configuration (default)'),
|
||||
'pro' => t('Professional')
|
||||
];
|
||||
|
||||
|
||||
$homelogin = get_config('system','login_on_homepage');
|
||||
$enable_context_help = get_config('system','enable_context_help');
|
||||
@@ -498,6 +508,9 @@ class Admin extends \Zotlabs\Web\Controller {
|
||||
'$baseurl' => z_root(),
|
||||
// name, label, value, help string, extra data...
|
||||
'$sitename' => array('sitename', t("Site name"), htmlspecialchars(get_config('system','sitename'), ENT_QUOTES, 'UTF-8'),''),
|
||||
|
||||
'$server_role' => array('server_role', t("Server Configuration/Role"), get_config('system','server_role'),'',$server_roles),
|
||||
|
||||
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
|
||||
'$admininfo' => array('admininfo', t("Administrator Information"), $admininfo, t("Contact information for site administrators. Displayed on siteinfo page. BBCode can be used here")),
|
||||
'$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices),
|
||||
|
@@ -663,13 +663,9 @@ class Connedit extends \Zotlabs\Web\Controller {
|
||||
$rating_text = $xl[0]['xlink_rating_text'];
|
||||
}
|
||||
|
||||
$poco_rating = get_config('system','poco_rating_enable');
|
||||
$rating_enabled = get_config('system','rating_enabled');
|
||||
|
||||
// if unset default to enabled
|
||||
if($poco_rating === false)
|
||||
$poco_rating = true;
|
||||
|
||||
if($poco_rating) {
|
||||
if($rating_enabled) {
|
||||
$rating = replace_macros(get_markup_template('rating_slider.tpl'),array(
|
||||
'$min' => -10,
|
||||
'$val' => $rating_val
|
||||
|
@@ -239,7 +239,7 @@ class Directory extends \Zotlabs\Web\Controller {
|
||||
|
||||
$page_type = '';
|
||||
|
||||
if($rr['total_ratings'])
|
||||
if($rr['total_ratings'] && get_config('system','rating_enabled'))
|
||||
$total_ratings = sprintf( tt("%d rating", "%d ratings", $rr['total_ratings']), $rr['total_ratings']);
|
||||
else
|
||||
$total_ratings = '';
|
||||
|
@@ -16,7 +16,9 @@ class Pubsites extends \Zotlabs\Web\Controller {
|
||||
$url = $directory['url'] . '/dirsearch';
|
||||
}
|
||||
$url .= '/sites';
|
||||
|
||||
|
||||
$rating_enabled = get_config('system','rating_enabled');
|
||||
|
||||
$o .= '<div class="generic-content-wrapper">';
|
||||
|
||||
$o .= '<div class="section-title-wrapper"><h2>' . t('Public Hubs') . '</h2></div>';
|
||||
@@ -28,7 +30,10 @@ class Pubsites extends \Zotlabs\Web\Controller {
|
||||
if($ret['success']) {
|
||||
$j = json_decode($ret['body'],true);
|
||||
if($j) {
|
||||
$o .= '<table class="table table-striped table-hover"><tr><td>' . t('Hub URL') . '</td><td>' . t('Access Type') . '</td><td>' . t('Registration Policy') . '</td><td>' . t('Stats') . '</td><td>' . t('Software') . '</td><td colspan="2">' . t('Ratings') . '</td></tr>';
|
||||
$o .= '<table class="table table-striped table-hover"><tr><td>' . t('Hub URL') . '</td><td>' . t('Access Type') . '</td><td>' . t('Registration Policy') . '</td><td>' . t('Stats') . '</td><td>' . t('Software') . '</td>';
|
||||
if($rating_enabled)
|
||||
$o .= '<td colspan="2">' . t('Ratings') . '</td>';
|
||||
$o .= '</tr>';
|
||||
if($j['sites']) {
|
||||
foreach($j['sites'] as $jj) {
|
||||
$m = parse_url($jj['url']);
|
||||
@@ -44,7 +49,10 @@ class Pubsites extends \Zotlabs\Web\Controller {
|
||||
$location = '<br /> ';
|
||||
}
|
||||
$urltext = str_replace(array('https://'), '', $jj['url']);
|
||||
$o .= '<tr><td><a href="'. (($jj['sellpage']) ? $jj['sellpage'] : $jj['url'] . '/register' ) . '" ><i class="fa fa-link"></i> ' . $urltext . '</a>' . $location . '</td><td>' . $jj['access'] . '</td><td>' . $jj['register'] . '</td><td>' . '<a target="stats" href="https://hubchart-tarine.rhcloud.com/hub.jsp?hubFqdn=' . $m['host'] . '"><i class="fa fa-area-chart"></i></a></td><td>' . ucwords($jj['project']) . '</td><td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="fa fa-eye"></i> ' . t('View') . '</a></td>' . $rate_links . '</tr>';
|
||||
$o .= '<tr><td><a href="'. (($jj['sellpage']) ? $jj['sellpage'] : $jj['url'] . '/register' ) . '" ><i class="fa fa-link"></i> ' . $urltext . '</a>' . $location . '</td><td>' . $jj['access'] . '</td><td>' . $jj['register'] . '</td><td>' . '<a target="stats" href="https://hubchart-tarine.rhcloud.com/hub.jsp?hubFqdn=' . $m['host'] . '"><i class="fa fa-area-chart"></i></a></td><td>' . ucwords($jj['project']) . '</td>';
|
||||
if($rating_enabled)
|
||||
$o .= '<td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="fa fa-eye"></i> ' . t('View') . '</a></td>' . $rate_links ;
|
||||
$o .= '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -119,8 +119,8 @@ class Rate extends \Zotlabs\Web\Controller {
|
||||
// return;
|
||||
// }
|
||||
|
||||
$poco_rating = get_config('system','poco_rating_enable');
|
||||
if((! $poco_rating) && ($poco_rating !== false)) {
|
||||
$rating_enabled = get_config('system','rating_enabled');
|
||||
if(! $rating_enabled) {
|
||||
notice('Ratings are disabled on this site.');
|
||||
return;
|
||||
}
|
||||
@@ -141,11 +141,7 @@ class Rate extends \Zotlabs\Web\Controller {
|
||||
$rating_text = '';
|
||||
}
|
||||
|
||||
// if unset default to enabled
|
||||
if($poco_rating === false)
|
||||
$poco_rating = true;
|
||||
|
||||
if($poco_rating) {
|
||||
if($rating_enabled) {
|
||||
$rating = replace_macros(get_markup_template('rating_slider.tpl'),array(
|
||||
'$min' => -10,
|
||||
'$val' => $rating_val
|
||||
|
@@ -21,12 +21,9 @@ class Ratings extends \Zotlabs\Web\Controller {
|
||||
if($x)
|
||||
$url = $x['url'];
|
||||
|
||||
$poco_rating = get_config('system','poco_rating_enable');
|
||||
// if unset default to enabled
|
||||
if($poco_rating === false)
|
||||
$poco_rating = true;
|
||||
$rating_enabled = get_config('system','rating_enabled');
|
||||
|
||||
if(! $poco_rating)
|
||||
if(! $rating_enabled)
|
||||
return;
|
||||
|
||||
if(argc() > 1)
|
||||
@@ -87,12 +84,9 @@ class Ratings extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
$poco_rating = get_config('system','poco_rating_enable');
|
||||
// if unset default to enabled
|
||||
if($poco_rating === false)
|
||||
$poco_rating = true;
|
||||
$rating_enabled = get_config('system','rating_enabled');
|
||||
|
||||
if(! $poco_rating)
|
||||
if(! $rating_enabled)
|
||||
return;
|
||||
|
||||
$site_target = ((array_key_exists('target',\App::$data) && array_key_exists('site_url',\App::$data['target'])) ?
|
||||
|
@@ -73,7 +73,9 @@ class Setup extends \Zotlabs\Web\Controller {
|
||||
$phpath = trim($_POST['phpath']);
|
||||
$adminmail = trim($_POST['adminmail']);
|
||||
$siteurl = trim($_POST['siteurl']);
|
||||
$advanced = ((intval($_POST['advanced'])) ? 1 : 0);
|
||||
$server_role = trim($_POST['server_role']);
|
||||
if(! $server_role)
|
||||
$server_role = 'standard';
|
||||
|
||||
// $siteurl should not have a trailing slash
|
||||
|
||||
@@ -101,7 +103,9 @@ class Setup extends \Zotlabs\Web\Controller {
|
||||
$timezone = notags(trim($_POST['timezone']));
|
||||
$adminmail = notags(trim($_POST['adminmail']));
|
||||
$siteurl = notags(trim($_POST['siteurl']));
|
||||
$advanced = ((intval($_POST['advanced'])) ? 'standard' : 'basic');
|
||||
$server_role = notags(trim($_POST['server_role']));
|
||||
if(! $server_role)
|
||||
$server_role = 'standard';
|
||||
|
||||
if($siteurl != z_root()) {
|
||||
$test = z_fetch_url($siteurl."/setup/testrewrite");
|
||||
@@ -130,7 +134,7 @@ class Setup extends \Zotlabs\Web\Controller {
|
||||
'$dbpass' => $dbpass,
|
||||
'$dbdata' => $dbdata,
|
||||
'$dbtype' => $dbtype,
|
||||
'$server_role' => $advanced,
|
||||
'$server_role' => $server_role,
|
||||
'$timezone' => $timezone,
|
||||
'$siteurl' => $siteurl,
|
||||
'$site_id' => random_string(),
|
||||
@@ -327,6 +331,12 @@ class Setup extends \Zotlabs\Web\Controller {
|
||||
$siteurl = notags(trim($_POST['siteurl']));
|
||||
$timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles');
|
||||
|
||||
$server_roles = [
|
||||
'basic' => t('Basic/Minimal Social Networking'),
|
||||
'standard' => t('Standard Configuration (default)'),
|
||||
'pro' => t('Professional')
|
||||
];
|
||||
|
||||
$tpl = get_markup_template('install_settings.tpl');
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$title' => $install_title,
|
||||
@@ -344,7 +354,8 @@ class Setup extends \Zotlabs\Web\Controller {
|
||||
'$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.')),
|
||||
|
||||
'$siteurl' => array('siteurl', t('Website URL'), z_root(), t('Please use SSL (https) URL if available.')),
|
||||
'$advanced' => array('advanced', t('Enable $Projectname <strong>advanced</strong> features?'), 1, t('Some advanced features, while useful - may be best suited for technically proficient audiences')),
|
||||
|
||||
'$server_role' => array('server_role', t("Server Configuration/Role"), 'standard','',$server_roles),
|
||||
|
||||
'$timezone' => array('timezone', t('Please select a default timezone for your website'), $timezone, '', get_timezones()),
|
||||
|
||||
|
Reference in New Issue
Block a user