Add 2.1.1 AJAX PHP logic

merge-requests/2/head v2.1.1
Mike Koch 9 years ago
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;

@ -378,4 +378,21 @@ function execute211Scripts() {
ADD INDEX ( `openedby` , `firstreplyby` , `closedby` ),
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…
Cancel
Save