Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Unify the checking of the platform. #1311

Merged
merged 1 commit into from Jun 26, 2012
Merged

Conversation

realityking
Copy link
Contributor

The standardizes everything on the IS_WIN/IS_MAC/IS_UNIX constants. JApplication::isWinOS() is only deprecated for legacy purposes.


// Define a boolean constant as true if a Mac based host
define('JPATH_ISMAC', (strtoupper(substr(PHP_OS, 0, 3)) === 'MAC'));

if (!defined('JPATH_ROOT'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have a B/C issue by removing these constants?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we do. We could move the to the import.legacy.php folder, make them aliases of IS_WIN and IS_MAC and deprecate them. What do you think?

@chdemko
Copy link
Contributor

chdemko commented Jun 26, 2012

it's a good solution

chdemko added a commit that referenced this pull request Jun 26, 2012
Unify the checking of the platform.
@chdemko chdemko merged commit 7c50894 into joomla:staging Jun 26, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants