summaryrefslogtreecommitdiff
path: root/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php
diff options
context:
space:
mode:
authorCiro Mattia Gonano <ciromattia@gmail.com>2013-09-11 15:56:48 +0200
committerCiro Mattia Gonano <ciromattia@gmail.com>2013-09-11 15:57:07 +0200
commit3069eaf35e833ffe4a1c1c7829dd7e168ae27420 (patch)
treed0c2e4d934cc34ba7d4232f759923b5a257dcb21 /buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php
parentb833247ce597ec26159b46c8dfbea7f1e265950b (diff)
Merge up to r3319
Diffstat (limited to 'buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php')
-rw-r--r--buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php62
1 files changed, 0 insertions, 62 deletions
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 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * assemble filepath of requested plugin
- *
- * @param string $type
- * @param string $name
- * @return string|false
- */
-function smarty_core_assemble_plugin_filepath($params, &$smarty)
-{
-
- $_plugin_filename = $params['type'] . '.' . $params['name'] . '.php';
- $_return = false;
-
- foreach ((array)$smarty->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: */
-
-?>