Skip to content
Snippets Groups Projects
Commit a2c58a8e authored by Jared Hancock's avatar Jared Hancock
Browse files

pjax: Support detection of new deployment

parent 91df632f
Branches
Tags
No related merge requests found
......@@ -294,6 +294,7 @@ define('I18N_DIR', INCLUDE_DIR.'i18n/');
#Current version && schema signature (Changes from version to version)
define('THIS_VERSION','1.8-git'); //Shown on admin panel
define('GIT_VERSION','$git');
//Path separator
if(!defined('PATH_SEPARATOR')){
if(strpos($_ENV['OS'],'Win')!==false || !strcasecmp(substr(PHP_OS, 0, 3),'WIN'))
......
......@@ -6,6 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="x-pjax-version" content="<?php echo GIT_VERSION; ?>">
<title><?php echo ($ost && ($title=$ost->getPageTitle()))?$title:'osTicket :: Staff Control Panel'; ?></title>
<!--[if IE]>
<style type="text/css">
......
......@@ -116,6 +116,10 @@ class Deployment extends Unpacker {
$source = preg_replace("/^(\s*)define\s*\(\s*'THIS_VERSION'.*$/m",
"$1define('THIS_VERSION', '".$version."'); // Set by installer",
$source);
// Set GIT_VERSION
$source = preg_replace("/^(\s*)define\s*\(\s*'GIT_VERSION'.*$/m",
"$1define('GIT_VERSION', '".$short."'); // Set by installer",
$source);
// Disable error display
$source = preg_replace("/^(\s*)ini_set\s*\(\s*'(display_errors|display_startup_errors)'.*$/m",
"$1ini_set('$2', '0'); // Set by installer",
......
......@@ -144,6 +144,7 @@ chdir($stage_path);
shell_exec("sed -ri -e \"
s/( *)define\('THIS_VERSION'.*/\\1define('THIS_VERSION', '$version');/
s/( *)define\('GIT_VERSION'.*/\\1define('GIT_VERSION', '$short');/
\" upload/bootstrap.php");
shell_exec("find upload -name '*.php' -print0 | xargs -0 sed -i -e '
s:<script\(.*\) src=\"\(.*\).js\"></script>:<script\\1 src=\"\\2.js?$short\"></script>:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment