From 3069eaf35e833ffe4a1c1c7829dd7e168ae27420 Mon Sep 17 00:00:00 2001 From: Ciro Mattia Gonano Date: Wed, 11 Sep 2013 15:56:48 +0200 Subject: Merge up to r3319 --- .../libs/core/core.assemble_plugin_filepath.php | 62 ---------- .../libs/core/core.assign_smarty_interface.php | 43 ------- .../libs/core/core.create_dir_structure.php | 79 ------------- .../libs/core/core.display_debug_console.php | 60 ---------- .../libs/core/core.get_include_path.php | 44 -------- .../Smarty-2.6.0/libs/core/core.get_microtime.php | 23 ---- .../libs/core/core.get_php_resource.php | 80 ------------- .../Smarty-2.6.0/libs/core/core.is_secure.php | 59 ---------- .../Smarty-2.6.0/libs/core/core.is_trusted.php | 50 --------- .../Smarty-2.6.0/libs/core/core.load_plugins.php | 125 --------------------- .../libs/core/core.load_resource_plugin.php | 74 ------------ .../libs/core/core.process_cached_inserts.php | 71 ------------ .../libs/core/core.process_compiled_include.php | 32 ------ .../libs/core/core.read_cache_file.php | 111 ------------------ .../Smarty-2.6.0/libs/core/core.rm_auto.php | 71 ------------ .../Smarty-2.6.0/libs/core/core.rmdir.php | 55 --------- .../libs/core/core.run_insert_handler.php | 71 ------------ .../libs/core/core.smarty_include_php.php | 50 --------- .../libs/core/core.write_cache_file.php | 73 ------------ .../libs/core/core.write_compiled_include.php | 59 ---------- .../libs/core/core.write_compiled_resource.php | 37 ------ .../Smarty-2.6.0/libs/core/core.write_file.php | 48 -------- 22 files changed, 1377 deletions(-) delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assign_smarty_interface.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.create_dir_structure.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.display_debug_console.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_include_path.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_microtime.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_php_resource.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_secure.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_trusted.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.load_plugins.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.load_resource_plugin.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.process_cached_inserts.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.process_compiled_include.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.read_cache_file.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.rm_auto.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.rmdir.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.run_insert_handler.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.smarty_include_php.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_cache_file.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_resource.php delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_file.php (limited to 'buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core') diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php deleted file mode 100644 index ec44f8e4..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php +++ /dev/null @@ -1,62 +0,0 @@ -plugins_dir as $_plugin_dir) { - - $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename; - - // see if path is relative - if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) { - $_relative_paths[] = $_plugin_dir; - // relative path, see if it is in the SMARTY_DIR - if (@is_readable(SMARTY_DIR . $_plugin_filepath)) { - $_return = SMARTY_DIR . $_plugin_filepath; - break; - } - } - // try relative to cwd (or absolute) - if (@is_readable($_plugin_filepath)) { - $_return = $_plugin_filepath; - break; - } - } - - if($_return === false) { - // still not found, try PHP include_path - if(isset($_relative_paths)) { - foreach ((array)$_relative_paths as $_plugin_dir) { - - $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename; - - $_params = array('file_path' => $_plugin_filepath); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php'); - if(smarty_core_get_include_path($_params, $smarty)) { - return $_params['new_file_path']; - } - } - } - } - - return $_return; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assign_smarty_interface.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assign_smarty_interface.php deleted file mode 100644 index 7e65a73e..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assign_smarty_interface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * Name: assign_smarty_interface
- * Purpose: assign the $smarty interface variable - * @param array Format: null - * @param Smarty - */ -function smarty_core_assign_smarty_interface($params, &$smarty) -{ - if (isset($smarty->_smarty_vars) && isset($smarty->_smarty_vars['request'])) { - return; - } - - $_globals_map = array('g' => 'HTTP_GET_VARS', - 'p' => 'HTTP_POST_VARS', - 'c' => 'HTTP_COOKIE_VARS', - 's' => 'HTTP_SERVER_VARS', - 'e' => 'HTTP_ENV_VARS'); - - $_smarty_vars_request = array(); - - foreach (preg_split('!!', strtolower($smarty->request_vars_order)) as $_c) { - if (isset($_globals_map[$_c])) { - $_smarty_vars_request = array_merge($_smarty_vars_request, $GLOBALS[$_globals_map[$_c]]); - } - } - $_smarty_vars_request = @array_merge($_smarty_vars_request, $GLOBALS['HTTP_SESSION_VARS']); - - $smarty->_smarty_vars['request'] = $_smarty_vars_request; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.create_dir_structure.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.create_dir_structure.php deleted file mode 100644 index 999cf593..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.create_dir_structure.php +++ /dev/null @@ -1,79 +0,0 @@ -_dir_perms) && !is_dir($_new_dir)) { - $smarty->trigger_error("problem creating directory '" . $_new_dir . "'"); - return false; - } - $_new_dir .= '/'; - } - } -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.display_debug_console.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.display_debug_console.php deleted file mode 100644 index c509ff72..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.display_debug_console.php +++ /dev/null @@ -1,60 +0,0 @@ - - * Name: display_debug_console
- * Purpose: display the javascript debug console window - * @param array Format: null - * @param Smarty - */ -function smarty_core_display_debug_console($params, &$smarty) -{ - // we must force compile the debug template in case the environment - // changed between separate applications. - - if(empty($smarty->debug_tpl)) { - // set path to debug template from SMARTY_DIR - $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl'; - if($smarty->security && is_file($smarty->debug_tpl)) { - $smarty->secure_dir[] = dirname(realpath($smarty->debug_tpl)); - } - } - - $_ldelim_orig = $smarty->left_delimiter; - $_rdelim_orig = $smarty->right_delimiter; - - $smarty->left_delimiter = '{'; - $smarty->right_delimiter = '}'; - - $_compile_id_orig = $smarty->_compile_id; - $smarty->_compile_id = null; - - $_compile_path = $smarty->_get_compile_path($smarty->debug_tpl); - if ($smarty->_compile_resource($smarty->debug_tpl, $_compile_path)) - { - ob_start(); - $smarty->_include($_compile_path); - $_results = ob_get_contents(); - ob_end_clean(); - } else { - $_results = ''; - } - - $smarty->_compile_id = $_compile_id_orig; - - $smarty->left_delimiter = $_ldelim_orig; - $smarty->right_delimiter = $_rdelim_orig; - - return $_results; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_include_path.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_include_path.php deleted file mode 100644 index eb7188cd..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_include_path.php +++ /dev/null @@ -1,44 +0,0 @@ - diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_microtime.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_microtime.php deleted file mode 100644 index f1a28e04..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_microtime.php +++ /dev/null @@ -1,23 +0,0 @@ - diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_php_resource.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_php_resource.php deleted file mode 100644 index 8121acf8..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.get_php_resource.php +++ /dev/null @@ -1,80 +0,0 @@ -trusted_dir; - $smarty->_parse_resource_name($params, $smarty); - - /* - * Find out if the resource exists. - */ - - if ($params['resource_type'] == 'file') { - $_readable = false; - if(file_exists($params['resource_name']) && is_readable($params['resource_name'])) { - $_readable = true; - } else { - // test for file in include_path - $_params = array('file_path' => $params['resource_name']); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php'); - if(smarty_core_get_include_path($_params, $smarty)) { - $_include_path = $_params['new_file_path']; - $_readable = true; - } - } - } else if ($params['resource_type'] != 'file') { - $_template_source = null; - $_readable = is_callable($smarty->_plugins['resource'][$params['resource_type']][0][0]) - && call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][0], - array($params['resource_name'], &$_template_source, &$smarty)); - } - - /* - * Set the error function, depending on which class calls us. - */ - if (method_exists($smarty, '_syntax_error')) { - $_error_funcc = '_syntax_error'; - } else { - $_error_funcc = 'trigger_error'; - } - - if ($_readable) { - if ($smarty->security) { - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_trusted.php'); - if (!smarty_core_is_trusted($params, $smarty)) { - $smarty->$_error_funcc('(secure mode) ' . $params['resource_type'] . ':' . $params['resource_name'] . ' is not trusted'); - return false; - } - } - } else { - $smarty->$_error_funcc($params['resource_type'] . ':' . $params['resource_name'] . ' is not readable'); - return false; - } - - if ($params['resource_type'] == 'file') { - $params['php_resource'] = $params['resource_name']; - } else { - $params['php_resource'] = $_template_source; - } - return true; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_secure.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_secure.php deleted file mode 100644 index 877886b8..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_secure.php +++ /dev/null @@ -1,59 +0,0 @@ -security || $smarty->security_settings['INCLUDE_ANY']) { - return true; - } - - $_smarty_secure = false; - if ($params['resource_type'] == 'file') { - if($check_template_dir) { - if (!in_array($smarty->template_dir, $smarty->secure_dir)) - // add template_dir to secure_dir array - array_unshift($smarty->secure_dir, $smarty->template_dir); - $check_template_dir = false; - } - if (!empty($smarty->secure_dir)) { - $_rp = realpath($params['resource_name']); - foreach ((array)$smarty->secure_dir as $curr_dir) { - if ( !empty($curr_dir) && is_readable ($curr_dir)) { - $_cd = realpath($curr_dir); - if (strncmp($_rp, $_cd, strlen($_cd)) == 0 - && $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) { - $_smarty_secure = true; - break; - } - } - } - } - } else { - // resource is not on local file system - $_smarty_secure = call_user_func_array( - $smarty->_plugins['resource'][$params['resource_type']][0][2], - array($params['resource_name'], &$_smarty_secure, &$smarty)); - } - - return $_smarty_secure; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_trusted.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_trusted.php deleted file mode 100644 index 452e8dc6..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_trusted.php +++ /dev/null @@ -1,50 +0,0 @@ -trusted_dir)) { - $_rp = realpath($params['resource_name']); - foreach ((array)$smarty->trusted_dir as $curr_dir) { - if (!empty($curr_dir) && is_readable ($curr_dir)) { - $_cd = realpath($curr_dir); - if (strncmp($_rp, $_cd, strlen($_cd)) == 0 - && $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) { - $_smarty_trusted = true; - break; - } - } - } - } - - } else { - // resource is not on local file system - $_smarty_trusted = call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][3], - array($params['resource_name'], $smarty)); - } - - return $_smarty_trusted; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.load_plugins.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.load_plugins.php deleted file mode 100644 index 6db1dc51..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.load_plugins.php +++ /dev/null @@ -1,125 +0,0 @@ -_plugins[$_type][$_name]; - - /* - * We do not load plugin more than once for each instance of Smarty. - * The following code checks for that. The plugin can also be - * registered dynamically at runtime, in which case template file - * and line number will be unknown, so we fill them in. - * - * The final element of the info array is a flag that indicates - * whether the dynamically registered plugin function has been - * checked for existence yet or not. - */ - if (isset($_plugin)) { - if (empty($_plugin[3])) { - if (!is_callable($_plugin[0])) { - $smarty->_trigger_fatal_error("[plugin] $_type '$_name' is not implemented", $_tpl_file, $_tpl_line, __FILE__, __LINE__); - } else { - $_plugin[1] = $_tpl_file; - $_plugin[2] = $_tpl_line; - $_plugin[3] = true; - if (!isset($_plugin[4])) $_plugin[4] = true; /* cacheable */ - } - } - continue; - } else if ($_type == 'insert') { - /* - * For backwards compatibility, we check for insert functions in - * the symbol table before trying to load them as a plugin. - */ - $_plugin_func = 'insert_' . $_name; - if (function_exists($_plugin_func)) { - $_plugin = array($_plugin_func, $_tpl_file, $_tpl_line, true, false); - continue; - } - } - - $_plugin_file = $smarty->_get_plugin_filepath($_type, $_name); - - if (! $_found = ($_plugin_file != false)) { - $_message = "could not load plugin file '$_type.$_name.php'\n"; - } - - /* - * If plugin file is found, it -must- provide the properly named - * plugin function. In case it doesn't, simply output the error and - * do not fall back on any other method. - */ - if ($_found) { - include_once $_plugin_file; - - $_plugin_func = 'smarty_' . $_type . '_' . $_name; - if (!function_exists($_plugin_func)) { - $smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", $_tpl_file, $_tpl_line, __FILE__, __LINE__); - continue; - } - } - /* - * In case of insert plugins, their code may be loaded later via - * 'script' attribute. - */ - else if ($_type == 'insert' && $_delayed_loading) { - $_plugin_func = 'smarty_' . $_type . '_' . $_name; - $_found = true; - } - - /* - * Plugin specific processing and error checking. - */ - if (!$_found) { - if ($_type == 'modifier') { - /* - * In case modifier falls back on using PHP functions - * directly, we only allow those specified in the security - * context. - */ - if ($smarty->security && !in_array($_name, $smarty->security_settings['MODIFIER_FUNCS'])) { - $_message = "(secure mode) modifier '$_name' is not allowed"; - } else { - if (!function_exists($_name)) { - $_message = "modifier '$_name' is not implemented"; - } else { - $_plugin_func = $_name; - $_found = true; - } - } - } else if ($_type == 'function') { - /* - * This is a catch-all situation. - */ - $_message = "unknown tag - '$_name'"; - } - } - - if ($_found) { - $smarty->_plugins[$_type][$_name] = array($_plugin_func, $_tpl_file, $_tpl_line, true, true); - } else { - // output error - $smarty->_trigger_fatal_error('[plugin] ' . $_message, $_tpl_file, $_tpl_line, __FILE__, __LINE__); - } - } -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.load_resource_plugin.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.load_resource_plugin.php deleted file mode 100644 index a7d37d1a..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.load_resource_plugin.php +++ /dev/null @@ -1,74 +0,0 @@ -_plugins['resource'][$params['type']]; - if (isset($_plugin)) { - if (!$_plugin[1] && count($_plugin[0])) { - $_plugin[1] = true; - foreach ($_plugin[0] as $_plugin_func) { - if (!is_callable($_plugin_func)) { - $_plugin[1] = false; - break; - } - } - } - - if (!$_plugin[1]) { - $smarty->_trigger_fatal_error("[plugin] resource '" . $params['type'] . "' is not implemented", null, null, __FILE__, __LINE__); - } - - return; - } - - $_plugin_file = $smarty->_get_plugin_filepath('resource', $params['type']); - $_found = ($_plugin_file != false); - - if ($_found) { /* - * If the plugin file is found, it -must- provide the properly named - * plugin functions. - */ - include_once($_plugin_file); - - /* - * Locate functions that we require the plugin to provide. - */ - $_resource_ops = array('source', 'timestamp', 'secure', 'trusted'); - $_resource_funcs = array(); - foreach ($_resource_ops as $_op) { - $_plugin_func = 'smarty_resource_' . $params['type'] . '_' . $_op; - if (!function_exists($_plugin_func)) { - $smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", null, null, __FILE__, __LINE__); - return; - } else { - $_resource_funcs[] = $_plugin_func; - } - } - - $smarty->_plugins['resource'][$params['type']] = array($_resource_funcs, true); - } -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.process_cached_inserts.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.process_cached_inserts.php deleted file mode 100644 index 0e368fdd..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.process_cached_inserts.php +++ /dev/null @@ -1,71 +0,0 @@ -_smarty_md5.'{insert_cache (.*)}'.$smarty->_smarty_md5.'!Uis', - $params['results'], $match); - list($cached_inserts, $insert_args) = $match; - - for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) { - if ($smarty->debugging) { - $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); - $debug_start_time = smarty_core_get_microtime($_params, $smarty); - } - - $args = unserialize($insert_args[$i]); - $name = $args['name']; - - if (isset($args['script'])) { - $_params = array('resource_name' => $smarty->_dequote($args['script'])); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php'); - if(!smarty_core_get_php_resource($_params, $smarty)) { - return false; - } - $resource_type = $_params['resource_type']; - $php_resource = $_params['php_resource']; - - - if ($resource_type == 'file') { - $smarty->_include($php_resource, true); - } else { - $smarty->_eval($php_resource); - } - } - - $function_name = $smarty->_plugins['insert'][$name][0]; - if (empty($args['assign'])) { - $replace = $function_name($args, $smarty); - } else { - $smarty->assign($args['assign'], $function_name($args, $smarty)); - $replace = ''; - } - - $params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']); - if ($smarty->debugging) { - $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); - $smarty->_smarty_debug_info[] = array('type' => 'insert', - 'filename' => 'insert_'.$name, - 'depth' => $smarty->_inclusion_depth, - 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $debug_start_time); - } - } - - return $params['results']; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.process_compiled_include.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.process_compiled_include.php deleted file mode 100644 index 3e1d4c15..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.process_compiled_include.php +++ /dev/null @@ -1,32 +0,0 @@ -_cache_including; - $smarty->_cache_including = true; - - $_return = $params['results']; - foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) { - $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s', - array(&$smarty, '_process_compiled_include_callback'), - $_return); - } - $smarty->_cache_including = $_cache_including; - return $_return; -} - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.read_cache_file.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.read_cache_file.php deleted file mode 100644 index 2ab42811..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.read_cache_file.php +++ /dev/null @@ -1,111 +0,0 @@ -force_compile) { - // force compile enabled, always regenerate - return false; - } - - if (isset($content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']])) { - list($params['results'], $smarty->_cache_info) = $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']]; - return true; - } - - if (!empty($smarty->cache_handler_func)) { - // use cache_handler function - call_user_func_array($smarty->cache_handler_func, - array('read', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null)); - } else { - // use local cache file - $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']); - $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id); - $params['results'] = $smarty->_read_file($_cache_file); - } - - if (empty($params['results'])) { - // nothing to parse (error?), regenerate cache - return false; - } - - $cache_split = explode("\n", $params['results'], 2); - $cache_header = $cache_split[0]; - - $_cache_info = unserialize($cache_header); - - if ($smarty->caching == 2 && isset ($_cache_info['expires'])){ - // caching by expiration time - if ($_cache_info['expires'] > -1 && (time() > $_cache_info['expires'])) { - // cache expired, regenerate - return false; - } - } else { - // caching by lifetime - if ($smarty->cache_lifetime > -1 && (time() - $_cache_info['timestamp'] > $smarty->cache_lifetime)) { - // cache expired, regenerate - return false; - } - } - - if ($smarty->compile_check) { - $_params = array('get_source' => false, 'quiet'=>true); - foreach (array_keys($_cache_info['template']) as $_template_dep) { - $_params['resource_name'] = $_template_dep; - if (!$smarty->_fetch_resource_info($_params) || $_cache_info['timestamp'] < $_params['resource_timestamp']) { - // template file has changed, regenerate cache - return false; - } - } - - if (isset($_cache_info['config'])) { - $_params = array('resource_base_path' => $smarty->config_dir, 'get_source' => false, 'quiet'=>true); - foreach (array_keys($_cache_info['config']) as $_config_dep) { - $_params['resource_name'] = $_config_dep; - if (!$smarty->_fetch_resource_info($_params) || $_cache_info['timestamp'] < $_params['resource_timestamp']) { - // config file has changed, regenerate cache - return false; - } - } - } - } - - foreach ($_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) { - if (empty($smarty->_cache_serials[$_include_file_path])) { - $smarty->_include($_include_file_path, true); - } - - if ($smarty->_cache_serials[$_include_file_path] != $_cache_serial) { - /* regenerate */ - return false; - } - } - $params['results'] = $cache_split[1]; - $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']] = array($params['results'], $_cache_info); - - $smarty->_cache_info = $_cache_info; - return true; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.rm_auto.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.rm_auto.php deleted file mode 100644 index b7cdaf8c..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.rm_auto.php +++ /dev/null @@ -1,71 +0,0 @@ - $params['auto_base'], - 'level' => 0, - 'exp_time' => $params['exp_time'] - ); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rmdir.php'); - $_res = smarty_core_rmdir($_params, $smarty); - } else { - $_tname = $smarty->_get_auto_filename($params['auto_base'], $params['auto_source'], $params['auto_id']); - - if(isset($params['auto_source'])) { - if (isset($params['extensions'])) { - $_res = false; - foreach ((array)$params['extensions'] as $_extension) - $_res |= $smarty->_unlink($_tname.$_extension, $params['exp_time']); - } else { - $_res = $smarty->_unlink($_tname, $params['exp_time']); - } - } elseif ($smarty->use_sub_dirs) { - $_params = array( - 'dirname' => $_tname, - 'level' => 1, - 'exp_time' => $params['exp_time'] - ); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rmdir.php'); - $_res = smarty_core_rmdir($_params, $smarty); - } else { - // remove matching file names - $_handle = opendir($params['auto_base']); - $_res = true; - while (false !== ($_filename = readdir($_handle))) { - if($_filename == '.' || $_filename == '..') { - continue; - } elseif (substr($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, 0, strlen($_tname)) == $_tname) { - $_res &= (bool)$smarty->_unlink($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, $params['exp_time']); - } - } - } - } - - return $_res; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.rmdir.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.rmdir.php deleted file mode 100644 index 38df822c..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.rmdir.php +++ /dev/null @@ -1,55 +0,0 @@ - keep root) - * WARNING: no tests, it will try to remove what you tell it! - * - * @param string $dirname - * @param integer $level - * @param integer $exp_time - * @return boolean - */ - -// $dirname, $level = 1, $exp_time = null - -function smarty_core_rmdir($params, &$smarty) -{ - if(!isset($params['level'])) { $params['level'] = 1; } - if(!isset($params['exp_time'])) { $params['exp_time'] = null; } - - if($_handle = @opendir($params['dirname'])) { - - while (false !== ($_entry = readdir($_handle))) { - if ($_entry != '.' && $_entry != '..') { - if (@is_dir($params['dirname'] . DIRECTORY_SEPARATOR . $_entry)) { - $_params = array( - 'dirname' => $params['dirname'] . DIRECTORY_SEPARATOR . $_entry, - 'level' => $params['level'] + 1, - 'exp_time' => $params['exp_time'] - ); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rmdir.php'); - smarty_core_rmdir($_params, $smarty); - } - else { - $smarty->_unlink($params['dirname'] . DIRECTORY_SEPARATOR . $_entry, $params['exp_time']); - } - } - } - closedir($_handle); - } - - if ($params['level']) { - return @rmdir($params['dirname']); - } - return (bool)$_handle; - -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.run_insert_handler.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.run_insert_handler.php deleted file mode 100644 index aa391ab3..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.run_insert_handler.php +++ /dev/null @@ -1,71 +0,0 @@ -debugging) { - $_params = array(); - $_debug_start_time = smarty_core_get_microtime($_params, $smarty); - } - - if ($smarty->caching) { - $_arg_string = serialize($params['args']); - $_name = $params['args']['name']; - if (!isset($smarty->_cache_info['insert_tags'][$_name])) { - $smarty->_cache_info['insert_tags'][$_name] = array('insert', - $_name, - $smarty->_plugins['insert'][$_name][1], - $smarty->_plugins['insert'][$_name][2], - !empty($params['args']['script']) ? true : false); - } - return $smarty->_smarty_md5."{insert_cache $_arg_string}".$smarty->_smarty_md5; - } else { - if (isset($params['args']['script'])) { - $_params = array('resource_name' => $smarty->_dequote($params['args']['script'])); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php'); - if(!smarty_core_get_php_resource($_params, $smarty)) { - return false; - } - - if ($_params['resource_type'] == 'file') { - $smarty->_include($_params['php_resource'], true); - } else { - $smarty->_eval($_params['php_resource']); - } - unset($params['args']['script']); - } - - $_funcname = $smarty->_plugins['insert'][$params['args']['name']][0]; - $_content = $_funcname($params['args'], $smarty); - if ($smarty->debugging) { - $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); - $smarty->_smarty_debug_info[] = array('type' => 'insert', - 'filename' => 'insert_'.$params['args']['name'], - 'depth' => $smarty->_inclusion_depth, - 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $_debug_start_time); - } - - if (!empty($params['args']["assign"])) { - $smarty->assign($params['args']["assign"], $_content); - } else { - return $_content; - } - } -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.smarty_include_php.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.smarty_include_php.php deleted file mode 100644 index 4b316480..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.smarty_include_php.php +++ /dev/null @@ -1,50 +0,0 @@ - $params['smarty_file']); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php'); - smarty_core_get_php_resource($_params, $smarty); - $_smarty_resource_type = $_params['resource_type']; - $_smarty_php_resource = $_params['php_resource']; - - if (!empty($params['smarty_assign'])) { - ob_start(); - if ($_smarty_resource_type == 'file') { - $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']); - } else { - $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']); - } - $smarty->assign($params['smarty_assign'], ob_get_contents()); - ob_end_clean(); - } else { - if ($_smarty_resource_type == 'file') { - $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']); - } else { - $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']); - } - } -} - - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_cache_file.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_cache_file.php deleted file mode 100644 index 7429ad98..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_cache_file.php +++ /dev/null @@ -1,73 +0,0 @@ -_cache_info['timestamp'] = time(); - if ($smarty->cache_lifetime > -1){ - // expiration set - $smarty->_cache_info['expires'] = $smarty->_cache_info['timestamp'] + $smarty->cache_lifetime; - } else { - // cache will never expire - $smarty->_cache_info['expires'] = -1; - } - - // collapse {nocache...}-tags - $params['results'] = preg_replace('!((\{nocache\:([0-9a-f]{32})#(\d+)\})' - .'.*' - .'{/nocache\:\\3#\\4\})!Us' - ,'\\2' - ,$params['results']); - $smarty->_cache_info['cache_serials'] = $smarty->_cache_serials; - - // prepend the cache header info into cache file - $params['results'] = serialize($smarty->_cache_info)."\n".$params['results']; - - if (!empty($smarty->cache_handler_func)) { - // use cache_handler function - call_user_func_array($smarty->cache_handler_func, - array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null)); - } else { - // use local cache file - - if(!@is_writable($smarty->cache_dir)) { - // cache_dir not writable, see if it exists - if(!@is_dir($smarty->cache_dir)) { - $smarty->trigger_error('the $cache_dir \'' . $smarty->cache_dir . '\' does not exist, or is not a directory.', E_USER_ERROR); - return false; - } - $smarty->trigger_error('unable to write to $cache_dir \'' . realpath($smarty->cache_dir) . '\'. Be sure $cache_dir is writable by the web server user.', E_USER_ERROR); - return false; - } - - $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']); - $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id); - $_params = array('filename' => $_cache_file, 'contents' => $params['results'], 'create_dirs' => true); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php'); - smarty_core_write_file($_params, $smarty); - return true; - } -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php deleted file mode 100644 index 9c6a4919..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php +++ /dev/null @@ -1,59 +0,0 @@ -caching\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\';\}'; - $_tag_end = 'if \(\$this->caching\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\';\}'; - - preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us', - $params['compiled_content'], $_match_source, PREG_SET_ORDER); - - // no nocache-parts found: done - if (count($_match_source)==0) return; - - // convert the matched php-code to functions - $_include_compiled = "_cache_serials[$_compile_path] = $params['cache_serial']; - $_include_compiled .= "\$this->_cache_serials['".$_compile_path."'] = '".$params['cache_serial']."';\n\n?>"; - - $_include_compiled .= $params['plugins_code']; - $_include_compiled .= "\n"; - - $_params = array('filename' => $_compile_path, - 'contents' => $_include_compiled, 'create_dirs' => true); - - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php'); - smarty_core_write_file($_params, $smarty); - return true; -} - - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_resource.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_resource.php deleted file mode 100644 index 09b50d3b..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_resource.php +++ /dev/null @@ -1,37 +0,0 @@ -compile_dir)) { - // compile_dir not writable, see if it exists - if(!@is_dir($smarty->compile_dir)) { - $smarty->trigger_error('the $compile_dir \'' . $smarty->compile_dir . '\' does not exist, or is not a directory.', E_USER_ERROR); - return false; - } - $smarty->trigger_error('unable to write to $compile_dir \'' . realpath($smarty->compile_dir) . '\'. Be sure $compile_dir is writable by the web server user.', E_USER_ERROR); - return false; - } - - $_params = array('filename' => $params['compile_path'], 'contents' => $params['compiled_content'], 'create_dirs' => true); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php'); - smarty_core_write_file($_params, $smarty); - touch($params['compile_path'], $params['resource_timestamp']); - return true; -} - -/* vim: set expandtab: */ - -?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_file.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_file.php deleted file mode 100644 index c92454d4..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_file.php +++ /dev/null @@ -1,48 +0,0 @@ - $_dirname); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.create_dir_structure.php'); - smarty_core_create_dir_structure($_params, $smarty); - } - - // write to tmp file, then rename it to avoid - // file locking race condition - $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid(''); - - if (!($fd = @fopen($_tmp_file, 'w'))) { - $smarty->trigger_error("problem writing temporary file '$_tmp_file'"); - return false; - } - - fwrite($fd, $params['contents']); - fclose($fd); - if(file_exists($params['filename'])) { - @unlink($params['filename']); - } - @rename($_tmp_file, $params['filename']); - @chmod($params['filename'], $smarty->_file_perms); - - return true; -} - -/* vim: set expandtab: */ - -?> -- cgit v1.2.3