View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 08652 | Bug reports | Theme editor | public | 2014-02-03 10:44 | 2021-03-04 16:59 |
| Reporter | mdekker | Assigned To | mdekker | ||
| Priority | normal | Severity | minor | ||
| Status | assigned | Resolution | open | ||
| Product Version | 2.05+ | ||||
| Summary | 08652: Refactor code to get template info from getSurveyInfo | ||||
| Description | At the moment getSurveyInfo returns an array with two keys that have the same value: template and templatedir. All code using this info will try to render that to a template, default template etc. This is a mess for code and a source of error. This needs to be centralized, and by doing that we can also get a better event to modify that information at runtime by a plugin. The current event beforeSurveyPage allows to change the template, but that info needs to persist in the getSurveyInfo method. | ||||
| Tags | No tags attached. | ||||
| Bug heat | 8 | ||||
| Complete LimeSurvey version number (& build) | 140203 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | |||||
| Database type & version | . | ||||
| Server OS (if known) | . | ||||
| Webserver software & version (if known) | . | ||||
| PHP Version | . | ||||
| Git branch / Pull Request URL | |||||
| related to | 08553 | closed | DenisChenu | Feature requests | beforeSurveyPage lack of get event |
|
You mean 2 new event
Not sure it's really a good idea to have so many event ? |
|
|
Why not just have use Survey::model()->findByPk ? All information should be available from the active record anyway. I dont see the need for this global function. |
|
|
The global function already exists and is used in a lot of places, that's why. When moving away from that function that means a ton of extra database calls to read the info since it is used in the code in a lot of places. It is a global helper now, but can also be moved to the survey model to keep it at a better place. And ofcourse there is room for improvement of the method itself. One improvement (that i porpose here) would be to move the checks if a template exists to the getsurveyinfo function/method. That way the check will only be done once and persist during the request. |
|
|
What's the current status of this issue. @Sam, is that something which is on your radar for LS3 or are the related code parts not touched by LS3 at all? |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-02-03 10:44 | mdekker | New Issue | |
| 2014-02-03 10:44 | mdekker | Status | new => assigned |
| 2014-02-03 10:44 | mdekker | Assigned To | => mdekker |
| 2014-02-13 20:17 | DenisChenu | Note Added: 28719 | |
| 2014-03-02 22:49 | c_schmitz | Project | Bug reports => @10@ |
| 2014-04-29 15:07 | sammousa | Note Added: 29903 | |
| 2014-04-29 16:59 | mdekker | Note Added: 29904 | |
| 2015-06-12 14:32 | Mazi | Note Added: 32339 | |
| 2015-06-15 23:37 | DenisChenu | Relationship added | related to 08553 |
| 2015-12-11 14:40 | c_schmitz | Category | Templates => Theme editor |
| 2021-03-04 16:59 | DenisChenu | Note Added: 62722 |