mirror of
https://github.com/friendica/friendica
synced 2025-04-26 18:30:11 +00:00
reverting tinymce changes, updating smarty to 3.1.19
This commit is contained in:
parent
5633e88aad
commit
0e1f8f6486
155 changed files with 13663 additions and 10784 deletions
|
@ -2,19 +2,19 @@
|
|||
/**
|
||||
* Smarty Internal Plugin CompileBase
|
||||
*
|
||||
* @package Smarty
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
* @author Uwe Tews
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class does extend all internal compile plugins
|
||||
*
|
||||
* @package Smarty
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
*/
|
||||
abstract class Smarty_Internal_CompileBase {
|
||||
|
||||
abstract class Smarty_Internal_CompileBase
|
||||
{
|
||||
/**
|
||||
* Array of names of required attribute required by tag
|
||||
*
|
||||
|
@ -43,15 +43,15 @@ abstract class Smarty_Internal_CompileBase {
|
|||
|
||||
/**
|
||||
* This function checks if the attributes passed are valid
|
||||
*
|
||||
* The attributes passed for the tag to compile are checked against the list of required and
|
||||
* optional attributes. Required attributes must be present. Optional attributes are check against
|
||||
* the corresponding list. The keyword '_any' specifies that any attribute will be accepted
|
||||
* as valid
|
||||
*
|
||||
* @param object $compiler compiler object
|
||||
* @param array $attributes attributes applied to the tag
|
||||
* @return array of mapped attributes for further processing
|
||||
* @param object $compiler compiler object
|
||||
* @param array $attributes attributes applied to the tag
|
||||
*
|
||||
* @return array of mapped attributes for further processing
|
||||
*/
|
||||
public function getAttributes($compiler, $attributes)
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ abstract class Smarty_Internal_CompileBase {
|
|||
if (in_array(trim($mixed, '\'"'), $this->option_flags)) {
|
||||
$_indexed_attr[trim($mixed, '\'"')] = true;
|
||||
// shorthand attribute ?
|
||||
} else if (isset($this->shorttag_order[$key])) {
|
||||
} elseif (isset($this->shorttag_order[$key])) {
|
||||
$_indexed_attr[$this->shorttag_order[$key]] = $mixed;
|
||||
} else {
|
||||
// too many shorthands
|
||||
|
@ -77,13 +77,13 @@ abstract class Smarty_Internal_CompileBase {
|
|||
if (in_array($kv['key'], $this->option_flags)) {
|
||||
if (is_bool($kv['value'])) {
|
||||
$_indexed_attr[$kv['key']] = $kv['value'];
|
||||
} else if (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) {
|
||||
} elseif (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) {
|
||||
if (trim($kv['value']) == 'true') {
|
||||
$_indexed_attr[$kv['key']] = true;
|
||||
} else {
|
||||
$_indexed_attr[$kv['key']] = false;
|
||||
}
|
||||
} else if (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) {
|
||||
} elseif (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) {
|
||||
if ($kv['value'] == 1) {
|
||||
$_indexed_attr[$kv['key']] = true;
|
||||
} else {
|
||||
|
@ -105,7 +105,7 @@ abstract class Smarty_Internal_CompileBase {
|
|||
$compiler->trigger_template_error("missing \"" . $attr . "\" attribute", $compiler->lex->taglineno);
|
||||
}
|
||||
}
|
||||
// check for unallowed attributes
|
||||
// check for not allowed attributes
|
||||
if ($this->optional_attributes != array('_any')) {
|
||||
$tmp_array = array_merge($this->required_attributes, $this->optional_attributes, $this->option_flags);
|
||||
foreach ($_indexed_attr as $key => $dummy) {
|
||||
|
@ -126,12 +126,11 @@ abstract class Smarty_Internal_CompileBase {
|
|||
|
||||
/**
|
||||
* Push opening tag name on stack
|
||||
*
|
||||
* Optionally additional data can be saved on stack
|
||||
*
|
||||
* @param object $compiler compiler object
|
||||
* @param string $openTag the opening tag's name
|
||||
* @param mixed $data optional data saved
|
||||
* @param object $compiler compiler object
|
||||
* @param string $openTag the opening tag's name
|
||||
* @param mixed $data optional data saved
|
||||
*/
|
||||
public function openTag($compiler, $openTag, $data = null)
|
||||
{
|
||||
|
@ -140,12 +139,12 @@ abstract class Smarty_Internal_CompileBase {
|
|||
|
||||
/**
|
||||
* Pop closing tag
|
||||
*
|
||||
* Raise an error if this stack-top doesn't match with expected opening tags
|
||||
*
|
||||
* @param object $compiler compiler object
|
||||
* @param array|string $expectedTag the expected opening tag names
|
||||
* @return mixed any type the opening tag's name or saved data
|
||||
* @param object $compiler compiler object
|
||||
* @param array|string $expectedTag the expected opening tag names
|
||||
*
|
||||
* @return mixed any type the opening tag's name or saved data
|
||||
*/
|
||||
public function closeTag($compiler, $expectedTag)
|
||||
{
|
||||
|
@ -163,14 +162,13 @@ abstract class Smarty_Internal_CompileBase {
|
|||
}
|
||||
}
|
||||
// wrong nesting of tags
|
||||
$compiler->trigger_template_error("unclosed {" . $_openTag . "} tag");
|
||||
$compiler->trigger_template_error("unclosed {$compiler->smarty->left_delimiter}" . $_openTag . "{$compiler->smarty->right_delimiter} tag");
|
||||
|
||||
return;
|
||||
}
|
||||
// wrong nesting of tags
|
||||
$compiler->trigger_template_error("unexpected closing tag", $compiler->lex->taglineno);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue