fix formatting

This commit is contained in:
monte.ohrt
2010-08-17 15:39:51 +00:00
parent ad921936b0
commit 21d507a5cb
97 changed files with 1357 additions and 1262 deletions

View File

@@ -760,6 +760,9 @@ class Smarty extends Smarty_Internal_Data {
}
}
/**
* Autoloader
*/
function smartyAutoload($class)
{
$_class = strtolower($class);
@@ -768,11 +771,16 @@ function smartyAutoload($class)
}
}
/**
* Smarty exception class
*/
Class SmartyException extends Exception {
}
/**
* Smarty compiler exception class
*/
Class SmartyCompilerException extends SmartyException {
}
?>

View File

@@ -24,4 +24,5 @@ function smarty_block_php($params, $content, $smarty, &$repeat, $template)
eval($content);
return '';
}
?>

View File

@@ -15,7 +15,7 @@
* or custom wrap/indent settings<br>
*
* @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat}
(Smarty online manual)
* (Smarty online manual)
* @param array $params parameters
* <pre>
* Params: style: string (email)

View File

@@ -5,7 +5,6 @@
* @subpackage PluginsFunction
*/
/**
* Smarty {counter} function plugin
*
@@ -74,4 +73,5 @@ function smarty_function_counter($params, $smarty)
return $retval;
}
?>

View File

@@ -1,6 +1,7 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
@@ -41,6 +42,7 @@
* @param Smarty
* @return string|null
*/
function smarty_function_cycle($params, $smarty)
{
static $cycle_vars;
@@ -100,4 +102,5 @@ function smarty_function_cycle($params, $smarty)
return $retval;
}
?>

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {fetch} plugin
*

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {html_checkboxes} function plugin
*

View File

@@ -17,7 +17,7 @@
* Output: <img src="/images/masthead.gif" width=400 height=23>
*
* @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image}
(Smarty online manual)
* (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @author credits to Duda <duda@big.hu>
* @version 1.0

View File

@@ -15,7 +15,7 @@
* the passed parameters
*
* @link http://smarty.php.net/manual/en/language.function.html.options.php {html_image}
(Smarty online manual)
* (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @param array $params parameters
* Input:<br>
@@ -29,7 +29,6 @@
* @return string
* @uses smarty_function_escape_special_chars()
*/
function smarty_function_html_options($params, $smarty, $template)
{
require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');

View File

@@ -22,7 +22,7 @@
* </pre>
*
* @link http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios}
(Smarty online manual)
* (Smarty online manual)
* @author Christopher Kvarme <christopher.kvarme@flashjab.com>
* @author credits to Monte Ohrt <monte at ohrt dot com>
* @version 1.0

View File

@@ -29,7 +29,7 @@
* of 0000-00-00 dates (cybot, boots)
*
* @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
(Smarty online manual)
* (Smarty online manual)
* @version 1.3.4
* @author Andrei Zmievski
* @author Monte Ohrt <monte at ohrt dot com>
@@ -330,4 +330,5 @@ function smarty_function_html_select_date($params, $smarty, $template)
return $html_result;
}
?>

View File

@@ -14,7 +14,7 @@
* Purpose: Prints the dropdowns for time selection
*
* @link http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time}
(Smarty online manual)
* (Smarty online manual)
* @author Roberto Berto <roberto@berto.net>
* @credits Monte Ohrt <monte AT ohrt DOT com>
* @param array $params parameters

View File

@@ -27,7 +27,7 @@
* @author credit to boots <boots dot smarty at yahoo dot com>
* @version 1.1
* @link http://smarty.php.net/manual/en/language.function.html.table.php {html_table}
(Smarty online manual)
* (Smarty online manual)
* @param array $params parameters
* Input:<br>
* - loop = array to loop through
@@ -173,4 +173,5 @@ function smarty_function_html_table_cycle($name, $var, $no)
return ($ret) ? ' ' . $ret : '';
}
?>

View File

@@ -26,7 +26,7 @@
* </pre>
*
* @link http://smarty.php.net/manual/en/language.function.mailto.php {mailto}
(Smarty online manual)
* (Smarty online manual)
* @version 1.2
* @author Monte Ohrt <monte at ohrt dot com>
* @author credits to Jason Sweat (added cc, bcc and subject functionality)

View File

@@ -7,7 +7,6 @@
* @subpackage PluginsFunction
*/
/**
* Smarty {math} function plugin
*
@@ -81,4 +80,5 @@ function smarty_function_math($params, $smarty, $template)
}
}
}
?>

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {popup} function plugin
*
@@ -115,4 +115,5 @@ function smarty_function_popup($params, $smarty, $template)
return $retval;
}
?>

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {popup_init} function plugin
*
@@ -20,6 +20,7 @@
* @param object $template template object
* @return string
*/
function smarty_function_popup_init($params, $smarty, $template)
{
$zindex = 1000;
@@ -35,4 +36,5 @@ function smarty_function_popup_init($params, $smarty, $template)
trigger_error("popup_init: missing src parameter",E_USER_WARNING);
}
}
?>

View File

@@ -1,5 +1,4 @@
<?php
/**
* Smarty plugin
*

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty regex_replace modifier plugin
*
@@ -42,4 +42,5 @@ function _smarty_regex_replace_check($search)
}
return $search;
}
?>

View File

@@ -1,7 +1,6 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/

View File

@@ -1,7 +1,6 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty cat modifier plugin
*

View File

@@ -35,4 +35,5 @@ function smarty_modifiercompiler_count_characters($params, $compiler)
return 'preg_match_all(\'/[^\s]/\',' . $params[0] . ', $tmp)';
}
}
?>

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty count_paragraphs modifier plugin
*
@@ -23,4 +23,5 @@ function smarty_modifiercompiler_count_paragraphs($params, $compiler)
// count \r or \n characters
return '(preg_match_all(\'#[\r\n]+#\', ' . $params[0] . ', $tmp)+1)';
}
?>

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty count_sentences modifier plugin
*

View File

@@ -5,7 +5,6 @@
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty indent modifier plugin
*
@@ -18,6 +17,7 @@
* @param array $params parameters
* @return string with compiled code
*/
function smarty_modifiercompiler_indent($params, $compiler)
{
if (!isset($params[1])) {

View File

@@ -1,7 +1,6 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
@@ -19,6 +18,7 @@
* @param array $params parameters
* @return string with compiled code
*/
function smarty_modifiercompiler_lower($params, $compiler)
{
if (function_exists('mb_strtolower')) {

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty noprint modifier plugin
*

View File

@@ -21,6 +21,7 @@
* @param array $params parameters
* @return string with compiled code
*/
function smarty_modifiercompiler_strip($params, $compiler)
{
if (!isset($params[1])) {

View File

@@ -18,6 +18,7 @@
* @param array $params parameters
* @return string with compiled code
*/
function smarty_modifiercompiler_strip_tags($params, $compiler)
{
if (!isset($params[1])) {

View File

@@ -1,6 +1,7 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFilter
*/

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty shared plugin
*
* @package Smarty
* @subpackage PluginsShared
*/
/**
* escape_special_chars common function
*
@@ -25,4 +25,5 @@ function smarty_function_escape_special_chars($string)
}
return $string;
}
?>

View File

@@ -1,11 +1,11 @@
<?php
/**
* Smarty shared plugin
*
* @package Smarty
* @subpackage PluginsShared
*/
/**
* Function: smarty_make_timestamp<br>
* Purpose: used by other smarty functions to make a timestamp
@@ -14,6 +14,7 @@
* @param string $string
* @return string
*/
function smarty_make_timestamp($string)
{
if(empty($string)) {
@@ -38,4 +39,5 @@ function smarty_make_timestamp($string)
return $time;
}
}
?>

View File

@@ -13,6 +13,7 @@
* @param object $ &$smarty Smarty object
* @return string filtered output
*/
function smarty_variablefilter_htmlspecialchars($source, $smarty)
{
return htmlspecialchars($source, ENT_QUOTES);

View File

@@ -9,6 +9,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Append Class
*/

View File

@@ -9,6 +9,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Assign Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Block Class
*/

View File

@@ -9,6 +9,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Function_Call Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Capture Class
*/

View File

@@ -9,6 +9,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Config Load Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Debug Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Eval Class
*/

View File

@@ -9,6 +9,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile extend Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile For Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Foreach Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Function Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile If Class
*/

View File

@@ -9,6 +9,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Include Class
*/

View File

@@ -9,6 +9,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Insert Class
*/

View File

@@ -9,6 +9,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Insert Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Ldelim Class
*/
@@ -29,4 +30,5 @@ class Smarty_Internal_Compile_Ldelim extends Smarty_Internal_CompileBase {
return $this->compiler->smarty->left_delimiter;
}
}
?>

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Nocache Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Block Plugin Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Function Plugin Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Modifier Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Object Block Function Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Object Function Class
*/
@@ -59,4 +60,5 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
return $output;
}
}
?>

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Print Expression Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Registered Block Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Registered Function Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile special Smarty Variable Class
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Rdelim Class
*/
@@ -29,4 +30,5 @@ class Smarty_Internal_Compile_Rdelim extends Smarty_Internal_CompileBase {
return $this->compiler->smarty->right_delimiter;
}
}
?>

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Section Class
*/
@@ -166,5 +167,4 @@ class Smarty_Internal_Compile_Sectionclose extends Smarty_Internal_CompileBase {
}
}
?>

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile While Class
*/
@@ -63,4 +64,5 @@ class Smarty_Internal_Compile_Whileclose extends Smarty_Internal_CompileBase {
return "<?php }?>";
}
}
?>

View File

@@ -10,6 +10,7 @@
* @subpackage Config
* @author Uwe Tews
*/
/**
* Main config file compiler class
*/

View File

@@ -7,6 +7,7 @@
* @subpackage Config
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Configfilelexer
*/
@@ -521,6 +522,6 @@ class Smarty_Internal_Configfilelexer
$this->yypopstate();
}
}
?>

View File

@@ -868,4 +868,5 @@ static public $yy_action = array(
} while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
}
}
?>

View File

@@ -9,6 +9,7 @@
* @subpackage Debug
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Debug Class
*/

View File

@@ -6,6 +6,7 @@
* @subpackage PluginsInternal
* @author Uwe Tews
*/
/**
* This class does call function defined with the {function} tag
*/

View File

@@ -9,6 +9,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Compile Insert Class
*/

View File

@@ -9,13 +9,14 @@
* @author Thue Kristensen
* @author Uwe Tews
*/
abstract class _smarty_parsetree {
abstract public function to_smarty_php();
}
/* A complete smarty tag. */
/**
* A complete smarty tag.
*/
class _smarty_tag extends _smarty_parsetree
{
public $parser;
@@ -42,7 +43,9 @@ class _smarty_tag extends _smarty_parsetree
}
}
/* Code fragment inside a tag. */
/**
* Code fragment inside a tag.
*/
class _smarty_code extends _smarty_parsetree {
public $parser;
public $data;
@@ -58,7 +61,9 @@ class _smarty_code extends _smarty_parsetree {
}
}
/* Double quoted string inside a tag. */
/**
* Double quoted string inside a tag.
*/
class _smarty_doublequoted extends _smarty_parsetree {
public $parser;
public $subtrees = Array();
@@ -113,7 +118,9 @@ class _smarty_doublequoted extends _smarty_parsetree {
}
}
/* Raw chars as part of a double quoted string. */
/**
* Raw chars as part of a double quoted string.
*/
class _smarty_dq_content extends _smarty_parsetree {
public $data;
function __construct($parser, $data)
@@ -127,7 +134,10 @@ class _smarty_dq_content extends _smarty_parsetree {
return '"' . $this->data . '"';
}
}
/* Template element */
/**
* Template element
*/
class _smarty_template_buffer extends _smarty_parsetree {
public $subtrees = Array();
function __construct($parser)
@@ -188,7 +198,10 @@ class _smarty_template_buffer extends _smarty_parsetree {
return $code;
}
}
/* template text */
/**
* template text
*/
class _smarty_text extends _smarty_parsetree {
public $data;
function __construct($parser, $data)
@@ -202,7 +215,10 @@ class _smarty_text extends _smarty_parsetree {
return $this->data;
}
}
/* template linebreaks */
/**
* template linebreaks
*/
class _smarty_linebreak extends _smarty_parsetree {
public $data;
function __construct($parser, $data)

View File

@@ -260,3 +260,5 @@ class Smarty_Internal_Register {
}
}
}
?>

View File

@@ -9,6 +9,7 @@
* @subpackage TemplateResources
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Resource Extends
*/
@@ -128,6 +129,10 @@ class Smarty_Internal_Resource_Extends {
}
// $_template->template_filepath = $saved_filepath;
}
/**
* saveBlockData
*/
protected function saveBlockData($block_content, $block_tag, $_filepath)
{
if (0 == preg_match("!(.?)(name=)(.*?)(?=(\s|{$this->_rdl}))!", $block_tag, $_match)) {

View File

@@ -9,6 +9,7 @@
* @subpackage TemplateResources
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Resource File
*/

View File

@@ -9,6 +9,7 @@
* @subpackage TemplateResources
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Resource PHP
*/
@@ -83,7 +84,6 @@ class Smarty_Internal_Resource_PHP {
}
}
/**
* Get filepath to compiled template
*

View File

@@ -9,10 +9,10 @@
* @subpackage TemplateResources
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Resource Registered
*/
class Smarty_Internal_Resource_Registered {
public function __construct($smarty)
{
@@ -68,6 +68,7 @@ class Smarty_Internal_Resource_Registered {
array($_template->resource_name, &$time_stamp, $this->smarty));
return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp;
}
/**
* Get timestamp to template source by type and name
*

View File

@@ -9,10 +9,10 @@
* @subpackage TemplateResources
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Resource Stream
*/
class Smarty_Internal_Resource_Stream {
public function __construct($smarty)
{

View File

@@ -9,10 +9,10 @@
* @subpackage TemplateResources
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Resource String
*/
class Smarty_Internal_Resource_String {
public function __construct($smarty)
{

View File

@@ -6,6 +6,7 @@
* @subpackage Security
* @author Uwe Tews
*/
/**
* This class contains all methods for security checking
*/
@@ -115,6 +116,7 @@ class Smarty_Internal_Security_Handler {
throw new SmartyException ("directory '{$_rp}' not allowed by security setting");
return false;
}
/**
* Check if directory of file resource is trusted.
*

View File

@@ -9,7 +9,9 @@
* @subpackage Compiler
* @author Uwe Tews
*/
require_once("smarty_internal_parsetree.php");
/**
* Class SmartyTemplateCompiler
*/

View File

@@ -8,6 +8,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Main compiler class
*/
@@ -403,5 +404,4 @@ class Smarty_Internal_TemplateCompilerBase {
throw new SmartyCompilerException($error_text);
}
}
?>

View File

@@ -7,6 +7,7 @@
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Templatelexer
*/

View File

@@ -159,3 +159,4 @@ class Smarty_Internal_Unregister {
}
}
?>

View File

@@ -274,3 +274,4 @@ class Smarty_Internal_Utility {
return true;
}
}
?>

View File

@@ -7,6 +7,7 @@
* @subpackage PluginsInternal
* @author Monte Ohrt
*/
/**
* Smarty Internal Write File Class
*/

View File

@@ -81,15 +81,15 @@ class Smarty_Security {
*/
public $streams = array('file');
/**
+ flag if constants can be accessed from template
* + flag if constants can be accessed from template
*/
public $allow_constants = true;
/**
+ flag if super globals can be accessed from template
* + flag if super globals can be accessed from template
*/
public $allow_super_globals = true;
/**
+ flag if {php} tag can be executed
* + flag if {php} tag can be executed
*/
public $allow_php_tag = false;
}