* This script tries to find the temp folder and unzip all setup files into.
*
* @author Marcel Werk
- * @copyright 2001-2011 WoltLab GmbH
+ * @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
// define constants
+define('INSTALL_SCRIPT', __FILE__);
define('INSTALL_SCRIPT_DIR', dirname(__FILE__).'/');
define('SETUP_FILE', INSTALL_SCRIPT_DIR . 'WCFSetup.tar.gz');
define('NO_IMPORTS', 1);
if (self::$mode === null) {
// WCFSetup
- if (defined('NO_IMPORTS')) {
+ if (defined('INSTALL_SCRIPT')) {
// do not use PHP_OS here, as this represents the system it was built on != running on
if (strpos(php_uname(), 'Windows') !== false) {
self::$mode = '0777';
// as this file (uploaded through FTP), we can safely grant write
// permissions exclusively to the owner rather than everyone
if (file_exists($tmpFilename)) {
- $scriptOwner = fileowner(__FILE__);
+ $scriptOwner = fileowner(INSTALL_SCRIPT);
$fileOwner = fileowner($tmpFilename);
if ($scriptOwner === $fileOwner) {
}
else {
// mirror permissions of WCF.class.php
- if (!file_exists(WCF_DIR . 'lib/system/WCF.class.php')) {
+ if (!file_exists()) {
throw new SystemException("Unable to find 'wcf/lib/system/WCF.class.php'.");
}