ezrpg-legacy / ezRPG-1.2.x

ezrpgproject.net
8 stars 7 forks source link

Should constants/path variables use a trailing slash or not? #51

Closed deohnas closed 8 years ago

deohnas commented 8 years ago

With given code block:

define('CUR_DIR', realpath(dirname(__FILE__)));
define('MOD_DIR', CUR_DIR . '/modules/');
define('ADMIN_DIR', CUR_DIR . '/admin');
define('CORE_DIR', CUR_DIR . '/core');
define('EXT_DIR', CORE_DIR . '/ext');
define('HOOKS_DIR', CUR_DIR . '/hooks');
define('THEME_DIR', CUR_DIR . '/templates/');
define('CACHE_DIR', CUR_DIR . '/cache/');

That's inconsistent and should be fixed.

uaktags commented 8 years ago

If there's a vote, i'd say "use trailing slash".

deohnas commented 8 years ago

I don't mind either, for me it's more important that it's consistent.

JakeBooher commented 8 years ago

I'm a fan of having a trailing slash

uaktags commented 8 years ago

Enforce the trailing slash.