Skip to content

Commit 515ac2a

Browse files
authored
MMA-9393 Fix update issue (#340)
1 parent 55faf05 commit 515ac2a

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

application/controllers/AdminController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ public function updateAction()
373373
$newver = SpamFilter_Version::getCurrentVersion(
374374
$values['update_type'], true
375375
); // realtime checking enabled
376+
$newver = $newver ?: SpamFilter_Version::getUsedVersion();
376377
$this->_flashMessenger->addMessage(
377378
array(
378379
'message' => $this->t->_('Installing addon update') . ' <strong>v' . $newver . '</strong> ' . $this->t->_('in tier') . ' <strong>' . $values['update_type'] . '</strong>',

bin/install.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
define('DEST_PATH', '/usr/local/prospamfilter');
5353
define('BASE_PATH', '/usr/src/prospamfilter');
54+
define('TMP_PATH', BASE_PATH . "/tmp/");
5455
define('CFG_PATH', '/etc/prospamfilter');
5556

5657
require_once BASE_PATH . DS . 'library' . DS . 'functions.php';

bin/installer/installer.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function check_php_version {
2929
echo "$1: invalid PHP binary"
3030
exit 1
3131
fi
32-
PHPVERSION=`echo "$version_info" | head -n1 | awk {'print $2'} | sed -e 's/-/\n/g' | head -n1`
32+
PHPVERSION=`echo "$version_info" | head -n1 | awk '{print $2}' | sed -e 's/-/\n/g' | head -n1`
3333
if [ -z "$PHPVERSION" ]; then
3434
echo "$1: PHP version empty"
3535
exit 1
@@ -141,7 +141,7 @@ else
141141
exit 1
142142
fi
143143

144-
random=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c5 | md5sum | awk {'print $1'}`
144+
random=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c5 | md5sum | awk '{print $1}'`
145145

146146
# set base path for the url that checks the current version
147147
basepath="http://download.seinternal.com/integration"

0 commit comments

Comments
 (0)