Standardize class include paths
Reported by Brian Michalski | September 17th, 2009 @ 10:20 PM | in Concert 1.9.x
Currently we include classes from the common folder using 2
different paths:
/common/feed.php /common//feed.php While these paths compute to the
same location, they're viewed as unique for caching purposes.
Removing the duplicate slashes would resolve this probably and lend
itself to cleaner code.
Comments and changes to this ticket
-
Brian Michalski January 25th, 2010 @ 05:45 PM
- State changed from new to open
It looks like we're inconsistent in our usage of COMMON_DIR when including files, as shown below. Should we assume this path always ends in a trailing slash or always assume it doesn't?
admin/index.php:include(COMMON_DIR.'/feed.php')
vs
screen/content.php:include(COMMON_DIR."feed.php")Full usage of COMMON_DIR:
admin/index.php:include(COMMON_DIR.'/mysql.inc.php');//Tom's sql library interface + db connection settings
admin/index.php:include(COMMON_DIR.'/user.php'); //Class to represent a site user
admin/index.php:include(COMMON_DIR.'/screen.php'); //Class to represent a screen in the system
admin/index.php:include(COMMON_DIR.'/feed.php'); //Class to represent a content feed
admin/index.php:include(COMMON_DIR.'/field.php'); //Class to represent a field in a template
admin/index.php:include(COMMON_DIR.'/position.php'); //Class to represent a postion relationship
admin/index.php:include(COMMON_DIR.'/content.php'); //Class to represent content items
admin/index.php:include(COMMON_DIR.'/upload.php'); //Helps uploading
admin/index.php:include(COMMON_DIR.'/group.php'); //Class to represent user groups
admin/index.php:include(COMMON_DIR.'/dynamic.php'); //Functionality for dynamic content
admin/index.php:include(COMMON_DIR.'/notification.php'); //Functionality for notifications
admin/index.php:include(COMMON_DIR.'/newsfeed.php'); //Functionality for notifications
admin/index.php:include(COMMON_DIR.'/template.php'); //Class to represent a template
admin/index.php:include(COMMON_DIR.'/image.inc.php'); //Image library, used for resizing images
common/upload.php: $command = COMMON_DIR . "scripts/DocumentConverter.py " . $source . " " . $target;
common/template.php: $font=COMMON_DIR.'FreeSans.ttf';
common/scripts/notifications.php:include(COMMON_DIR.'mysql.inc.php');//Tom's sql library interface + db connection settings
common/scripts/notifications.php:include(COMMON_DIR.'user.php'); //Class to represent a site user
common/scripts/notifications.php:include(COMMON_DIR.'screen.php'); //Class to represent a screen in the system
common/scripts/notifications.php:include(COMMON_DIR.'feed.php'); //Class to represent a content feed
common/scripts/notifications.php:include(COMMON_DIR.'field.php'); //Class to represent a field in a template
common/scripts/notifications.php:include(COMMON_DIR.'position.php'); //Class to represent a postion relationship
common/scripts/notifications.php:include(COMMON_DIR.'content.php'); //Class to represent content items in the system
common/scripts/notifications.php:include(COMMON_DIR.'upload.php'); //Helps uploading
common/scripts/notifications.php:include(COMMON_DIR.'group.php'); //Class to represent user groups
common/scripts/notifications.php:include(COMMON_DIR.'dynamic.php'); //Functionality for dynamic content
common/scripts/notifications.php:include(COMMON_DIR.'image.inc.php');//Image library, used for resizing images
common/scripts/notifications.php:include(COMMON_DIR.'notification.php');//Class to represent notifications
common/scripts/cron.php:include(COMMON_DIR.'mysql.inc.php');//Tom's sql library interface + db connection settings
common/scripts/cron.php:include(COMMON_DIR.'user.php'); //Class to represent a site user
common/scripts/cron.php:include(COMMON_DIR.'screen.php'); //Class to represent a screen in the system
common/scripts/cron.php:include(COMMON_DIR.'feed.php'); //Class to represent a content feed
common/scripts/cron.php:include(COMMON_DIR.'field.php'); //Class to represent a field in a template
common/scripts/cron.php:include(COMMON_DIR.'position.php'); //Class to represent a postion relationship
common/scripts/cron.php:include(COMMON_DIR.'content.php'); //Class to represent content items in the system
common/scripts/cron.php:include(COMMON_DIR.'upload.php'); //Helps uploading
common/scripts/cron.php:include(COMMON_DIR.'group.php'); //Class to represent user groups
common/scripts/cron.php:include(COMMON_DIR.'dynamic.php'); //Functionality for dynamic content
common/scripts/cron.php:include(COMMON_DIR.'image.inc.php');//Image library, used for resizing images
common/scripts/cron.php:include(COMMON_DIR.'notification.php');//Class to represent notifications
common/scripts/template_exp.php:include(COMMON_DIR.'mysql.inc.php');//Tom's sql library interface + db connection settings
config.inc.php:define('COMMON_DIR', ROOT_DIR.'common/'); //server-side path to dir with resources for
config.inc.php.sample:define('COMMON_DIR', ROOT_DIR.'common/'); //server-side path to dir with resources for
content/render/api/009.php:include(COMMON_DIR.'/user.php'); //Class to represent a site user
content/render/api/009.php:include(COMMON_DIR.'/feed.php'); //Class to represent a content feed
content/render/api/009.php:include(COMMON_DIR.'/content.php'); //Class to represent content items in the system
content/render/api/007.php:include(COMMON_DIR.'/user.php'); //Class to represent a site user
content/render/api/007.php:include(COMMON_DIR.'/feed.php'); //Class to represent a content feed
content/render/api/007.php:include(COMMON_DIR.'/content.php'); //Class to represent content items in the system
content/render/api/008.php:include(COMMON_DIR.'/user.php'); //Class to represent a site user
content/render/api/008.php:include(COMMON_DIR.'/feed.php'); //Class to represent a content feed
content/render/api/008.php:include(COMMON_DIR.'/content.php'); //Class to represent content items in the system
content/render/index.php:include_once(COMMON_DIR.'mysql.inc.php');
content/render/render.php: include_once(COMMON_DIR.'image.inc.php');
screen/image.php:include(COMMON_DIR.'mysql.inc.php');
screen/template.php:include(COMMON_DIR.'mysql.inc.php');
screen/index.php:include(COMMON_DIR."mysql.inc.php");
screen/test.php:include(COMMON_DIR."/mysql.inc.php");
screen/content.php:include(COMMON_DIR."mysql.inc.php");
screen/content.php:include(COMMON_DIR."driver.php");
screen/content.php:include(COMMON_DIR."feed.php");
screen/content.php:include(COMMON_DIR."dynamic.php");
screen/content.php:include(COMMON_DIR."screen.php"); -
Brian Michalski February 17th, 2010 @ 08:55 PM
Mike: Do you see any reason we should NOT standardize the existence of a trailing slash on the COMMON_DIR variable? It would seem consistant with our other variables for us to assume its there...
-
Michael DiTore February 18th, 2010 @ 01:10 AM
That sounds totally reasonable. The other variables (the ones that do CSS
includes and all sorts of other things), I'm a little more hesitant to
touch, but this one should definitely be standardized. -
Brian Michalski February 18th, 2010 @ 11:47 PM
- Assigned user set to Brian Michalski
- State changed from open to resolved
-
Brian Michalski March 27th, 2012 @ 01:58 AM
- Milestone order changed from 0 to 0
(from [d87d9c71c3080292a84ee6e0913cdadab26b41fa]) allow for adding/controaling of members. closes #47 https://github.com/concerto/concerto/commit/d87d9c71c3080292a84ee6e...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Concerto is an open source digital signage system that makes it easy to engage a large community of people with graphical and text-based announcements, bulletins, and other messages... but enough about us, you came here to get involved.
<br />
If you think you've <b>found a bug in Concerto</b>, please click 'Create new ticket' and let us know about it.
<br />
Looking to peek at our source code? Head to <a href="https://github.com/concerto/concerto_v1">https://github.com/concerto/concerto_v1</a> (Concerto version 1) or <a href="https://github.com/concerto/concerto">https://github.com/concerto/concerto</a> (Concerto version 2).
<br />
Our getting started guide is available here: <a href="https://github.com/concerto/concerto/wiki/Getting-Involved">https://github.com/concerto/concerto/wiki/Getting-Involved</a>.
People watching this ticket
Referenced by
- 47 Standardize class include paths (from [708]) COMMON_DIR must end in a trailing slash (/)....