mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
oh boy...
- Migrate code base to PHP 5.1+ git-svn-id: file:///svn/phpbb/trunk@8295 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -37,16 +37,16 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
class template_compile
|
||||
{
|
||||
var $template;
|
||||
private $template;
|
||||
|
||||
// Various storage arrays
|
||||
var $block_names = array();
|
||||
var $block_else_level = array();
|
||||
private $block_names = array();
|
||||
private $block_else_level = array();
|
||||
|
||||
/**
|
||||
* constuctor
|
||||
*/
|
||||
function template_compile(&$template)
|
||||
function __construct(template &$template)
|
||||
{
|
||||
$this->template = &$template;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ class template_compile
|
||||
* Load template source from file
|
||||
* @access private
|
||||
*/
|
||||
function _tpl_load_file($handle, $store_in_db = false)
|
||||
public function _tpl_load_file($handle, $store_in_db = false)
|
||||
{
|
||||
// Try and open template for read
|
||||
if (!file_exists($this->template->files[$handle]))
|
||||
@@ -91,7 +91,7 @@ class template_compile
|
||||
* the ones that exist in zend_language_scanner.l
|
||||
* @access private
|
||||
*/
|
||||
function remove_php_tags(&$code)
|
||||
private function remove_php_tags(&$code)
|
||||
{
|
||||
// This matches the information gathered from the internal PHP lexer
|
||||
$match = array(
|
||||
@@ -107,7 +107,7 @@ class template_compile
|
||||
* The all seeing all doing compile method. Parts are inspired by or directly from Smarty
|
||||
* @access private
|
||||
*/
|
||||
function compile($code, $no_echo = false, $echo_var = '')
|
||||
public function compile($code, $no_echo = false, $echo_var = '')
|
||||
{
|
||||
global $config;
|
||||
|
||||
@@ -232,7 +232,7 @@ class template_compile
|
||||
* Compile variables
|
||||
* @access private
|
||||
*/
|
||||
function compile_var_tags(&$text_blocks)
|
||||
private function compile_var_tags(&$text_blocks)
|
||||
{
|
||||
// change template varrefs into PHP varrefs
|
||||
$varrefs = array();
|
||||
@@ -274,7 +274,7 @@ class template_compile
|
||||
* Compile blocks
|
||||
* @access private
|
||||
*/
|
||||
function compile_tag_block($tag_args)
|
||||
private function compile_tag_block($tag_args)
|
||||
{
|
||||
$no_nesting = false;
|
||||
|
||||
@@ -379,7 +379,7 @@ class template_compile
|
||||
* some adaptions for our block level methods
|
||||
* @access private
|
||||
*/
|
||||
function compile_tag_if($tag_args, $elseif)
|
||||
private function compile_tag_if($tag_args, $elseif)
|
||||
{
|
||||
// Tokenize args for 'if' tag.
|
||||
preg_match_all('/(?:
|
||||
@@ -527,7 +527,7 @@ class template_compile
|
||||
* Compile DEFINE tags
|
||||
* @access private
|
||||
*/
|
||||
function compile_tag_define($tag_args, $op)
|
||||
private function compile_tag_define($tag_args, $op)
|
||||
{
|
||||
preg_match('#^((?:[a-z0-9\-_]+\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (\'?)([^\']*)(\'?))?$#', $tag_args, $match);
|
||||
|
||||
@@ -580,7 +580,7 @@ class template_compile
|
||||
* Compile INCLUDE tag
|
||||
* @access private
|
||||
*/
|
||||
function compile_tag_include($tag_args)
|
||||
private function compile_tag_include($tag_args)
|
||||
{
|
||||
return "\$this->_tpl_include('$tag_args');";
|
||||
}
|
||||
@@ -589,7 +589,7 @@ class template_compile
|
||||
* Compile INCLUDE_PHP tag
|
||||
* @access private
|
||||
*/
|
||||
function compile_tag_include_php($tag_args)
|
||||
private function compile_tag_include_php($tag_args)
|
||||
{
|
||||
return "include('" . $tag_args . "');";
|
||||
}
|
||||
@@ -599,7 +599,7 @@ class template_compile
|
||||
* This is from Smarty
|
||||
* @access private
|
||||
*/
|
||||
function _parse_is_expr($is_arg, $tokens)
|
||||
private function _parse_is_expr($is_arg, array $tokens)
|
||||
{
|
||||
$expr_end = 0;
|
||||
$negate_expr = false;
|
||||
@@ -670,7 +670,7 @@ class template_compile
|
||||
* NOTE: expects a trailing "." on the namespace.
|
||||
* @access private
|
||||
*/
|
||||
function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
|
||||
private function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
|
||||
{
|
||||
// Strip the trailing period.
|
||||
$namespace = substr($namespace, 0, -1);
|
||||
@@ -695,7 +695,7 @@ class template_compile
|
||||
* NOTE: does not expect a trailing "." on the blockname.
|
||||
* @access private
|
||||
*/
|
||||
function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
|
||||
private function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
|
||||
{
|
||||
// Get an array of the blocks involved.
|
||||
$blocks = explode('.', $blockname);
|
||||
@@ -733,7 +733,7 @@ class template_compile
|
||||
* Write compiled file to cache directory
|
||||
* @access private
|
||||
*/
|
||||
function compile_write($handle, $data)
|
||||
public function compile_write($handle, $data)
|
||||
{
|
||||
global $phpEx;
|
||||
|
||||
@@ -742,7 +742,7 @@ class template_compile
|
||||
if ($fp = @fopen($filename, 'wb'))
|
||||
{
|
||||
@flock($fp, LOCK_EX);
|
||||
@fwrite ($fp, $data);
|
||||
@fwrite($fp, $data);
|
||||
@flock($fp, LOCK_UN);
|
||||
@fclose($fp);
|
||||
|
||||
|
Reference in New Issue
Block a user