mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-12 18:41:08 +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() {
|
public static function currentStyle() {
|
||||||
// Load value from system settings
|
// 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
|
* @param string $style_name Name of a style
|
||||||
*/
|
*/
|
||||||
public static function setCurrentStyle($style_name) {
|
public static function setCurrentStyle($style_name) {
|
||||||
Settings::set('invitationstyle', $style_name);
|
Settings::set('invitation_style', $style_name);
|
||||||
Settings::update();
|
Settings::update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ Class Settings {
|
|||||||
'logo' => '',
|
'logo' => '',
|
||||||
'usernamepattern' => '{name}',
|
'usernamepattern' => '{name}',
|
||||||
'chat_style' => 'default',
|
'chat_style' => 'default',
|
||||||
'invitationstyle' => 'default',
|
'invitation_style' => 'default',
|
||||||
'page_style' => 'default',
|
'page_style' => 'default',
|
||||||
'chattitle' => 'Live Support',
|
'chattitle' => 'Live Support',
|
||||||
'geolink' => 'http://api.hostip.info/get_html.php?ip={ip}',
|
'geolink' => 'http://api.hostip.info/get_html.php?ip={ip}',
|
||||||
|
@ -51,7 +51,7 @@ $options = array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (Settings::get('enabletracking')) {
|
if (Settings::get('enabletracking')) {
|
||||||
$options[] = 'invitationstyle';
|
$options[] = 'invitation_style';
|
||||||
$invitationstylelist = InvitationStyle::availableStyles();
|
$invitationstylelist = InvitationStyle::availableStyles();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,9 +83,9 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Settings::get('enabletracking')) {
|
if (Settings::get('enabletracking')) {
|
||||||
$params['invitationstyle'] = verifyparam("invitationstyle", "/^\w+$/", $params['invitationstyle']);
|
$params['invitation_style'] = verifyparam("invitation_style", "/^\w+$/", $params['invitation_style']);
|
||||||
if (!in_array($params['invitationstyle'], $invitationstylelist)) {
|
if (!in_array($params['invitation_style'], $invitationstylelist)) {
|
||||||
$params['invitationstyle'] = $invitationstylelist[0];
|
$params['invitation_style'] = $invitationstylelist[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ $page['formcronkey'] = $params['cron_key'];
|
|||||||
$page['cron_path'] = cron_get_uri($params['cron_key']);
|
$page['cron_path'] = cron_get_uri($params['cron_key']);
|
||||||
|
|
||||||
if (Settings::get('enabletracking')) {
|
if (Settings::get('enabletracking')) {
|
||||||
$page['forminvitationstyle'] = $params['invitationstyle'];
|
$page['forminvitationstyle'] = $params['invitation_style'];
|
||||||
$page['availableInvitationStyles'] = $invitationstylelist;
|
$page['availableInvitationStyles'] = $invitationstylelist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,11 +141,11 @@ require_once(dirname(__FILE__).'/inc_errors.php');
|
|||||||
</div>
|
</div>
|
||||||
<?php if ($page['enabletracking']) { ?>
|
<?php if ($page['enabletracking']) { ?>
|
||||||
<div class="field">
|
<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">
|
<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>
|
</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"/>
|
<br clear="all"/>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user