mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-08 00:34:42 +03:00
Replace 'invitationstyle' config with 'invitation_style'
This commit is contained in:
parent
3fc3544f23
commit
881c3a0f81
@ -55,7 +55,7 @@ class InvitationStyle extends Style implements StyleInterface {
|
||||
*/
|
||||
public static function currentStyle() {
|
||||
// Load value from system settings
|
||||
return Settings::get('invitationstyle');
|
||||
return Settings::get('invitation_style');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -64,7 +64,7 @@ class InvitationStyle extends Style implements StyleInterface {
|
||||
* @param string $style_name Name of a style
|
||||
*/
|
||||
public static function setCurrentStyle($style_name) {
|
||||
Settings::set('invitationstyle', $style_name);
|
||||
Settings::set('invitation_style', $style_name);
|
||||
Settings::update();
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ Class Settings {
|
||||
'logo' => '',
|
||||
'usernamepattern' => '{name}',
|
||||
'chat_style' => 'default',
|
||||
'invitationstyle' => 'default',
|
||||
'invitation_style' => 'default',
|
||||
'page_style' => 'default',
|
||||
'chattitle' => 'Live Support',
|
||||
'geolink' => 'http://api.hostip.info/get_html.php?ip={ip}',
|
||||
|
@ -51,7 +51,7 @@ $options = array(
|
||||
);
|
||||
|
||||
if (Settings::get('enabletracking')) {
|
||||
$options[] = 'invitationstyle';
|
||||
$options[] = 'invitation_style';
|
||||
$invitationstylelist = InvitationStyle::availableStyles();
|
||||
}
|
||||
|
||||
@ -83,9 +83,9 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) {
|
||||
}
|
||||
|
||||
if (Settings::get('enabletracking')) {
|
||||
$params['invitationstyle'] = verifyparam("invitationstyle", "/^\w+$/", $params['invitationstyle']);
|
||||
if (!in_array($params['invitationstyle'], $invitationstylelist)) {
|
||||
$params['invitationstyle'] = $invitationstylelist[0];
|
||||
$params['invitation_style'] = verifyparam("invitation_style", "/^\w+$/", $params['invitation_style']);
|
||||
if (!in_array($params['invitation_style'], $invitationstylelist)) {
|
||||
$params['invitation_style'] = $invitationstylelist[0];
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ $page['formcronkey'] = $params['cron_key'];
|
||||
$page['cron_path'] = cron_get_uri($params['cron_key']);
|
||||
|
||||
if (Settings::get('enabletracking')) {
|
||||
$page['forminvitationstyle'] = $params['invitationstyle'];
|
||||
$page['forminvitationstyle'] = $params['invitation_style'];
|
||||
$page['availableInvitationStyles'] = $invitationstylelist;
|
||||
}
|
||||
|
||||
|
@ -141,11 +141,11 @@ require_once(dirname(__FILE__).'/inc_errors.php');
|
||||
</div>
|
||||
<?php if ($page['enabletracking']) { ?>
|
||||
<div class="field">
|
||||
<label for="invitationstyle" class="flabel"><?php echo getlocal('settings.invitationstyle') ?></label>
|
||||
<label for="invitation_style" class="flabel"><?php echo getlocal('settings.invitationstyle') ?></label>
|
||||
<div class="fvalue">
|
||||
<select id="invitationstyle" name="invitationstyle" ><?php foreach($page['availableInvitationStyles'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("invitationstyle") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
|
||||
<select id="invitation_style" name="invitation_style" ><?php foreach($page['availableInvitationStyles'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("invitationstyle") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
|
||||
</div>
|
||||
<label for="invitationstyle" class="fdescr"> — <?php echo getlocal('settings.invitationstyle.description') ?></label>
|
||||
<label for="invitation_style" class="fdescr"> — <?php echo getlocal('settings.invitationstyle.description') ?></label>
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
Loading…
Reference in New Issue
Block a user