Standardize class include paths
-
Brian Michalski
- 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
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
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
- Assigned user set to Brian Michalski
- State changed from open to resolved
(from [708]) COMMON_DIR must end in a trailing slash (/). Updated diagnostics to test accordingly. [#47 Standardize class include paths state:resolved responsible:"Brian Michalski"]
-
Brian Michalski
- Milestone order changed from 0 to 0
(from [d87d9c71c3080292a84ee6e0913cdadab26b41fa]) allow for adding/controaling of members. closes #47 Standardize class include paths 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.