View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
07719Bug reportsOtherpublic2026-11-19 22:23
Reporterluayessa Assigned To 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Summary07719: Redundant Code in the expire function
Description

Check the expire function in the following file:
/application/controllers/admin/surveyadmin.php

Check these lines, we call "_expireSurvey" function, However the next two lines do the same thing as the "_expireSurvey" function does.

$this->_expireSurvey($iSurveyID);
$dExpirationdate = dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", Yii::app()->getConfig('timeadjust'));

$dExpirationdate = dateShift($dExpirationdate, "Y-m-d H:i:s", '-1 day');
Survey::model()->updateByPk($iSurveyID,array('expires' => $dExpirationdate));

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2026-11-19 22:23

administrator   ~87718

The expire action was rewritten: in LimeSurvey 7 SurveyAdministrationController::actionExpire() calls Survey::expire() once and the duplicated code is gone. Closing as fixed.

Issue History

Date Modified Username Field Change
2013-03-31 06:16 luayessa New Issue
2026-11-19 22:23 c_schmitz Note Added: 87718
2026-11-19 22:23 c_schmitz Bug heat 0 => 2
2026-11-19 22:23 c_schmitz Status new => closed
2026-11-19 22:23 c_schmitz Resolution open => fixed