mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 03:18:52 +00:00
[feature/template-engine] Rename is_absolute to phpbb_is_absolute.
PHPBB3-9726
This commit is contained in:
parent
ee203b4632
commit
e116561348
3 changed files with 4 additions and 4 deletions
|
@ -752,7 +752,7 @@ function phpbb_is_writable($file)
|
|||
* @param string $path Path to check absoluteness of
|
||||
* @return boolean
|
||||
*/
|
||||
function is_absolute($path)
|
||||
function phpbb_is_absolute($path)
|
||||
{
|
||||
return ($path[0] == '/' || (DIRECTORY_SEPARATOR == '\\' && preg_match('#^[a-z]:[/\\\]#i', $path))) ? true : false;
|
||||
}
|
||||
|
@ -772,7 +772,7 @@ function phpbb_own_realpath($path)
|
|||
$path_prefix = '';
|
||||
|
||||
// Determine what sort of path we have
|
||||
if (is_absolute($path))
|
||||
if (phpbb_is_absolute($path))
|
||||
{
|
||||
$absolute = true;
|
||||
|
||||
|
|
|
@ -526,7 +526,7 @@ class phpbb_template
|
|||
*/
|
||||
public function _php_include($filename)
|
||||
{
|
||||
if (is_absolute($filename))
|
||||
if (phpbb_is_absolute($filename))
|
||||
{
|
||||
$file = $filename;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case
|
|||
public function test_includephp_absolute()
|
||||
{
|
||||
$path_to_php = dirname(__FILE__) . '/templates/_dummy_include.php.inc';
|
||||
$this->assertTrue(is_absolute($path_to_php));
|
||||
$this->assertTrue(phpbb_is_absolute($path_to_php));
|
||||
$template_text = "Path is absolute.\n<!-- INCLUDEPHP $path_to_php -->";
|
||||
|
||||
$cache_dir = dirname($this->template->cachepath) . '/';
|
||||
|
|
Loading…
Add table
Reference in a new issue