projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
deb4293
)
Constant PATH rewritten, some parts rewritten to use INCLUDE_READABLE()
author
Roland Häder
<roland@mxchange.org>
Mon, 23 Feb 2009 19:40:40 +0000
(19:40 +0000)
committer
Roland Häder
<roland@mxchange.org>
Mon, 23 Feb 2009 19:40:40 +0000
(19:40 +0000)
12 files changed:
inc/autopurge.php
patch
|
blob
|
history
inc/config.php
patch
|
blob
|
history
inc/db/lib-mysql3.php
patch
|
blob
|
history
inc/extensions/ext-sql_patches.php
patch
|
blob
|
history
inc/functions.php
patch
|
blob
|
history
inc/load_cache.php
patch
|
blob
|
history
inc/modules/admin.php
patch
|
blob
|
history
inc/modules/admin/overview-inc.php
patch
|
blob
|
history
inc/modules/admin/what-theme_import.php
patch
|
blob
|
history
inc/modules/guest/what-wernis_portal.php
patch
|
blob
|
history
inc/modules/member/what-themes.php
patch
|
blob
|
history
inc/pool-update.php
patch
|
blob
|
history
diff --git
a/inc/autopurge.php
b/inc/autopurge.php
index 75bddcd86b15f2864ccb3d377222099beda077e1..8f2e72a208e683e053d724c893464283f701541a 100644
(file)
--- a/
inc/autopurge.php
+++ b/
inc/autopurge.php
@@
-38,7
+38,7
@@
if (!defined('__SECURITY')) {
} // END - if
// Load all includes
} // END - if
// Load all includes
-$INC_POOL = GET_DIR_AS_ARRAY(
PATH
."inc/autopurge/", "purge-");
+$INC_POOL = GET_DIR_AS_ARRAY(
constant('PATH')
."inc/autopurge/", "purge-");
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);
diff --git
a/inc/config.php
b/inc/config.php
index 5e6307bbd6ca4e426b69bab8c022228a141715c5..4cfa57bbbf36aee8a0d990951e82ed04981c2783 100644
(file)
--- a/
inc/config.php
+++ b/
inc/config.php
@@
-162,7
+162,7
@@
define('SSL_COOKIES', false);
define('ENABLE_BACKLINK', true);
// Connect to the MySQL database...
define('ENABLE_BACKLINK', true);
// Connect to the MySQL database...
-require(
PATH
."inc/mysql-connect.php");
+require(
constant('PATH')
."inc/mysql-connect.php");
//
?>
//
?>
diff --git
a/inc/db/lib-mysql3.php
b/inc/db/lib-mysql3.php
index 8d0ee5f467477c1b0700e9800f285203f611c026..b1850f4efa553eb7983d1ed102eefd3cd7a813ed 100644
(file)
--- a/
inc/db/lib-mysql3.php
+++ b/
inc/db/lib-mysql3.php
@@
-79,7
+79,7
@@
Query string:<br />
//
// Debugging stuff...
//
//
// Debugging stuff...
//
- $fp =
@fopen(PATH
."inc/cache/mysql.log", 'a') or mxchange_die("Cannot write mysql.log!");
+ $fp =
fopen(constant('PATH')
."inc/cache/mysql.log", 'a') or mxchange_die("Cannot write mysql.log!");
if (!isset($OK)) {
// Write first entry
fwrite($fp, "Module=".$GLOBALS['module']."\n");
if (!isset($OK)) {
// Write first entry
fwrite($fp, "Module=".$GLOBALS['module']."\n");
@@
-256,7
+256,7
@@
function SQL_QUERY_ESC ($qstring, $data, $file, $line, $run=true, $strip=true) {
//
// Debugging
//
//
// Debugging
//
- //* DEBUG: */ $fp = fopen(
PATH
."inc/cache/escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!");
+ //* DEBUG: */ $fp = fopen(
constant('PATH')
."inc/cache/escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!");
//* DEBUG: */ fwrite($fp, $file."(".$line."): ".str_replace("\r", "", str_replace("\n", " ", $eval))."\n");
//* DEBUG: */ fclose($fp);
//* DEBUG: */ fwrite($fp, $file."(".$line."): ".str_replace("\r", "", str_replace("\n", " ", $eval))."\n");
//* DEBUG: */ fclose($fp);
diff --git
a/inc/extensions/ext-sql_patches.php
b/inc/extensions/ext-sql_patches.php
index 3cc2446bf531d90328b48a9edc7f839408771e71..d849e757e321f6b45c768dd2709ffd946fc9def6 100644
(file)
--- a/
inc/extensions/ext-sql_patches.php
+++ b/
inc/extensions/ext-sql_patches.php
@@
-310,7
+310,7
@@
case "update": // Update an extension
case "0.2.4": // SQL queries for v0.2.4
$auto_type = "png"; // PNG image is the default
case "0.2.4": // SQL queries for v0.2.4
$auto_type = "png"; // PNG image is the default
- if ((
FILE_READABLE(PATH.
"theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) {
+ if ((
INCLUDE_READABLE(
"theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) {
// Switch to JPEG format
$auto_type = "jpg";
}
// Switch to JPEG format
$auto_type = "jpg";
}
diff --git
a/inc/functions.php
b/inc/functions.php
index 38612873b25b6a9be882b1929a991055823ea0c6..c5db673515ab429308bea018173048a8f4c41958 100644
(file)
--- a/
inc/functions.php
+++ b/
inc/functions.php
@@
-712,7
+712,7
@@
function GET_LANGUAGE() {
$ret = $cacheArray['language'];
} elseif (!empty($lang)) {
// Check if main language file does exist
$ret = $cacheArray['language'];
} elseif (!empty($lang)) {
// Check if main language file does exist
- if (FILE_READABLE(
PATH
."inc/language/".$lang.".php")) {
+ if (FILE_READABLE(
constant('PATH')
."inc/language/".$lang.".php")) {
// Okay found, so let's update cookies
SET_LANGUAGE($lang);
}
// Okay found, so let's update cookies
SET_LANGUAGE($lang);
}
@@
-1227,7
+1227,7
@@
function GEN_RANDOM_CODE($length, $code, $uid, $DATA="") {
if (!defined('_MAX')) define('_MAX', 15235);
// Build server string
if (!defined('_MAX')) define('_MAX', 15235);
// Build server string
- $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(
PATH
."inc/databases.php");
+ $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(
constant('PATH')
."inc/databases.php");
// Build key string
$keys = SITE_KEY.":".DATE_KEY;
// Build key string
$keys = SITE_KEY.":".DATE_KEY;
@@
-2033,7
+2033,7
@@
function generateHash ($plainText, $salt = "") {
// When the salt is empty build a new one, else use the first x configured characters as the salt
if (empty($salt)) {
// Build server string
// When the salt is empty build a new one, else use the first x configured characters as the salt
if (empty($salt)) {
// Build server string
- $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(
PATH
."inc/databases.php");
+ $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(
constant('PATH')
."inc/databases.php");
// Build key string
$keys = constant('SITE_KEY').":".constant('DATE_KEY').":".getConfig('secret_key').":".getConfig('file_hash').":".date("d-m-Y (l-F-T)", bigintval(getConfig('patch_ctime'))).":".getConfig('master_salt');
// Build key string
$keys = constant('SITE_KEY').":".constant('DATE_KEY').":".getConfig('secret_key').":".getConfig('file_hash').":".date("d-m-Y (l-F-T)", bigintval(getConfig('patch_ctime'))).":".getConfig('master_salt');
@@
-2400,7
+2400,7
@@
function DEBUG_LOG ($file, $line, $message, $force=true) {
// Is debug mode enabled?
if ((isBooleanConstantAndTrue('DEBUG_MODE')) || ($force === true)) {
// Log this message away
// Is debug mode enabled?
if ((isBooleanConstantAndTrue('DEBUG_MODE')) || ($force === true)) {
// Log this message away
- $fp = fopen(
PATH
."inc/cache/debug.log", 'a') or mxchange_die("Cannot write logfile debug.log!");
+ $fp = fopen(
constant('PATH')
."inc/cache/debug.log", 'a') or mxchange_die("Cannot write logfile debug.log!");
fwrite($fp, date("d.m.Y|H:i:s", time())."|".basename($file)."|".$line."|".strip_tags($message)."\n");
fclose($fp);
} // END - if
fwrite($fp, date("d.m.Y|H:i:s", time())."|".basename($file)."|".$line."|".strip_tags($message)."\n");
fclose($fp);
} // END - if
@@
-2457,7
+2457,7
@@
function RESET_ADD_INCLUDES () {
} // END - if
// Get more daily reset scripts
} // END - if
// Get more daily reset scripts
- $INC_POOL = GET_DIR_AS_ARRAY(
PATH
."inc/reset/", "reset_");
+ $INC_POOL = GET_DIR_AS_ARRAY(
constant('PATH')
."inc/reset/", "reset_");
// Update database
if (!defined('DEBUG_RESET')) UPDATE_CONFIG("last_update", time());
// Update database
if (!defined('DEBUG_RESET')) UPDATE_CONFIG("last_update", time());
@@
-2468,7
+2468,7
@@
function RESET_ADD_INCLUDES () {
// Has it changed?
if (getConfig('last_week') != $currWeek) {
// Include weekly reset scripts
// Has it changed?
if (getConfig('last_week') != $currWeek) {
// Include weekly reset scripts
- $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(
PATH
."inc/weekly/", "weekly_"));
+ $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(
constant('PATH')
."inc/weekly/", "weekly_"));
// Update config
if (!defined('DEBUG_WEEKLY')) UPDATE_CONFIG("last_week", $currWeek);
// Update config
if (!defined('DEBUG_WEEKLY')) UPDATE_CONFIG("last_week", $currWeek);
@@
-2480,7
+2480,7
@@
function RESET_ADD_INCLUDES () {
// Has it changed?
if (getConfig('last_month') != $currMonth) {
// Include monthly reset scripts
// Has it changed?
if (getConfig('last_month') != $currMonth) {
// Include monthly reset scripts
- $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(
PATH
."inc/monthly/", "monthly_"));
+ $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(
constant('PATH')
."inc/monthly/", "monthly_"));
// Update config
if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
// Update config
if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
diff --git
a/inc/load_cache.php
b/inc/load_cache.php
index 4e849ba4402108eb778629cd0d37c29295978d74..cc441d5d8b5002454823e85ce78d0ec24cd0f088 100644
(file)
--- a/
inc/load_cache.php
+++ b/
inc/load_cache.php
@@
-38,7
+38,7
@@
if (!defined('__SECURITY')) {
}
// Load more cache includes
}
// Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY(
PATH
."inc/loader/", "load_cache-");
+$INC_POOL = GET_DIR_AS_ARRAY(
constant('PATH')
."inc/loader/", "load_cache-");
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);
diff --git
a/inc/modules/admin.php
b/inc/modules/admin.php
index 5700828f82251fe6b848fe260527514ab830c442..2127e9f67b3943c75814d3e34cfcb7845b3291d7 100644
(file)
--- a/
inc/modules/admin.php
+++ b/
inc/modules/admin.php
@@
-68,7
+68,7
@@
if (!isBooleanConstantAndTrue('admin_registered')) {
switch ($ret)
{
case "done":
switch ($ret)
{
case "done":
- admin_WriteData(
PATH
."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
+ admin_WriteData(
constant('PATH')
."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
if (!constant('_FATAL')) {
// Registering is done
LOAD_URL("modules.php?module=admin&action=login®ister=done");
if (!constant('_FATAL')) {
// Registering is done
LOAD_URL("modules.php?module=admin&action=login®ister=done");
@@
-96,7
+96,7
@@
if (!isBooleanConstantAndTrue('admin_registered')) {
// Admin still not registered?
if (!isBooleanConstantAndTrue('admin_registered')) {
// Write to config that registration is done
// Admin still not registered?
if (!isBooleanConstantAndTrue('admin_registered')) {
// Write to config that registration is done
- admin_WriteData(
PATH
."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
+ admin_WriteData(
constant('PATH')
."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
// Load URL for login
LOAD_URL("modules.php?module=admin&action=login");
// Load URL for login
LOAD_URL("modules.php?module=admin&action=login");
@@
-347,7
+347,7
@@
if (!isBooleanConstantAndTrue('admin_registered')) {
if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', "OLD");
// Check for version and switch between old menu system and new "intelligent menu system"
if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', "OLD");
// Check for version and switch between old menu system and new "intelligent menu system"
- if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (
FILE_READABLE(PATH.
"inc/modules/admin/lasys-inc.php"))) {
+ if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (
INCLUDE_READABLE(
"inc/modules/admin/lasys-inc.php"))) {
// Default area is the entrance, of course
$area = "entrance";
// Default area is the entrance, of course
$area = "entrance";
diff --git
a/inc/modules/admin/overview-inc.php
b/inc/modules/admin/overview-inc.php
index 2ffdeee1f7d3c2b72692c2cd84957ede3b35d330..85d37c9740751a0548e819755567f7d3c44221f8 100644
(file)
--- a/
inc/modules/admin/overview-inc.php
+++ b/
inc/modules/admin/overview-inc.php
@@
-49,7
+49,7
@@
function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
$JOBS_DONE = true;
// Open the extension directory
$JOBS_DONE = true;
// Open the extension directory
- $handle = opendir(
PATH
."inc/extensions/") or mxchange_die("Cannot read extension directory!");
+ $handle = opendir(
constant('PATH')
."inc/extensions/") or mxchange_die("Cannot read extension directory!");
while ($file = readdir($handle)) {
// Is this file an extension?
if ((substr($file, 0, 4) == "ext-") && (substr($file, -4) == ".php")) {
while ($file = readdir($handle)) {
// Is this file an extension?
if ((substr($file, 0, 4) == "ext-") && (substr($file, -4) == ".php")) {
diff --git
a/inc/modules/admin/what-theme_import.php
b/inc/modules/admin/what-theme_import.php
index 045e925e2bb630f89d9d7a9b75727773edbf22fe..df118063b96f88e5eca1c0b6b987cdc35410ed37 100644
(file)
--- a/
inc/modules/admin/what-theme_import.php
+++ b/
inc/modules/admin/what-theme_import.php
@@
-90,7
+90,7
@@
$THEMES = array(
);
// Read directory "themes"
);
// Read directory "themes"
-$handle = opendir(
PATH
."theme/") or mxchange_die("Cannot read themes dir!");
+$handle = opendir(
constant('PATH')
."theme/") or mxchange_die("Cannot read themes dir!");
while ($dir = readdir($handle)) {
// Construct absolute theme.php file name
$INC = sprintf("theme/%s/theme.php", $dir);
while ($dir = readdir($handle)) {
// Construct absolute theme.php file name
$INC = sprintf("theme/%s/theme.php", $dir);
diff --git
a/inc/modules/guest/what-wernis_portal.php
b/inc/modules/guest/what-wernis_portal.php
index 3d801a5e8c80bea7740d27766f71df45b8fac896..c60a8f3f8e03f5e7a4501009af91ebb7f924a81c 100644
(file)
--- a/
inc/modules/guest/what-wernis_portal.php
+++ b/
inc/modules/guest/what-wernis_portal.php
@@
-49,7
+49,7
@@
ADD_DESCR("guest", __FILE__);
OUTPUT_HTML("<div style=\"padding-left: 10px; padding-right: 10px\">");
$rdf = new fase4_rdf();
$rdf->use_dynamic_display(false);
OUTPUT_HTML("<div style=\"padding-left: 10px; padding-right: 10px\">");
$rdf = new fase4_rdf();
$rdf->use_dynamic_display(false);
-$rdf->set_CacheDir(
PATH
."inc/cache/");
+$rdf->set_CacheDir(
constant('PATH')
."inc/cache/");
$rdf->set_salt(md5(SITE_KEY));
$rdf->set_max_item(10);
$rdf->set_Options(
$rdf->set_salt(md5(SITE_KEY));
$rdf->set_max_item(10);
$rdf->set_Options(
diff --git
a/inc/modules/member/what-themes.php
b/inc/modules/member/what-themes.php
index 990f2bedce3a11aa893d175b583b51d7986466b8..cf10a10eab7a7b62bc51f8190c313c2f87b8d108 100644
(file)
--- a/
inc/modules/member/what-themes.php
+++ b/
inc/modules/member/what-themes.php
@@
-71,7
+71,7
@@
$THEMES = array(
);
// Read directory "themes"
);
// Read directory "themes"
-$handle = opendir(
PATH
."theme/") or mxchange_die("Cannot read themes dir!");
+$handle = opendir(
constant('PATH')
."theme/") or mxchange_die("Cannot read themes dir!");
while ($entry = readdir($handle)) {
// Construct absolute theme.php file name
$INC = sprintf("theme/%s/theme.php", $entry);
while ($entry = readdir($handle)) {
// Construct absolute theme.php file name
$INC = sprintf("theme/%s/theme.php", $entry);
diff --git
a/inc/pool-update.php
b/inc/pool-update.php
index 32256682f5370933dbb4853696c23d9f8e04a4c5..93e986148ad7a6b01220de3b9790791d1705205e 100644
(file)
--- a/
inc/pool-update.php
+++ b/
inc/pool-update.php
@@
-47,7
+47,7
@@
if (defined('__DAILY_RESET')) {
$GLOBALS['pool_cnt'] = 0;
// Load more cache includes
$GLOBALS['pool_cnt'] = 0;
// Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY(
PATH
."inc/pool/", "pool-");
+$INC_POOL = GET_DIR_AS_ARRAY(
constant('PATH')
."inc/pool/", "pool-");
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);