Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jan 15, 2024
2 parents 9b46cc5 + bb0854a commit 35869f7
Show file tree
Hide file tree
Showing 19 changed files with 117 additions and 76 deletions.
3 changes: 1 addition & 2 deletions application/config/version.php
Expand Up @@ -16,6 +16,5 @@
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['templateapiversion'] = 3;
$config['assetsversionnumber'] = '30368';

$config['assetsversionnumber'] = '30370';
return $config;
2 changes: 1 addition & 1 deletion application/core/Traits/LSApplicationTrait.php
Expand Up @@ -30,7 +30,7 @@ public function getCurrentUserId()
}
/* use App()->session and not App()->user fot easiest unit test */
$this->currentUserId = App()->session['loginID'];
if ($this->currentUserId && !User::model()->active()->findByPk($this->currentUserId)) {
if ($this->currentUserId && !User::model()->notexpired()->active()->findByPk($this->currentUserId)) {
$this->currentUserId = 0;
}
return $this->currentUserId;
Expand Down
2 changes: 1 addition & 1 deletion application/models/UpdateForm.php
Expand Up @@ -799,7 +799,7 @@ private function fileSystemCheck($obj)
} else {
$check->writable = 'pass';
}
if ($obj->freespaceCheck) {
if ($obj->freespaceCheck && function_exists('disk_free_space')) {
$check->freespace = (@disk_free_space($obj->name) > $obj->minfreespace);
} else {
$check->freespace = 'pass';
Expand Down
34 changes: 27 additions & 7 deletions application/models/User.php
Expand Up @@ -132,19 +132,39 @@ public function rules()
/** @inheritdoc */
public function scopes()
{
$activeScope = array(
'condition' => 'user_status = :active',
'params' => array(
'active' => 1,
)
);

$notExpiredScope = array(
'condition' => "expires > :now OR expires IS NULL",
'params' => array(
'now' => dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", Yii::app()->getConfig("timeadjust")),
)
);

if (App()->getConfig("DBVersion") < 495) {
/* No expires column before 495 */
return array(
'active' => []
'active' => [],
'notexpired' => [],
);
}

if (App()->getConfig("DBVersion") < 619) {
/* No user_status column before 619 */
return array(
'active' => [],
'notexpired' => $notExpiredScope
);
}

return array(
'active' => array(
'condition' => "expires > :now OR expires IS NULL",
'params' => array(
'now' => dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", Yii::app()->getConfig("timeadjust")),
)
)
'active' => $activeScope,
'notexpired' => $notExpiredScope
);
}

Expand Down
22 changes: 22 additions & 0 deletions docs/release_notes.txt
Expand Up @@ -34,6 +34,28 @@ Thank you to everyone who helped with this new release!

CHANGE LOG
------------------------------------------------------
Changes from 6.4.1 (build 240108) to 6.4.2 (build 240115) January 15, 2024
-Fixed issue: Don't use disk_free_space if function doesn't exist (ComfortUpdate) (Olle Haerstedt)
-Fixed issue #2565: Label set panel description typo (Kevin Foster)
-Fixed issue #19325: When deleting a token the participant_id is being logged while it should be the token_id (#3684) (Gabriel Jenik)
-Fixed issue #19248: When deleting a token through the model, the AuditLog beforeDeleteToken event fails (#3676) (Gabriel Jenik)
#Updated translation: Turkish by bulent, kayazeren
#Updated translation: Slovak by jelen1
#Updated translation: Portuguese (Portugal) by hurricane, samarta
#Updated translation: Polish by elissa
#Updated translation: Polish (Informal) by elissa
#Updated translation: Korean by modernity4r
#Updated translation: Japanese by d_inoue, nomoto
#Updated translation: Italian by lfanfoni
#Updated translation: Italian (Informal) by lfanfoni
#Updated translation: German by c_schmitz, eddylackmann
#Updated translation: German by c_schmitz
#Updated translation: German (Informal) by c_schmitz
#Updated translation: Finnish by Jmantysalo
#Updated translation: Czech by jelen1
#Updated translation: Czech (Informal) by jelen1


Changes from 6.4.0 (build 231218) to 6.4.1 (build 240108) January 8, 2024
-Fixed issue: Delete quota redirects to public survey list (Olle Haerstedt)
-Fixed issue #19335: Message from submitfailed is never shown to user in one case (#3688) (Olle Härstedt)
Expand Down

0 comments on commit 35869f7

Please sign in to comment.