Add 2.1.1 AJAX PHP logic
This commit is contained in:
parent
4a3c9fc98d
commit
19b2582a19
@ -30,6 +30,9 @@ if ($version == 1) {
|
||||
} elseif ($version == 210) {
|
||||
execute210Scripts();
|
||||
execute210FileUpdate();
|
||||
} elseif ($version == 211) {
|
||||
execute211Scripts();
|
||||
execute211FileUpdate();
|
||||
} else {
|
||||
$response = 'The version "'.$version.'" was not recognized. Check the value submitted and try again.';
|
||||
print $response;
|
||||
|
@ -379,3 +379,20 @@ function execute211Scripts() {
|
||||
ADD INDEX(`dt`)");
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.1.1' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
|
||||
function execute211FileUpdate() {
|
||||
//-- Add the boostrap theme property to modsForHesk_settings.inc.php
|
||||
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
|
||||
//-- Only add the additional settings if they aren't already there.
|
||||
if (strpos($file, 'new_kb_article_visibility') === false)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
//-- Default value for new Knowledgebase article: 0 = Published, 1 = Private, 2 = Draft
|
||||
$modsForHesk_settings[\'new_kb_article_visibility\'] = 0;';
|
||||
}
|
||||
|
||||
return file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file);
|
||||
}
|
||||
// END Version 2.1.1
|
Loading…
x
Reference in New Issue
Block a user