mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 17:27:16 +02:00
let's see if i can break something. :o
git-svn-id: file:///svn/phpbb/trunk@7830 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -121,7 +121,7 @@ class acm
|
||||
@include($this->cache_dir . $entry);
|
||||
if ($expired)
|
||||
{
|
||||
@unlink($this->cache_dir . $entry);
|
||||
$this->remove_file($this->cache_dir . $entry);
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
@@ -215,7 +215,7 @@ class acm
|
||||
continue;
|
||||
}
|
||||
|
||||
@unlink($this->cache_dir . $entry);
|
||||
$this->remove_file($this->cache_dir . $entry);
|
||||
}
|
||||
closedir($dir);
|
||||
|
||||
@@ -273,7 +273,7 @@ class acm
|
||||
|
||||
if ($found)
|
||||
{
|
||||
@unlink($this->cache_dir . $entry);
|
||||
$this->remove_file($this->cache_dir . $entry);
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
@@ -288,7 +288,7 @@ class acm
|
||||
|
||||
if ($var_name[0] == '_')
|
||||
{
|
||||
@unlink($this->cache_dir . 'data' . $var_name . ".$phpEx");
|
||||
$this->remove_file($this->cache_dir . 'data' . $var_name . ".$phpEx");
|
||||
}
|
||||
else if (isset($this->vars[$var_name]))
|
||||
{
|
||||
@@ -351,7 +351,7 @@ class acm
|
||||
}
|
||||
else if ($expired)
|
||||
{
|
||||
@unlink($this->cache_dir . 'sql_' . md5($query) . ".$phpEx");
|
||||
$this->remove_file($this->cache_dir . 'sql_' . md5($query) . ".$phpEx");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -461,6 +461,18 @@ class acm
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes/unlinks file
|
||||
*/
|
||||
function remove_file($filename)
|
||||
{
|
||||
if (!@unlink($filename))
|
||||
{
|
||||
// E_USER_ERROR - not using language entry - intended.
|
||||
trigger_error('Unable to remove files within ' . $this->cache_dir . '. Please check directory permissions.', E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -51,7 +51,7 @@ class acp_php_info
|
||||
$output = str_replace(array('class="e"', 'class="v"', 'class="h"', '<hr />', '<font', '</font>'), array('class="row1"', 'class="row2"', '', '', '<span', '</span>'), $output);
|
||||
|
||||
preg_match_all('#<div class="center">(.*)</div>#siU', $output, $output);
|
||||
$output = $output[1][0];
|
||||
$output = (!empty($output[1][0])) ? $output[1][0] : @$output[1];
|
||||
|
||||
$template->assign_var('PHPINFO', $output);
|
||||
}
|
||||
|
@@ -472,7 +472,7 @@ if (!function_exists('stripos'))
|
||||
|
||||
if (!function_exists('realpath'))
|
||||
{
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN' && !(bool) ini_get('safe_mode') && function_exists('shell_exec') && trim(`realpath .`))
|
||||
if (DIRECTORY_SEPARATOR != '\\' && !(bool) ini_get('safe_mode') && function_exists('shell_exec') && trim(`realpath .`))
|
||||
{
|
||||
/**
|
||||
* @author Chris Smith <chris@project-minerva.org>
|
||||
@@ -497,7 +497,7 @@ if (!function_exists('realpath'))
|
||||
*/
|
||||
function is_absolute($path)
|
||||
{
|
||||
return ($path[0] == '/' || (substr(PHP_OS, 0, 3) == 'WIN' && preg_match('#^[a-z]:/#i', $path))) ? true : false;
|
||||
return ($path[0] == '/' || (DIRECTORY_SEPARATOR == '\\' && preg_match('#^[a-z]:/#i', $path))) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3608,7 +3608,7 @@ function phpbb_checkdnsrr($host, $type = '')
|
||||
{
|
||||
$type = (!$type) ? 'MX' : $type;
|
||||
|
||||
if (strpos(PHP_OS, 'WIN') !== false)
|
||||
if (DIRECTORY_SEPARATOR == '\\')
|
||||
{
|
||||
if (!function_exists('exec'))
|
||||
{
|
||||
|
@@ -13,14 +13,7 @@
|
||||
*/
|
||||
function can_load_dll($dll)
|
||||
{
|
||||
global $suffix;
|
||||
|
||||
if (empty($suffix))
|
||||
{
|
||||
$suffix = (defined('PHP_OS') && strpos(strtolower(PHP_OS), 'win') === 0) ? 'dll' : 'so';
|
||||
}
|
||||
|
||||
return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && @dl($dll . ".$suffix")) ? true : false;
|
||||
return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && @dl($dll . '.' . PHP_SHLIB_SUFFIX)) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -52,7 +52,7 @@ class messenger
|
||||
$this->addresses['to'][$pos]['email'] = trim($address);
|
||||
|
||||
// If empty sendmail_path on windows, PHP changes the to line
|
||||
if (!$config['smtp_delivery'] && strpos(strtolower(PHP_OS), 'win') === 0)
|
||||
if (!$config['smtp_delivery'] && DIRECTORY_SEPARATOR == '\\')
|
||||
{
|
||||
$this->addresses['to'][$pos]['name'] = '';
|
||||
}
|
||||
|
@@ -2253,7 +2253,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
require_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
include("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
}
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error);
|
||||
|
Reference in New Issue
Block a user