?
avatar fitorec
fitorec
22 Feb 2012

Checking the file libraries/import.php I'm a question regarding the use of constants IS_WIN, IS_MAC, IS_UNIX.

Somewhere in the CMS are used?

Moreover libraries/joomla/filesystem/path.php file defines constants: JPATH_ISWIN and JPATH_ISMAC on lines 13, 16 respectively.

The file ./libraries/joomla/application/application.php define function 'isWinOS'

The object JFTP in its constructor sets the variable OS.

All these files make use of the form:

<?php
substr(PHP_OS, 0, 3)

to determine the operating system.

the external libraries for example: phpmailer and geshi also make use of this form.

IMHO is necessary to define these variables.

However appear in the documentation. https://github.com/joomla/joomla-platform/blob/staging/docs/manual/en-US/chapters/introduction.xml#L41

Personally I consider that:

    • These constants should not exist.
    • Or if the file 'iasf.php' is loaded before the other files, then you should make use of these constants.

Personally I think it's the first best solution(educes the learning curve of the framework).

P. S. I would like to help review this detail.

avatar fitorec fitorec - open - 22 Feb 2012
avatar mbabker
mbabker - comment - 28 Dec 2012

In the CMS, they aren't used as far as I'm aware. Some changes to the constants have occurred in the Platform. Any further discussion should go on there.

avatar zero-24 zero-24 - close - 28 Dec 2012
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?
Build staging

Add a Comment

Login with GitHub to post a comment