[ZBX-6695] Harmonize use of require_once and include_once for footer.php Created: 2013 Jun 12 Updated: 2017 May 30 Resolved: 2013 Jun 17 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.7, 2.1.0 |
Fix Version/s: | 2.1.0 |
Type: | Incident report | Priority: | Trivial |
Reporter: | Volker Fröhlich | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Labels: | consistency, internals, style | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
require_once and include_once are mixedly used to include the footer snippet: require_once 'include/page_footer.php'; Furthermore, dirname(_FILE_) is only prepended in some occasions. |
Comments |
Comment by richlv [ 2013 Jun 12 ] |
(1) services.php seems to include footer twice conditionally, and once unconditionally. iivs removed duplicate footer include entries <richlv> CLOSED |
Comment by richlv [ 2013 Jun 12 ] |
https://www.zabbix.org/wiki/Docs/specs/coding_style#Statement_formatting is relevant here |
Comment by richlv [ 2013 Jun 12 ] |
include_once usage : ./srv_status.php:include_once('include/page_footer.php'); require_once without dirname(_FILE_) : ./popup_bitem.php:require_once 'include/page_footer.php'; |
Comment by Ivo Kurzemnieks [ 2013 Jun 17 ] |
|
Comment by richlv [ 2013 Jun 17 ] |
(2) scripts_exec.php seems to have excess parenthesis : <richlv> checked wrong branch, CLOSED |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Jun 18 ] |
TESTED. |
Comment by Ivo Kurzemnieks [ 2013 Jun 18 ] |
Fixed in pre-2.1.0 (trunk) r36428 |